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 #pragma once
21 
22 #define DEFSORT 3
23 
24 #include <vector>
25 
26 #include "address.hxx"
27 #include <com/sun/star/lang/Locale.hpp>
28 #include "scdllapi.h"
29 
30 struct ScSubTotalParam;
31 struct ScQueryParam;
32 
34 {
36  bool bDoSort;
37  bool bAscending;
38 };
39 
41 {
46  sal_uInt16 nUserIndex;
47  bool bHasHeader;
48  bool bByRow;
49  bool bCaseSens;
53  bool bUserDef;
55  bool bInplace;
59  ::std::vector<ScSortKeyState>
61  css::lang::Locale aCollatorLocale;
63  sal_uInt16 nCompatHeader;
64 
65  ScSortParam();
66  ScSortParam( const ScSortParam& r );
68  ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld );
70  ScSortParam( const ScQueryParam&, SCCOL nCol );
71  ~ScSortParam();
72 
73  ScSortParam& operator= ( const ScSortParam& r );
74  bool operator== ( const ScSortParam& rOther ) const;
75  void Clear ();
76  void MoveToDest();
77 
78  sal_uInt16 GetSortKeyCount() const { return maKeyState.size(); }
79 };
80 
81 namespace sc {
82 
84 {
91 
95  std::vector<SCCOLROW> maOrderIndices;
96  bool mbByRow;
97  bool mbPattern;
101 
106  void reverse();
107 };
108 
109 }
110 
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518
::std::vector< ScSortKeyState > maKeyState
Definition: sortparam.hxx:60
sal_uInt16 nUserIndex
Definition: sortparam.hxx:46
SCROW nRow1
Definition: sortparam.hxx:43
SCCOL nCol2
Definition: sortparam.hxx:44
css::lang::Locale aCollatorLocale
Definition: sortparam.hxx:61
SCCOL nDestCol
Definition: sortparam.hxx:57
bool bIncludeComments
Definition: sortparam.hxx:51
bool bUserDef
Definition: sortparam.hxx:53
SCROW nRow2
Definition: sortparam.hxx:45
ScRange maSortRange
This sort range already takes into account the presence or absence of header row / column i...
Definition: sortparam.hxx:90
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
bool bNaturalSort
Definition: sortparam.hxx:50
bool bIncludeGraphicObjects
Definition: sortparam.hxx:52
SCCOL nCol1
Definition: sortparam.hxx:42
sal_Int16 SCCOL
Definition: types.hxx:21
bool bCaseSens
Definition: sortparam.hxx:49
void Clear(EHistoryType eHistory)
std::vector< SCCOLROW > maOrderIndices
List of original column / row positions after reordering.
Definition: sortparam.hxx:95
sal_Int32 SCROW
Definition: types.hxx:17
bool bInplace
Definition: sortparam.hxx:55
bool bHasHeader
Definition: sortparam.hxx:47
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:78
SCCOLROW nField
Definition: sortparam.hxx:35
OUString aCollatorAlgorithm
Definition: sortparam.hxx:62
SCROW nDestRow
Definition: sortparam.hxx:58
bool bIncludePattern
Definition: sortparam.hxx:54
sal_uInt16 nCompatHeader
Definition: sortparam.hxx:63
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
sal_Int16 SCTAB
Definition: types.hxx:22
SCTAB nDestTab
Definition: sortparam.hxx:56