summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/inc/autofilterbuffer.hxx
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2020-06-29 13:23:34 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-09-09 17:09:04 +0200
commita86ddd7fc0413f65ee7851eb09b15a24e5d457ba (patch)
tree12641aa5048a890e24a9305098386a1ecee7fe19 /sc/source/filter/inc/autofilterbuffer.hxx
parentpdfium: only init pdfium library once and destroy on LO exit (diff)
downloadcore-a86ddd7fc0413f65ee7851eb09b15a24e5d457ba.tar.gz
core-a86ddd7fc0413f65ee7851eb09b15a24e5d457ba.zip
tdf#95640 XLSX: import/export of custom sort lists
Conflicts: sc/source/filter/excel/excrecds.cxx sc/source/filter/oox/autofilterbuffer.cxx sc/source/filter/oox/tablebuffer.cxx Change-Id: If5ffef39770bf7abd6e75e8de998d4a2b4749a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97399 Tested-by: Jenkins Tested-by: Serge Krot <Serge.Krot@cib.de> Reviewed-by: Serge Krot <Serge.Krot@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102254 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sc/source/filter/inc/autofilterbuffer.hxx')
-rw-r--r--sc/source/filter/inc/autofilterbuffer.hxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index c6387e5d37d4..ae8e8b4fa2a0 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -184,6 +184,22 @@ private:
bool mbShowButton;
};
+// class SortCondition
+
+class SortCondition : public WorkbookHelper
+{
+public:
+ explicit SortCondition( const WorkbookHelper& rHelper );
+
+ void importSortCondition( const AttributeList& rAttribs, sal_Int16 nSheet );
+
+ ScRange maRange; // Column/Row that this sort condition applies to.
+ OUString maSortCustomList; // Sort by a custom list.
+ bool mbDescending;
+};
+
+// class AutoFilter
+
class AutoFilter : public WorkbookHelper
{
public:
@@ -194,17 +210,26 @@ public:
/** Imports auto filter settings from the AUTOFILTER record. */
void importAutoFilter( SequenceInputStream& rStrm, sal_Int16 nSheet );
+ void importSortState( const AttributeList& rAttribs, sal_Int16 nSheet );
+
/** Creates a new auto filter column and stores it internally. */
FilterColumn& createFilterColumn();
+ SortCondition& createSortCondition();
+
/** Applies the filter to the passed filter descriptor. */
- void finalizeImport( const css::uno::Reference< css::sheet::XSheetFilterDescriptor3>& rxFilterDesc );
+ void finalizeImport( const css::uno::Reference< css::sheet::XDatabaseRange >& rxDatabaseRange,
+ sal_Int16 nSheet );
private:
typedef RefVector< FilterColumn > FilterColumnVector;
FilterColumnVector maFilterColumns;
ScRange maRange;
+
+ ScRange maSortRange; // The whole range of data to sort (not just the sort-by column).
+ typedef RefVector< SortCondition > SortConditionVector;
+ SortConditionVector maSortConditions;
};
class AutoFilterBuffer : public WorkbookHelper
@@ -221,7 +246,8 @@ public:
/** Applies the filters to the passed database range object.
@return True = this buffer contains valid auto filter settings. */
- bool finalizeImport( const css::uno::Reference< css::sheet::XDatabaseRange >& rxDatabaseRange );
+ bool finalizeImport( const css::uno::Reference< css::sheet::XDatabaseRange >& rxDatabaseRange,
+ sal_Int16 nSheet );
private:
/** Returns the auto filter object used to perform auto filtering. */