summaryrefslogtreecommitdiff
path: root/sw/source/core/view/viewsh.cxx
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
commit7f33ed417b2e29e5470724ea76967f64699a2662 (patch)
treeabfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/core/view/viewsh.cxx
parent80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff)
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/core/view/viewsh.cxx')
-rw-r--r--sw/source/core/view/viewsh.cxx276
1 files changed, 138 insertions, 138 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0bbfc70d5a22..8d5d32d3a0b6 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -95,13 +95,13 @@
// #i74769#
#include <svx/sdrpaintwindow.hxx>
-BOOL ViewShell::bLstAct = FALSE;
+sal_Bool ViewShell::bLstAct = sal_False;
ShellResource *ViewShell::pShellRes = 0;
Window *ViewShell::pCareWindow = 0;
BitmapEx* ViewShell::pErrorBmp = NULL;
BitmapEx* ViewShell::pReplaceBmp = NULL;
-BOOL bInSizeNotify = FALSE;
+sal_Bool bInSizeNotify = sal_False;
DBG_NAME(LayoutIdle)
@@ -185,24 +185,24 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
|*
******************************************************************************/
-void ViewShell::ImplEndAction( const BOOL bIdleEnd )
+void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
//Fuer den Drucker gibt es hier nichts zu tun.
if ( !GetWin() || IsPreView() )
{
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
UISizeNotify();
return;
}
- bInEndAction = TRUE;
+ bInEndAction = sal_True;
//Laeuft hiermit das EndAction der Letzten Shell im Ring?
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{ if ( pSh->ActionPend() )
- { ViewShell::bLstAct = FALSE;
+ { ViewShell::bLstAct = sal_False;
pSh = this;
}
else
@@ -218,14 +218,14 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
- const BOOL bExtraData = ::IsExtraData( GetDoc() );
+ const sal_Bool bExtraData = ::IsExtraData( GetDoc() );
if ( !bIdleEnd )
{
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
if ( nLockPaint )
- aAction.SetPaint( FALSE );
+ aAction.SetPaint( sal_False );
aAction.SetInputType( INPUT_KEYBOARD );
aAction.Action();
}
@@ -242,7 +242,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
if ( !nLockPaint )
{
- BOOL bPaintsFromSystem = aInvalidRect.HasArea();
+ sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
GetWin()->Update();
if ( aInvalidRect.HasArea() )
{
@@ -250,9 +250,9 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->AddPaintRect( aInvalidRect );
ResetInvalidRect();
- bPaintsFromSystem = TRUE;
+ bPaintsFromSystem = sal_True;
}
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
SwRegionRects *pRegion = Imp()->GetRegion();
@@ -262,7 +262,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
// Mitte eine Selektion und mit einem anderen Cursor an linken
// rechten Rand springen. Ohne ShowCrsr verschwindet die
// Selektion
- BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
+ sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
@@ -283,7 +283,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
SwRect aRect( (*pRegion)[ pRegion->Count() - 1 ] );
pRegion->Remove( pRegion->Count() - 1 );
- BOOL bPaint = TRUE;
+ sal_Bool bPaint = sal_True;
if ( IsEndActionByVirDev() )
{
//virtuelles device erzeugen und einstellen.
@@ -292,7 +292,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
MapMode aMapMode( GetOut()->GetMapMode() );
pVout->SetMapMode( aMapMode );
- BOOL bSizeOK = TRUE;
+ sal_Bool bSizeOK = sal_True;
Rectangle aTmp1( aRect.SVRect() );
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
@@ -314,7 +314,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
}
if ( bSizeOK )
{
- bPaint = FALSE;
+ bPaint = sal_False;
// --> OD 2007-07-26 #i79947#
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
@@ -397,19 +397,19 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->DelRegion();
}
if( bShowCrsr )
- ((SwCrsrShell*)this)->ShowCrsrs( TRUE );
+ ((SwCrsrShell*)this)->ShowCrsrs( sal_True );
}
else
{
Imp()->DelRegion();
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
}
}
else
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
- bInEndAction = FALSE;
- ViewShell::bLstAct = FALSE;
+ bInEndAction = sal_False;
+ ViewShell::bLstAct = sal_False;
Imp()->EndAction();
@@ -436,7 +436,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
void ViewShell::ImplStartAction()
{
- bPaintWorks = FALSE;
+ bPaintWorks = sal_False;
Imp()->StartAction();
}
@@ -453,12 +453,12 @@ void ViewShell::ImplStartAction()
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
- GetWin()->EnablePaint( FALSE ); //Auch die Controls abklemmen.
+ GetWin()->EnablePaint( sal_False ); //Auch die Controls abklemmen.
Imp()->LockPaint();
}
-void ViewShell::ImplUnlockPaint( BOOL bVirDev )
+void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
{
SET_CURR_SHELL( this );
if ( GetWin() && GetWin()->IsVisible() )
@@ -473,7 +473,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
aSize.Height()+= 20;
if( pVout->SetOutputSize( aSize ) )
{
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Validate();
Imp()->UnlockPaint();
@@ -497,7 +497,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
delete pVout;
@@ -505,7 +505,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
}
@@ -522,9 +522,9 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
|*
******************************************************************************/
-BOOL ViewShell::AddPaintRect( const SwRect & rRect )
+sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh = this;
do
{
@@ -621,7 +621,7 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
{
if(rVSh.pSfxViewShell)
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = rVSh.pSfxViewShell->GetViewFrame();
const SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
Window *pWin = pChWin ? pChWin->GetWindow() : NULL;
@@ -640,7 +640,7 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
|*
******************************************************************************/
-Point ViewShell::GetPagePos( USHORT nPageNum ) const
+Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
@@ -654,14 +654,14 @@ Point ViewShell::GetPagePos( USHORT nPageNum ) const
|*
******************************************************************************/
-USHORT ViewShell::GetNumPages()
+sal_uInt16 ViewShell::GetNumPages()
{
//Es kann sein, das noch kein Layout existiert weil die Methode vom
//Root-Ctor gerufen wird.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
-sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
+sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
{
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
@@ -678,11 +678,11 @@ sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
|*
*************************************************************************/
-void ViewShell::UpdateFlds(BOOL bCloseDB)
+void ViewShell::UpdateFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
- BOOL bCrsr = ISA(SwCrsrShell);
+ sal_Bool bCrsr = ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell*)this)->StartAction();
else
@@ -704,9 +704,9 @@ void ViewShell::UpdateAllCharts()
GetDoc()->UpdateAllCharts();
}
-BOOL ViewShell::HasCharts() const
+sal_Bool ViewShell::HasCharts() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwStartNode *pStNd;
SwNodeIndex aIdx( *GetDoc()->GetNodes().GetEndOfAutotext().
StartOfSectionNode(), 1 );
@@ -716,7 +716,7 @@ BOOL ViewShell::HasCharts() const
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
if( pNd && pNd->GetChartTblName().Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -782,9 +782,9 @@ void ViewShell::LayoutIdle()
|*
*************************************************************************/
-void lcl_InvalidateAllCntnt( ViewShell& rSh, BYTE nInv )
+void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
{
- BOOL bCrsr = rSh.ISA(SwCrsrShell);
+ sal_Bool bCrsr = rSh.ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell&)rSh).StartAction();
else
@@ -829,9 +829,9 @@ void ViewShell::SetParaSpaceMax( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -841,9 +841,9 @@ void ViewShell::SetParaSpaceMaxAtPages( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -853,9 +853,9 @@ void ViewShell::SetTabCompat( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::TAB_COMPAT) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -865,12 +865,12 @@ void ViewShell::SetAddExtLeading( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_EXT_LEADING) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
if ( pTmpDrawModel )
pTmpDrawModel->SetAddExtLeading( bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -880,7 +880,7 @@ void ViewShell::SetUseVirDev( bool bNewVirtual )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) != bNewVirtual )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
// this sets the flag at the document and calls PrtDataChanged
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
pIDDA->setReferenceDeviceType( bNewVirtual, true );
@@ -894,9 +894,9 @@ void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -908,9 +908,9 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -921,7 +921,7 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -933,7 +933,7 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -945,9 +945,9 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -959,9 +959,9 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) != _bDoNotJustifyLinesWithManualBreak )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -978,7 +978,7 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
void ViewShell::Reformat()
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
// Wir gehen auf Nummer sicher:
// Wir muessen die alten Fontinformationen wegschmeissen,
@@ -1020,26 +1020,26 @@ void ViewShell::Reformat()
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
//Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
//Progress einschalten wenn noch keiner Lauft.
- const BOOL bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
+ const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
- USHORT nEndPage = GetLayout()->GetPageNum();
+ sal_uInt16 nEndPage = GetLayout()->GetPageNum();
nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
}
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetCalcLayout( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetCalcLayout( sal_True );
+ aAction.SetReschedule( sal_True );
GetDoc()->LockExpFlds();
aAction.Action();
GetDoc()->UnlockExpFlds();
@@ -1049,9 +1049,9 @@ void ViewShell::CalcLayout()
if ( aAction.IsExpFlds() )
{
aAction.Reset();
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetReschedule( sal_True );
SwDocPosUpdate aMsgHnt( 0 );
GetDoc()->UpdatePageFlds( &aMsgHnt );
@@ -1097,18 +1097,18 @@ void ViewShell::SetFirstVisPageInvalid()
void ViewShell::SizeChgNotify()
{
if ( !pWin )
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || bPaintInProgress )
{
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
{
- const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( FALSE );
+ const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( sal_False );
const SwPageFrm *pPage;
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
{
- USHORT nVirtNum = pPage->GetVirtPageNum();
+ sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
String sDisplay = rNum.GetNumStr( nVirtNum );
PageNumNotify( this, pCnt->GetPhyPageNum(), nVirtNum, sDisplay );
@@ -1117,7 +1117,7 @@ void ViewShell::SizeChgNotify()
}
else
{
- bDocSizeChgd = FALSE;
+ bDocSizeChgd = sal_False;
::SizeNotify( this, GetDocSize() );
}
}
@@ -1151,7 +1151,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
- const BOOL bFull = aPrevArea.IsEmpty();
+ const sal_Bool bFull = aPrevArea.IsEmpty();
aVisArea = rRect;
SetFirstVisPageInvalid();
@@ -1245,7 +1245,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
const long nOfst = GetOut()->PixelToLogic(
Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width();
- for ( USHORT i = 0;
+ for ( sal_uInt16 i = 0;
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
@@ -1328,9 +1328,9 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
|*
******************************************************************************/
-BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
+sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
- const ULONG nColCnt = pOut->GetColorCount();
+ const sal_uLong nColCnt = pOut->GetColorCount();
long lMult = 1, lMax = LONG_MAX;
if ( nColCnt == 65536 )
{
@@ -1371,7 +1371,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
{
- Imp()->bStopSmooth = FALSE;
+ Imp()->bStopSmooth = sal_False;
const SwRect aOldVis( VisArea() );
@@ -1434,9 +1434,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
// SW paint stuff
PaintDesktop( aRect );
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// end paint and destroy ObjectContact again
DLPostPaint2(true);
@@ -1529,9 +1529,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
}
- Imp()->bSmoothUpdate = TRUE;
+ Imp()->bSmoothUpdate = sal_True;
GetWin()->Update();
- Imp()->bSmoothUpdate = FALSE;
+ Imp()->bSmoothUpdate = sal_False;
if(!Imp()->bStopSmooth)
{
@@ -1619,7 +1619,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if ( !Imp()->bStopSmooth )
--nLockPaint;
SetFirstVisPageInvalid();
- return TRUE;
+ return sal_True;
}
delete pVout;
}
@@ -1630,7 +1630,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
else
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -1651,7 +1651,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
//Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
//Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
//den diese werden spaeter beim VisPortChgd ausgespart.
- BOOL bBorderOnly = FALSE;
+ sal_Bool bBorderOnly = sal_False;
const SwRootFrm *pRoot = GetDoc()->GetRootFrm();
if ( rRect.Top() > pRoot->Frm().Bottom() )
{
@@ -1659,7 +1659,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
while ( pPg && pPg->GetNext() )
pPg = pPg->GetNext();
if ( !pPg || !pPg->Frm().IsOver( VisArea() ) )
- bBorderOnly = TRUE;
+ bBorderOnly = sal_True;
}
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
@@ -1732,7 +1732,7 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
- for ( USHORT i = 0; i < rRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rRegion.Count(); ++i )
{
const Rectangle aRectangle(rRegion[i].SVRect());
@@ -1786,20 +1786,20 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
|*
******************************************************************************/
-BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
+sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
- return FALSE;
+ return sal_False;
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = VisArea().Bottom();
const SwTwips nRight = VisArea().Right();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
(pPage->Frm().Left() > nRight)))
{
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
- bRet = TRUE;
+ bRet = sal_True;
pPage = (SwPageFrm*)pPage->GetNext();
}
@@ -1813,7 +1813,7 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
Imp()->DelRegion();
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
// We increment the action counter to avoid a recursive call of actions
// e.g. from a SwFEShell::RequestObjectResize(..) in bug 95829.
// A recursive call of actions is no good idea because the inner action
@@ -1828,11 +1828,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
//Nur dann interessant, wenn sich im sichtbaren Bereich etwas
//veraendert hat.
- BOOL bStop = TRUE;
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ sal_Bool bStop = sal_True;
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{
const SwRect &rTmp = (*pRegion)[i];
- if ( FALSE == (bStop = rTmp.IsOver( VisArea() )) )
+ if ( sal_False == (bStop = rTmp.IsOver( VisArea() )) )
break;
}
if ( bStop )
@@ -1847,24 +1847,24 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
//Erst Invert dann Compress, niemals andersherum!
pRegion->Invert();
pRegion->Compress();
- bRet = FALSE;
+ bRet = sal_False;
if ( pRegion->Count() )
{
SwRegionRects aRegion( rRect );
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{ const SwRect &rTmp = (*pRegion)[i];
if ( !rRect.IsInside( rTmp ) )
{
InvalidateWindows( rTmp );
if ( rTmp.IsOver( VisArea() ) )
{ aRegion -= rTmp;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
if ( bRet )
{
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
GetWin()->Invalidate( aRegion[i].SVRect() );
if ( rRect != VisArea() )
@@ -1881,11 +1881,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
Imp()->DelRegion();
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -1907,7 +1907,7 @@ void ViewShell::Paint(const Rectangle &rRect)
{
SwRect aTmp( rRect );
if ( !Imp()->aSmoothRect.IsInside( aTmp ) )
- Imp()->bStopSmooth = TRUE;
+ Imp()->bStopSmooth = sal_True;
else
{
Imp()->aSmoothRect = aTmp;
@@ -1940,9 +1940,9 @@ void ViewShell::Paint(const Rectangle &rRect)
return;
}
- bPaintInProgress = TRUE;
+ bPaintInProgress = sal_True;
SET_CURR_SHELL( this );
- SwRootFrm::SetNoVirDev( TRUE );
+ SwRootFrm::SetNoVirDev( sal_True );
//Wir wollen nicht staendig hin und her Clippen, wir verlassen
//uns darauf, das sich alle auf das Rechteck beschraeken und
@@ -1959,9 +1959,9 @@ void ViewShell::Paint(const Rectangle &rRect)
//vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
}
else
{
@@ -1983,9 +1983,9 @@ void ViewShell::Paint(const Rectangle &rRect)
//vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// --> OD 2009-08-12 #i101192#
// end Pre/PostPaint encapsulation
DLPostPaint2(true);
@@ -1994,8 +1994,8 @@ void ViewShell::Paint(const Rectangle &rRect)
//delete pSaveHdl;
}
- SwRootFrm::SetNoVirDev( FALSE );
- bPaintInProgress = FALSE;
+ SwRootFrm::SetNoVirDev( sal_False );
+ bPaintInProgress = sal_False;
UISizeNotify();
}
}
@@ -2050,7 +2050,7 @@ void ViewShell::SetBrowseBorder( const Size& rNew )
{
aBrowseBorder = rNew;
if ( aVisArea.HasArea() )
- CheckBrowseView( FALSE );
+ CheckBrowseView( sal_False );
}
}
@@ -2082,7 +2082,7 @@ sal_Int32 ViewShell::GetBrowseWidth() const
|*
******************************************************************************/
-void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
+void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
{
if ( !bBrowseChgd &&
!getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -2127,7 +2127,7 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
// Wenn sich die Groessenverhaeltnise im BrowseModus aendern,
// muss die Position und PrtArea der Cntnt- und Tab-Frames invalidiert werden.
- BYTE nInv = INV_PRTAREA | INV_TABLE | INV_POS;
+ sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS;
// Beim BrowseModus-Wechsel benoetigen die CntntFrms
// wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
if( bBrowseChgd )
@@ -2257,13 +2257,13 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SET_CURR_SHELL( this );
- BOOL bReformat = FALSE;
+ sal_Bool bReformat = sal_False;
if( pOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
{
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !rOpt.IsShowHiddenField() );
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( pOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
{
@@ -2274,14 +2274,14 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
pFldType->Modify( &aHnt, 0);
}
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( !bReformat && pOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
- // bReformat wird TRUE, wenn ...
+ // bReformat wird sal_True, wenn ...
// - Feldnamen anzeigen oder nicht ...
// ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
// - Das Window ist natuerlich was ganz anderes als der Drucker...
@@ -2299,12 +2299,12 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
// sondern der Bildschirm, muss bei Zoomfaktoraenderung neu formatiert
// werden.
if( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
- bReformat = TRUE;
+ bReformat = sal_True;
if ( HasDrawView() || rOpt.IsGridVisible() )
{
@@ -2340,7 +2340,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
pDView->SetMarkHdlSizePixel(rOpt.IsBigMarkHdl() ? 9 : 7);
}
- BOOL bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
*pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
pOpt->SetUIOptions(rOpt);
@@ -2360,7 +2360,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( bOnlineSpellChgd )
{
ViewShell *pSh = (ViewShell*)this->GetNext();
- BOOL bOnlineSpl = rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpl = rOpt.IsOnlineSpell();
while( pSh != this )
{ pSh->pOpt->SetOnlineSpell( bOnlineSpl );
Window *pTmpWin = pSh->GetWin();
@@ -2387,7 +2387,7 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
//the API-Flag of the view options is set but never reset
//it is required to set scroll bars in readonly documents
if(rOpt.IsStarOneSetting())
- pOpt->SetStarOneSetting(TRUE);
+ pOpt->SetStarOneSetting(sal_True);
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
@@ -2401,7 +2401,7 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
|*
******************************************************************************/
-void ViewShell::SetReadonlyOption(BOOL bSet)
+void ViewShell::SetReadonlyOption(sal_Bool bSet)
{
//JP 01.02.99: bei ReadOnly Flag richtig abfragen und ggfs. neu
// formatieren; Bug 61335
@@ -2410,9 +2410,9 @@ void ViewShell::SetReadonlyOption(BOOL bSet)
if( bSet != pOpt->IsReadonly() )
{
// damit die Flags richtig erfragt werden koennen.
- pOpt->SetReadonly( FALSE );
+ pOpt->SetReadonly( sal_False );
- BOOL bReformat = pOpt->IsFldName();
+ sal_Bool bReformat = pOpt->IsFldName();
pOpt->SetReadonly( bSet );
@@ -2439,7 +2439,7 @@ void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet &&
getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- pOpt->SetPrtFormat( TRUE );
+ pOpt->SetPrtFormat( sal_True );
pOpt->SetPDFExport(bSet);
}
}
@@ -2462,7 +2462,7 @@ void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
|*
******************************************************************************/
-void ViewShell::SetPrtFormatOption( BOOL bSet )
+void ViewShell::SetPrtFormatOption( sal_Bool bSet )
{
pOpt->SetPrtFormat( bSet );
}
@@ -2481,26 +2481,26 @@ void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
{
- bDocSizeChgd = FALSE;
- BOOL bOld = bInSizeNotify;
- bInSizeNotify = TRUE;
+ bDocSizeChgd = sal_False;
+ sal_Bool bOld = bInSizeNotify;
+ bInSizeNotify = sal_True;
::SizeNotify( this, GetDocSize() );
bInSizeNotify = bOld;
}
}
-void ViewShell::SetRestoreActions(USHORT nSet)
+void ViewShell::SetRestoreActions(sal_uInt16 nSet)
{
DBG_ASSERT(!GetRestoreActions()||!nSet, "mehrfaches Restore der Actions ?");
Imp()->SetRestoreActions(nSet);
}
-USHORT ViewShell::GetRestoreActions() const
+sal_uInt16 ViewShell::GetRestoreActions() const
{
return Imp()->GetRestoreActions();
}
-BOOL ViewShell::IsNewLayout() const
+sal_Bool ViewShell::IsNewLayout() const
{
return GetLayout()->IsNewLayout();
}
@@ -2672,7 +2672,7 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwR
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
- USHORT nResId = 0, nHCResId = 0;
+ sal_uInt16 nResId = 0, nHCResId = 0;
if( bIsErrorState )
{
ppRet = &pErrorBmp;
@@ -2688,7 +2688,7 @@ const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
if( !*ppRet )
{
- USHORT nBmpResId =
+ sal_uInt16 nBmpResId =
Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? nHCResId : nResId;
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );