diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/view/tabvwsh5.cxx | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/view/tabvwsh5.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index aee5c276fdd9..030c26f3ef71 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -61,7 +61,7 @@ void 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: @@ -70,13 +70,13 @@ void 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 } } @@ -141,7 +141,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; case SC_HINT_FORCESETTAB: - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); break; default: @@ -151,7 +151,7 @@ void 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) { @@ -209,7 +209,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0 - SetEditShell(pView ,TRUE); + SetEditShell(pView ,sal_True); } } } @@ -222,7 +222,7 @@ void 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: @@ -247,7 +247,7 @@ void 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: @@ -258,7 +258,7 @@ void 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 @@ -280,7 +280,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; case SC_TAB_HIDDEN: if ( nTab1 == nNewTab ) // aktuelle ausgeblendet - bForce = TRUE; + bStayOnActiveTab = false; break; } @@ -288,13 +288,14 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - SetTabNo( nNewTab, bForce ); + sal_Bool bForce = !bStayOnActiveTab; + SetTabNo( nNewTab, bForce, 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: @@ -393,7 +394,7 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, default: *ppItem = new SvxNumberInfoItem( pDoc->GetFormatTable(), - (const USHORT) + (const sal_uInt16) SID_ATTR_NUMBERFORMAT_INFO ); } } @@ -410,7 +411,7 @@ void ScTabViewShell::UpdateNumberFormatter( { const sal_uInt32* pDelArr = rInfoItem.GetDelArray(); - for ( USHORT i=0; i<nDelCount; i++ ) + for ( sal_uInt16 i=0; i<nDelCount; i++ ) rInfoItem.GetNumberFormatter()->DeleteEntry( pDelArr[i] ); } |