From d842884c5ddbfbaa691de03edf7da9fe1679a516 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Tue, 5 Oct 2010 07:57:51 -0500 Subject: [PATCH] FASTBOOL to bool conversion --- sd/inc/drawdoc.hxx | 8 ++++---- sd/inc/pglink.hxx | 2 +- sd/inc/sderror.hxx | 4 ++-- sd/inc/sdpage.hxx | 2 +- sd/source/core/drawdoc.cxx | 4 ++-- sd/source/core/drawdoc2.cxx | 13 ++++++------- sd/source/core/drawdoc3.cxx | 6 +++--- sd/source/core/sdpage2.cxx | 4 ++-- sd/source/ui/animations/motionpathtag.cxx | 2 +- sd/source/ui/func/fupoor.cxx | 4 ++-- sd/source/ui/view/drviews4.cxx | 2 +- sd/source/ui/view/drviews7.cxx | 2 +- sd/source/ui/view/drviewsa.cxx | 2 +- 13 files changed, 27 insertions(+), 28 deletions(-) diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index be38885..71217c4 100755 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -224,10 +224,10 @@ public: ~SdDrawDocument(); virtual SdrModel* AllocModel() const; - virtual SdrPage* AllocPage(FASTBOOL bMasterPage); + virtual SdrPage* AllocPage(bool bMasterPage); virtual const SdrModel* LoadModel(const String& rFileName); virtual void DisposeLoadedModels(); - virtual FASTBOOL IsReadOnly() const; + virtual bool IsReadOnly() const; virtual void SetChanged(sal_Bool bFlag = sal_True); virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const; @@ -449,8 +449,8 @@ public: void Merge(SdrModel& rSourceModel, USHORT nFirstPageNum=0, USHORT nLastPageNum=0xFFFF, USHORT nDestPos=0xFFFF, - FASTBOOL bMergeMasterPages=FALSE, FASTBOOL bAllMasterPages=FALSE, - FASTBOOL bUndo=TRUE, FASTBOOL bTreadSourceAsConst=FALSE); + bool bMergeMasterPages = false, bool bAllMasterPages = false, + bool bUndo = true, bool bTreadSourceAsConst = false); SD_DLLPUBLIC ::com::sun::star::text::WritingMode GetDefaultWritingMode() const; void SetDefaultWritingMode( ::com::sun::star::text::WritingMode eMode ); diff --git a/sd/inc/pglink.hxx b/sd/inc/pglink.hxx index 2d301fa..4c66be1 100644 --- a/sd/inc/pglink.hxx +++ b/sd/inc/pglink.hxx @@ -47,7 +47,7 @@ public: virtual void Closed(); virtual void DataChanged( const String& , const ::com::sun::star::uno::Any & ); - FASTBOOL Connect() { return 0 != SvBaseLink::GetRealObject(); } + bool Connect() { return 0 != SvBaseLink::GetRealObject(); } }; #else diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx index af0d92f..f899c22 100644 --- a/sd/inc/sderror.hxx +++ b/sd/inc/sderror.hxx @@ -49,12 +49,12 @@ #ifndef __RSC -inline FASTBOOL IsWarning( ULONG nErr ) +inline bool IsWarning( ULONG nErr ) { return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr ); } -inline FASTBOOL IsError( ULONG nErr ) +inline bool IsError( ULONG nErr ) { return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr ); } diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 744c37b..7e56cb0 100755 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -188,7 +188,7 @@ public: virtual void SetUppBorder(INT32 nBorder); virtual void SetLwrBorder(INT32 nBorder); virtual void SetModel(SdrModel* pNewModel); - virtual FASTBOOL IsReadOnly() const; + virtual bool IsReadOnly() const; sd::ShapeList& GetPresentationShapeList() { return maPresentationShapeList; } diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index c8e61c4..2905e57 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -534,9 +534,9 @@ SdrModel* SdDrawDocument::AllocModel() const |* \************************************************************************/ -SdrPage* SdDrawDocument::AllocPage(FASTBOOL bMasterPage) +SdrPage* SdDrawDocument::AllocPage(bool bMasterPage) { - return new SdPage(*this, NULL, (BOOL)bMasterPage); + return new SdPage(*this, NULL, bMasterPage); } /************************************************************************* diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 07e294c..9f43d94 100755 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -568,8 +568,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * Handzettel-Seite einfuegen **********************************************************************/ - BOOL bMasterPage; - SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=FALSE) ); + SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(FALSE) ); SdPage* pRefPage = NULL; @@ -594,7 +593,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * MasterPage einfuegen und an der Handzettel-Seite vermerken **********************************************************************/ - SdPage* pHandoutMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pHandoutMPage = (SdPage*) AllocPage(TRUE); pHandoutMPage->SetSize( pHandoutPage->GetSize() ); pHandoutMPage->SetPageKind(PK_HANDOUT); pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(), @@ -617,7 +616,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) if (nPageCount == 0) { - pPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=FALSE) ); + pPage = dynamic_cast< SdPage* >( AllocPage(FALSE) ); if( pRefPage ) { @@ -673,7 +672,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * MasterPage einfuegen und an der Seite vermerken **********************************************************************/ - SdPage* pMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pMPage = (SdPage*) AllocPage(TRUE); pMPage->SetSize( pPage->GetSize() ); pMPage->SetBorder( pPage->GetLftBorder(), pPage->GetUppBorder(), @@ -687,7 +686,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * Notizen-Seite einfuegen **********************************************************************/ - SdPage* pNotesPage = (SdPage*) AllocPage(bMasterPage=FALSE); + SdPage* pNotesPage = (SdPage*) AllocPage(FALSE); if( pRefDocument ) pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES ); @@ -719,7 +718,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * MasterPage einfuegen und an der Notizen-Seite vermerken **********************************************************************/ - SdPage* pNotesMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pNotesMPage = (SdPage*) AllocPage(TRUE); pNotesMPage->SetSize( pNotesPage->GetSize() ); pNotesMPage->SetPageKind(PK_NOTES); pNotesMPage->SetBorder( pNotesPage->GetLftBorder(), diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 4fa6467..8fe73c8 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1205,7 +1205,7 @@ void SdDrawDocument::DisposeLoadedModels() |* \************************************************************************/ -FASTBOOL SdDrawDocument::IsReadOnly() const +bool SdDrawDocument::IsReadOnly() const { return FALSE; } @@ -2034,8 +2034,8 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, void SdDrawDocument::Merge(SdrModel& rSourceModel, USHORT nFirstPageNum, USHORT nLastPageNum, USHORT nDestPos, - FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages, - FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst) + bool bMergeMasterPages, bool bAllMasterPages, + bool bUndo, bool bTreadSourceAsConst) { sal_uInt16 nMasterPageCount = GetMasterPageCount(); SdrModel::Merge( rSourceModel, nFirstPageNum, nLastPageNum, nDestPos, bMergeMasterPages, bAllMasterPages, bUndo, bTreadSourceAsConst ); diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 2b3db02..ae7cded 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -316,9 +316,9 @@ void SdPage::SetModel(SdrModel* pNewModel) |* \************************************************************************/ -FASTBOOL SdPage::IsReadOnly() const +bool SdPage::IsReadOnly() const { - return FALSE; + return false; } /************************************************************************* diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 6648aed..6cf0de9 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -798,7 +798,7 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt ) if(mrView.IsDragObj()) { - FASTBOOL bWasNoSnap = mrView.GetDragStat().IsNoSnap(); + bool bWasNoSnap = mrView.GetDragStat().IsNoSnap(); BOOL bWasSnapEnabled = mrView.IsSnapEnabled(); // switch snapping off diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 7bfafc3..af2519d 100755 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -820,7 +820,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt) if(mpView->IsDragObj()) { - FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); + bool bWasNoSnap = rDragStat.IsNoSnap(); BOOL bWasSnapEnabled = mpView->IsSnapEnabled(); // switch snapping off @@ -831,7 +831,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt) mpView->MovAction(aEndPoint); mpView->EndDragObj(); - + // restore snap if(!bWasNoSnap) ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index b3a7b30..bbbccd4 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -440,7 +440,7 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) { if ( !IsInputLocked() ) { - FASTBOOL bIsSetPageOrg = mpDrawView->IsSetPageOrg(); + bool bIsSetPageOrg = mpDrawView->IsSetPageOrg(); if (mbIsRulerDrag) { diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index af6de2d..6c290ce 100755 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -240,7 +240,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_DRAW_TEXT_VERTICAL ); } - FASTBOOL bConvertToPathPossible = mpDrawView->IsConvertToPathObjPossible(FALSE); + bool bConvertToPathPossible = mpDrawView->IsConvertToPathObjPossible(FALSE); const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); const ULONG nMarkCount = rMarkList.GetMarkCount(); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 374310d..b69581d 100755 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -771,7 +771,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) SdrObject* pObj = NULL; const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); ULONG nMarkCount = rMarkList.GetMarkCount(); - FASTBOOL bOneLayer = TRUE; + bool bOneLayer = TRUE; // Use the first ten selected shapes as a (hopefully // representative) sample of all shapes of the current page. -- 1.7.1