diff options
author | Eike Rathke <erack@redhat.com> | 2016-10-26 14:50:43 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-26 14:55:23 +0200 |
commit | 647e860435c781fbb111ae59bc70dc8e6776fed5 (patch) | |
tree | a83cfa257e271f017a9ff06f993f3a365bf57963 /sc/source/ui/inc | |
parent | 0d3e45608a5771b58ad2f7bea0989d635f25c47c (diff) |
Resolves: tdf#92117 create only one Undo for all UnmergeCells() calls
... during DeleteCells() and InsertCells(), instead of one Undo per
UnmergeCells() call. And actually create Undo only if bRecord requested.
Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r-- | sc/source/ui/inc/docfunc.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/undoblk.hxx | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index f54893ed4613..e6757a749b79 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -45,6 +45,7 @@ class ScTableProtection; struct ScCellMergeOption; class ScConditionalFormat; class ScConditionalFormatList; +class ScUndoRemoveMerge; namespace sc { @@ -189,8 +190,8 @@ public: bool MergeCells( const ScCellMergeOption& rOption, bool bContents, bool bRecord, bool bApi, bool bEmptyMergedCells = false ); - bool UnmergeCells( const ScRange& rRange, bool bRecord ); - bool UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ); + bool UnmergeCells( const ScRange& rRange, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ); + bool UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ); void SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTAB nTab = -1 ); // takes ownership of pNewRanges //nTab = -1 for local range names void ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 ); diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 9e09292d13ea..01af186c1ea1 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -901,6 +901,8 @@ public: ScUndoRemoveMerge( ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, ScDocument* pNewUndoDoc ); + ScUndoRemoveMerge( ScDocShell* pNewDocShell, + ScDocument* pNewUndoDoc ); virtual ~ScUndoRemoveMerge() override; virtual void Undo() override; @@ -910,11 +912,14 @@ public: virtual OUString GetComment() const override; + ScDocument* GetUndoDoc(); + void AddCellMergeOption( const ScCellMergeOption& rOption ); + private: void SetCurTab(); - ScCellMergeOption maOption; - ScDocument* pUndoDoc; + std::vector<ScCellMergeOption> maOptions; + ScDocument* pUndoDoc; }; class ScUndoBorder: public ScBlockUndo |