diff options
Diffstat (limited to 'sc/source/filter/inc/autofilterbuffer.hxx')
-rw-r--r-- | sc/source/filter/inc/autofilterbuffer.hxx | 30 |
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. */ |