summaryrefslogtreecommitdiff
path: root/sc/inc/sortparam.hxx
diff options
context:
space:
mode:
authorAlbert Thuswaldner <albert.thuswaldner@gmail.com>2012-03-20 19:38:29 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-04 07:53:10 +0200
commita02b445c39d969fedc554fc2c500b88a27a13906 (patch)
tree0d8109abf6ea285c7b661101faa3a967ea0908bd /sc/inc/sortparam.hxx
parent62d745ddde6b60aaaa796123f45b3df8c10e9869 (diff)
fdo#45747 remove the limitation to 3 sort entries in calc part1
Diffstat (limited to 'sc/inc/sortparam.hxx')
-rw-r--r--sc/inc/sortparam.hxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index f1d4e21e9371..5f1fee0c3ae2 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -29,16 +29,27 @@
#ifndef SC_SORTPARAM_HXX
#define SC_SORTPARAM_HXX
+#define DEFSORT 3
+
+#include <vector>
+
#include "address.hxx"
#include <tools/solar.h>
#include <com/sun/star/lang/Locale.hpp>
#include "scdllapi.h"
-#define MAXSORT 3
-
struct ScSubTotalParam;
struct ScQueryParam;
+struct ScSortKeyState
+{
+ bool bDoSort;
+ SCCOLROW nField;
+ bool bAscending;
+};
+
+typedef ::std::vector<ScSortKeyState> ScSortKeyStateVec;
+
struct SC_DLLPUBLIC ScSortParam
{
SCCOL nCol1;
@@ -56,13 +67,12 @@ struct SC_DLLPUBLIC ScSortParam
SCTAB nDestTab;
SCCOL nDestCol;
SCROW nDestRow;
- bool bDoSort[MAXSORT];
- SCCOLROW nField[MAXSORT];
- bool bAscending[MAXSORT];
+ ScSortKeyStateVec maKeyState;
::com::sun::star::lang::Locale aCollatorLocale;
::rtl::OUString aCollatorAlgorithm;
sal_uInt16 nCompatHeader;
+
ScSortParam();
ScSortParam( const ScSortParam& r );
/// SubTotals sort
@@ -73,8 +83,9 @@ struct SC_DLLPUBLIC ScSortParam
ScSortParam& operator= ( const ScSortParam& r );
bool operator== ( const ScSortParam& rOther ) const;
void Clear ();
-
void MoveToDest();
+
+ inline sal_uInt16 GetSortKeyCount() const { return maKeyState.size(); }
};