summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx2
-rw-r--r--sw/source/uibase/app/swmodule.cxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 642651283428..6b35b6a309e5 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -72,7 +72,7 @@ SwCondCollPage::SwCondCollPage(weld::Container* pPage, weld::DialogController* p
m_xStyleLB->connect_changed(LINK(this, SwCondCollPage, SelectTreeListBoxHdl));
m_xFilterLB->connect_changed(LINK(this, SwCondCollPage, SelectListBoxHdl));
- std::unique_ptr<SfxStyleFamilies> xFamilies(SW_MOD()->CreateStyleFamilies());
+ std::optional<SfxStyleFamilies> xFamilies(SW_MOD()->CreateStyleFamilies());
size_t nCount = xFamilies->size();
for (size_t j = 0; j < nCount; ++j)
{
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)