summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-14 12:57:33 +0200
committerNoel Grandin <noel@peralex.com>2014-03-18 11:26:05 +0200
commit96ef76c1b75332e4b8379276e396ea623153644d (patch)
treee87a6a4f7970421f777baedf83315c22579581c8 /sfx2
parente67d675d1e6410a95c3ea0765c12d96c3a1db512 (diff)
sfx2: sal_Bool->bool
Change-Id: I733cd63e321bdc775739228c269fa66ff7780780
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/fileobj.cxx29
-rw-r--r--sfx2/source/appl/fileobj.hxx12
-rw-r--r--sfx2/source/appl/impldde.cxx26
-rw-r--r--sfx2/source/appl/impldde.hxx10
-rw-r--r--sfx2/source/appl/linkmgr2.cxx6
-rw-r--r--sfx2/source/appl/linksrc.cxx28
6 files changed, 56 insertions, 55 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 55ecb5270158..e389f7a2a549 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -91,9 +91,9 @@ SvFileObject::~SvFileObject()
}
-sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
+bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
const OUString & rMimeType,
- sal_Bool bGetSynchron )
+ bool bGetSynchron )
{
sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType );
switch( nType )
@@ -212,13 +212,13 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
rData <<= OUString( sFileNm );
break;
}
- return sal_True/*0 != aTypeList.Count()*/;
+ return true/*0 != aTypeList.Count()*/;
}
-sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
+bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
{
if( !pLink || !pLink->GetLinkManager() )
- return sal_False;
+ return false;
// Test if not another link of the same connection already exists
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
@@ -229,7 +229,7 @@ sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
if( pShell.Is() )
{
if( pShell->IsAbortingImport() )
- return sal_False;
+ return false;
if( pShell->GetMedium() )
sReferer = pShell->GetMedium()->GetName();
@@ -253,14 +253,14 @@ sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
break;
default:
- return sal_False;
+ return false;
}
SetUpdateTimeout( 0 );
// and now register by this or other found Pseudo-Object
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
- return sal_True;
+ return true;
}
sal_Bool SvFileObject::LoadFile_Impl()
@@ -588,28 +588,29 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
ERRCODE_SO_PENDING if it has not been completely read
ERRCODE_SO_FALSE otherwise
*/
-sal_Bool SvFileObject::IsPending() const
+bool SvFileObject::IsPending() const
{
return FILETYPE_GRF == nType && !bLoadError &&
( pDownLoadData || bWaitForData );
}
-sal_Bool SvFileObject::IsDataComplete() const
+
+bool SvFileObject::IsDataComplete() const
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( FILETYPE_GRF != nType )
- bRet = sal_True;
+ bRet = true;
else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
{
SvFileObject* pThis = (SvFileObject*)this;
if( bDataReady ||
( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
- bRet = sal_True;
+ bRet = true;
else
{
INetURLObject aUrl( sFileNm );
if( aUrl.HasError() ||
INET_PROT_NOT_VALID == aUrl.GetProtocol() )
- bRet = sal_True;
+ bRet = true;
}
}
return bRet;
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index c04500ce94bf..fc7b9dbefb89 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -64,16 +64,16 @@ protected:
public:
SvFileObject();
- virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const OUString & rMimeType,
- sal_Bool bSynchron = sal_False );
+ bool bSynchron = false );
- virtual sal_Bool Connect( sfx2::SvBaseLink* );
- virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
+ virtual bool Connect( sfx2::SvBaseLink* );
+ virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
// Ask whether you can access data directly or whether it has to be triggered
- virtual sal_Bool IsPending() const;
- virtual sal_Bool IsDataComplete() const;
+ virtual bool IsPending() const;
+ virtual bool IsDataComplete() const;
void CancelTransfers();
};
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index cc6431d0bd3a..3839d8544219 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -129,12 +129,12 @@ SvDDEObject::~SvDDEObject()
delete pConnection;
}
-sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const OUString & rMimeType,
- sal_Bool bSynchron )
+ bool bSynchron )
{
if( !pConnection )
- return sal_False;
+ return false;
if( pConnection->GetError() ) // then we try once more
{
@@ -148,7 +148,7 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
if( bWaitForData ) // we are in an rekursive loop, get out again
- return sal_False;
+ return false;
// Lock against Reentrance
bWaitForData = sal_True;
@@ -193,7 +193,7 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
-sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
+bool SvDDEObject::Connect( SvBaseLink * pSvLink )
{
#if defined(WNT)
static sal_Bool bInWinExec = sal_False;
@@ -209,17 +209,17 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
- return sal_True;
+ return true;
}
if( !pSvLink->GetLinkManager() )
- return sal_False;
+ return false;
OUString sServer, sTopic;
pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem );
if( sServer.isEmpty() || sTopic.isEmpty() || sItem.isEmpty() )
- return sal_False;
+ return false;
pConnection = new DdeConnection( sServer, sTopic );
if( pConnection->GetError() )
@@ -237,7 +237,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
if( bSysTopic )
{
nError = DDELINK_ERROR_DATA;
- return sal_False;
+ return false;
}
// otherwise in Win/WinNT, start the Application directly
}
@@ -292,7 +292,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
}
if( pConnection->GetError() )
- return sal_False;
+ return false;
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
@@ -301,7 +301,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
SetUpdateTimeout( 0 );
- return sal_True;
+ return true;
}
void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl )
@@ -343,7 +343,7 @@ sal_Bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
return 0 != nFmt;
}
-sal_Bool SvDDEObject::IsPending() const
+bool SvDDEObject::IsPending() const
/* [Description]
The method determines whether the data-object can be read from a DDE.
@@ -357,7 +357,7 @@ sal_Bool SvDDEObject::IsPending() const
return bWaitForData;
}
-sal_Bool SvDDEObject::IsDataComplete() const
+bool SvDDEObject::IsDataComplete() const
{
return bWaitForData;
}
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index 79a0bd286072..7e0f35b57c82 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -54,15 +54,15 @@ protected:
public:
SvDDEObject();
- virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const OUString & aMimeType,
- sal_Bool bSynchron = sal_False );
+ bool bSynchron = false );
- virtual sal_Bool Connect( SvBaseLink * );
+ virtual bool Connect( SvBaseLink * );
virtual void Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
- virtual sal_Bool IsPending() const;
- virtual sal_Bool IsDataComplete() const;
+ virtual bool IsPending() const;
+ virtual bool IsDataComplete() const;
};
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 26a9bdbaf904..a0b44e72b6d5 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -60,7 +60,7 @@ class SvxInternalLink : public sfx2::SvLinkSource
public:
SvxInternalLink() {}
- virtual sal_Bool Connect( sfx2::SvBaseLink* );
+ virtual bool Connect( sfx2::SvBaseLink* );
};
@@ -559,7 +559,7 @@ OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL )
return sRet;
}
-sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
+bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
{
SfxObjectShell* pFndShell = 0;
sal_uInt16 nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
@@ -622,7 +622,7 @@ sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
// empty topics are not allowed - which document is it
if( sTopic.isEmpty() )
- return sal_False;
+ return false;
if (pFndShell)
{
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index ae0f2135fe0f..9817b18ac6db 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -212,7 +212,7 @@ SvLinkSource::StreamToLoadFrom SvLinkSource::getStreamToLoadFrom()
pImpl->m_bIsReadOnly);
}
-void SvLinkSource::setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
+void SvLinkSource::setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, bool bIsReadOnly )
{
pImpl->m_xInputStreamToLoadFrom = xInputStream;
pImpl->m_bIsReadOnly = bIsReadOnly;
@@ -257,7 +257,7 @@ void SvLinkSource::SendDataChanged()
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, sDataMimeType, sal_True ) )
+ GetData( aVal, sDataMimeType, true ) )
{
p->xSink->DataChanged( sDataMimeType, aVal );
@@ -292,7 +292,7 @@ void SvLinkSource::NotifyDataChanged()
{
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, p->aDataMimeType, sal_True ) )
+ GetData( aVal, p->aDataMimeType, true ) )
{
p->xSink->DataChanged( p->aDataMimeType, aVal );
@@ -389,40 +389,40 @@ void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink )
}
}
-sal_Bool SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
+bool SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
const SvLinkSource_Entry_Impl* p;
for( sal_uInt16 n = 0, nEnd = pImpl->aArr.size(); n < nEnd; ++n )
if( ( p = pImpl->aArr[ n ] )->bIsDataSink &&
( !pLink || &p->xSink == pLink ) )
{
- bRet = sal_True;
+ bRet = true;
break;
}
return bRet;
}
// sal_True => waitinmg for data
-sal_Bool SvLinkSource::IsPending() const
+bool SvLinkSource::IsPending() const
{
- return sal_False;
+ return false;
}
// sal_True => data complete loaded
-sal_Bool SvLinkSource::IsDataComplete() const
+bool SvLinkSource::IsDataComplete() const
{
- return sal_True;
+ return true;
}
-sal_Bool SvLinkSource::Connect( SvBaseLink* )
+bool SvLinkSource::Connect( SvBaseLink* )
{
- return sal_True;
+ return true;
}
-sal_Bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const OUString &, sal_Bool )
+bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const OUString &, bool )
{
- return sal_False;
+ return false;
}
void SvLinkSource::Edit( Window *, SvBaseLink *, const Link& )