[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Nov 27 03:07:15 PST 2015
include/vcl/commandinfoprovider.hxx | 2 ++
vcl/inc/svdata.hxx | 7 ++++++-
vcl/source/app/svmain.cxx | 7 +++++++
vcl/source/helper/commandinfoprovider.cxx | 17 +++++++++++++++--
4 files changed, 30 insertions(+), 3 deletions(-)
New commits:
commit fa7708def7601bd07cb7642dc444993d7f8f8587
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
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