include/sfx2/app.hxx        |    2 +-
 include/sfx2/objsh.hxx      |    2 +-
 sfx2/source/appl/appdde.cxx |   15 +++++++--------
 3 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 9a68ae949c8db91fad463df6d84e4eb89b3be4f7
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Nov 25 11:20:59 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Nov 25 15:59:41 2020 +0100

    SfxObjectShell::DdeExecute and SfxApplication::DdeExecute should return bool
    
    Change-Id: I32749562744572723de8a38811b6bc0bd950b582
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106580
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 9714ad8e13d5..26b14e2ca2d4 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -120,7 +120,7 @@ public:
 
     // DDE
 #if defined(_WIN32)
-    static long                 DdeExecute( const OUString& rCmd );
+    static bool                 DdeExecute( const OUString& rCmd );
 #endif
     bool                        InitializeDde();
     const DdeService*           GetDdeService() const;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index c4ec915588b4..8d3897b29d07 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -532,7 +532,7 @@ public:
 
 #if defined(_WIN32)
     // DDE-Interface
-    long                        DdeExecute( const OUString& rCmd );
+    bool                        DdeExecute( const OUString& rCmd );
     virtual bool                DdeGetData( const OUString& rItem,
                                             const OUString& rMimeType,
                                             css::uno::Any & rValue );
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 9c2e21dcc426..0746c19755d2 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -297,7 +297,7 @@ bool SfxAppEvent_Impl( const OUString& rCmd, const 
OUString& rEvent,
     relevant SfxApplication subclass in BASIC syntax. Return values can
     not be transferred, unfortunately.
 */
-long SfxApplication::DdeExecute( const OUString&   rCmd )  // Expressed in our 
BASIC-Syntax
+bool SfxApplication::DdeExecute( const OUString&   rCmd )  // Expressed in our 
BASIC-Syntax
 {
     // Print or Open-Event?
     if ( !( SfxAppEvent_Impl( rCmd, "Print", ApplicationEvent::Type::Print ) ||
@@ -310,10 +310,10 @@ long SfxApplication::DdeExecute( const OUString&   rCmd ) 
 // Expressed in our B
         if( !pRet )
         {
             SbxBase::ResetError();
-            return 0;
+            return false;
         }
     }
-    return 1;
+    return true;
 }
 
 /*  [Description]
@@ -323,7 +323,7 @@ long SfxApplication::DdeExecute( const OUString&   rCmd )  
// Expressed in our B
 
     The base implementation does nothing and returns 0.
 */
-long SfxObjectShell::DdeExecute( const OUString&   rCmd )  // Expressed in our 
BASIC-Syntax
+bool SfxObjectShell::DdeExecute( const OUString&   rCmd )  // Expressed in our 
BASIC-Syntax
 {
 #if !HAVE_FEATURE_SCRIPTING
     (void) rCmd;
@@ -334,10 +334,10 @@ long SfxObjectShell::DdeExecute( const OUString&   rCmd ) 
 // Expressed in our B
     if( !pRet )
     {
         SbxBase::ResetError();
-        return 0;
+        return false;
     }
 #endif
-    return 1;
+    return true;
 }
 
 /*  [Description]
@@ -537,8 +537,7 @@ bool SfxDdeDocTopic_Impl::Put( const DdeData* pData )
 
 bool SfxDdeDocTopic_Impl::Execute( const OUString* pStr )
 {
-    long nRet = pStr ? pSh->DdeExecute( *pStr ) : 0;
-    return 0 != nRet;
+    return pStr && pSh->DdeExecute( *pStr );
 }
 
 bool SfxDdeDocTopic_Impl::MakeItem( const OUString& rItem )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to