bump product version to 4.1.6.2
[LibreOffice.git] / sc / inc / sortparam.hxx
bloba4c6f65e2493a577f41035cd65db0f003f822097
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_SORTPARAM_HXX
21 #define SC_SORTPARAM_HXX
23 #define DEFSORT 3
25 #include <vector>
27 #include "address.hxx"
28 #include <tools/solar.h>
29 #include <com/sun/star/lang/Locale.hpp>
30 #include "scdllapi.h"
32 struct ScSubTotalParam;
33 struct ScQueryParam;
35 struct ScSortKeyState
37 bool bDoSort;
38 SCCOLROW nField;
39 bool bAscending;
42 typedef ::std::vector<ScSortKeyState> ScSortKeyStateVec;
44 struct SC_DLLPUBLIC ScSortParam
46 SCCOL nCol1;
47 SCROW nRow1;
48 SCCOL nCol2;
49 SCROW nRow2;
50 sal_uInt16 nUserIndex;
51 bool bHasHeader;
52 bool bByRow;
53 bool bCaseSens;
54 bool bNaturalSort;
55 bool bUserDef;
56 bool bIncludePattern;
57 bool bInplace;
58 SCTAB nDestTab;
59 SCCOL nDestCol;
60 SCROW nDestRow;
61 ScSortKeyStateVec maKeyState;
62 ::com::sun::star::lang::Locale aCollatorLocale;
63 OUString aCollatorAlgorithm;
64 sal_uInt16 nCompatHeader;
67 ScSortParam();
68 ScSortParam( const ScSortParam& r );
69 /// SubTotals sort
70 ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld );
71 /// TopTen sort
72 ScSortParam( const ScQueryParam&, SCCOL nCol );
74 ScSortParam& operator= ( const ScSortParam& r );
75 bool operator== ( const ScSortParam& rOther ) const;
76 void Clear ();
77 void MoveToDest();
79 inline sal_uInt16 GetSortKeyCount() const { return maKeyState.size(); }
83 #endif // SC_SORTPARAM_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */