include/sfx2/objsh.hxx | 2 +- include/sfx2/viewfrm.hxx | 2 +- sc/source/ui/docshell/docsh4.cxx | 16 +++++++--------- sc/source/ui/inc/docsh.hxx | 2 +- sfx2/source/appl/appdde.cxx | 14 +++++++------- sw/inc/docsh.hxx | 2 +- sw/source/ui/app/docsh2.cxx | 2 +- 7 files changed, 19 insertions(+), 21 deletions(-)
New commits: commit bf535c47728aa874dd9f0d7fba6ba478adb26073 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jan 15 15:11:53 2014 +0100 DdeSetData should apparently return bool Change-Id: Ie0e66ac6c76eabb80340d4c11b60dd7890c6a378 diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index d2c0fe3..69b49a6 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -482,7 +482,7 @@ public: virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); - virtual long DdeSetData( const OUString& rItem, + virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ); diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 9628eb8..b771574 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -143,7 +143,7 @@ public: virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); - virtual long DdeSetData( const OUString& rItem, + virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index cb82e6a..eeb9e03 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2125,7 +2125,7 @@ bool ScDocShell::DdeGetData( const OUString& rItem, return aObj.IsRef() && aObj.ExportData( rMimeType, rValue ); } -long ScDocShell::DdeSetData( const OUString& rItem, +bool ScDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) { @@ -2136,9 +2136,9 @@ long ScDocShell::DdeSetData( const OUString& rItem, if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, osl_getThreadTextEncoding() ) ) { aDdeTextFmt = aDdeTextFmt.toAsciiUpperCase(); - return 1; + return true; } - return 0; + return false; } ScImportExport aObj( &aDocument, rItem ); if( aDdeTextFmt[0] == 'F' ) @@ -2149,19 +2149,17 @@ long ScDocShell::DdeSetData( const OUString& rItem, OUString aData; if ( ScByteSequenceToString::GetString( aData, rValue, osl_getThreadTextEncoding() ) ) { - return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 0; + return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ); } - return 0; + return false; } if( aDdeTextFmt == "CSV" || aDdeTextFmt == "FCSV" ) aObj.SetSeparator( ',' ); - return aObj.ImportData( rMimeType, rValue ) ? 1 : 0; + return aObj.ImportData( rMimeType, rValue ); } ScImportExport aObj( &aDocument, rItem ); - if( aObj.IsRef() ) - return aObj.ImportData( rMimeType, rValue ) ? 1 : 0; - return 0; + return aObj.IsRef() && aObj.ImportData( rMimeType, rValue ); } ::sfx2::SvLinkSource* ScDocShell::DdeCreateLinkSource( const OUString& rItem ) diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index c521ee9..5072f56 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -376,7 +376,7 @@ public: virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); - virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType, + virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ); diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 9785e36..e82cb17 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -386,13 +386,13 @@ bool SfxObjectShell::DdeGetData( const OUString&, // the Item to be This method can be overloaded by application developers, to receive DDE-data directed to their SfxApplication subclass. - The base implementation is not receiving any data and returns 0. + The base implementation is not receiving any data and returns false. */ -long SfxObjectShell::DdeSetData( const OUString&, // the Item to be addressed +bool SfxObjectShell::DdeSetData( const OUString&, // the Item to be addressed const OUString&, // in: Format const ::com::sun::star::uno::Any& )// out: requested data { - return 0; + return false; } /* [Description] @@ -461,13 +461,13 @@ bool SfxViewFrame::DdeGetData( const OUString&, // the Item to be add This method can be overloaded by application developers, to receive DDE-data directed to their SfxApplication subclass. - The base implementation is not receiving any data and returns 0. + The base implementation is not receiving any data and returns false. */ -long SfxViewFrame::DdeSetData( const OUString&, // the Item to be addressed +bool SfxViewFrame::DdeSetData( const OUString&, // the Item to be addressed const OUString&, // in: Format const ::com::sun::star::uno::Any& )// out: requested data { - return 0; + return false; } /* [Description] @@ -614,7 +614,7 @@ bool SfxDdeDocTopic_Impl::Put( const DdeData* pData ) ::com::sun::star::uno::Any aValue; aValue <<= aSeq; OUString sMimeType( SotExchange::GetFormatMimeType( pData->GetFormat() )); - bRet = 0 != pSh->DdeSetData( GetCurItem(), sMimeType, aValue ); + bRet = pSh->DdeSetData( GetCurItem(), sMimeType, aValue ); } else bRet = false; diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 30bd90a..10a7b2d 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -222,7 +222,7 @@ public: virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); - virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType, + virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ); virtual void ReconnectDdeLink(SfxObjectShell& rServer); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 879217f..334d7e8 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1169,7 +1169,7 @@ bool SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, return pDoc->GetData( rItem, rMimeType, rValue ); } -long SwDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType, +bool SwDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType, const uno::Any & rValue ) { return pDoc->SetData( rItem, rMimeType, rValue ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits