diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-02 18:29:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-13 18:07:14 -0400 |
commit | 5c6ee09126631342939ae8766fe36083d8c011e3 (patch) | |
tree | 48081d36ae5000542adb49cc037267992f59ec66 /sc/inc/document.hxx | |
parent | fdo#81102: fix .doc import of blank even page header (diff) | |
download | core-5c6ee09126631342939ae8766fe36083d8c011e3.tar.gz core-5c6ee09126631342939ae8766fe36083d8c011e3.zip |
fdo#81309: Adjust references during sort.
Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f
Diffstat (limited to 'sc/inc/document.hxx')
-rw-r--r-- | sc/inc/document.hxx | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index d7f87520c39f..44e88c073a33 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -29,7 +29,6 @@ #include "rangenam.hxx" #include "brdcst.hxx" #include "tabopparams.hxx" -#include "sortparam.hxx" #include "types.hxx" #include <formula/grammar.hxx> #include <formula/types.hxx> @@ -79,6 +78,8 @@ class CellValues; class RowHeightContext; struct SetFormulaDirtyContext; class RefMovedHint; +struct SortUndoParam; +struct ReorderParam; } @@ -181,6 +182,8 @@ class EditTextObject; struct ScRefCellValue; class ScDocumentImport; class ScPostIt; +struct ScSubTotalParam; +struct ScQueryParam; namespace com { namespace sun { namespace star { namespace lang { @@ -1676,7 +1679,9 @@ public: SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const; SC_DLLPUBLIC SvNumberFormatter* CreateFormatTable() const; - void Sort( SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress ); + void Sort( SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* pProgress, sc::ReorderParam* pUndo ); + void Reorder( const sc::ReorderParam& rParam, ScProgress* pProgress ); + SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub ); SC_DLLPUBLIC bool CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam ); @@ -2033,8 +2038,8 @@ public: void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; } - void GetSortParam( ScSortParam& rParam, SCTAB nTab ); - void SetSortParam( ScSortParam& rParam, SCTAB nTab ); + void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab ); + void SC_DLLPUBLIC SetSortParam( ScSortParam& rParam, SCTAB nTab ); inline void SetVbaEventProcessor( const com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >& rxVbaEvents ) { mxVbaEvents = rxVbaEvents; } @@ -2063,6 +2068,19 @@ public: size_t GetFormulaHash( const ScAddress& rPos ) const; + /** + * Make specified formula cells non-grouped. + * + * @param nTab sheet index + * @param nCol column index + * @param rRows list of row indices at which formula cells are to be + * unshared. This call sorts the passed row indices and + * removes duplicates, which is why the caller must pass it + * as reference. + */ + void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows ); + void RegroupFormulaCells( SCTAB nTab, SCCOL nCol ); + ScFormulaVectorState GetFormulaVectorState( const ScAddress& rPos ) const; formula::FormulaTokenRef ResolveStaticReference( const ScAddress& rPos ); @@ -2148,15 +2166,6 @@ private: void SharePooledResources( ScDocument* pSrcDoc ); }; -inline void ScDocument::GetSortParam( ScSortParam& rParam, SCTAB nTab ) -{ - rParam = mSheetSortParams[ nTab ]; -} - -inline void ScDocument::SetSortParam( ScSortParam& rParam, SCTAB nTab ) -{ - mSheetSortParams[ nTab ] = rParam; -} #endif |