diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-14 11:18:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-18 11:26:05 +0200 |
commit | e67d675d1e6410a95c3ea0765c12d96c3a1db512 (patch) | |
tree | 538f4802bf0fbb97e49b241e53ea77f437f16ce1 | |
parent | 4f9ce93ecb965652b79ffa569700e91e47912ba2 (diff) |
sfx2: sal_Bool->bool
Change-Id: I01a33e255b0dd2a0045f6eed52e6b31305750599
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 4 | ||||
-rw-r--r-- | include/sfx2/linkmgr.hxx | 12 | ||||
-rw-r--r-- | include/sfx2/lnkbase.hxx | 34 | ||||
-rw-r--r-- | sfx2/source/appl/linkmgr2.cxx | 30 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 28 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlbas.cxx | 2 |
9 files changed, 59 insertions, 59 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index a1faaf8a1f82..a529574c7c29 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -296,9 +296,9 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, UpdateNowClickHdl) for( size_t i = 0; i < pLinkMgr->GetLinks().size(); ++i ) if( &xLink == *pLinkMgr->GetLinks()[ i ] ) { - xLink->SetUseCache( sal_False ); + xLink->SetUseCache( false ); SetType( *xLink, aPosArr[ n ], xLink->GetUpdateMode() ); - xLink->SetUseCache( sal_True ); + xLink->SetUseCache( true ); break; } } diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index f62b07319b31..3865594c49a2 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -61,7 +61,7 @@ class SFX2_DLLPUBLIC LinkManager SfxObjectShell *pPersist; // LinkMgr must be release before SfxObjectShell protected: - sal_Bool InsertLink( SvBaseLink* pLink, sal_uInt16 nObjType, sal_uInt16 nUpdateType, + bool InsertLink( SvBaseLink* pLink, sal_uInt16 nObjType, sal_uInt16 nUpdateType, const OUString* pName = 0 ); public: @@ -90,16 +90,16 @@ public: void Remove( SvBaseLink *pLink ); void Remove( size_t nPos, size_t nCnt = 1 ); - sal_Bool Insert( SvBaseLink* pLink ); + bool Insert( SvBaseLink* pLink ); // the links connect to a SvLinkSource and adds to the list - sal_Bool InsertDDELink( SvBaseLink*, + bool InsertDDELink( SvBaseLink*, const OUString& rServer, const OUString& rTopic, const OUString& rItem ); // if everything is already set at the link! - sal_Bool InsertDDELink( SvBaseLink* ); + bool InsertDDELink( SvBaseLink* ); // Connect the links to a pseudo-object and add to the list bool InsertFileLink( sfx2::SvBaseLink&, @@ -141,7 +141,7 @@ public: // Call with list of links to server const SvLinkSources& GetServers() const { return aServerTbl; } // Link register/delete - sal_Bool InsertServer( SvLinkSource* rObj ); + bool InsertServer( SvLinkSource* rObj ); void RemoveServer( SvLinkSource* rObj ); // A transfer is aborted, so cancel all download media @@ -157,7 +157,7 @@ public: // if the mimetype says graphic/bitmap/gdimetafile then get the // graphic from the Any. Return says no errors - static sal_Bool GetGraphicFromAny( const OUString& rMimeType, + static bool GetGraphicFromAny( const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue, Graphic& rGrf ); diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index 6fe28bf97ea3..c83adaa1419e 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -73,11 +73,11 @@ private: SvLinkSourceRef xObj; OUString aLinkName; BaseLink_Impl* pImpl; - sal_uInt16 nObjType; - sal_Bool bVisible : 1; - sal_Bool bSynchron : 1; - sal_Bool bUseCache : 1; // for Graphics Links! - sal_Bool bWasLastEditOK : 1; + sal_uInt16 nObjType; + bool bVisible : 1; + bool bSynchron : 1; + bool bUseCache : 1; // for Graphics Links! + bool bWasLastEditOK : 1; DECL_LINK( EndEditHdl, OUString* ); @@ -91,7 +91,7 @@ protected: ImplBaseLinkData* pImplData; - sal_Bool m_bIsReadOnly; + bool m_bIsReadOnly; com::sun::star::uno::Reference<com::sun::star::io::XInputStream> m_xInputStreamToLoadFrom; @@ -99,7 +99,7 @@ protected: SvBaseLink( sal_uInt16 nLinkType, sal_uIntPtr nContentType = FORMAT_STRING ); virtual ~SvBaseLink(); - void _GetRealObject( sal_Bool bConnect = sal_True ); + void _GetRealObject( bool bConnect = true ); SvLinkSource* GetRealObject() { @@ -134,37 +134,37 @@ public: void SetUpdateMode( sal_uInt16 ); sal_uInt16 GetUpdateMode() const; sal_uIntPtr GetContentType() const; - sal_Bool SetContentType( sal_uIntPtr nType ); + bool SetContentType( sal_uIntPtr nType ); LinkManager* GetLinkManager(); const LinkManager* GetLinkManager() const; void SetLinkManager( LinkManager* _pMgr ); - sal_Bool Update(); + bool Update(); void Disconnect(); // Link impl: DECL_LINK( MyEndDialogHdl, SvBaseLink* ); <= param is this virtual void Edit( Window*, const Link& rEndEditHdl ); // should the link appear in the dialog? (to the left in the link in the...) - sal_Bool IsVisible() const { return bVisible; } - void SetVisible( sal_Bool bFlag ) { bVisible = bFlag; } + bool IsVisible() const { return bVisible; } + void SetVisible( bool bFlag ) { bVisible = bFlag; } // should the Link be loaded synchronous or asynchronous? - sal_Bool IsSynchron() const { return bSynchron; } - void SetSynchron( sal_Bool bFlag ) { bSynchron = bFlag; } + bool IsSynchron() const { return bSynchron; } + void SetSynchron( bool bFlag ) { bSynchron = bFlag; } - sal_Bool IsUseCache() const { return bUseCache; } - void SetUseCache( sal_Bool bFlag ) { bUseCache = bFlag; } + bool IsUseCache() const { return bUseCache; } + void SetUseCache( bool bFlag ) { bUseCache = bFlag; } void setStreamToLoadFrom( const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, - sal_Bool bIsReadOnly ) + bool bIsReadOnly ) { m_xInputStreamToLoadFrom = xInputStream; m_bIsReadOnly = bIsReadOnly; } // #i88291# void clearStreamToLoadFrom(); - inline sal_Bool WasLastEditOK() const { return bWasLastEditOK; } + inline bool WasLastEditOK() const { return bWasLastEditOK; } FileDialogHelper & GetInsertFileDialog(const OUString& rFactory) const; }; diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index f909c0a99f7f..26a9bdbaf904 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -156,7 +156,7 @@ void LinkManager::Remove( size_t nPos, size_t nCnt ) } -sal_Bool LinkManager::Insert( SvBaseLink* pLink ) +bool LinkManager::Insert( SvBaseLink* pLink ) { for( size_t n = 0; n < aLinkTbl.size(); ++n ) { @@ -167,17 +167,17 @@ sal_Bool LinkManager::Insert( SvBaseLink* pLink ) aLinkTbl.erase( aLinkTbl.begin() + n-- ); } else if( pLink == *pTmp ) - return sal_False; // No duplicate links inserted + return false; // No duplicate links inserted } SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink ); pLink->SetLinkManager( this ); aLinkTbl.push_back( pTmp ); - return sal_True; + return true; } -sal_Bool LinkManager::InsertLink( SvBaseLink * pLink, +bool LinkManager::InsertLink( SvBaseLink * pLink, sal_uInt16 nObjType, sal_uInt16 nUpdateMode, const OUString* pName ) @@ -191,13 +191,13 @@ sal_Bool LinkManager::InsertLink( SvBaseLink * pLink, } -sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink, +bool LinkManager::InsertDDELink( SvBaseLink * pLink, const OUString& rServer, const OUString& rTopic, const OUString& rItem ) { if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) ) - return sal_False; + return false; OUString sCmd; ::sfx2::MakeLnkName( sCmd, &rServer, rTopic, rItem ); @@ -208,11 +208,11 @@ sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink, } -sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink ) +bool LinkManager::InsertDDELink( SvBaseLink * pLink ) { DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" ); if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) ) - return sal_False; + return false; if( pLink->GetObjType() == OBJECT_CLIENT_SO ) pLink->SetObjType( OBJECT_CLIENT_DDE ); @@ -357,11 +357,11 @@ SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink ) } } -sal_Bool LinkManager::InsertServer( SvLinkSource* pObj ) +bool LinkManager::InsertServer( SvLinkSource* pObj ) { // no duplicate inserts if( !pObj ) - return sal_False; + return false; return aServerTbl.insert( pObj ).second; } @@ -505,11 +505,11 @@ sal_uIntPtr LinkManager::RegisterStatusInfoId() -sal_Bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, +bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue, Graphic& rGrf ) { - sal_Bool bRet = sal_False; + bool bRet = false; ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; if( rValue.hasValue() && ( rValue >>= aSeq ) ) { @@ -522,7 +522,7 @@ sal_Bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, case SOT_FORMATSTR_ID_SVXB: { ReadGraphic( aMemStm, rGrf ); - bRet = sal_True; + bRet = true; } break; case FORMAT_GDIMETAFILE: @@ -530,7 +530,7 @@ sal_Bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, GDIMetaFile aMtf; aMtf.Read( aMemStm ); rGrf = aMtf; - bRet = sal_True; + bRet = true; } break; case FORMAT_BITMAP: @@ -538,7 +538,7 @@ sal_Bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, Bitmap aBmp; ReadDIB(aBmp, aMemStm, true); rGrf = aBmp; - bRet = sal_True; + bRet = true; } break; } diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 346ad25ba12f..7d9fee3eee80 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -129,8 +129,8 @@ SvBaseLink::SvBaseLink() pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; - bVisible = bSynchron = bUseCache = sal_True; - bWasLastEditOK = sal_False; + bVisible = bSynchron = bUseCache = true; + bWasLastEditOK = false; } @@ -141,8 +141,8 @@ SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType ) pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; - bVisible = bSynchron = bUseCache = sal_True; - bWasLastEditOK = sal_False; + bVisible = bSynchron = bUseCache = true; + bWasLastEditOK = false; // It it going to be a Ole-Link, pImplData->ClientType.nUpdateMode = nUpdateMode; @@ -156,8 +156,8 @@ SvBaseLink::SvBaseLink( const OUString& rLinkName, sal_uInt16 nObjectType, SvLin : pImpl(0) , m_bIsReadOnly(false) { - bVisible = bSynchron = bUseCache = sal_True; - bWasLastEditOK = sal_False; + bVisible = bSynchron = bUseCache = true; + bWasLastEditOK = false; aLinkName = rLinkName; pImplData = new ImplBaseLinkData; nObjType = nObjectType; @@ -299,7 +299,7 @@ void SvBaseLink::clearStreamToLoadFrom() } } -sal_Bool SvBaseLink::Update() +bool SvBaseLink::Update() { if( OBJECT_CLIENT_SO & nObjType ) { @@ -329,7 +329,7 @@ sal_Bool SvBaseLink::Update() { // should be asynschron? if( xObj->IsPending() ) - return sal_True; + return true; // we do not need the object anymore AddNextRef(); @@ -338,7 +338,7 @@ sal_Bool SvBaseLink::Update() } } } - return sal_False; + return false; } @@ -350,7 +350,7 @@ sal_uInt16 SvBaseLink::GetUpdateMode() const } -void SvBaseLink::_GetRealObject( sal_Bool bConnect) +void SvBaseLink::_GetRealObject( bool bConnect) { if( !pImpl->m_pLinkMgr ) return; @@ -392,14 +392,14 @@ sal_uIntPtr SvBaseLink::GetContentType() const } -sal_Bool SvBaseLink::SetContentType( sal_uIntPtr nType ) +bool SvBaseLink::SetContentType( sal_uIntPtr nType ) { if( OBJECT_CLIENT_SO & nObjType ) { pImplData->ClientType.nCntntType = nType; - return sal_True; + return true; } - return sal_False; + return false; } LinkManager* SvBaseLink::GetLinkManager() @@ -471,7 +471,7 @@ void SvBaseLink::Edit( Window* pParent, const Link& rEndEditHdl ) if ( !bAsync ) { ExecuteEdit( OUString() ); - bWasLastEditOK = sal_False; + bWasLastEditOK = false; if ( pImpl->m_aEndEditLink.IsSet() ) pImpl->m_aEndEditLink.Call( this ); } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index f452d9fda2cb..1104a073c7f3 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -620,7 +620,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd ) // It's within a normal Section, so show again if( !pParent ) - pBLnk->SetVisible( sal_True ); + pBLnk->SetVisible( true ); } } } diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 84c8ab0c26aa..2ccf29015761 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -416,9 +416,9 @@ bool SwBaseLink::SwapIn( bool bWaitForData, bool bNativFormat ) } else if( !IsSynchron() && bWaitForData ) { - SetSynchron( sal_True ); + SetSynchron( true ); bRes = Update(); - SetSynchron( sal_False ); + SetSynchron( false ); } else bRes = Update(); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index c707084a5798..ddbb2627c1fd 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -169,7 +169,7 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ), pOleNode(pNode) { - SetSynchron( sal_False ); + SetSynchron( false ); } SwEmbedObjectLink::~SwEmbedObjectLink() diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 8841a4c414cd..354a8b7ee0f9 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -325,7 +325,7 @@ void SwHTMLWriter::OutBasicBodyEvents() uno::Reference < container::XNameReplace > xEvents = xSup->getEvents(); for ( sal_Int32 i=0; i<4; i++ ) { - SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( OUString::createFromAscii(aEventNames[i]) ), pDocSh, sal_True ); + SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( OUString::createFromAscii(aEventNames[i]) ), pDocSh, true ); if ( pMacro ) { aDocTable.Insert( aBodyEventTable[i].nEvent, *pMacro ); |