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 /sc/source | |
parent | 921e2dc0393873ad0a972252000803ceadc290cb (diff) |
DdeSetData should apparently return bool
Change-Id: Ie0e66ac6c76eabb80340d4c11b60dd7890c6a378
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 2 |
2 files changed, 8 insertions, 10 deletions
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 ); |