diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-15 15:11:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-15 15:17:15 +0100 |
commit | bf535c47728aa874dd9f0d7fba6ba478adb26073 (patch) | |
tree | 3d57d28ba39cfddd3356802cab8e0efe35743ef5 | |
parent | 921e2dc0393873ad0a972252000803ceadc290cb (diff) |
DdeSetData should apparently return bool
Change-Id: Ie0e66ac6c76eabb80340d4c11b60dd7890c6a378
-rw-r--r-- | include/sfx2/objsh.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/viewfrm.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appdde.cxx | 14 | ||||
-rw-r--r-- | sw/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 2 |
7 files changed, 19 insertions, 21 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index d2c0fe3ceb99..69b49a60f492 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 9628eb8dc0bd..b771574c2fd1 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 cb82e6ac82e9..eeb9e03dd3b4 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 c521ee9798c6..5072f56d633f 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 9785e369b253..e82cb17a87e0 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 30bd90adae89..10a7b2d1b6d2 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 879217f271b0..334d7e821f40 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 ); |