1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SC_SORTPARAM_HXX 25 #define SC_SORTPARAM_HXX 26 27 #include "address.hxx" 28 #include <tools/string.hxx> 29 #include <tools/solar.h> 30 #include <com/sun/star/lang/Locale.hpp> 31 #include "scdllapi.h" 32 33 #define MAXSORT 3 34 35 36 struct ScSubTotalParam; 37 struct ScQueryParam; 38 39 struct SC_DLLPUBLIC ScSortParam 40 { 41 SCCOL nCol1; 42 SCROW nRow1; 43 SCCOL nCol2; 44 SCROW nRow2; 45 sal_Bool bHasHeader; 46 sal_Bool bByRow; 47 sal_Bool bCaseSens; 48 sal_Bool bUserDef; 49 sal_uInt16 nUserIndex; 50 sal_Bool bIncludePattern; 51 sal_Bool bInplace; 52 SCTAB nDestTab; 53 SCCOL nDestCol; 54 SCROW nDestRow; 55 sal_Bool bDoSort[MAXSORT]; 56 SCCOLROW nField[MAXSORT]; 57 sal_Bool bAscending[MAXSORT]; 58 ::com::sun::star::lang::Locale aCollatorLocale; 59 String aCollatorAlgorithm; 60 sal_uInt16 nCompatHeader; 61 62 ScSortParam(); 63 ScSortParam( const ScSortParam& r ); 64 /// SubTotals sort 65 ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ); 66 /// TopTen sort 67 ScSortParam( const ScQueryParam&, SCCOL nCol ); 68 69 ScSortParam& operator= ( const ScSortParam& r ); 70 sal_Bool operator== ( const ScSortParam& rOther ) const; 71 void Clear (); 72 73 void MoveToDest(); 74 }; 75 76 77 #endif // SC_SORTPARAM_HXX 78