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 c72a7a63833f840fdb334d91fc81a77c17f128a6 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jan 15 13:58:41 2014 +0100 DdeGetData should apparently return bool Change-Id: I603198b9fd2c6fea1c9ec7de09b23c61fe9d603c diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index c38ed8f..d2c0fe3 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -479,7 +479,7 @@ public: // DDE-Interface virtual long DdeExecute( const OUString& rCmd ); - virtual long DdeGetData( const OUString& rItem, + virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); virtual long DdeSetData( const OUString& rItem, diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 8c245ab..9628eb8 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -140,7 +140,7 @@ public: // DDE-Interface virtual long DdeExecute( const OUString& rCmd ); - virtual long DdeGetData( const OUString& rItem, + virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); virtual long DdeSetData( const OUString& rItem, diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 7819fc2..cb82e6a 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2077,7 +2077,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, rbFooter = ((const SfxBoolItem&)pSet->Get(ATTR_PAGE_ON)).GetValue(); } -long ScDocShell::DdeGetData( const OUString& rItem, +bool ScDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ) { @@ -2090,11 +2090,11 @@ long ScDocShell::DdeGetData( const OUString& rItem, rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( (const sal_Int8*)aFmtByte.getStr(), aFmtByte.getLength() + 1 ); - return 1; + return true; } ScImportExport aObj( &aDocument, rItem ); if ( !aObj.IsRef() ) - return 0; // ungueltiger Bereich + return false; // ungueltiger Bereich if( aDdeTextFmt[0] == 'F' ) aObj.SetFormulas( sal_True ); @@ -2108,23 +2108,21 @@ long ScDocShell::DdeGetData( const OUString& rItem, rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( (const sal_Int8*)aData.getStr(), aData.getLength() + 1 ); - return 1; + return true; } else - return 0; + return false; } if( aDdeTextFmt == "CSV" || aDdeTextFmt == "FCSV" ) aObj.SetSeparator( ',' ); aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, 0, false ) ); - return aObj.ExportData( rMimeType, rValue ) ? 1 : 0; + return aObj.ExportData( rMimeType, rValue ); } ScImportExport aObj( &aDocument, rItem ); aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, 0, false ) ); - if( aObj.IsRef() ) - return aObj.ExportData( rMimeType, rValue ) ? 1 : 0; - return 0; + return aObj.IsRef() && aObj.ExportData( rMimeType, rValue ); } long ScDocShell::DdeSetData( const OUString& rItem, diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 6bfee71..c521ee9 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -374,7 +374,7 @@ public: bool& rbHeader, bool& rbFooter ); - virtual long DdeGetData( const OUString& rItem, const OUString& rMimeType, + virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index f3efec1..9785e36 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -370,13 +370,13 @@ long SfxObjectShell::DdeExecute( const OUString& rCmd ) // Expressed in our B This method can be overloaded by application developers, to receive DDE-data-requests directed to their SfxApplication subclass. - The base implementation provides no data and returns 0. + The base implementation provides no data and returns false. */ -long SfxObjectShell::DdeGetData( const OUString&, // the Item to be addressed +bool SfxObjectShell::DdeGetData( const OUString&, // the Item to be addressed const OUString&, // in: Format ::com::sun::star::uno::Any& )// out: requested data { - return 0; + return false; } //-------------------------------------------------------------------- @@ -447,13 +447,13 @@ long SfxViewFrame::DdeExecute( const OUString& rCmd ) // Expressed in our BASI This method can be overloaded by application developers, to receive DDE-data-requests directed to their SfxApplication subclass. - The base implementation provides no data and returns 0. + The base implementation provides no data and returns false. */ -long SfxViewFrame::DdeGetData( const OUString&, // the Item to be addressed +bool SfxViewFrame::DdeGetData( const OUString&, // the Item to be addressed const OUString&, // in: Format ::com::sun::star::uno::Any& )// out: requested data { - return 0; + return false; } /* [Description] @@ -594,7 +594,7 @@ DdeData* SfxDdeDocTopic_Impl::Get( sal_uIntPtr nFormat ) { OUString sMimeType( SotExchange::GetFormatMimeType( nFormat )); ::com::sun::star::uno::Any aValue; - long nRet = pSh->DdeGetData( GetCurItem(), sMimeType, aValue ); + bool nRet = pSh->DdeGetData( GetCurItem(), sMimeType, aValue ); if( nRet && aValue.hasValue() && ( aValue >>= aSeq ) ) { aData = DdeData( aSeq.getConstArray(), aSeq.getLength(), nFormat ); diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index e75a4d1..30bd90a 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -220,7 +220,7 @@ public: Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0); - virtual long DdeGetData( const OUString& rItem, const OUString& rMimeType, + virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ); virtual long DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index e793fe4..879217f 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1163,7 +1163,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHel } #endif -long SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, +bool SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, uno::Any & rValue ) { return pDoc->GetData( rItem, rMimeType, rValue ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits