diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-17 08:59:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-17 10:19:39 +0200 |
commit | fbad565fcb5ee8d20a1a83838e66b43aeb23bfa4 (patch) | |
tree | 28fc4618e92e815f2842ff97cf7b6420cb0153c7 /sc/inc | |
parent | f2111a924ac7bf654e1bf30018007140deec9d78 (diff) |
use optional for some fields in ScGlobal
Change-Id: I715b771a9c09b7bcc536ce114080e27d75c2e91c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122230
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/global.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index f9a773c39b6f..7cf4d84b402f 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -35,6 +35,7 @@ #undef bool #include <memory> +#include <optional> #include <string_view> namespace com::sun::star::uno { template <typename > class Reference; } @@ -521,7 +522,7 @@ class ScGlobal static std::unique_ptr<SvNumberFormatter> xEnglishFormatter; // for UNO / XML export static css::uno::Reference< css::i18n::XOrdinalSuffix> xOrdinalSuffix; - static std::unique_ptr<CalendarWrapper> xCalendar; + static std::optional<CalendarWrapper> oCalendar; static std::atomic<CollatorWrapper*> pCaseCollator; static std::atomic<CollatorWrapper*> pCollator; static std::atomic<::utl::TransliterationWrapper*> pTransliteration; @@ -533,7 +534,7 @@ class ScGlobal static void InitPPT(); public: - static std::unique_ptr<SvtSysLocale> xSysLocale; + static std::optional<SvtSysLocale> oSysLocale; SC_DLLPUBLIC static const LocaleDataWrapper* getLocaleDataPtr(); SC_DLLPUBLIC static const CharClass& getCharClass(); |