summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-15 13:58:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-15 13:58:41 +0100
commitc72a7a63833f840fdb334d91fc81a77c17f128a6 (patch)
treedddcb18a9a02da4680aa6cfc68af70559cfcf765
parent7e4823772ceb00d18301497fdad1a5b2678872bf (diff)
DdeGetData should apparently return bool
Change-Id: I603198b9fd2c6fea1c9ec7de09b23c61fe9d603c
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/viewfrm.hxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx16
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sfx2/source/appl/appdde.cxx14
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/source/ui/app/docsh2.cxx2
7 files changed, 19 insertions, 21 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index c38ed8ff2f0f..d2c0fe3ceb99 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 8c245ab1946c..9628eb8dc0bd 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 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 );
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index f3efec169948..9785e369b253 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 e75a4d15318c..30bd90adae89 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 e793fe433f0c..879217f271b0 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 );