summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwsh5.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-03 06:03:40 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-03 06:03:40 +0200
commitea7fe02f4d149466bb2170b4bf0a45676936112b (patch)
tree4487bf54ce2f85345bce570cf6e21a9b8a9d570f /sc/source/ui/view/tabvwsh5.cxx
parentd4a8a64c218a4640e9701356aa87701d5a80589b (diff)
improve performance of ScUndoInsertTables::Undo
we can now insert several sheets and then undo in nearly no time
Diffstat (limited to 'sc/source/ui/view/tabvwsh5.cxx')
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx7
1 files changed, 7 insertions, 0 deletions
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();