sfx2: sal_Bool->bool
Change-Id: I733cd63e321bdc775739228c269fa66ff7780780
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
|||||||
SvLinkSource();
|
SvLinkSource();
|
||||||
virtual ~SvLinkSource();
|
virtual ~SvLinkSource();
|
||||||
|
|
||||||
sal_Bool HasDataLinks( const SvBaseLink* = 0 ) const;
|
bool HasDataLinks( const SvBaseLink* = 0 ) const;
|
||||||
|
|
||||||
void Closed();
|
void Closed();
|
||||||
|
|
||||||
@@ -74,15 +74,15 @@ public:
|
|||||||
void SendDataChanged();
|
void SendDataChanged();
|
||||||
void NotifyDataChanged();
|
void NotifyDataChanged();
|
||||||
|
|
||||||
virtual sal_Bool Connect( SvBaseLink* );
|
virtual bool Connect( SvBaseLink* );
|
||||||
virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
|
virtual bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
|
||||||
const rtl::OUString & rMimeType,
|
const rtl::OUString & rMimeType,
|
||||||
sal_Bool bSynchron = sal_False );
|
bool bSynchron = false );
|
||||||
|
|
||||||
// sal_True => waitinmg for data
|
// sal_True => waitinmg for data
|
||||||
virtual sal_Bool IsPending() const;
|
virtual bool IsPending() const;
|
||||||
// sal_True => data complete loaded
|
// 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
|
// Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
|
||||||
virtual void Edit( Window *, SvBaseLink *, const Link& rEndEditHdl );
|
virtual void Edit( Window *, SvBaseLink *, const Link& rEndEditHdl );
|
||||||
@@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
struct StreamToLoadFrom{
|
struct StreamToLoadFrom{
|
||||||
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_xInputStreamToLoadFrom(xInputStream),
|
||||||
m_bIsReadOnly(bIsReadOnly)
|
m_bIsReadOnly(bIsReadOnly)
|
||||||
{
|
{
|
||||||
@@ -105,11 +105,11 @@ public:
|
|||||||
|
|
||||||
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
|
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
|
||||||
m_xInputStreamToLoadFrom;
|
m_xInputStreamToLoadFrom;
|
||||||
sal_Bool m_bIsReadOnly;
|
bool m_bIsReadOnly;
|
||||||
};
|
};
|
||||||
|
|
||||||
StreamToLoadFrom getStreamToLoadFrom();
|
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();
|
void clearStreamToLoadFrom();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -133,9 +133,9 @@ void ScServerObject::EndListeningAll()
|
|||||||
SfxListener::EndListeningAll();
|
SfxListener::EndListeningAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool ScServerObject::GetData(
|
bool ScServerObject::GetData(
|
||||||
::com::sun::star::uno::Any & rData /*out param*/,
|
::com::sun::star::uno::Any & rData /*out param*/,
|
||||||
const OUString & rMimeType, sal_Bool /* bSynchron */ )
|
const OUString & rMimeType, bool /* bSynchron */ )
|
||||||
{
|
{
|
||||||
if (!pDocSh)
|
if (!pDocSh)
|
||||||
return false;
|
return false;
|
||||||
@@ -179,22 +179,22 @@ sal_Bool ScServerObject::GetData(
|
|||||||
rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
|
rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
|
||||||
(const sal_Int8*)aByteData.getStr(),
|
(const sal_Int8*)aByteData.getStr(),
|
||||||
aByteData.getLength() + 1 );
|
aByteData.getLength() + 1 );
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
if( aDdeTextFmt.equalsAscii( "CSV" ) ||
|
if( aDdeTextFmt.equalsAscii( "CSV" ) ||
|
||||||
aDdeTextFmt.equalsAscii( "FCSV" ) )
|
aDdeTextFmt.equalsAscii( "FCSV" ) )
|
||||||
aObj.SetSeparator( ',' );
|
aObj.SetSeparator( ',' );
|
||||||
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
||||||
return aObj.ExportData( rMimeType, rData ) ? 1 : 0;
|
return aObj.ExportData( rMimeType, rData );
|
||||||
}
|
}
|
||||||
|
|
||||||
ScImportExport aObj( pDoc, aRange );
|
ScImportExport aObj( pDoc, aRange );
|
||||||
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
|
||||||
if( aObj.IsRef() )
|
if( aObj.IsRef() )
|
||||||
return aObj.ExportData( rMimeType, rData ) ? 1 : 0;
|
return aObj.ExportData( rMimeType, rData );
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||||
|
@@ -54,9 +54,9 @@ public:
|
|||||||
ScServerObject( ScDocShell* pShell, const OUString& rItem );
|
ScServerObject( ScDocShell* pShell, const OUString& rItem );
|
||||||
virtual ~ScServerObject();
|
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,
|
const OUString & rMimeType,
|
||||||
sal_Bool bSynchron = false );
|
bool bSynchron = false );
|
||||||
|
|
||||||
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
||||||
void EndListeningAll();
|
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,
|
const OUString & rMimeType,
|
||||||
sal_Bool bGetSynchron )
|
bool bGetSynchron )
|
||||||
{
|
{
|
||||||
sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType );
|
sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType );
|
||||||
switch( nType )
|
switch( nType )
|
||||||
@@ -212,13 +212,13 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
|
|||||||
rData <<= OUString( sFileNm );
|
rData <<= OUString( sFileNm );
|
||||||
break;
|
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() )
|
if( !pLink || !pLink->GetLinkManager() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
// Test if not another link of the same connection already exists
|
// Test if not another link of the same connection already exists
|
||||||
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
|
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
|
||||||
@@ -229,7 +229,7 @@ sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
|
|||||||
if( pShell.Is() )
|
if( pShell.Is() )
|
||||||
{
|
{
|
||||||
if( pShell->IsAbortingImport() )
|
if( pShell->IsAbortingImport() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
if( pShell->GetMedium() )
|
if( pShell->GetMedium() )
|
||||||
sReferer = pShell->GetMedium()->GetName();
|
sReferer = pShell->GetMedium()->GetName();
|
||||||
@@ -253,14 +253,14 @@ sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return sal_False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetUpdateTimeout( 0 );
|
SetUpdateTimeout( 0 );
|
||||||
|
|
||||||
// and now register by this or other found Pseudo-Object
|
// and now register by this or other found Pseudo-Object
|
||||||
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
|
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SvFileObject::LoadFile_Impl()
|
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_PENDING if it has not been completely read
|
||||||
ERRCODE_SO_FALSE otherwise
|
ERRCODE_SO_FALSE otherwise
|
||||||
*/
|
*/
|
||||||
sal_Bool SvFileObject::IsPending() const
|
bool SvFileObject::IsPending() const
|
||||||
{
|
{
|
||||||
return FILETYPE_GRF == nType && !bLoadError &&
|
return FILETYPE_GRF == nType && !bLoadError &&
|
||||||
( pDownLoadData || bWaitForData );
|
( pDownLoadData || bWaitForData );
|
||||||
}
|
}
|
||||||
sal_Bool SvFileObject::IsDataComplete() const
|
|
||||||
|
bool SvFileObject::IsDataComplete() const
|
||||||
{
|
{
|
||||||
sal_Bool bRet = sal_False;
|
bool bRet = false;
|
||||||
if( FILETYPE_GRF != nType )
|
if( FILETYPE_GRF != nType )
|
||||||
bRet = sal_True;
|
bRet = true;
|
||||||
else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
|
else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
|
||||||
{
|
{
|
||||||
SvFileObject* pThis = (SvFileObject*)this;
|
SvFileObject* pThis = (SvFileObject*)this;
|
||||||
if( bDataReady ||
|
if( bDataReady ||
|
||||||
( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
|
( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
|
||||||
bRet = sal_True;
|
bRet = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INetURLObject aUrl( sFileNm );
|
INetURLObject aUrl( sFileNm );
|
||||||
if( aUrl.HasError() ||
|
if( aUrl.HasError() ||
|
||||||
INET_PROT_NOT_VALID == aUrl.GetProtocol() )
|
INET_PROT_NOT_VALID == aUrl.GetProtocol() )
|
||||||
bRet = sal_True;
|
bRet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
|
@@ -64,16 +64,16 @@ protected:
|
|||||||
public:
|
public:
|
||||||
SvFileObject();
|
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,
|
const OUString & rMimeType,
|
||||||
sal_Bool bSynchron = sal_False );
|
bool bSynchron = false );
|
||||||
|
|
||||||
virtual sal_Bool Connect( sfx2::SvBaseLink* );
|
virtual bool Connect( sfx2::SvBaseLink* );
|
||||||
virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
|
virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
|
||||||
|
|
||||||
// Ask whether you can access data directly or whether it has to be triggered
|
// Ask whether you can access data directly or whether it has to be triggered
|
||||||
virtual sal_Bool IsPending() const;
|
virtual bool IsPending() const;
|
||||||
virtual sal_Bool IsDataComplete() const;
|
virtual bool IsDataComplete() const;
|
||||||
|
|
||||||
void CancelTransfers();
|
void CancelTransfers();
|
||||||
};
|
};
|
||||||
|
@@ -129,12 +129,12 @@ SvDDEObject::~SvDDEObject()
|
|||||||
delete pConnection;
|
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,
|
const OUString & rMimeType,
|
||||||
sal_Bool bSynchron )
|
bool bSynchron )
|
||||||
{
|
{
|
||||||
if( !pConnection )
|
if( !pConnection )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
if( pConnection->GetError() ) // then we try once more
|
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
|
if( bWaitForData ) // we are in an rekursive loop, get out again
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
// Lock against Reentrance
|
// Lock against Reentrance
|
||||||
bWaitForData = sal_True;
|
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)
|
#if defined(WNT)
|
||||||
static sal_Bool bInWinExec = sal_False;
|
static sal_Bool bInWinExec = sal_False;
|
||||||
@@ -209,17 +209,17 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
|
|||||||
: 0 );
|
: 0 );
|
||||||
AddConnectAdvise( pSvLink );
|
AddConnectAdvise( pSvLink );
|
||||||
|
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !pSvLink->GetLinkManager() )
|
if( !pSvLink->GetLinkManager() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
OUString sServer, sTopic;
|
OUString sServer, sTopic;
|
||||||
pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem );
|
pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem );
|
||||||
|
|
||||||
if( sServer.isEmpty() || sTopic.isEmpty() || sItem.isEmpty() )
|
if( sServer.isEmpty() || sTopic.isEmpty() || sItem.isEmpty() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
pConnection = new DdeConnection( sServer, sTopic );
|
pConnection = new DdeConnection( sServer, sTopic );
|
||||||
if( pConnection->GetError() )
|
if( pConnection->GetError() )
|
||||||
@@ -237,7 +237,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
|
|||||||
if( bSysTopic )
|
if( bSysTopic )
|
||||||
{
|
{
|
||||||
nError = DDELINK_ERROR_DATA;
|
nError = DDELINK_ERROR_DATA;
|
||||||
return sal_False;
|
return false;
|
||||||
}
|
}
|
||||||
// otherwise in Win/WinNT, start the Application directly
|
// otherwise in Win/WinNT, start the Application directly
|
||||||
}
|
}
|
||||||
@@ -292,7 +292,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( pConnection->GetError() )
|
if( pConnection->GetError() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
AddDataAdvise( pSvLink,
|
AddDataAdvise( pSvLink,
|
||||||
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
|
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
|
||||||
@@ -301,7 +301,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
|
|||||||
: 0 );
|
: 0 );
|
||||||
AddConnectAdvise( pSvLink );
|
AddConnectAdvise( pSvLink );
|
||||||
SetUpdateTimeout( 0 );
|
SetUpdateTimeout( 0 );
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl )
|
void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl )
|
||||||
@@ -343,7 +343,7 @@ sal_Bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
|
|||||||
return 0 != nFmt;
|
return 0 != nFmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SvDDEObject::IsPending() const
|
bool SvDDEObject::IsPending() const
|
||||||
/* [Description]
|
/* [Description]
|
||||||
|
|
||||||
The method determines whether the data-object can be read from a DDE.
|
The method determines whether the data-object can be read from a DDE.
|
||||||
@@ -357,7 +357,7 @@ sal_Bool SvDDEObject::IsPending() const
|
|||||||
return bWaitForData;
|
return bWaitForData;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SvDDEObject::IsDataComplete() const
|
bool SvDDEObject::IsDataComplete() const
|
||||||
{
|
{
|
||||||
return bWaitForData;
|
return bWaitForData;
|
||||||
}
|
}
|
||||||
|
@@ -54,15 +54,15 @@ protected:
|
|||||||
public:
|
public:
|
||||||
SvDDEObject();
|
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,
|
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 void Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
|
||||||
|
|
||||||
virtual sal_Bool IsPending() const;
|
virtual bool IsPending() const;
|
||||||
virtual sal_Bool IsDataComplete() const;
|
virtual bool IsDataComplete() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,7 @@ class SvxInternalLink : public sfx2::SvLinkSource
|
|||||||
public:
|
public:
|
||||||
SvxInternalLink() {}
|
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;
|
return sRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
|
bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
|
||||||
{
|
{
|
||||||
SfxObjectShell* pFndShell = 0;
|
SfxObjectShell* pFndShell = 0;
|
||||||
sal_uInt16 nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
|
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
|
// empty topics are not allowed - which document is it
|
||||||
if( sTopic.isEmpty() )
|
if( sTopic.isEmpty() )
|
||||||
return sal_False;
|
return false;
|
||||||
|
|
||||||
if (pFndShell)
|
if (pFndShell)
|
||||||
{
|
{
|
||||||
|
@@ -212,7 +212,7 @@ SvLinkSource::StreamToLoadFrom SvLinkSource::getStreamToLoadFrom()
|
|||||||
pImpl->m_bIsReadOnly);
|
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_xInputStreamToLoadFrom = xInputStream;
|
||||||
pImpl->m_bIsReadOnly = bIsReadOnly;
|
pImpl->m_bIsReadOnly = bIsReadOnly;
|
||||||
@@ -257,7 +257,7 @@ void SvLinkSource::SendDataChanged()
|
|||||||
|
|
||||||
Any aVal;
|
Any aVal;
|
||||||
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
|
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
|
||||||
GetData( aVal, sDataMimeType, sal_True ) )
|
GetData( aVal, sDataMimeType, true ) )
|
||||||
{
|
{
|
||||||
p->xSink->DataChanged( sDataMimeType, aVal );
|
p->xSink->DataChanged( sDataMimeType, aVal );
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ void SvLinkSource::NotifyDataChanged()
|
|||||||
{
|
{
|
||||||
Any aVal;
|
Any aVal;
|
||||||
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
|
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
|
||||||
GetData( aVal, p->aDataMimeType, sal_True ) )
|
GetData( aVal, p->aDataMimeType, true ) )
|
||||||
{
|
{
|
||||||
p->xSink->DataChanged( p->aDataMimeType, aVal );
|
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;
|
const SvLinkSource_Entry_Impl* p;
|
||||||
for( sal_uInt16 n = 0, nEnd = pImpl->aArr.size(); n < nEnd; ++n )
|
for( sal_uInt16 n = 0, nEnd = pImpl->aArr.size(); n < nEnd; ++n )
|
||||||
if( ( p = pImpl->aArr[ n ] )->bIsDataSink &&
|
if( ( p = pImpl->aArr[ n ] )->bIsDataSink &&
|
||||||
( !pLink || &p->xSink == pLink ) )
|
( !pLink || &p->xSink == pLink ) )
|
||||||
{
|
{
|
||||||
bRet = sal_True;
|
bRet = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sal_True => waitinmg for data
|
// 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_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& )
|
void SvLinkSource::Edit( Window *, SvBaseLink *, const Link& )
|
||||||
|
@@ -60,9 +60,9 @@ public:
|
|||||||
}
|
}
|
||||||
virtual ~SwServerObject();
|
virtual ~SwServerObject();
|
||||||
|
|
||||||
virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData,
|
virtual bool GetData( ::com::sun::star::uno::Any & rData,
|
||||||
const OUString & rMimeType,
|
const OUString & rMimeType,
|
||||||
sal_Bool bSynchron = sal_False );
|
bool bSynchron = false );
|
||||||
|
|
||||||
sal_Bool SetData( const OUString & rMimeType,
|
sal_Bool SetData( const OUString & rMimeType,
|
||||||
const ::com::sun::star::uno::Any& rData );
|
const ::com::sun::star::uno::Any& rData );
|
||||||
|
@@ -39,10 +39,10 @@ SwServerObject::~SwServerObject()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SwServerObject::GetData( uno::Any & rData,
|
bool SwServerObject::GetData( uno::Any & rData,
|
||||||
const OUString & rMimeType, sal_Bool )
|
const OUString & rMimeType, bool )
|
||||||
{
|
{
|
||||||
sal_Bool bRet = sal_False;
|
bool bRet = false;
|
||||||
WriterRef xWrt;
|
WriterRef xWrt;
|
||||||
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
|
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
|
||||||
{
|
{
|
||||||
@@ -96,7 +96,7 @@ sal_Bool SwServerObject::GetData( uno::Any & rData,
|
|||||||
rData <<= uno::Sequence< sal_Int8 >(
|
rData <<= uno::Sequence< sal_Int8 >(
|
||||||
(sal_Int8*)aMemStm.GetData(),
|
(sal_Int8*)aMemStm.GetData(),
|
||||||
aMemStm.Seek( STREAM_SEEK_TO_END ) );
|
aMemStm.Seek( STREAM_SEEK_TO_END ) );
|
||||||
bRet = sal_True;
|
bRet = true;
|
||||||
}
|
}
|
||||||
delete pPam;
|
delete pPam;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user