diff options
Diffstat (limited to 'sc/source/ui/view/tabvwsh5.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 1a3dd6928a17..12f08ec6d0e2 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -249,7 +249,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint // kann und dann auch die aktive View umgeschaltet werden muss. SCTAB nNewTab = nActiveTab; - BOOL bForce = FALSE; + bool bStayOnActiveTab = true; switch (nId) { case SC_TAB_INSERTED: @@ -260,7 +260,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if ( nTab1 < nNewTab ) // vorher geloescht --nNewTab; else if ( nTab1 == nNewTab ) // aktuelle geloescht - bForce = TRUE; + bStayOnActiveTab = false; break; case SC_TAB_MOVED: if ( nNewTab == nTab1 ) // verschobene Tabelle @@ -282,7 +282,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint break; case SC_TAB_HIDDEN: if ( nTab1 == nNewTab ) // aktuelle ausgeblendet - bForce = TRUE; + bStayOnActiveTab = false; break; } @@ -290,7 +290,8 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - SetTabNo( nNewTab, bForce ); + BOOL bForce = !bStayOnActiveTab; + SetTabNo( nNewTab, bForce, FALSE, bStayOnActiveTab ); } else if (rHint.ISA(ScIndexHint)) { |