Kaydet (Commit) fa7708de authored tarafından Caolán McNamara's avatar Caolán McNamara

mutex used in post-main dtor

Change-Id: Ia4f4def1fd58d82a7c994114e45a36227269671c
üst 5b9062a2
...@@ -100,6 +100,8 @@ public: ...@@ -100,6 +100,8 @@ public:
*/ */
void SetFrame (const css::uno::Reference<css::frame::XFrame>& rxFrame); void SetFrame (const css::uno::Reference<css::frame::XFrame>& rxFrame);
void dispose();
private: private:
css::uno::Reference<css::uno::XComponentContext> mxContext; css::uno::Reference<css::uno::XComponentContext> mxContext;
css::uno::Reference<css::frame::XFrame> mxCachedDataFrame; css::uno::Reference<css::frame::XFrame> mxCachedDataFrame;
......
...@@ -75,7 +75,11 @@ class Image; ...@@ -75,7 +75,11 @@ class Image;
class PopupMenu; class PopupMenu;
class Application; class Application;
class OutputDevice; class OutputDevice;
namespace vcl { class Window; } namespace vcl
{
class CommandInfoProvider;
class Window;
}
class SystemWindow; class SystemWindow;
class WorkWindow; class WorkWindow;
class Dialog; class Dialog;
...@@ -338,6 +342,7 @@ struct ImplSVData ...@@ -338,6 +342,7 @@ struct ImplSVData
VclPtr<vcl::Window> mpIntroWindow; // the splash screen VclPtr<vcl::Window> mpIntroWindow; // the splash screen
DockingManager* mpDockingManager; DockingManager* mpDockingManager;
BlendFrameCache* mpBlendFrameCache; BlendFrameCache* mpBlendFrameCache;
vcl::CommandInfoProvider* mpCommandInfoProvider;
oslThreadIdentifier mnMainThreadId; oslThreadIdentifier mnMainThreadId;
rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; rtl::Reference< vcl::DisplayConnection > mxDisplayConnection;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "vcl/implimagetree.hxx" #include "vcl/implimagetree.hxx"
#include "vcl/settings.hxx" #include "vcl/settings.hxx"
#include "vcl/unowrap.hxx" #include "vcl/unowrap.hxx"
#include "vcl/commandinfoprovider.hxx"
#include "vcl/configsettings.hxx" #include "vcl/configsettings.hxx"
#include "vcl/lazydelete.hxx" #include "vcl/lazydelete.hxx"
#include "vcl/embeddedfontshelper.hxx" #include "vcl/embeddedfontshelper.hxx"
...@@ -517,6 +518,12 @@ void DeInitVCL() ...@@ -517,6 +518,12 @@ void DeInitVCL()
if (pSVData->mpBlendFrameCache) if (pSVData->mpBlendFrameCache)
delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr; delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr;
if (pSVData->mpCommandInfoProvider)
{
pSVData->mpCommandInfoProvider->dispose();
pSVData->mpCommandInfoProvider = nullptr;
}
ImplDeletePrnQueueList(); ImplDeletePrnQueueList();
delete pSVData->maGDIData.mpScreenFontList; delete pSVData->maGDIData.mpScreenFontList;
pSVData->maGDIData.mpScreenFontList = nullptr; pSVData->maGDIData.mpScreenFontList = nullptr;
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <com/sun/star/ui/XImageManager.hpp> #include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/awt/KeyModifier.hpp>
#include "svdata.hxx"
using namespace css; using namespace css;
using namespace css::uno; using namespace css::uno;
...@@ -100,15 +102,26 @@ CommandInfoProvider::CommandInfoProvider() ...@@ -100,15 +102,26 @@ CommandInfoProvider::CommandInfoProvider()
msCachedModuleIdentifier(), msCachedModuleIdentifier(),
mxFrameListener() mxFrameListener()
{ {
ImplGetSVData()->mpCommandInfoProvider = this;
} }
CommandInfoProvider::~CommandInfoProvider() void CommandInfoProvider::dispose()
{ {
if (mxFrameListener.is()) if (mxFrameListener.is())
{ {
mxFrameListener->dispose(); mxFrameListener->dispose();
mxFrameListener = nullptr; mxFrameListener.clear();
} }
mxCachedGlobalAcceleratorConfiguration.clear();
mxCachedModuleAcceleratorConfiguration.clear();
mxCachedDocumentAcceleratorConfiguration.clear();
mxCachedDataFrame.clear();
mxContext.clear();
}
CommandInfoProvider::~CommandInfoProvider()
{
dispose();
} }
OUString CommandInfoProvider::GetLabelForCommand ( OUString CommandInfoProvider::GetLabelForCommand (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment