[Libreoffice-commits] core.git: 2 commits - include/tools svl/source

Stephan Bergmann sbergman at redhat.com
Tue Jul 7 05:53:04 PDT 2015


 include/tools/shl.hxx       |    4 ++--
 svl/source/svdde/ddecli.cxx |   23 +++++++++++++++--------
 svl/source/svdde/ddeimp.hxx |   10 +---------
 3 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 64fe80db1f06c01084a1c8c498ac874ce4e476ce
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jul 7 14:44:59 2015 +0200

    Replace GetAppData(SHL_SVDDE) with a static pointer var
    
    Change-Id: I63d35dc3dbfb1185d5795316d2c1d77745d85451

diff --git a/include/tools/shl.hxx b/include/tools/shl.hxx
index 0e48062..85a4242 100644
--- a/include/tools/shl.hxx
+++ b/include/tools/shl.hxx
@@ -33,7 +33,7 @@
 // 6 (SHL_TOOLS) removed
 // 7 (SHL_SV) removed
 // 8 (SHL_SVT) removed
-#define SHL_SVDDE       9
+// 9 (SHL_SVDDE) removed
 // 10 (SHL_ERR) removed
 //11 (SHL_IPC) removed
 //12 (SHL_SVX) removed
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index 860f7c6..f771075 100644
--- a/svl/source/svdde/ddecli.cxx
+++ b/svl/source/svdde/ddecli.cxx
@@ -29,20 +29,27 @@
 #include <tools/solarmutex.hxx>
 #include <osl/mutex.hxx>
 
-DdeInstData* ImpInitInstData()
+namespace {
+
+DdeInstData * theDdeInstData;
+
+}
+
+DdeInstData* ImpGetInstData()
 {
-    DdeInstData* pData = new DdeInstData;
+    return theDdeInstData;
+}
 
-    DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE );
-    *ppInst = pData;
-    return pData;
+DdeInstData* ImpInitInstData()
+{
+    theDdeInstData = new DdeInstData;
+    return theDdeInstData;
 }
 
 void ImpDeinitInstData()
 {
-    DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE );
-    delete (*ppInst);
-    *ppInst = 0;
+    delete theDdeInstData;
+    theDdeInstData = 0;
 }
 
 
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index 23bffe9..265025c 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -26,7 +26,6 @@
 #include <boost/noncopyable.hpp>
 #include <rtl/ustring.hxx>
 #include <svl/svdde.hxx>
-#include <tools/shl.hxx>
 #include <vector>
 
 
@@ -121,10 +120,7 @@ public:
     }
 };
 
-inline DdeInstData* ImpGetInstData()
-{
-    return (DdeInstData*)(*GetAppData( SHL_SVDDE ));
-}
+DdeInstData* ImpGetInstData();
 DdeInstData* ImpInitInstData();
 void ImpDeinitInstData();
 
commit 2b429eff07ed3e3049e47e0219669a47bada4905
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jul 7 13:33:13 2015 +0200

    SHL_SHL2 is unused
    
    Change-Id: I8e76b7e0f58143c883fa94a44d9681c6c3b9ac5a

diff --git a/include/tools/shl.hxx b/include/tools/shl.hxx
index db6693c..0e48062 100644
--- a/include/tools/shl.hxx
+++ b/include/tools/shl.hxx
@@ -25,7 +25,7 @@
 // GetAppData()
 
 // 0 (SHL_SHL1) removed
-#define SHL_SHL2        1
+// 1 (SHL_SHL2) removed
 // 2 (SHL_SHL3) removed
 // 3 (SHL_APP1) removed
 // 4 (SHL_APP2) removed
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index 945f639..23bffe9 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -121,10 +121,6 @@ public:
     }
 };
 
-#ifndef SHL_SVDDE
-#define SHL_SVDDE   SHL_SHL2
-#endif
-
 inline DdeInstData* ImpGetInstData()
 {
     return (DdeInstData*)(*GetAppData( SHL_SVDDE ));


More information about the Libreoffice-commits mailing list