diff options
Diffstat (limited to 'sc/source/ui/view/preview.cxx')
-rw-r--r-- | sc/source/ui/view/preview.cxx | 254 |
1 files changed, 127 insertions, 127 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 83fdab9000e6..4f3f1d753f32 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -99,34 +99,34 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView Window( pParent ), nPageNo( 0 ), nZoom( 100 ), - bValid( FALSE ), + bValid( sal_False ), nTabsTested( 0 ), nTab( 0 ), nTabStart( 0 ), nDisplayStart( 0 ), nTotalPages( 0 ), - bStateValid( FALSE ), - bLocationValid( FALSE ), + bStateValid( sal_False ), + bLocationValid( sal_False ), pLocationData( NULL ), pDrawView( NULL ), - bInPaint( FALSE ), - bInGetState( FALSE ), + bInPaint( sal_False ), + bInGetState( sal_False ), pDocShell( pDocSh ), pViewShell( pViewSh ), - bLeftRulerMove( FALSE ), - bRightRulerMove( FALSE ), - bTopRulerMove( FALSE ), - bBottomRulerMove( FALSE ), - bHeaderRulerMove( FALSE ), - bFooterRulerMove( FALSE ), - bLeftRulerChange( FALSE ), - bRightRulerChange( FALSE ), - bTopRulerChange( FALSE ), - bBottomRulerChange( FALSE ), - bHeaderRulerChange( FALSE ), - bFooterRulerChange( FALSE ), - bPageMargin ( FALSE ), - bColRulerMove( FALSE ), + bLeftRulerMove( sal_False ), + bRightRulerMove( sal_False ), + bTopRulerMove( sal_False ), + bBottomRulerMove( sal_False ), + bHeaderRulerMove( sal_False ), + bFooterRulerMove( sal_False ), + bLeftRulerChange( sal_False ), + bRightRulerChange( sal_False ), + bTopRulerChange( sal_False ), + bBottomRulerChange( sal_False ), + bHeaderRulerChange( sal_False ), + bFooterRulerChange( sal_False ), + bPageMargin ( sal_False ), + bColRulerMove( sal_False ), mnScale( 0 ), nColNumberButttonDown( 0 ), nHeaderHeight ( 0 ), @@ -169,8 +169,8 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein pDrawView = new FmFormView( pModel, this ); // #55259# die DrawView uebernimmt den Design-Modus vom Model // (Einstellung "Im Entwurfsmodus oeffnen"), darum hier zuruecksetzen - pDrawView->SetDesignMode( TRUE ); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetDesignMode( sal_True ); + pDrawView->SetPrintPreview( sal_True ); pDrawView->ShowSdrPage(pPage); } #if 0 @@ -202,7 +202,7 @@ void ScPreview::TestLastPage() DBG_ASSERT(nPages[nTab],"alle Tabellen leer?"); nTabPage = nPages[nTab] - 1; nTabStart = 0; - for (USHORT i=0; i<nTab; i++) + for (sal_uInt16 i=0; i<nTab; i++) nTabStart += nPages[i]; ScDocument* pDoc = pDocShell->GetDocument(); @@ -283,8 +283,8 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ ) aState.nDocPages = nTotalPages; - bValid = TRUE; - bStateValid = TRUE; + bValid = sal_True; + bStateValid = sal_True; DoInvalidate(); } @@ -296,11 +296,11 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert SCTAB nOldTab = nTab; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while (nPageNo >= nTotalPages && nTabsTested < nTabCount) { CalcPages( nTabsTested ); - bDone = TRUE; + bDone = sal_True; } if (!bDone) @@ -328,7 +328,7 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert TestLastPage(); // testen, ob hinter letzter Seite if ( nTab != nOldTab ) - bStateValid = FALSE; + bStateValid = sal_False; DoInvalidate(); } @@ -347,8 +347,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); - BOOL bDoPrint = ( pFillLocation == NULL ); - BOOL bValidPage = ( nPageNo < nTotalPages ); + sal_Bool bDoPrint = ( pFillLocation == NULL ); + sal_Bool bValidPage = ( nPageNo < nTotalPages ); ScModule* pScMod = SC_MOD(); const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); @@ -381,7 +381,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) pPrintFunc->SetOffset(aOffset); pPrintFunc->SetManualZoom(nZoom); pPrintFunc->SetDateTime(aDate,aTime); - pPrintFunc->SetClearFlag(TRUE); + pPrintFunc->SetClearFlag(sal_True); pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() ); pPrintFunc->SetDrawView( pDrawView ); @@ -396,7 +396,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) DBG_ASSERT(nPrinted<=1, "was'n nu los?"); SetMapMode(aMMMode); -// USHORT nPrintZoom = pPrintFunc->GetZoom(); +// sal_uInt16 nPrintZoom = pPrintFunc->GetZoom(); if (nPrinted) // wenn nichts, alles grau zeichnen { @@ -409,7 +409,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) { pPrintFunc->GetPrintState( aState ); aState.nDocPages = nTotalPages; - bStateValid = TRUE; + bStateValid = sal_True; } delete pPrintFunc; } @@ -423,8 +423,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Size aWinSize = GetOutputSize(); Point aWinEnd( aWinSize.Width(), aWinSize.Height() ); - BOOL bRight = nPageEndX <= aWinEnd.X(); - BOOL bBottom = nPageEndY <= aWinEnd.Y(); + sal_Bool bRight = nPageEndX <= aWinEnd.X(); + sal_Bool bBottom = nPageEndY <= aWinEnd.Y(); if (bRight || bBottom) { SetLineColor(); @@ -514,11 +514,11 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) long nRightMargin = 0; long nTopMargin = 0; long nBottomMargin = 0; - BOOL bHeaderOn = FALSE; - BOOL bFooterOn = FALSE; + sal_Bool bHeaderOn = sal_False; + sal_Bool bFooterOn = sal_False; ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Size aPaintPageSize; if ( nPageNo < nTotalPages ) @@ -534,7 +534,7 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) pPrintFunc->SetOffset(aOffset); pPrintFunc->SetManualZoom(nZoom); pPrintFunc->SetDateTime(aDate,aTime); - pPrintFunc->SetClearFlag(TRUE); + pPrintFunc->SetClearFlag(sal_True); pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() ); pPrintFunc->SetDrawView( pDrawView ); @@ -606,7 +606,7 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) { pPrintFunc->GetPrintState( aState ); aState.nDocPages = nTotalPages; - bStateValid = TRUE; + bStateValid = sal_True; } delete pPrintFunc; @@ -617,8 +617,8 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) long nPageEndY = aPaintPageSize.Height() - aOffset.Y(); Size aWinSize = GetOutputSize(); Point aWinEnd( aWinSize.Width(), aWinSize.Height() ); - BOOL bRight = nPageEndX <= aWinEnd.X(); - BOOL bBottom = nPageEndY <= aWinEnd.Y(); + sal_Bool bRight = nPageEndX <= aWinEnd.X(); + sal_Bool bBottom = nPageEndY <= aWinEnd.Y(); if( bPageMargin ) { @@ -670,10 +670,10 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) void __EXPORT ScPreview::Command( const CommandEvent& rCEvt ) { - USHORT nCmd = rCEvt.GetCommand(); + sal_uInt16 nCmd = rCEvt.GetCommand(); if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) { - BOOL bDone = pViewShell->ScrollCommand( rCEvt ); + sal_Bool bDone = pViewShell->ScrollCommand( rCEvt ); if (!bDone) Window::Command(rCEvt); } @@ -690,11 +690,11 @@ void __EXPORT ScPreview::KeyInput( const KeyEvent& rKEvt ) // (in ScPreview, not ScPreviewShell -> only if the preview window has the focus) const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nKey = rKeyCode.GetCode(); - BOOL bHandled = FALSE; + sal_uInt16 nKey = rKeyCode.GetCode(); + sal_Bool bHandled = sal_False; if(!rKeyCode.GetModifier()) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; switch(nKey) { case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break; @@ -703,7 +703,7 @@ void __EXPORT ScPreview::KeyInput( const KeyEvent& rKEvt ) } if(nSlot) { - bHandled = TRUE; + bHandled = sal_True; pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON ); } } @@ -718,19 +718,19 @@ const ScPreviewLocationData& ScPreview::GetLocationData() if ( !pLocationData ) { pLocationData = new ScPreviewLocationData( pDocShell->GetDocument(), this ); - bLocationValid = FALSE; + bLocationValid = sal_False; } if ( !bLocationValid ) { pLocationData->Clear(); DoPrint( pLocationData ); - bLocationValid = TRUE; + bLocationValid = sal_True; } return *pLocationData; } -void ScPreview::DataChanged(BOOL bNewTime) +void ScPreview::DataChanged(sal_Bool bNewTime) { if (bNewTime) { @@ -738,7 +738,7 @@ void ScPreview::DataChanged(BOOL bNewTime) aTime = Time(); } - bValid = FALSE; + bValid = sal_False; InvalidateLocationData( SC_HINT_DATACHANGED ); Invalidate(); } @@ -766,7 +766,7 @@ String ScPreview::GetPosString() } -void ScPreview::SetZoom(USHORT nNewZoom) +void ScPreview::SetZoom(sal_uInt16 nNewZoom) { if (nNewZoom < 20) nNewZoom = 20; @@ -783,11 +783,11 @@ void ScPreview::SetZoom(USHORT nNewZoom) MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); SetMapMode( aMMMode ); - bInPaint = TRUE; // don't scroll during SetYOffset in UpdateScrollBars + bInPaint = sal_True; // don't scroll during SetYOffset in UpdateScrollBars pViewShell->UpdateScrollBars(); - bInPaint = FALSE; + bInPaint = sal_False; - bStateValid = FALSE; + bStateValid = sal_False; InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED ); DoInvalidate(); Invalidate(); @@ -848,7 +848,7 @@ Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab ) } -USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly) +sal_uInt16 ScPreview::GetOptimalZoom(sal_Bool bWidthOnly) { double nWinScaleX = ScGlobal::nScreenPPTX / pDocShell->GetOutputFactor(); double nWinScaleY = ScGlobal::nScreenPPTY; @@ -876,7 +876,7 @@ USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly) if (nOptimal>400) nOptimal = 400; - return (USHORT) nOptimal; + return (sal_uInt16) nOptimal; } else return nZoom; @@ -1023,14 +1023,14 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bLeftRulerChange ) { DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); - bLeftRulerMove = TRUE; - bRightRulerMove = FALSE; + bLeftRulerMove = sal_True; + bRightRulerMove = sal_False; } else if( bRightRulerChange ) { DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); - bLeftRulerMove = FALSE; - bRightRulerMove = TRUE; + bLeftRulerMove = sal_False; + bRightRulerMove = sal_True; } } @@ -1040,26 +1040,26 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bTopRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bTopRulerMove = TRUE; - bBottomRulerMove = FALSE; + bTopRulerMove = sal_True; + bBottomRulerMove = sal_False; } else if( bBottomRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bTopRulerMove = FALSE; - bBottomRulerMove = TRUE; + bTopRulerMove = sal_False; + bBottomRulerMove = sal_True; } else if( bHeaderRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bHeaderRulerMove = TRUE; - bFooterRulerMove = FALSE; + bHeaderRulerMove = sal_True; + bFooterRulerMove = sal_False; } else if( bFooterRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bHeaderRulerMove = FALSE; - bFooterRulerMove = TRUE; + bHeaderRulerMove = sal_False; + bFooterRulerMove = sal_True; } } @@ -1085,7 +1085,7 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT ); DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT ); - bColRulerMove = TRUE; + bColRulerMove = sal_True; } } @@ -1104,11 +1104,11 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) { SetPointer( Pointer( POINTER_ARROW ) ); - BOOL bMoveRulerAction= TRUE; + sal_Bool bMoveRulerAction= sal_True; ScDocument * pDoc = pDocShell->GetDocument(); String aOldName = pDoc->GetPageStyle( nTab ); - BOOL bUndo( pDoc->IsUndoEnabled() ); + sal_Bool bUndo( pDoc->IsUndoEnabled() ); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE ); @@ -1124,22 +1124,22 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( aButtonDownPt.X() == aButtonUpPt.X() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; DrawInvert( aButtonUpPt.X(), POINTER_HSIZEBAR ); } if( bMoveRulerAction ) @@ -1172,33 +1172,33 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle aRect(0,0,10000,10000); Paint( aRect ); - bLeftRulerChange = FALSE; - bRightRulerChange = FALSE; + bLeftRulerChange = sal_False; + bRightRulerChange = sal_False; } } - bLeftRulerMove = FALSE; - bRightRulerMove = FALSE; + bLeftRulerMove = sal_False; + bRightRulerMove = sal_False; } if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR ) { SetPointer( POINTER_ARROW ); - BOOL bMoveRulerAction = TRUE; + sal_Bool bMoveRulerAction = sal_True; if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint( Rectangle(0,0,10000,10000) ); } else if( aButtonDownPt.Y() == aButtonUpPt.Y() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR ); } if( bMoveRulerAction ) { ScDocument * pDoc = pDocShell->GetDocument(); - BOOL bUndo( pDoc->IsUndoEnabled() ); + sal_Bool bUndo( pDoc->IsUndoEnabled() ); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ); DBG_ASSERT( pStyleSheet, "PageStyle not found" ); @@ -1214,18 +1214,18 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( bTopRulerMove && bTopRulerChange ) { - aULItem.SetUpperValue( (USHORT)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) ); + aULItem.SetUpperValue( (sal_uInt16)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) ); rStyleSet.Put( aULItem ); } else if( bBottomRulerMove && bBottomRulerChange ) { - aULItem.SetLowerValue( (USHORT)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) ); + aULItem.SetLowerValue( (sal_uInt16)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) ); rStyleSet.Put( aULItem ); } else if( bHeaderRulerMove && bHeaderRulerChange ) { const SfxPoolItem* pItem = NULL; - if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET ) + if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, sal_False, &pItem ) == SFX_ITEM_SET ) { SfxItemSet& pHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aHeaderSize = ((const SvxSizeItem&)pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize(); @@ -1239,7 +1239,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( bFooterRulerMove && bFooterRulerChange ) { const SfxPoolItem* pItem = NULL; - if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET ) + if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, sal_False, &pItem ) == SFX_ITEM_SET ) { SfxItemSet& pFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aFooterSize = ((const SvxSizeItem&)pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize(); @@ -1268,26 +1268,26 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle aRect(0,0,10000,10000); Paint( aRect ); - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } } - bTopRulerMove = FALSE; - bBottomRulerMove = FALSE; - bHeaderRulerMove = FALSE; - bFooterRulerMove = FALSE; + bTopRulerMove = sal_False; + bBottomRulerMove = sal_False; + bHeaderRulerMove = sal_False; + bFooterRulerMove = sal_False; } if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT ) { SetPointer(POINTER_ARROW); ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); - BOOL bMoveRulerAction = TRUE; + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bMoveRulerAction = sal_True; if( aButtonDownPt.X() == aButtonUpPt.X() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; if( nColNumberButttonDown == aPageArea.aStart.Col() ) DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT ); else @@ -1314,7 +1314,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( nNewColWidth >= 0 ) { - aFunc.SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_DIRECT, (USHORT)nNewColWidth, TRUE, TRUE); + aFunc.SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_DIRECT, (sal_uInt16)nNewColWidth, sal_True, sal_True); } if ( ValidTab( nTab ) ) { @@ -1324,7 +1324,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle nRect(0,0,10000,10000); Paint( nRect ); } - bColRulerMove = FALSE; + bColRulerMove = sal_False; } ReleaseMouse(); } @@ -1385,7 +1385,7 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight ), aMMMode ); Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight ), aMMMode ); - BOOL bOnColRulerChange = FALSE; + sal_Bool bOnColRulerChange = sal_False; for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ ) { @@ -1395,7 +1395,7 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) && ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() < aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bOnColRulerChange = TRUE; + bOnColRulerChange = sal_True; if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT ) nColNumberButttonDown = i; break; @@ -1404,41 +1404,41 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) && !bRightRulerMove ) { - bLeftRulerChange = TRUE; - bRightRulerChange = FALSE; + bLeftRulerChange = sal_True; + bRightRulerChange = sal_False; } else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) && !bLeftRulerMove ) { - bLeftRulerChange = FALSE; - bRightRulerChange = TRUE; + bLeftRulerChange = sal_False; + bRightRulerChange = sal_True; } else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > ( aTopLeft.Y() - 2 ) && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bTopRulerChange = TRUE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_True; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > ( aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = TRUE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_True; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > ( aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bFooterRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = TRUE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_True; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > ( aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = TRUE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_True; } if( bPageMargin ) @@ -1529,9 +1529,9 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) } } //Issue51656 Add resizeable margin on page preview from maoyg -void ScPreview::InvalidateLocationData(ULONG nId) +void ScPreview::InvalidateLocationData(sal_uLong nId) { - bLocationValid = FALSE; + bLocationValid = sal_False; if (pViewShell->HasAccessibilityObjects()) pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) ); } @@ -1558,7 +1558,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre } //Issue51656 Add resizeable margin on page preview from maoyg -void ScPreview::DragMove( long nDragMovePos, USHORT nFlags ) +void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) { Fraction aPreviewZoom( nZoom, 100 ); Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); @@ -1585,7 +1585,7 @@ void ScPreview::DragMove( long nDragMovePos, USHORT nFlags ) } } -void ScPreview::DrawInvert( long nDragPos, USHORT nFlags ) +void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags ) { long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Height(); long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Width(); |