[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - 2 commits - include/vcl sw/inc vcl/inc vcl/source

Caolán McNamara caolanm at redhat.com
Fri Nov 27 05:49:45 PST 2015


 include/vcl/commandinfoprovider.hxx       |    2 ++
 sw/inc/globals.hrc                        |    2 +-
 vcl/inc/svdata.hxx                        |    7 ++++++-
 vcl/source/app/svmain.cxx                 |    7 +++++++
 vcl/source/helper/commandinfoprovider.cxx |   17 +++++++++++++++--
 5 files changed, 31 insertions(+), 4 deletions(-)

New commits:
commit 978d0494d54a9d673beef7b7bcd7c47dd5e63ed2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 26 11:56:55 2015 +0000

    missing string resource
    
    content.cxx loops over CONTEXT_COUNT so there can't be holes here
    
    regression from
    
    commit 63aa32b726e482c49b2aaae9cad8a7beae3653a4
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Mon Sep 28 17:05:40 2015 +0100
    
        move strings out of widget
    
    Change-Id: Ie189e2a910e02a96bc8e1450a2f2b03afaf466ac
    (cherry picked from commit b33236bfd25333513823e69fac1bc833ee4b5f6e)

diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index d89291e..0335de1 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -101,7 +101,7 @@
 #define STR_HIDDEN                   (STR_STATUS_FIRST + 0)
 #define STR_ACTIVE                   (STR_STATUS_FIRST + 1)
 #define STR_INACTIVE                 (STR_STATUS_FIRST + 2)
-#define STR_MISC                     (RC_GLOBALS_BEGIN + 63)
+#define STR_MISC                     (RC_GLOBALS_BEGIN + 62)
 #define STR_EDIT_ENTRY               STR_MISC
 #define STR_DELETE_ENTRY             (STR_MISC + 1)
 
commit 05ec111a84019f00b6352523971bb0752950f477
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 26 11:32:40 2015 +0000

    mutex used in post-main dtor
    
    Change-Id: Ia4f4def1fd58d82a7c994114e45a36227269671c
    (cherry picked from commit fa7708def7601bd07cb7642dc444993d7f8f8587)

diff --git a/include/vcl/commandinfoprovider.hxx b/include/vcl/commandinfoprovider.hxx
index c790fed..4fc88b7 100644
--- a/include/vcl/commandinfoprovider.hxx
+++ b/include/vcl/commandinfoprovider.hxx
@@ -100,6 +100,8 @@ public:
     */
     void SetFrame (const css::uno::Reference<css::frame::XFrame>& rxFrame);
 
+    void dispose();
+
   private:
     css::uno::Reference<css::uno::XComponentContext> mxContext;
     css::uno::Reference<css::frame::XFrame> mxCachedDataFrame;
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index da1904c..46527f0 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -75,7 +75,11 @@ class Image;
 class PopupMenu;
 class Application;
 class OutputDevice;
-namespace vcl { class Window; }
+namespace vcl
+{
+    class CommandInfoProvider;
+    class Window;
+}
 class SystemWindow;
 class WorkWindow;
 class Dialog;
@@ -338,6 +342,7 @@ struct ImplSVData
     VclPtr<vcl::Window>     mpIntroWindow;                  // the splash screen
     DockingManager*         mpDockingManager;
     BlendFrameCache*        mpBlendFrameCache;
+    vcl::CommandInfoProvider* mpCommandInfoProvider;
 
     oslThreadIdentifier     mnMainThreadId;
     rtl::Reference< vcl::DisplayConnection > mxDisplayConnection;
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 9cb3d2d..ce44f60 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -38,6 +38,7 @@
 #include "vcl/implimagetree.hxx"
 #include "vcl/settings.hxx"
 #include "vcl/unowrap.hxx"
+#include "vcl/commandinfoprovider.hxx"
 #include "vcl/configsettings.hxx"
 #include "vcl/lazydelete.hxx"
 #include "vcl/embeddedfontshelper.hxx"
@@ -517,6 +518,12 @@ void DeInitVCL()
     if (pSVData->mpBlendFrameCache)
         delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr;
 
+    if (pSVData->mpCommandInfoProvider)
+    {
+        pSVData->mpCommandInfoProvider->dispose();
+        pSVData->mpCommandInfoProvider = nullptr;
+    }
+
     ImplDeletePrnQueueList();
     delete pSVData->maGDIData.mpScreenFontList;
     pSVData->maGDIData.mpScreenFontList = nullptr;
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index 5ef6f09..fcc8aec 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -31,6 +31,8 @@
 #include <com/sun/star/ui/XImageManager.hpp>
 #include <com/sun/star/awt/KeyModifier.hpp>
 
+#include "svdata.hxx"
+
 using namespace css;
 using namespace css::uno;
 
@@ -100,15 +102,26 @@ CommandInfoProvider::CommandInfoProvider()
       msCachedModuleIdentifier(),
       mxFrameListener()
 {
+    ImplGetSVData()->mpCommandInfoProvider = this;
 }
 
-CommandInfoProvider::~CommandInfoProvider()
+void CommandInfoProvider::dispose()
 {
     if (mxFrameListener.is())
     {
         mxFrameListener->dispose();
-        mxFrameListener = nullptr;
+        mxFrameListener.clear();
     }
+    mxCachedGlobalAcceleratorConfiguration.clear();
+    mxCachedModuleAcceleratorConfiguration.clear();
+    mxCachedDocumentAcceleratorConfiguration.clear();
+    mxCachedDataFrame.clear();
+    mxContext.clear();
+}
+
+CommandInfoProvider::~CommandInfoProvider()
+{
+    dispose();
 }
 
 OUString CommandInfoProvider::GetLabelForCommand (


More information about the Libreoffice-commits mailing list