summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 09:53:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 13:19:18 +0200
commit6eb3d37fdc75537aa94144eef97493ec6192792f (patch)
tree4f65352402590eee8dd6164644ee2140ad0e79da /sw/source/uibase
parenta4b66458a7b8da2f5580014813e5dabe3fa670b6 (diff)
no need to allocate SfxStyleFamilies on the heap
Change-Id: Ibedb36dec14c61927ef594ddf47fda94728530a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/swmodule.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 485bb7a52d41..1a9622ebbd5f 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -341,41 +341,41 @@ void SwModule::RemoveAttrPool()
m_pAttrPool.clear();
}
-std::unique_ptr<SfxStyleFamilies> SwModule::CreateStyleFamilies()
+std::optional<SfxStyleFamilies> SwModule::CreateStyleFamilies()
{
- std::unique_ptr<SfxStyleFamilies> pStyleFamilies(new SfxStyleFamilies);
+ SfxStyleFamilies aStyleFamilies;
- pStyleFamilies->emplace_back(SfxStyleFamily::Para,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Para,
SwResId(STR_PARAGRAPHSTYLEFAMILY),
BMP_STYLES_FAMILY_PARA,
RID_PARAGRAPHSTYLEFAMILY, GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Char,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Char,
SwResId(STR_CHARACTERSTYLEFAMILY),
BMP_STYLES_FAMILY_CHAR,
RID_CHARACTERSTYLEFAMILY, GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Frame,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Frame,
SwResId(STR_FRAMESTYLEFAMILY),
BMP_STYLES_FAMILY_FRAME,
RID_FRAMESTYLEFAMILY, GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Page,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Page,
SwResId(STR_PAGESTYLEFAMILY),
BMP_STYLES_FAMILY_PAGE,
RID_PAGESTYLEFAMILY, GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Pseudo,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Pseudo,
SwResId(STR_LISTSTYLEFAMILY),
BMP_STYLES_FAMILY_LIST,
RID_LISTSTYLEFAMILY, GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Table,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Table,
SwResId(STR_TABLESTYLEFAMILY),
BMP_STYLES_FAMILY_TABLE,
RID_TABLESTYLEFAMILY, GetResLocale());
- return pStyleFamilies;
+ return aStyleFamilies;
}
void SwModule::RegisterAutomationApplicationEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller)