diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-22 11:20:01 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-22 20:42:23 +0200 |
commit | ca8a4c81a4194cfaa526bd8071a2243aad0f3461 (patch) | |
tree | cb22c6d1bbdfa9dff376d85a612ad9ab49db200b /vcl/inc/unx | |
parent | 893c08b59abf31ee0ae50c4ac030b006c43c0976 (diff) |
vcl: [loplugin:badstatics] pManager
Move this to class GenericUnixSalData, which is deleted on shutdown.
Change-Id: I6366c12f255bfeca737b22259c3f58ffa2c6222c
Reviewed-on: https://gerrit.libreoffice.org/42632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r-- | vcl/inc/unx/fontmanager.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/gendata.hxx | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx index 0dd0cc87b412..47ea4348bdcc 100644 --- a/vcl/inc/unx/fontmanager.hxx +++ b/vcl/inc/unx/fontmanager.hxx @@ -45,6 +45,7 @@ class FontSubsetInfo; class FontConfigFontOptions; class FontSelectPattern; +class GenericUnixSalData; namespace psp { class PPDParser; @@ -200,8 +201,9 @@ class VCL_PLUGIN_PUBLIC PrintFontManager DECL_LINK( autoInstallFontLangSupport, Timer*, void ); #endif PrintFontManager(); - ~PrintFontManager(); public: + ~PrintFontManager(); + friend class ::GenericUnixSalData; static PrintFontManager& get(); // one instance only // There may be multiple font ids for font collections diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx index db19b0cf0420..55a9aaf4ba8c 100644 --- a/vcl/inc/unx/gendata.hxx +++ b/vcl/inc/unx/gendata.hxx @@ -14,7 +14,10 @@ #include <saldatabasic.hxx> +#include <memory> + class SalGenericDisplay; +namespace psp { class PrintFontManager; } enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3, SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4, @@ -31,8 +34,13 @@ class VCL_DLLPUBLIC GenericUnixSalData : public SalData OUString m_aHostname; // for transient storage of unicode strings eg. 'u123' by input methods OUString m_aUnicodeEntry; + + friend class psp::PrintFontManager; + std::unique_ptr<psp::PrintFontManager> m_pPrintFontManager; + public: - GenericUnixSalData( GenericUnixSalDataType t, SalInstance *pInstance ) : SalData(), m_eType( t ), m_pDisplay( nullptr ) { m_pInstance = pInstance; SetSalData( this ); } + GenericUnixSalData(GenericUnixSalDataType const t, SalInstance *const pInstance); + virtual ~GenericUnixSalData() override; virtual void Dispose() {} SalGenericDisplay *GetDisplay() const { return m_pDisplay; } |