summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-30 22:01:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-31 19:57:14 +0200
commit5fddc93fec46cda828595418105af3838918cb69 (patch)
treecd8ed7622a3060d9976272f0c6881b9ab1ca8e90 /sfx2
parent8bfb8574fe1b0bffff6ad82d469fc43247ac8c80 (diff)
no need to allocate SfxFilterMatcher separately
it only contains a single pointer Change-Id: If988f03d693d4912ce3b7a6fa5fab7cd52ab05cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appmain.cxx4
-rw-r--r--sfx2/source/inc/appdata.hxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 884c4fd4db39..5f24bbc8aae3 100644
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -28,9 +28,9 @@ SfxFilterMatcher& SfxApplication::GetFilterMatcher()
{
if( !pImpl->pMatcher )
{
- pImpl->pMatcher.reset(new SfxFilterMatcher());
+ pImpl->pMatcher.emplace();
URIHelper::SetMaybeFileHdl( LINK(
- pImpl->pMatcher.get(), SfxFilterMatcher, MaybeFileHdl_Impl ) );
+ &*pImpl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) );
}
return *pImpl->pMatcher;
}
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index ac29be15f9b7..8b225d251372 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -27,6 +27,7 @@
#include <svtools/ehdl.hxx>
#include <sfx2/app.hxx>
#include <sfx2/doctempl.hxx>
+#include <sfx2/fcontnr.hxx>
#include <o3tl/enumarray.hxx>
#include "sfxpicklist.hxx"
@@ -41,7 +42,6 @@ class DdeService;
class SfxItemPool;
class SfxFilterMatcher;
class ISfxTemplateCommon;
-class SfxFilterMatcher;
class SfxStatusDispatcher;
class SfxDdeTriggerTopic_Impl;
class SfxFrame;
@@ -75,7 +75,7 @@ public:
std::vector<SfxFrame*> vTopFrames;
// application members
- std::unique_ptr<SfxFilterMatcher> pMatcher;
+ std::optional<SfxFilterMatcher> pMatcher;
std::unique_ptr<SfxErrorHandler> m_pToolsErrorHdl;
std::unique_ptr<SfxErrorHandler> m_pSoErrorHdl;
#if HAVE_FEATURE_SCRIPTING