LibreOffice Module sc (master)  1
sortparam.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_INC_SORTPARAM_HXX
21 #define INCLUDED_SC_INC_SORTPARAM_HXX
22 
23 #define DEFSORT 3
24 
25 #include <vector>
26 
27 #include "address.hxx"
28 #include <com/sun/star/lang/Locale.hpp>
29 #include "scdllapi.h"
30 
31 struct ScSubTotalParam;
32 struct ScQueryParam;
33 
35 {
37  bool bDoSort;
38  bool bAscending;
39 };
40 
42 {
47  sal_uInt16 nUserIndex;
48  bool bHasHeader;
49  bool bByRow;
50  bool bCaseSens;
54  bool bUserDef;
56  bool bInplace;
60  ::std::vector<ScSortKeyState>
62  css::lang::Locale aCollatorLocale;
64  sal_uInt16 nCompatHeader;
65 
66  ScSortParam();
67  ScSortParam( const ScSortParam& r );
69  ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld );
71  ScSortParam( const ScQueryParam&, SCCOL nCol );
72  ~ScSortParam();
73 
74  ScSortParam& operator= ( const ScSortParam& r );
75  bool operator== ( const ScSortParam& rOther ) const;
76  void Clear ();
77  void MoveToDest();
78 
79  sal_uInt16 GetSortKeyCount() const { return maKeyState.size(); }
80 };
81 
82 namespace sc {
83 
85 {
92 
96  std::vector<SCCOLROW> maOrderIndices;
97  bool mbByRow;
98  bool mbPattern;
102 
107  void reverse();
108 };
109 
110 }
111 
112 #endif // INCLUDED_SC_INC_SORTPARAM_HXX
113 
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:517
::std::vector< ScSortKeyState > maKeyState
Definition: sortparam.hxx:61
sal_uInt16 nUserIndex
Definition: sortparam.hxx:47
SCROW nRow1
Definition: sortparam.hxx:44
SCCOL nCol2
Definition: sortparam.hxx:45
css::lang::Locale aCollatorLocale
Definition: sortparam.hxx:62
SCCOL nDestCol
Definition: sortparam.hxx:58
bool bIncludeComments
Definition: sortparam.hxx:52
bool bUserDef
Definition: sortparam.hxx:54
SCROW nRow2
Definition: sortparam.hxx:46
ScRange maSortRange
This sort range already takes into account the presence or absence of header row / column i...
Definition: sortparam.hxx:91
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
bool bNaturalSort
Definition: sortparam.hxx:51
bool bIncludeGraphicObjects
Definition: sortparam.hxx:53
SCCOL nCol1
Definition: sortparam.hxx:43
sal_Int16 SCCOL
Definition: types.hxx:22
bool bCaseSens
Definition: sortparam.hxx:50
std::vector< SCCOLROW > maOrderIndices
List of original column / row positions after reordering.
Definition: sortparam.hxx:96
sal_Int32 SCROW
Definition: types.hxx:18
bool bInplace
Definition: sortparam.hxx:56
bool bHasHeader
Definition: sortparam.hxx:48
void reverse()
Reorder the position indices such that it can be used to undo the original reordering.
Definition: sortparam.cxx:272
sal_uInt16 GetSortKeyCount() const
Definition: sortparam.hxx:79
SCCOLROW nField
Definition: sortparam.hxx:36
OUString aCollatorAlgorithm
Definition: sortparam.hxx:63
SCROW nDestRow
Definition: sortparam.hxx:59
bool bIncludePattern
Definition: sortparam.hxx:55
sal_uInt16 nCompatHeader
Definition: sortparam.hxx:64
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
sal_Int16 SCTAB
Definition: types.hxx:23
SCTAB nDestTab
Definition: sortparam.hxx:57