From 4eed799a79cffa08a9cae7e8980a0f4673441289 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 18 Aug 2010 17:20:31 +0200 Subject: mib19: #163305# do not fire sheet activation events, when a sheet gets inserted/deleted etc. and the active sheet just changes its index --- sc/source/ui/view/tabvwsh5.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (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 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)) { -- cgit From cd42389ad67b403a07a0dda8e2a6e213def49251 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 17 Jan 2011 13:20:22 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from sc --- sc/source/ui/view/tabvwsh5.cxx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (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 12f08ec6d0e2..406e608cff9b 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -60,7 +60,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { if (rHint.ISA(SfxSimpleHint)) // ohne Parameter { - ULONG nSlot = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nSlot = ((SfxSimpleHint&)rHint).GetId(); switch ( nSlot ) { case FID_DATACHANGED: @@ -69,13 +69,13 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint case FID_REFMODECHANGED: { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (!bRefMode) StopRefMode(); else { GetSelEngine()->Reset(); - GetFunctionSet()->SetAnchorFlag(TRUE); + GetFunctionSet()->SetAnchorFlag(sal_True); // AnchorFlag, damit gleich mit Control angehaengt werden kann } } @@ -140,7 +140,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint break; case SC_HINT_FORCESETTAB: - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); break; default: @@ -150,7 +150,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint else if (rHint.ISA(ScPaintHint)) // neu zeichnen { ScPaintHint* pHint = (ScPaintHint*) &rHint; - USHORT nParts = pHint->GetParts(); + sal_uInt16 nParts = pHint->GetParts(); SCTAB nTab = GetViewData()->GetTabNo(); if (pHint->GetStartTab() <= nTab && pHint->GetEndTab() >= nTab) { @@ -211,7 +211,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0 - SetEditShell(pView ,TRUE); + SetEditShell(pView ,sal_True); } } } @@ -224,7 +224,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint const ScTablesHint& rTabHint = (const ScTablesHint&)rHint; SCTAB nTab1 = rTabHint.GetTab1(); SCTAB nTab2 = rTabHint.GetTab2(); - USHORT nId = rTabHint.GetId(); + sal_uInt16 nId = rTabHint.GetId(); switch (nId) { case SC_TAB_INSERTED: @@ -290,14 +290,14 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - BOOL bForce = !bStayOnActiveTab; - SetTabNo( nNewTab, bForce, FALSE, bStayOnActiveTab ); + sal_Bool bForce = !bStayOnActiveTab; + SetTabNo( nNewTab, bForce, sal_False, bStayOnActiveTab ); } else if (rHint.ISA(ScIndexHint)) { const ScIndexHint& rIndexHint = (const ScIndexHint&)rHint; - USHORT nId = rIndexHint.GetId(); - USHORT nIndex = rIndexHint.GetIndex(); + sal_uInt16 nId = rIndexHint.GetId(); + sal_uInt16 nIndex = rIndexHint.GetIndex(); switch (nId) { case SC_HINT_SHOWRANGEFINDER: @@ -396,7 +396,7 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, default: *ppItem = new SvxNumberInfoItem( pDoc->GetFormatTable(), - (const USHORT) + (const sal_uInt16) SID_ATTR_NUMBERFORMAT_INFO ); } } @@ -413,7 +413,7 @@ void ScTabViewShell::UpdateNumberFormatter( { const sal_uInt32* pDelArr = rInfoItem.GetDelArray(); - for ( USHORT i=0; iDeleteEntry( pDelArr[i] ); } -- cgit