diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-16 00:38:46 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-16 09:51:13 +0100 |
commit | 55a5e890ef531961a811508a316c83bd6a679781 (patch) | |
tree | 8b18e645be1b9e661ae67d1d72008b5d53436c95 /sw | |
parent | 78a4b4247b90a75e7a5a8b42aef8d39187cc0182 (diff) |
sal_Bool to bool + make a local function static
Change-Id: I8285f69e175dd10f6128a1d9b39bdc646c51df43
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/swbaslnk.hxx | 20 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 38 | ||||
-rw-r--r-- | sw/source/core/fields/ddefld.cxx | 10 |
4 files changed, 36 insertions, 36 deletions
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx index f145b5b05e3e..85566d538011 100644 --- a/sw/inc/swbaslnk.hxx +++ b/sw/inc/swbaslnk.hxx @@ -32,8 +32,8 @@ class SwBaseLink : public ::sfx2::SvBaseLink SwCntntNode* pCntntNode; bool bSwapIn : 1; - sal_Bool bNoDataFlag : 1; - sal_Bool bIgnoreDataChanged : 1; + bool bNoDataFlag : 1; + bool bIgnoreDataChanged : 1; ReReadThread* m_pReReadThread; protected: @@ -42,7 +42,7 @@ protected: SwBaseLink( const OUString& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj, SwCntntNode* pNode = 0 ) : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ), - bSwapIn( false ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ), + bSwapIn( false ), bNoDataFlag( false ), bIgnoreDataChanged( false ), m_pReReadThread(0) {} @@ -51,7 +51,7 @@ public: SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 ) : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ), - bSwapIn( false ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ), + bSwapIn( false ), bNoDataFlag( false ), bIgnoreDataChanged( false ), m_pReReadThread(0) {} virtual ~SwBaseLink(); @@ -68,18 +68,18 @@ public: // For graphics only. bool SwapIn( bool bWaitForData = false, bool bNativFormat = false ); - sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); } + bool Connect() { return 0 != SvBaseLink::GetRealObject(); } // Only for graphics-links (for switching between DDE / Grf-link). void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); } - sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const; - virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, + bool IsRecursion( const SwBaseLink* pChkLnk ) const; + virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, sal_Int32 nEnd = -1 ) const; - void SetNoDataFlag() { bNoDataFlag = sal_True; } - sal_Bool ChkNoDataFlag() { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; } - sal_Bool IsNoDataFlag() const { return bNoDataFlag; } + void SetNoDataFlag() { bNoDataFlag = true; } + bool ChkNoDataFlag() { const bool bRet = bNoDataFlag; bNoDataFlag = false; return bRet; } + bool IsNoDataFlag() const { return bNoDataFlag; } }; #endif diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index b723bf3450ad..0b859064e8de 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -76,7 +76,7 @@ public: const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual const SwNode* GetAnchor() const; - virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, + virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, sal_Int32 nEnd = -1 ) const; inline SwSectionNode* GetSectNode() @@ -1586,7 +1586,7 @@ const SwNode* SwIntrnlSectRefLink::GetAnchor() const return rSectFmt.GetSectionNode( false ); } -sal_Bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, +bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 , sal_Int32 ) const { SwStartNode* pSttNd = rSectFmt.GetSectionNode( false ); diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 9825b7f859d8..84c8ab0c26aa 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -51,7 +51,7 @@ using namespace com::sun::star; -sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ); +static bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ); TYPEINIT1( SwBaseLink, ::sfx2::SvBaseLink ); @@ -92,7 +92,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) SwDoc* pDoc = pCntntNode->GetDoc(); if( pDoc->IsInDtor() || ChkNoDataFlag() || bIgnoreDataChanged ) { - bIgnoreDataChanged = sal_False; + bIgnoreDataChanged = false; return SUCCESS; } @@ -126,7 +126,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) bool bUpdate = false; bool bGraphicArrived = false; - sal_Bool bGraphicPieceArrived = sal_False; + bool bGraphicPieceArrived = false; bool bDontNotify = false; Size aGrfSz, aFrmFmtSz; @@ -168,7 +168,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) // we need to go through bGraphicArrived down there. // Or else the graphic is painted at its definitive size bGraphicArrived = true; - bGraphicPieceArrived = sal_False; + bGraphicPieceArrived = false; } pSwGrfNode->SetGraphic(aGrf, rGrfObj.GetLink()); @@ -210,11 +210,11 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) if( bUpdate && !bDontNotify && (!bSwapIn || bGraphicArrived) && !bInNotifyLinks) { - sal_Bool bLockView = sal_False; + bool bLockView = false; if( pSh ) { bLockView = pSh->IsViewLocked(); - pSh->LockView( sal_True ); + pSh->LockView( true ); } if( pESh ) @@ -244,9 +244,9 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) ( !bSwapIn || GRAPHIC_DEFAULT == pGrfNd->GetGrfObj().GetType())) { - pBLink->bIgnoreDataChanged = sal_False; + pBLink->bIgnoreDataChanged = false; pBLink->DataChanged( rMimeType, rValue ); - pBLink->bIgnoreDataChanged = sal_True; + pBLink->bIgnoreDataChanged = true; pGrfNd->SetGraphicArrived( ((SwGrfNode*)pCntntNode)-> IsGraphicArrived() ); @@ -271,7 +271,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) if( pESh ) { - const sal_Bool bEndActionByVirDev = pESh->IsEndActionByVirDev(); + const bool bEndActionByVirDev = pESh->IsEndActionByVirDev(); pESh->SetEndActionByVirDev( sal_True ); pESh->EndAllAction(); pESh->SetEndActionByVirDev( bEndActionByVirDev ); @@ -280,15 +280,15 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) pSh->EndAction(); if( pSh && !bLockView ) - pSh->LockView( sal_False ); + pSh->LockView( false ); } return SUCCESS; } -sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ) +static bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwViewShell *pSh; CurrShell *pCurr = 0; if ( pGrfNd->GetDoc()->GetEditShell( &pSh ) ) @@ -326,7 +326,7 @@ sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfN SwFmtFrmSize aAttr( rOldAttr ); aAttr.SetSize( aCalcSz ); pFmt->SetFmtAttr( aAttr ); - bRet = sal_True; + bRet = true; } if( !aSz.Width() ) @@ -341,7 +341,7 @@ sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfN 0 != (pANd = & pAPos->nNode.GetNode()) && 0 != (pTblNd = pANd->FindTableNode()) ) { - const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = pTblNd->GetTable().GetHTMLTableLayout(); if( pLayout ) @@ -409,7 +409,7 @@ bool SwBaseLink::SwapIn( bool bWaitForData, bool bNativFormat ) { // The Flag needs to be reset on a SwapIn, because // we want to reapply the data. - bIgnoreDataChanged = sal_False; + bIgnoreDataChanged = false; DataChanged( aMimeType, aValue ); } } @@ -463,7 +463,7 @@ const SwNode* SwBaseLink::GetAnchor() const return 0; } -sal_Bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const +bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const { SwServerObjectRef aRef( (SwServerObject*)GetObj() ); if( aRef.Is() ) @@ -472,14 +472,14 @@ sal_Bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const // if we are contained in them. Else we have a recursion. return aRef->IsLinkInServer( pChkLnk ); } - return sal_False; + return false; } -sal_Bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, sal_Int32, sal_Int32 ) const +bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, sal_Int32, sal_Int32 ) const { // Not Graphic or OLE Links // Fields or Sections have their own derivation! - return sal_False; + return false; } SwBaseLink::~SwBaseLink() diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index f5cbf4c8b80a..e79729c8b3c6 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -49,7 +49,7 @@ public: const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual const SwNode* GetAnchor() const; - virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, + virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0, sal_Int32 nEnd = -1 ) const; }; @@ -188,7 +188,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const return pNd; } -sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, +bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt, sal_Int32 nEnd ) const { // here, any anchor of the normal NodesArray should be sufficient @@ -207,7 +207,7 @@ sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, if( pTblNd->GetNodes().IsDocNodes() && nSttNd < pTblNd->EndOfSectionIndex() && nEndNd > pTblNd->GetIndex() ) - return sal_True; + return true; } else if( ((SwFmtFld*)pLast)->GetTxtFld() ) { @@ -219,12 +219,12 @@ sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, if( nSttNd <= nNdPos && nNdPos <= nEndNd && ( nNdPos != nSttNd || *pTFld->GetStart() >= nStt ) && ( nNdPos != nEndNd || *pTFld->GetStart() < nEnd )) - return sal_True; + return true; } } } while( 0 != ( pLast = ++aIter )); - return sal_False; + return false; } SwDDEFieldType::SwDDEFieldType(const OUString& rName, |