summaryrefslogtreecommitdiff
path: root/sc/inc/sortparam.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-05 05:05:40 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-05 05:05:40 +0200
commit3e887edcaacc5b0f5e35d682a259124648e84229 (patch)
treee8545d20a3e06e405e07386cba1d6d089ffb46fc /sc/inc/sortparam.hxx
parenta5eadc6aaafec92df23c57e258882a2c98ece0ad (diff)
Revert "Cleanup. ScPivot(Collection) is no more."
This reverts commit 568d3912bf8ced76ecb9506bccc3bd361daba082.
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(); }
};