summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/inc/scmod.hxx2
-rw-r--r--sc/source/ui/app/scmod.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index fd19d67df5d9..0cf597af2103 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -229,7 +229,7 @@ public:
virtual std::optional<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) override;
- virtual std::optional<SfxStyleFamilies> CreateStyleFamilies() override;
+ virtual SfxStyleFamilies CreateStyleFamilies() override;
void SetInSharedDocLoading( bool bNew ) { m_bIsInSharedDocLoading = bNew; }
bool IsInSharedDocLoading() const { return m_bIsInSharedDocLoading; }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 84238486fa6b..26e40a2d3d9a 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2344,7 +2344,7 @@ bool ScModule::HasThesaurusLanguage( LanguageType nLang )
return bHasLang;
}
-std::optional<SfxStyleFamilies> ScModule::CreateStyleFamilies()
+SfxStyleFamilies ScModule::CreateStyleFamilies()
{
SfxStyleFamilies aStyleFamilies;
std::locale resLocale = ScModule::get()->GetResLocale();