sfx2: sal_Bool->bool
Change-Id: I733cd63e321bdc775739228c269fa66ff7780780
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
SvLinkSource();
|
||||
virtual ~SvLinkSource();
|
||||
|
||||
sal_Bool HasDataLinks( const SvBaseLink* = 0 ) const;
|
||||
bool HasDataLinks( const SvBaseLink* = 0 ) const;
|
||||
|
||||
void Closed();
|
||||
|
||||
@@ -74,15 +74,15 @@ public:
|
||||
void SendDataChanged();
|
||||
void NotifyDataChanged();
|
||||
|
||||
virtual sal_Bool Connect( SvBaseLink* );
|
||||
virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
|
||||
virtual bool Connect( SvBaseLink* );
|
||||
virtual bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
|
||||
const rtl::OUString & rMimeType,
|
||||
sal_Bool bSynchron = sal_False );
|
||||
bool bSynchron = false );
|
||||
|
||||
// sal_True => waitinmg for data
|
||||
virtual sal_Bool IsPending() const;
|
||||
virtual bool IsPending() const;
|
||||
// sal_True => data complete loaded
|
||||
virtual sal_Bool IsDataComplete() const;
|
||||
virtual bool IsDataComplete() const;
|
||||
|
||||
// Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
|
||||
virtual void Edit( Window *, SvBaseLink *, const Link& rEndEditHdl );
|
||||
@@ -97,19 +97,19 @@ public:
|
||||
|
||||
struct StreamToLoadFrom{
|
||||
StreamToLoadFrom(
|
||||
const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
|
||||
const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, bool bIsReadOnly )
|
||||
:m_xInputStreamToLoadFrom(xInputStream),
|
||||
m_bIsReadOnly(bIsReadOnly)
|
||||
{
|
||||
}
|
||||
|
||||
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
|
||||
m_xInputStreamToLoadFrom;
|
||||
sal_Bool m_bIsReadOnly;
|
||||
m_xInputStreamToLoadFrom;
|
||||
bool m_bIsReadOnly;
|
||||
};
|
||||
|
||||
StreamToLoadFrom getStreamToLoadFrom();
|
||||
void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly );
|
||||
void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, bool bIsReadOnly );
|
||||
void clearStreamToLoadFrom();
|
||||
};
|
||||
|
||||
|
@@ -133,9 +133,9 @@ void ScServerObject::EndListeningAll()
|
||||
SfxListener::EndListeningAll();
|
||||
}
|
||||
|
||||
sal_Bool ScServerObject::GetData(
|
||||
bool ScServerObject::GetData(
|
||||
::com::sun::star::uno::Any & rData /*out param*/,
|
||||
const OUString & rMimeType, sal_Bool /* bSynchron */ )
|
||||
const OUString & rMimeType, bool /* bSynchron */ )
|
||||
{
|
||||
if (!pDocSh)
|
||||
return false;
|
||||
@@ -179,22 +179,22 @@ sal_Bool ScServerObject::GetData(
|
||||
rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
|
||||
(const sal_Int8*)aByteData.getStr(),
|
||||
aByteData.getLength() + 1 );
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
if( aDdeTextFmt.equalsAscii( "CSV" ) ||
|
||||
aDdeTextFmt.equalsAscii( "FCSV" ) )
|
||||
aObj.SetSeparator( ',' );
|
||||
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
||||
return aObj.ExportData( rMimeType, rData ) ? 1 : 0;
|
||||
return aObj.ExportData( rMimeType, rData );
|
||||
}
|
||||
|
||||
ScImportExport aObj( pDoc, aRange );
|
||||
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
||||
if( aObj.IsRef() )
|
||||
return aObj.ExportData( rMimeType, rData ) ? 1 : 0;
|
||||
return 0;
|
||||
return aObj.ExportData( rMimeType, rData );
|
||||
return false;
|
||||
}
|
||||
|
||||
void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
|
@@ -54,9 +54,9 @@ public:
|
||||
ScServerObject( ScDocShell* pShell, const OUString& rItem );
|
||||
virtual ~ScServerObject();
|
||||
|
||||
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 = false );
|
||||
bool bSynchron = false );
|
||||
|
||||
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
||||
void EndListeningAll();
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
};
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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& )
|
||||
|
@@ -60,9 +60,9 @@ public:
|
||||
}
|
||||
virtual ~SwServerObject();
|
||||
|
||||
virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData,
|
||||
virtual bool GetData( ::com::sun::star::uno::Any & rData,
|
||||
const OUString & rMimeType,
|
||||
sal_Bool bSynchron = sal_False );
|
||||
bool bSynchron = false );
|
||||
|
||||
sal_Bool SetData( const OUString & rMimeType,
|
||||
const ::com::sun::star::uno::Any& rData );
|
||||
|
@@ -39,10 +39,10 @@ SwServerObject::~SwServerObject()
|
||||
{
|
||||
}
|
||||
|
||||
sal_Bool SwServerObject::GetData( uno::Any & rData,
|
||||
const OUString & rMimeType, sal_Bool )
|
||||
bool SwServerObject::GetData( uno::Any & rData,
|
||||
const OUString & rMimeType, bool )
|
||||
{
|
||||
sal_Bool bRet = sal_False;
|
||||
bool bRet = false;
|
||||
WriterRef xWrt;
|
||||
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
|
||||
{
|
||||
@@ -96,7 +96,7 @@ sal_Bool SwServerObject::GetData( uno::Any & rData,
|
||||
rData <<= uno::Sequence< sal_Int8 >(
|
||||
(sal_Int8*)aMemStm.GetData(),
|
||||
aMemStm.Seek( STREAM_SEEK_TO_END ) );
|
||||
bRet = sal_True;
|
||||
bRet = true;
|
||||
}
|
||||
delete pPam;
|
||||
}
|
||||
|
Reference in New Issue
Block a user