The toolbar sort buttons sort the data according to the values in the same column as the current cell--the cell with the black border. When you select cells from left to right, the current cell ends up in the rightmost column, and Calc sorts according to that.
So, to avoid that, you can select the cells from right to left, leaving the current cell in the leftmost column, or, if your data are in a neat, rectangular table with no gaps, you can click in any cell of the table, without selecting any other cells, and click the sort button. In this situation, Calc will automatically locate all the data and sort it by the column with the current cell.
This is fine for the occasional quick sort, but for a sorting operation you need to repeat, the best approach uses another step: select the cells with the data, then do Data > Define Range. Give it a name, check the options, and OK. Now, Calc will remember the data range and all the sort options and criteria. Anytime you click one of the sort buttons on the toolbar, Calc will repeat the ordering configured for that area of the sheet.
AOO 4 • Linux • Fedora 17