diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk index 0b72164bbf96..984137ebcf78 100644 --- a/i18npool/Library_i18npool.mk +++ b/i18npool/Library_i18npool.mk @@ -41,6 +41,10 @@ $(eval $(call gb_Library_use_externals,i18npool,\ icu_headers \ )) +$(eval $(call gb_Library_use_custom_headers,i18npool,\ + officecfg/registry \ +)) + ifeq ($(DISABLE_DYNLOADING),TRUE) $(eval $(call gb_Library_add_cxxflags,i18npool,\ -DDICT_JA_ZH_IN_DATAFILE \ diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index a1630a1cc2bd..1ba942ca3b51 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -32,6 +32,7 @@ #include #include #include +#include // Cyrillic upper case #define C_CYR_A "\xD0\x90" @@ -1201,23 +1202,8 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) bool DefaultNumberingProvider::isScriptFlagEnabled(const OUString& aName) { - if (! xHierarchicalNameAccess.is()) { - Reference< XMultiServiceFactory > xConfigProvider = - configuration::theDefaultProvider::get(m_xContext); - - if (! xConfigProvider.is()) - throw RuntimeException(); - - uno::Sequence aArgs(comphelper::InitAnyPropertySequence( - { - {"nodepath", uno::Any(u"/org.openoffice.Office.Common/I18N"_ustr)} - })); - - Reference xInterface = xConfigProvider->createInstanceWithArguments( - u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs); - - xHierarchicalNameAccess.set(xInterface, UNO_QUERY_THROW); - } + if (! xHierarchicalNameAccess.is()) + xHierarchicalNameAccess = officecfg::Office::Common::I18N::get(); Any aEnabled = xHierarchicalNameAccess->getByHierarchicalName(aName);