diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-20 14:14:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-20 16:12:22 +0100 |
commit | 77dc6b346ad56b38ec41dc39887388d86548b712 (patch) | |
tree | a3ea7e1c2497e9ce9ed40a396a8b4fb705a82ed1 | |
parent | 27dec7c2b1ce0a25ff42465bd4db8ecfc912ec73 (diff) |
tweak config-less sysconfig path
Change-Id: I9b93b740aab2e6e2a19612d8ec41e699c1032e9e
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 24 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/misc/syslocale.cxx | 11 |
7 files changed, 21 insertions, 35 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index ea3a5f919c5d..910b4872c844 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1294,24 +1294,18 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v LanguageType eLang = pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), aStart.GetIndex()+1)); LanguageTag aLanguageTag( eLang); - if (!pImpEditEngine->pLocaleDataWrapper) - pImpEditEngine->pLocaleDataWrapper = new OnDemandLocaleDataWrapper; - - if (!pImpEditEngine->pLocaleDataWrapper->isInitialized()) - pImpEditEngine->pLocaleDataWrapper->init( SvtSysLocale().GetLocaleData().getComponentContext(), aLanguageTag); + if (!pImpEditEngine->xLocaleDataWrapper.isInitialized()) + pImpEditEngine->xLocaleDataWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), aLanguageTag); else - pImpEditEngine->pLocaleDataWrapper->changeLocale( aLanguageTag); - - if (!pImpEditEngine->pTransliterationWrapper) - pImpEditEngine->pTransliterationWrapper = new OnDemandTransliterationWrapper; + pImpEditEngine->xLocaleDataWrapper.changeLocale( aLanguageTag); - if (!pImpEditEngine->pTransliterationWrapper->isInitialized()) - pImpEditEngine->pTransliterationWrapper->init( SvtSysLocale().GetLocaleData().getComponentContext(), eLang, i18n::TransliterationModules_IGNORE_CASE); + if (!pImpEditEngine->xTransliterationWrapper.isInitialized()) + pImpEditEngine->xTransliterationWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), eLang, i18n::TransliterationModules_IGNORE_CASE); else - pImpEditEngine->pTransliterationWrapper->changeLocale( eLang); + pImpEditEngine->xTransliterationWrapper.changeLocale( eLang); - const ::utl::TransliterationWrapper* pTransliteration = pImpEditEngine->pTransliterationWrapper->get(); - Sequence< i18n::CalendarItem2 > xItem = pImpEditEngine->pLocaleDataWrapper->get()->getDefaultCalendarDays(); + const ::utl::TransliterationWrapper* pTransliteration = pImpEditEngine->xTransliterationWrapper.get(); + Sequence< i18n::CalendarItem2 > xItem = pImpEditEngine->xLocaleDataWrapper->getDefaultCalendarDays(); sal_Int32 nCount = xItem.getLength(); const i18n::CalendarItem2* pArr = xItem.getArray(); for( sal_Int32 n = 0; n <= nCount; ++n ) @@ -1326,7 +1320,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v if ( aComplete.isEmpty() ) { - xItem = pImpEditEngine->pLocaleDataWrapper->get()->getDefaultCalendarMonths(); + xItem = pImpEditEngine->xLocaleDataWrapper->getDefaultCalendarMonths(); sal_Int32 nMonthCount = xItem.getLength(); const i18n::CalendarItem2* pMonthArr = xItem.getArray(); for( sal_Int32 n = 0; n <= nMonthCount; ++n ) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 5ce5524ed385..793a85eb1331 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -464,8 +464,8 @@ private: LanguageType eDefLanguage; - OnDemandLocaleDataWrapper* pLocaleDataWrapper; - OnDemandTransliterationWrapper* pTransliterationWrapper; + OnDemandLocaleDataWrapper xLocaleDataWrapper; + OnDemandTransliterationWrapper xTransliterationWrapper; // For Formatting / Update .... boost::ptr_vector<DeletedNodeInfo> aDeletedNodes; diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 9dec70e0e0f1..8269dae61488 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -129,8 +129,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : nStretchY = 100; eDefLanguage = LANGUAGE_DONTKNOW; - pLocaleDataWrapper = 0; - pTransliterationWrapper = 0; maBackgroundColor = COL_AUTO; nAsianCompressionMode = text::CharacterCompressionType::NONE; @@ -184,8 +182,6 @@ ImpEditEngine::~ImpEditEngine() delete pCTLOptions; if ( bOwnerOfRefDev ) pRefDev.disposeAndClear(); - delete pLocaleDataWrapper; - delete pTransliterationWrapper; delete pSpellInfo; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 8b0098557f26..db8e67d19d04 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -26,6 +26,7 @@ #include <comphelper/string.hxx> #include <tools/debug.hxx> #include <unotools/charclass.hxx> +#include <unotools/configmgr.hxx> #include <i18nlangtag/mslangid.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/numberformatcodewrapper.hxx> @@ -3125,7 +3126,9 @@ sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const // static sal_uInt16 SvNumberFormatter::GetYear2000Default() { - return (sal_uInt16) ::utl::MiscCfg().GetYear2000(); + if (!utl::ConfigManager::IsAvoidConfig()) + return (sal_uInt16) ::utl::MiscCfg().GetYear2000(); + return 1930; } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 1ee306910445..832cad2220ea 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -31,6 +31,7 @@ #include <svl/whiter.hxx> #include <svl/zforlist.hxx> #include <comphelper/processfactory.hxx> +#include <unotools/configmgr.hxx> #include <unotools/misccfg.hxx> #include <com/sun/star/i18n/WordType.hpp> #include <fmtpdsc.hxx> @@ -1714,7 +1715,8 @@ void SwDoc::_CreateNumberFormatter() mpNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLang ); mpNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL ); - mpNumberFormatter->SetYear2000(static_cast<sal_uInt16>(::utl::MiscCfg().GetYear2000())); + if (!utl::ConfigManager::IsAvoidConfig()) + mpNumberFormatter->SetYear2000(static_cast<sal_uInt16>(::utl::MiscCfg().GetYear2000())); } SwTableNumFormatMerge::SwTableNumFormatMerge( const SwDoc& rSrc, SwDoc& rDest ) diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index f72c1c00cf7f..c349f2e5dc0f 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -516,8 +516,8 @@ SvtSysLocaleOptions::SvtSysLocaleOptions() if ( !pOptions ) { pOptions = new SvtSysLocaleOptions_Impl; - - ItemHolder1::holdConfigItem(E_SYSLOCALEOPTIONS); + if (!utl::ConfigManager::IsAvoidConfig()) + ItemHolder1::holdConfigItem(E_SYSLOCALEOPTIONS); } ++nRefCount; pOptions->AddListener(this); diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx index 117d5d854380..b8e6d5678b9d 100644 --- a/unotools/source/misc/syslocale.cxx +++ b/unotools/source/misc/syslocale.cxx @@ -55,13 +55,7 @@ private: SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL) { - if (utl::ConfigManager::IsAvoidConfig()) - { - pLocaleData = NULL; - return; - } - - pLocaleData = new LocaleDataWrapper(aSysLocaleOptions.GetRealLanguageTag()); + pLocaleData = new LocaleDataWrapper( aSysLocaleOptions.GetRealLanguageTag() ); setDateAcceptancePatternsConfig(); // listen for further changes @@ -121,9 +115,6 @@ void SvtSysLocale_Impl::setDateAcceptancePatternsConfig() SvtSysLocale::SvtSysLocale() { - if (utl::ConfigManager::IsAvoidConfig()) - return; - MutexGuard aGuard( GetMutex() ); if ( !pImpl ) pImpl = new SvtSysLocale_Impl; |