diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-15 13:58:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-15 13:58:41 +0100 |
commit | c72a7a63833f840fdb334d91fc81a77c17f128a6 (patch) | |
tree | dddcb18a9a02da4680aa6cfc68af70559cfcf765 /sc | |
parent | 7e4823772ceb00d18301497fdad1a5b2678872bf (diff) |
DdeGetData should apparently return bool
Change-Id: I603198b9fd2c6fea1c9ec7de09b23c61fe9d603c
Diffstat (limited to 'sc')
-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 7819fc2f033a..cb82e6ac82e9 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 6bfee712c3bc..c521ee9798c6 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 ); |