[Libreoffice-commits] core.git: sfx2/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 31 17:57:49 UTC 2021
sfx2/source/appl/appmain.cxx | 4 ++--
sfx2/source/inc/appdata.hxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5fddc93fec46cda828595418105af3838918cb69
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Mon Aug 30 22:01:27 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 31 19:57:14 2021 +0200
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 at collabora.co.uk>
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
More information about the Libreoffice-commits
mailing list