From ea7fe02f4d149466bb2170b4bf0a45676936112b Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Fri, 3 Jun 2011 06:03:40 +0200 Subject: improve performance of ScUndoInsertTables::Undo we can now insert several sheets and then undo in nearly no time --- sc/source/ui/view/tabvwsh5.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sc/source/ui/view/tabvwsh5.cxx') diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 4b47f9610108..1bc112d13e78 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -242,6 +242,9 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) case SC_TABS_INSERTED: GetViewData()->InsertTabs( nTab1, nTab2 ); break; + case SC_TABS_DELETED: + GetViewData()->DeleteTabs( nTab1, nTab2 ); + break; default: OSL_FAIL("unbekannter ScTablesHint"); } @@ -289,6 +292,10 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( nTab1 <= nNewTab ) nNewTab += nTab2; break; + case SC_TABS_DELETED: + if ( nTab1 < nNewTab ) + nNewTab -= nTab2; + break; } ScDocument* pDoc = GetViewData()->GetDocument(); -- cgit