summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/mgetempl.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-02-02 23:46:11 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-02-04 00:33:07 +0100
commit700194c65544f130c92819425933d43528ba1598 (patch)
tree270c177289da7c352e33bbb62c6486df5d7c0ed1 /sfx2/source/dialog/mgetempl.cxx
parent527f81f2717812a10f88fb69edeaf062fd8589a1 (diff)
No longer use std::optional for SfxModule::CreateStyleFamilies
Just return an empty std::vector instead of a std::optional that contains no value in the default implementation, and adjust the type of the local variables and class members that contain the result and their use accordingly. Change-Id: I4e25b3cbd96c6eb9f06b0ae44b36675bb11ab38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181024 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/dialog/mgetempl.cxx')
-rw-r--r--sfx2/source/dialog/mgetempl.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 9425b5e5b437..4bbed98ecb5a 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -91,7 +91,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D
else
m_xEditLinkStyleBtn->set_sensitive(true);
- mxFamilies = SfxApplication::GetModule_Impl()->CreateStyleFamilies();
+ maFamilies = SfxApplication::GetModule_Impl()->CreateStyleFamilies();
SfxStyleSheetBasePool* pPool = nullptr;
SfxObjectShell* pDocShell = SfxObjectShell::Current();
@@ -184,11 +184,11 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D
m_xBaseLb->set_sensitive(false);
}
- size_t nCount = mxFamilies->size();
+ size_t nCount = maFamilies.size();
size_t i;
for ( i = 0; i < nCount; ++i )
{
- pItem = &(mxFamilies->at(i));
+ pItem = &(maFamilies.at(i));
if ( pItem->GetFamily() == pStyle->GetFamily() )
break;
@@ -255,7 +255,6 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D
SfxManageStyleSheetPage::~SfxManageStyleSheetPage()
{
- mxFamilies.reset();
pItem = nullptr;
pStyle = nullptr;
}