diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
commit | cd42389ad67b403a07a0dda8e2a6e213def49251 (patch) | |
tree | 51e19c743788a549502b7c801c64e11142103310 /sc/source/ui/view/tabview.cxx | |
parent | removetooltypes01: #i112600# remove tooltypes from chart2 (diff) | |
download | core-cd42389ad67b403a07a0dda8e2a6e213def49251.tar.gz core-cd42389ad67b403a07a0dda8e2a6e213def49251.zip |
removetooltypes01: #i112600# remove tooltypes from sc
Diffstat (limited to 'sc/source/ui/view/tabview.cxx')
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 274 |
1 files changed, 137 insertions, 137 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 0bc4617a9af4..83bf1a4c9c12 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -220,14 +220,14 @@ using namespace ::com::sun::star; // Corner-Button -ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional ) : +ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional ) : Window( pParent, WinBits( 0 ) ), pViewData( pData ), bAdd( bAdditional ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetBackground( rStyleSettings.GetFaceColor() ); - EnableRTL( FALSE ); + EnableRTL( sal_False ); } __EXPORT ScCornerButton::~ScCornerButton() @@ -244,7 +244,7 @@ void __EXPORT ScCornerButton::Paint( const Rectangle& rRect ) Window::Paint(rRect); - BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); long nDarkX = bLayoutRTL ? 0 : nPosX; if ( !bAdd && !rStyleSettings.GetHighContrastMode() ) @@ -308,42 +308,42 @@ void __EXPORT ScCornerButton::Resize() void __EXPORT ScCornerButton::MouseButtonDown( const MouseEvent& rMEvt ) { ScModule* pScMod = SC_MOD(); - BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); if (!bDisable) { ScTabViewShell* pViewSh = pViewData->GetViewShell(); pViewSh->SetActive(); // Appear und SetViewFrame pViewSh->ActiveGrabFocus(); - BOOL bControl = rMEvt.IsMod1(); + sal_Bool bControl = rMEvt.IsMod1(); pViewSh->SelectAll( bControl ); } } //================================================================== -BOOL lcl_HasColOutline( const ScViewData& rViewData ) +sal_Bool lcl_HasColOutline( const ScViewData& rViewData ) { const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo()); if (pTable) { const ScOutlineArray* pArray = pTable->GetColArray(); if ( pArray->GetDepth() > 0 ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL lcl_HasRowOutline( const ScViewData& rViewData ) +sal_Bool lcl_HasRowOutline( const ScViewData& rViewData ) { const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo()); if (pTable) { const ScOutlineArray* pArray = pTable->GetRowArray(); if ( pArray->GetDepth() > 0 ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //================================================================== @@ -358,34 +358,34 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData ) pHdrSelEng( NULL ), \ aHdrFunc( &aViewData ), \ pDrawView( NULL ), \ - bDrawSelMode( FALSE ), \ + bDrawSelMode( sal_False ), \ aVScrollTop( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \ aVScrollBottom( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \ aHScrollLeft( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \ aHScrollRight( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \ - aCornerButton( pFrameWin, &aViewData, FALSE ), \ - aTopButton( pFrameWin, &aViewData, TRUE ), \ + aCornerButton( pFrameWin, &aViewData, sal_False ), \ + aTopButton( pFrameWin, &aViewData, sal_True ), \ aScrollBarBox( pFrameWin, WB_SIZEABLE ), \ pInputHintWindow( NULL ), \ pPageBreakData( NULL ), \ pHighlightRanges( NULL ), \ pBrushDocument( NULL ), \ pDrawBrushSet( NULL ), \ - bLockPaintBrush( FALSE ), \ + bLockPaintBrush( sal_False ), \ pTimerWindow( NULL ), \ nTipVisible( 0 ), \ - bDragging( FALSE ), \ - bIsBlockMode( FALSE ), \ - bBlockNeg( FALSE ), \ - bBlockCols( FALSE ), \ - bBlockRows( FALSE ), \ + bDragging( sal_False ), \ + bIsBlockMode( sal_False ), \ + bBlockNeg( sal_False ), \ + bBlockCols( sal_False ), \ + bBlockRows( sal_False ), \ mfPendingTabBarWidth( -1.0 ), \ - bMinimized( FALSE ), \ - bInUpdateHeader( FALSE ), \ - bInActivatePart( FALSE ), \ - bInZoomUpdate( FALSE ), \ - bMoveIsShift( FALSE ), \ - bNewStartIfMarking( FALSE ) + bMinimized( sal_False ), \ + bInUpdateHeader( sal_False ), \ + bInActivatePart( sal_False ), \ + bInZoomUpdate( sal_False ), \ + bMoveIsShift( sal_False ), \ + bNewStartIfMarking( sal_False ) ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) : @@ -453,7 +453,7 @@ IMPL_LINK( ScTabView, TimerHdl, Timer*, EMPTYARG ) // --- Resize --------------------------------------------------------------------- void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize, - long nTotalWidth, BOOL bLayoutRTL ) + long nTotalWidth, sal_Bool bLayoutRTL ) { Point aNewPos = rPos; if ( bLayoutRTL ) @@ -469,36 +469,36 @@ void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize, rWindow.SetPosSizePixel( aNewPos, rSize ); } -void ScTabView::DoResize( const Point& rOffset, const Size& rSize, BOOL bInner ) +void ScTabView::DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner ) { HideListBox(); - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); long nTotalWidth = rSize.Width(); if ( bLayoutRTL ) nTotalWidth += 2*rOffset.X(); - BOOL bVScroll = aViewData.IsVScrollMode(); - BOOL bHScroll = aViewData.IsHScrollMode(); - BOOL bTabControl = aViewData.IsTabMode(); - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bVScroll = aViewData.IsVScrollMode(); + sal_Bool bHScroll = aViewData.IsHScrollMode(); + sal_Bool bTabControl = aViewData.IsTabMode(); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScroll = bVScroll = FALSE; + bHScroll = bVScroll = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScroll = bVScroll = TRUE; + bHScroll = bVScroll = sal_True; if ( aViewData.GetDocShell()->IsPreview() ) - bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = FALSE; + bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = sal_False; long nBarX = 0; long nBarY = 0; @@ -895,40 +895,40 @@ void ScTabView::UpdateVarZoom() SvxZoomType eZoomType = GetZoomType(); if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate ) { - bInZoomUpdate = TRUE; + bInZoomUpdate = sal_True; const Fraction& rOldX = GetViewData()->GetZoomX(); const Fraction& rOldY = GetViewData()->GetZoomY(); long nOldPercent = ( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator(); - USHORT nNewZoom = CalcZoom( eZoomType, (USHORT)nOldPercent ); + sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent ); Fraction aNew( nNewZoom, 100 ); if ( aNew != rOldX || aNew != rOldY ) { - SetZoom( aNew, aNew, FALSE ); // always separately per sheet + SetZoom( aNew, aNew, sal_False ); // always separately per sheet PaintGrid(); PaintTop(); PaintLeft(); aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM ); aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); } - bInZoomUpdate = FALSE; + bInZoomUpdate = sal_False; } } void ScTabView::UpdateFixPos() { - BOOL bResize = FALSE; + sal_Bool bResize = sal_False; if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixX()) - bResize = TRUE; + bResize = sal_True; if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixY()) - bResize = TRUE; + bResize = sal_True; if (bResize) - RepeatResize(FALSE); + RepeatResize(sal_False); } -void ScTabView::RepeatResize( BOOL bUpdateFix ) +void ScTabView::RepeatResize( sal_Bool bUpdateFix ) { if ( bUpdateFix ) { @@ -954,12 +954,12 @@ void ScTabView::RepeatResize( BOOL bUpdateFix ) void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) { - BOOL bScrollBars = aViewData.IsVScrollMode(); - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bScrollBars = aViewData.IsVScrollMode(); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); rBorder = SvBorder(); @@ -987,14 +987,14 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) IMPL_LINK( ScTabView, TabBarResize, void*, EMPTYARG ) { - BOOL bHScrollMode = aViewData.IsHScrollMode(); + sal_Bool bHScrollMode = aViewData.IsHScrollMode(); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScrollMode = FALSE; + bHScrollMode = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = TRUE; + bHScrollMode = sal_True; if( bHScrollMode ) { @@ -1076,7 +1076,7 @@ Window* ScTabView::GetWindowByPos( ScSplitPos ePos ) void ScTabView::SetActivePointer( const Pointer& rPointer ) { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetPointer( rPointer ); @@ -1124,7 +1124,7 @@ void ScTabView::ActiveGrabFocus() ScSplitPos ScTabView::FindWindow( Window* pWindow ) const { ScSplitPos eVal = SC_SPLIT_BOTTOMLEFT; // Default - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] == pWindow ) eVal = (ScSplitPos) i; @@ -1137,10 +1137,10 @@ Point ScTabView::GetGridOffset() const // Groessen hier wie in DoResize - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); // Outline-Controls if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM]) @@ -1161,11 +1161,11 @@ Point ScTabView::GetGridOffset() const // --- Scroll-Bars -------------------------------------------------------- -BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) +sal_Bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) { HideNoteMarker(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const CommandWheelData* pData = rCEvt.GetWheelData(); if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM ) { @@ -1186,7 +1186,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) { // scroll wheel doesn't set the AppOptions default - BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); + sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); Fraction aFract( nNew, 100 ); SetZoom( aFract, aFract, bSyncZoom ); @@ -1197,7 +1197,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) aViewData.GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); } - bDone = TRUE; + bDone = sal_True; } } else @@ -1214,7 +1214,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) { - BOOL bOnlineScroll = TRUE; //! Optionen + sal_Bool bOnlineScroll = sal_True; //! Optionen if ( bDragging ) { @@ -1230,7 +1230,7 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ) { - BOOL bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL(); + sal_Bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL(); ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT; long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich); if (nDelta) ScrollX( nDelta, eWhich ); @@ -1238,20 +1238,20 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) else // VScroll... { ScVSplitPos eWhich = (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM; - long nDelta = GetScrollBarPos( *pScroll, FALSE ) + nScrollMin - aViewData.GetPosY(eWhich); + long nDelta = GetScrollBarPos( *pScroll, sal_False ) + nScrollMin - aViewData.GetPosY(eWhich); if (nDelta) ScrollY( nDelta, eWhich ); } } - bDragging = FALSE; + bDragging = sal_False; } return 0; } IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) { - BOOL bOnlineScroll = TRUE; //! Optionen + sal_Bool bOnlineScroll = sal_True; //! Optionen - BOOL bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ); + sal_Bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ); long nViewPos; if ( bHoriz ) nViewPos = aViewData.GetPosX( (pScroll == &aHScrollLeft) ? @@ -1260,15 +1260,15 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) nViewPos = aViewData.GetPosY( (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM ); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); - BOOL bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL()); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL()); ScrollType eType = pScroll->GetType(); if ( eType == SCROLL_DRAG ) { if (!bDragging) { - bDragging = TRUE; + bDragging = sal_True; nPrevDragPos = nViewPos; } @@ -1303,7 +1303,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) String aHelpStr; Rectangle aRect; - USHORT nAlign; + sal_uInt16 nAlign; if (bHoriz) { aHelpStr = ScGlobal::GetRscString(STR_COLUMN); @@ -1406,7 +1406,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) if (nDelta) { - BOOL bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern + sal_Bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern if ( bHoriz ) ScrollX( nDelta, (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate ); else @@ -1417,9 +1417,9 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) return 0; } -void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars ) +void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars ) { - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); @@ -1506,9 +1506,9 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars ) TestHintWindow(); // neu positionieren } -void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars ) +void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars ) { - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); @@ -1666,7 +1666,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY if ( nWidth != pRowBar[SC_SPLIT_BOTTOM]->GetWidth() && !bInUpdateHeader ) { - bInUpdateHeader = TRUE; + bInUpdateHeader = sal_True; pRowBar[SC_SPLIT_BOTTOM]->SetWidth( nWidth ); if (pRowBar[SC_SPLIT_TOP]) @@ -1677,11 +1677,11 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY // auf VCL gibt's Update ohne Ende (jedes Update gilt fuer alle Fenster) //aCornerButton.Update(); // der bekommt sonst nie ein Update - bInUpdateHeader = FALSE; + bInUpdateHeader = sal_False; } } -inline void ShowHide( Window* pWin, BOOL bShow ) +inline void ShowHide( Window* pWin, sal_Bool bShow ) { DBG_ASSERT(pWin || !bShow, "Fenster ist nicht da"); if (pWin) @@ -1690,26 +1690,26 @@ inline void ShowHide( Window* pWin, BOOL bShow ) void ScTabView::UpdateShow() { - BOOL bHScrollMode = aViewData.IsHScrollMode(); - BOOL bVScrollMode = aViewData.IsVScrollMode(); - BOOL bTabMode = aViewData.IsTabMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - BOOL bHeader = aViewData.IsHeaderMode(); + sal_Bool bHScrollMode = aViewData.IsHScrollMode(); + sal_Bool bVScrollMode = aViewData.IsVScrollMode(); + sal_Bool bTabMode = aViewData.IsTabMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bHeader = aViewData.IsHeaderMode(); - BOOL bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); - BOOL bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); + sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); + sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScrollMode = bVScrollMode = FALSE; + bHScrollMode = bVScrollMode = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = bVScrollMode = TRUE; + bHScrollMode = bVScrollMode = sal_True; if ( aViewData.GetDocShell()->IsPreview() ) - bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = FALSE; + bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = sal_False; // // Windows anlegen @@ -1791,7 +1791,7 @@ IMPL_LINK( ScTabView, SplitHdl, Splitter*, pSplitter ) DoVSplit( pVSplitter->GetSplitPosPixel() ); if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX || aViewData.GetVSplitMode() == SC_SPLIT_FIX ) - FreezeSplitters( TRUE ); + FreezeSplitters( sal_True ); DoResize( aBorderPos, aFrameSize ); @@ -1803,7 +1803,7 @@ void ScTabView::DoHSplit(long nSplitPos) // nSplitPos is the real pixel position on the frame window, // mirroring for RTL has to be done here. - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); if ( bLayoutRTL ) nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1; @@ -1844,7 +1844,7 @@ void ScTabView::DoHSplit(long nSplitPos) long nLeftWidth = nSplitPos - pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width(); if ( nLeftWidth < 0 ) nLeftWidth = 0; nNewDelta = nOldDelta + aViewData.CellsAtX( nOldDelta, 1, SC_SPLIT_LEFT, - (USHORT) nLeftWidth ); + (sal_uInt16) nLeftWidth ); if ( nNewDelta > MAXCOL ) nNewDelta = MAXCOL; aViewData.SetPosX( SC_SPLIT_RIGHT, nNewDelta ); @@ -1858,7 +1858,7 @@ void ScTabView::DoHSplit(long nSplitPos) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); @@ -1916,7 +1916,7 @@ void ScTabView::DoVSplit(long nSplitPos) long nTopHeight = nSplitPos - pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height(); if ( nTopHeight < 0 ) nTopHeight = 0; nNewDelta = nOldDelta + aViewData.CellsAtY( nOldDelta, 1, SC_SPLIT_TOP, - (USHORT) nTopHeight ); + (sal_uInt16) nTopHeight ); if ( nNewDelta > MAXROW ) nNewDelta = MAXROW; aViewData.SetPosY( SC_SPLIT_BOTTOM, nNewDelta ); @@ -1930,7 +1930,7 @@ void ScTabView::DoVSplit(long nSplitPos) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); @@ -1986,7 +1986,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; long nDocX = (long)( (double) pDoc->GetColOffset( MAXCOL + 1, nTab ) * HMM_PER_TWIPS ) * nLayoutSign; @@ -2104,7 +2104,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); bool bCenterHor = false; @@ -2163,13 +2163,13 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL return aRet; } -void ScTabView::LockModifiers( USHORT nModifiers ) +void ScTabView::LockModifiers( sal_uInt16 nModifiers ) { pSelEngine->LockModifiers( nModifiers ); pHdrSelEng->LockModifiers( nModifiers ); } -USHORT ScTabView::GetLockedModifiers() const +sal_uInt16 ScTabView::GetLockedModifiers() const { return pSelEngine->GetLockedModifiers(); } @@ -2185,7 +2185,7 @@ Point ScTabView::GetMousePosPixel() return aPos; } -BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) +sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) { if (pWin) { @@ -2196,18 +2196,18 @@ BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) Size aWinSize = pWin->GetOutputSizePixel(); if ( aRel.X() >= 0 && aRel.X() < aWinSize.Width() + SPLIT_HANDLE_SIZE && aRel.Y() >= 0 && aRel.Y() < aWinSize.Height() + SPLIT_HANDLE_SIZE ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScTabView::SnapSplitPos( Point& rScreenPosPixel ) { - BOOL bOverWin = FALSE; - USHORT i; + sal_Bool bOverWin = sal_False; + sal_uInt16 i; for (i=0; i<4; i++) if (lcl_MouseIsOverWin(rScreenPosPixel,pGridWin[i])) - bOverWin = TRUE; + bOverWin = sal_True; if (!bOverWin) return; @@ -2231,19 +2231,19 @@ void ScTabView::SnapSplitPos( Point& rScreenPosPixel ) SCsCOL nPosX; SCsROW nPosY; // #52949# bNextIfLarge=FALSE: nicht auf naechste Zelle, wenn ausserhalb des Fensters - aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, TRUE, FALSE, FALSE ); - BOOL bLeft; - BOOL bTop; + aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, sal_True, sal_False, sal_False ); + sal_Bool bLeft; + sal_Bool bTop; aViewData.GetMouseQuadrant( aMouse, ePos, nPosX, nPosY, bLeft, bTop ); if (!bLeft) ++nPosX; if (!bTop) ++nPosY; - aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE ); + aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True ); rScreenPosPixel = pWin->OutputToNormalizedScreenPixel( aMouse ); } -void ScTabView::FreezeSplitters( BOOL bFreeze ) +void ScTabView::FreezeSplitters( sal_Bool bFreeze ) { ScSplitMode eOldH = aViewData.GetHSplitMode(); ScSplitMode eOldV = aViewData.GetVSplitMode(); @@ -2253,7 +2253,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) ePos = SC_SPLIT_TOPLEFT; Window* pWin = pGridWin[ePos]; - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); if ( bFreeze ) { @@ -2275,8 +2275,8 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) aSplit.Y() = aViewData.GetVSplitPos() - aWinStart.Y(); aViewData.GetPosFromPixel( aSplit.X(), aSplit.Y(), ePos, nPosX, nPosY ); - BOOL bLeft; - BOOL bTop; + sal_Bool bLeft; + sal_Bool bTop; aViewData.GetMouseQuadrant( aSplit, ePos, nPosX, nPosY, bLeft, bTop ); if (!bLeft) ++nPosX; @@ -2303,7 +2303,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM); } - aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE ); + aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True ); if (nPosX > aViewData.GetPosX(SC_SPLIT_LEFT)) // (aSplit.X() > 0) doesn't work for RTL { long nSplitPos = aSplit.X() + aWinStart.X(); @@ -2341,12 +2341,12 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); - RepeatResize(FALSE); + RepeatResize(sal_False); UpdateShow(); PaintLeft(); @@ -2377,7 +2377,7 @@ void ScTabView::SplitAtCursor() SCCOL nPosX = aViewData.GetCurX(); SCROW nPosY = aViewData.GetCurY(); - Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, TRUE ); + Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, sal_True ); if ( nPosX > 0 ) DoHSplit( aSplit.X() + aWinStart.X() ); else @@ -2389,7 +2389,7 @@ void ScTabView::SplitAtCursor() RepeatResize(); } -void ScTabView::SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer ) // fuer API +void ScTabView::SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer ) // fuer API { // Pixel ist auf die ganze View bezogen, nicht auf das erste GridWin @@ -2426,7 +2426,7 @@ void ScTabView::SetNewVisArea() // (auch wenn ansonsten der Edit-MapMode gesetzt ist) MapMode aOldMode[4]; MapMode aDrawMode[4]; - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i]) { @@ -2501,11 +2501,11 @@ void ScTabView::StartDataSelect() pWin->LaunchDPFieldMenu( nCol, nRow ); break; default: - pWin->DoAutoFilterMenue( nCol, nRow, TRUE ); + pWin->DoAutoFilterMenue( nCol, nRow, sal_True ); } } -void ScTabView::EnableRefInput(BOOL bFlag) +void ScTabView::EnableRefInput(sal_Bool bFlag) { aHScrollLeft.EnableInput(bFlag); aHScrollRight.EnableInput(bFlag); @@ -2515,20 +2515,20 @@ void ScTabView::EnableRefInput(BOOL bFlag) // ab hier dynamisch angelegte - if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,TRUE); + if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,sal_True); if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL) - pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=NULL) - pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_TOPLEFT]!=NULL) - pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_TOPRIGHT]!=NULL) - pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,sal_False); if(pColBar[SC_SPLIT_RIGHT]!=NULL) - pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,FALSE); + pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,sal_False); if(pRowBar[SC_SPLIT_TOP]!=NULL) - pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,FALSE); + pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,sal_False); } |