diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-10 16:40:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-28 08:25:24 +0200 |
commit | f95a7c2c6d5c2158de12bb3ca6fd94b139e33c62 (patch) | |
tree | 85f09e15fd9954a84f55e561cb174fe0450ea99f /sw | |
parent | fdo#46808, Adapt document::FilterConfigRefresh UNO service to new style (diff) | |
download | core-f95a7c2c6d5c2158de12bb3ca6fd94b139e33c62.tar.gz core-f95a7c2c6d5c2158de12bb3ca6fd94b139e33c62.zip |
fdo#46808, Convert SvNumberFormatter to use XComponentContext
Change-Id: If4e8312dae6bc5eb8bb7655cf250f06ab37b7e5c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/utlui/numfmtlb.cxx | 5 |
4 files changed, 8 insertions, 15 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 484c93c1aa46..dec44945f1a2 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2311,8 +2311,7 @@ void SwDoc::_CreateNumberFormatter() LanguageType eLang = LANGUAGE_SYSTEM; - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - pNumberFormatter = new SvNumberFormatter( xMSF, eLang ); + pNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLang ); pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL ); pNumberFormatter->SetYear2000(static_cast<sal_uInt16>(::utl::MiscCfg().GetYear2000())); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 393a685757c6..3d3bcf4ed0ee 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2308,7 +2308,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr) if( pNumFmt ) { sal_uInt16 nLng = rFld.GetLanguage(); - LocaleDataWrapper aLocDat(comphelper::getComponentContext(pNFmtr->GetServiceManager()), + LocaleDataWrapper aLocDat(pNFmtr->GetComponentContext(), LanguageTag(nLng)); String sFmt(pNumFmt->GetMappedFormatstring(GetNfKeywordTable(), diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 8995ac076a78..fcc36424c1f5 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -78,7 +78,6 @@ private: const String aStrSum; SvNumberFormatter* pNumFmt; - uno::Reference< lang::XMultiServiceFactory > m_xMSF; uno::Reference< i18n::XBreakIterator > m_xBreak; //------------------------------------------- @@ -544,15 +543,11 @@ AutoFmtPreview::AutoFmtPreview(Window* pParent) : aStrNorth ( SW_RES( STR_NORTH ) ), aStrMid ( SW_RES( STR_MID ) ), aStrSouth ( SW_RES( STR_SOUTH ) ), - aStrSum ( SW_RES( STR_SUM ) ), - m_xMSF ( comphelper::getProcessServiceFactory() ) + aStrSum ( SW_RES( STR_SUM ) ) { - OSL_ENSURE( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory"); - if ( m_xMSF.is() ) - { - m_xBreak = i18n::BreakIterator::create(comphelper::getComponentContext(m_xMSF)); - } - pNumFmt = new SvNumberFormatter( m_xMSF, LANGUAGE_SYSTEM ); + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); + m_xBreak = i18n::BreakIterator::create(xContext); + pNumFmt = new SvNumberFormatter( xContext, LANGUAGE_SYSTEM ); Init(); } diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index ced1283cf541..7dbfe5c50613 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -97,9 +97,8 @@ void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts) eCurLanguage = SvtSysLocale().GetLanguageTag().getLanguageType(); if (bUsrFmts == sal_False) - { - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage); + { + pOwnFormatter = new SvNumberFormatter(comphelper::getProcessComponentContext(), eCurLanguage); } SetFormatType(nFormatType); |