summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/inc/propbrw.hxx3
-rw-r--r--cui/source/dialogs/postdlg.cxx6
-rw-r--r--cui/source/options/optasian.cxx3
-rw-r--r--cui/source/options/optgdlg.cxx4
-rw-r--r--cui/source/tabpages/tabstpge.cxx2
-rw-r--r--editeng/inc/editeng/forbiddencharacterstable.hxx8
-rw-r--r--editeng/source/editeng/editeng.cxx4
-rw-r--r--editeng/source/editeng/eerdll.cxx3
-rw-r--r--editeng/source/misc/forbiddencharacterstable.cxx8
-rw-r--r--editeng/source/misc/svxacorr.cxx3
-rw-r--r--linguistic/source/misc.cxx1
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx4
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/dialog/versdlg.cxx5
-rw-r--r--starmath/source/unomodel.cxx3
-rw-r--r--svl/inc/svl/ondemand.hxx30
-rw-r--r--svl/source/numbers/zforlist.cxx12
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svtools/source/contnr/DocumentInfoPreview.cxx4
-rw-r--r--svtools/source/control/calendar.cxx2
-rw-r--r--svtools/source/control/fmtfield.cxx4
-rw-r--r--svx/source/dialog/_contdlg.cxx4
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx2
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--sw/inc/breakit.hxx8
-rw-r--r--sw/source/core/bastyp/breakit.cxx16
-rw-r--r--sw/source/core/bastyp/calc.cxx8
-rw-r--r--sw/source/core/bastyp/init.cxx4
-rw-r--r--sw/source/core/doc/doc.cxx10
-rw-r--r--sw/source/core/doc/docsort.cxx3
-rw-r--r--sw/source/core/fields/docufld.cxx1
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx2
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx2
-rw-r--r--unotools/inc/unotools/localedatawrapper.hxx15
-rw-r--r--unotools/inc/unotools/numberformatcodewrapper.hxx7
-rw-r--r--unotools/source/i18n/intlwrapper.cxx3
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx23
-rw-r--r--unotools/source/i18n/numberformatcodewrapper.cxx20
-rw-r--r--unotools/source/misc/syslocale.cxx2
-rw-r--r--vcl/inc/vcl/i18nhelp.hxx8
-rw-r--r--vcl/source/app/i18nhelp.cxx8
-rw-r--r--vcl/source/app/settings.cxx10
-rw-r--r--vcl/source/control/field.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--xmloff/inc/xmloff/xmlnumfi.hxx4
-rw-r--r--xmloff/source/style/xmlnumfe.cxx8
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
56 files changed, 155 insertions, 164 deletions
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index ece39a92cc89..fe00cdd5e28b 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -30,6 +30,9 @@
class SfxBindings;
class SdrView;
class SfxViewShell;
+namespace com { namespace sun { namespace star { namespace lang {
+ class XMultiServiceFactory;
+}}}}
namespace basctl
{
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 4d2ecd1ce329..45971a7ae668 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -124,7 +124,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,
}
else
{
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) );
}
@@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
String aTmp( SvtUserOptions().GetID() );
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
String aStr( aEditED.GetText() );
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
@@ -239,7 +239,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
IMPL_LINK_NOARG(SvxPostItDialog, OKHdl)
{
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
pOutSet = new SfxItemSet( rSet );
pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 229af974baf2..20a6794835b3 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -349,8 +349,7 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl)
}
if(!bAvail)
{
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- LocaleDataWrapper aWrap( xMSF, aLocale );
+ LocaleDataWrapper aWrap( aLocale );
ForbiddenCharacters aForbidden = aWrap.getForbiddenCharacters();
sStart = aForbidden.beginLine;
sEnd = aForbidden.endLine;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 84a8d3e51f9a..006be93a1c19 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1697,7 +1697,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
{
Locale aTempLocale;
SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguage());
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale );
+ LocaleDataWrapper aLocaleWrapper( aTempLocale );
aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
}
aDatePatternsED.SetText( aDatePatternsString);
@@ -1894,7 +1894,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox )
// obtain corresponding locale data
Locale aTempLocale;
SvxLanguageToLocale( aTempLocale, eLang );
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale );
+ LocaleDataWrapper aLocaleWrapper( aTempLocale );
// update the decimal separator key of the related CheckBox
String sTempLabel(sDecimalSeparatorLabel);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index d5f1a5c6fbe1..d01d497106da 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -186,7 +186,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent,
aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial);
// Get the default decimal char from the system
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep()[0];
FreeResource();
}
diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx
index a66b2f71f8c0..14556fd0ceda 100644
--- a/editeng/inc/editeng/forbiddencharacterstable.hxx
+++ b/editeng/inc/editeng/forbiddencharacterstable.hxx
@@ -29,8 +29,8 @@
namespace com {
namespace sun {
namespace star {
-namespace lang {
- class XMultiServiceFactory;
+namespace uno {
+ class XComponentContext;
}}}}
class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public salhelper::SimpleReferenceObject
@@ -39,10 +39,10 @@ public:
typedef std::map<sal_uInt16, com::sun::star::i18n::ForbiddenCharacters> Map;
private:
Map maMap;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
public:
- SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF);
+ SvxForbiddenCharactersTable( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext);
~SvxForbiddenCharactersTable() {}
Map& GetMap() { return maMap; }
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 849205acc2db..f437564ff91e 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1365,12 +1365,12 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
lang::Locale aLocale( MsLangId::convertLanguageToLocale( eLang));
if (!pImpEditEngine->xLocaleDataWrapper.isInitialized())
- pImpEditEngine->xLocaleDataWrapper.init( SvtSysLocale().GetLocaleData().getServiceFactory(), aLocale, eLang);
+ pImpEditEngine->xLocaleDataWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), aLocale, eLang);
else
pImpEditEngine->xLocaleDataWrapper.changeLocale( aLocale, eLang);
if (!pImpEditEngine->xTransliterationWrapper.isInitialized())
- pImpEditEngine->xTransliterationWrapper.init( SvtSysLocale().GetLocaleData().getServiceFactory(), eLang, i18n::TransliterationModules_IGNORE_CASE);
+ pImpEditEngine->xTransliterationWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), eLang, i18n::TransliterationModules_IGNORE_CASE);
else
pImpEditEngine->xTransliterationWrapper.changeLocale( eLang);
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 7aba28686116..8836b4201019 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -172,8 +172,7 @@ rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTab
{
if ( !xForbiddenCharsTable.is() )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
+ xForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() );
}
return xForbiddenCharsTable;
}
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx
index 0bc4a22885cd..5c4f3c8a0ff8 100644
--- a/editeng/source/misc/forbiddencharacterstable.cxx
+++ b/editeng/source/misc/forbiddencharacterstable.cxx
@@ -25,9 +25,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF)
+SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext)
{
- mxMSF = xMSF;
+ m_xContext = rxContext;
}
const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault )
@@ -36,9 +36,9 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge
Map::iterator it = maMap.find( nLanguage );
if ( it != maMap.end() )
pForbiddenCharacters = &(it->second);
- else if ( bGetDefault && mxMSF.is() )
+ else if ( bGetDefault && m_xContext.is() )
{
- LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) );
+ LocaleDataWrapper aWrapper( m_xContext, SvxCreateLocale( nLanguage ) );
maMap[ nLanguage ] = aWrapper.getForbiddenCharacters();
pForbiddenCharacters = &maMap[ nLanguage ];
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e436cdcc4c33..3f2298a9730f 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -202,8 +202,7 @@ static sal_uInt16 GetAppLang()
}
static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang )
{
- static LocaleDataWrapper aLclDtWrp( GetProcessFact(),
- SvxCreateLocale( GetAppLang() ) );
+ static LocaleDataWrapper aLclDtWrp( SvxCreateLocale( GetAppLang() ) );
::com::sun::star::lang::Locale aLcl( SvxCreateLocale( nLang ));
const ::com::sun::star::lang::Locale& rLcl = aLclDtWrp.getLoadedLocale();
if( aLcl.Language != rLcl.Language ||
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 5992496e1272..1cad0615d9a4 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -78,7 +78,6 @@ osl::Mutex & GetLinguMutex()
LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang )
{
static LocaleDataWrapper aLclDtaWrp(
- comphelper::getProcessServiceFactory(),
CreateLocale( SvtSysLocale().GetUILanguage() ) );
const Locale &rLcl = aLclDtaWrp.getLoadedLocale();
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 2cb39c035bc5..3d815842333e 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -147,6 +147,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
CharacterClassification \
LocaleCalendar \
LocaleData \
+ NumberFormatMapper \
TextConversion \
Transliteration \
))
@@ -861,7 +862,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
IndexEntrySupplier \
InputSequenceChecker \
NativeNumberSupplier \
- NumberFormatMapper \
OrdinalSuffix \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 5688f1721087..8bb6a5238b66 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -26,6 +26,10 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/report/meta/XFormulaParser.hpp>
+namespace com { namespace sun { namespace star { namespace lang {
+ class XMultiServiceFactory;
+} } } }
+
//============================================================================
namespace rptui
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 0fed4f5980ff..14d1022127c8 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2300,7 +2300,7 @@ void ScXMLImport::ExamineDefaultStyle()
aDecSep = ScGlobal::pLocaleData->getNumDecimalSep();
else
{
- LocaleDataWrapper aLocaleData( pDoc->GetServiceManager(),
+ LocaleDataWrapper aLocaleData( comphelper::getComponentContext(pDoc->GetServiceManager()),
MsLangId::convertLanguageToLocale( nFormatLang ) );
aDecSep = aLocaleData.getNumDecimalSep();
}
@@ -2520,7 +2520,7 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUStri
{
{
ScXMLImport::MutexGuard aGuard(*this);
- LocaleDataWrapper aLocaleData( GetDocument()->GetServiceManager(), aLocale );
+ LocaleDataWrapper aLocaleData( comphelper::getComponentContext(GetDocument()->GetServiceManager()), aLocale );
rtl::OUStringBuffer aBuffer(15);
aBuffer.appendAscii("#");
aBuffer.append( aLocaleData.getNumThousandSep() );
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 5a82e606739f..777d5311ddb1 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -136,7 +136,7 @@ void ScDocShell::InitItems()
if (aLocales.getLength())
{
rtl::Reference<SvxForbiddenCharactersTable> xForbiddenTable =
- new SvxForbiddenCharactersTable( aDocument.GetServiceManager() );
+ new SvxForbiddenCharactersTable( comphelper::getComponentContext(aDocument.GetServiceManager()) );
const lang::Locale* pLocales = aLocales.getConstArray();
for (sal_Int32 i = 0; i < aLocales.getLength(); i++)
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index 1e3c565cbcc5..2fe216101021 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -47,7 +47,7 @@ static rtl::Reference<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell*
// create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable,
// so changes can be stored.
- xRet = new SvxForbiddenCharactersTable( pDoc->GetServiceManager() );
+ xRet = new SvxForbiddenCharactersTable( comphelper::getComponentContext(pDoc->GetServiceManager()) );
pDoc->SetForbiddenCharacters( xRet );
}
}
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 6ddcda448750..efe0adb9358b 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -263,7 +263,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
if( xHyphenator.is() )
rOutliner.SetHyphenator( xHyphenator );
- SetForbiddenCharsTable( new SvxForbiddenCharactersTable( ::comphelper::getProcessServiceFactory() ) );
+ SetForbiddenCharsTable( new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ) );
}
catch(...)
{
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index fc109add1382..73429f14d1e9 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -712,7 +712,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
{
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set without range");
while ( *pRanges )
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 99d7dbfa1366..3dc9cdb78f1d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -724,7 +724,7 @@ namespace
{
String GetDateTimeString( sal_Int32 _nDate, sal_Int32 _nTime )
{
- LocaleDataWrapper aWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aWrapper( Application::GetSettings().GetLocale() );
Date aDate( _nDate );
Time aTime( _nTime );
@@ -878,7 +878,7 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl)
String aName;
if ( bEnableUseUserData && aUseUserDataCB.IsChecked() )
aName = SvtUserOptions().GetFullName();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
DateTime now( DateTime::SYSTEM );
util::DateTime uDT(
now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
@@ -1148,7 +1148,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
// handle access data
sal_Bool m_bUseUserData = pInfoItem->IsUseUserData();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
aCreateValFt.SetText( ConvertDateTime_Impl( pInfoItem->getAuthor(),
pInfoItem->getCreationDate(), aLocaleWrapper ) );
util::DateTime aTime( pInfoItem->getModificationDate() );
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 55702767d976..0eeaf942df89 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -316,8 +316,7 @@ void SfxVersionDialog::RecalcDateColumn()
{
// recalculate the datetime column width
DateTime aNow( DateTime::SYSTEM );
- mpLocaleWrapper = new LocaleDataWrapper(
- ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ mpLocaleWrapper = new LocaleDataWrapper( Application::GetSettings().GetLocale() );
String sDateTime = ConvertDateTime_Impl( aNow, *mpLocaleWrapper );
long nWidth = aVersionBox.GetTextWidth( sDateTime );
nWidth += 15; // a little offset
@@ -451,7 +450,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi
{
FreeResource();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreationDate, aLocaleWrapper )) );
aSavedByText.SetText( aSavedByText.GetText().Append(pInfo->aAuthor) );
aEdit.SetText( rInfo.aComment );
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 7bfce092c64a..efa322573de9 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -953,8 +953,7 @@ sal_Int32 SAL_CALL SmModel::getRendererCount(
static Size lcl_GuessPaperSize()
{
Size aRes;
- Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
- LocaleDataWrapper aLocWrp( xMgr, AllSettings().GetLocale() );
+ LocaleDataWrapper aLocWrp( AllSettings().GetLocale() );
if( MEASURE_METRIC == aLocWrp.getMeasurementSystemEnum() )
{
// in 100th mm
diff --git a/svl/inc/svl/ondemand.hxx b/svl/inc/svl/ondemand.hxx
index 792eb0f58e22..f724cca95746 100644
--- a/svl/inc/svl/ondemand.hxx
+++ b/svl/inc/svl/ondemand.hxx
@@ -54,7 +54,7 @@
class OnDemandLocaleDataWrapper
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
SvtSysLocale aSysLocale;
LanguageType eCurrentLanguage;
LanguageType eLastAnyLanguage;
@@ -75,7 +75,7 @@ public:
eCurrentLanguage = LANGUAGE_SYSTEM;
}
OnDemandLocaleDataWrapper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
::com::sun::star::lang::Locale& rLocale,
LanguageType eLang
)
@@ -85,7 +85,7 @@ public:
, bInitialized(false)
{
pSystem = aSysLocale.GetLocaleDataPtr();
- init( rxSMgr, rLocale, eLang );
+ init( rxContext, rLocale, eLang );
}
~OnDemandLocaleDataWrapper()
{
@@ -98,12 +98,12 @@ public:
bool is() const { return pCurrent != NULL; }
void init(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
::com::sun::star::lang::Locale& rLocale,
LanguageType eLang
)
{
- xSMgr = rxSMgr;
+ m_xContext = rxContext;
changeLocale( rLocale, eLang );
bInitialized = true;
}
@@ -117,13 +117,13 @@ public:
break;
case LANGUAGE_ENGLISH_US :
if ( !pEnglish )
- pEnglish = new LocaleDataWrapper( xSMgr, rLocale );
+ pEnglish = new LocaleDataWrapper( m_xContext, rLocale );
pCurrent = pEnglish;
break;
default:
if ( !pAny )
{
- pAny = new LocaleDataWrapper( xSMgr, rLocale );
+ pAny = new LocaleDataWrapper( m_xContext, rLocale );
eLastAnyLanguage = eLang;
}
else if ( eLastAnyLanguage != eLang )
@@ -143,7 +143,7 @@ public:
{
if ( !pAny )
{
- pAny = new LocaleDataWrapper( xSMgr, pCurrent->getLocale() );
+ pAny = new LocaleDataWrapper( m_xContext, pCurrent->getLocale() );
eLastAnyLanguage = eCurrentLanguage;
}
else if ( pCurrent != pAny )
@@ -240,7 +240,7 @@ public:
*/
class OnDemandTransliterationWrapper
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
LanguageType eLanguage;
::com::sun::star::i18n::TransliterationModules nType;
mutable ::utl::TransliterationWrapper* pPtr;
@@ -255,14 +255,14 @@ public:
, bInitialized(false)
{}
OnDemandTransliterationWrapper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
LanguageType eLang,
::com::sun::star::i18n::TransliterationModules nTypeP
)
: bValid(false)
, bInitialized(false)
{
- init( rxSMgr, eLang, nTypeP );
+ init( rxContext, eLang, nTypeP );
}
~OnDemandTransliterationWrapper()
{
@@ -274,12 +274,12 @@ public:
bool is() const { return pPtr != NULL; }
void init(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
LanguageType eLang,
::com::sun::star::i18n::TransliterationModules nTypeP
)
{
- xSMgr = rxSMgr;
+ m_xContext = rxContext;
nType = nTypeP;
changeLocale( eLang );
if ( pPtr )
@@ -301,7 +301,7 @@ public:
if ( !bValid )
{
if ( !pPtr )
- pPtr = new ::utl::TransliterationWrapper( comphelper::getComponentContext(xSMgr), nType );
+ pPtr = new ::utl::TransliterationWrapper( m_xContext, nType );
pPtr->loadModuleIfNeeded( eLanguage );
bValid = true;
}
@@ -311,7 +311,7 @@ public:
const ::utl::TransliterationWrapper* getForModule( const String& rModule, LanguageType eLang ) const
{
if ( !pPtr )
- pPtr = new ::utl::TransliterationWrapper( comphelper::getComponentContext(xSMgr), nType );
+ pPtr = new ::utl::TransliterationWrapper( m_xContext, nType );
pPtr->loadModuleByImplName( rModule, eLang );
bValid = false; // reforce settings change in get()
return pPtr;
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 8d73e68a19d5..106a37220a2e 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -235,9 +235,9 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
aLocale = MsLangId::convertLanguageToLocale( eLang );
pCharClass = new CharClass( comphelper::getComponentContext(xServiceManager), aLocale );
- xLocaleData.init( xServiceManager, aLocale, eLang );
+ xLocaleData.init( comphelper::getComponentContext(xServiceManager), aLocale, eLang );
xCalendar.init( comphelper::getComponentContext(xServiceManager), aLocale );
- xTransliteration.init( xServiceManager, eLang,
+ xTransliteration.init( comphelper::getComponentContext(xServiceManager), eLang,
::com::sun::star::i18n::TransliterationModules_IGNORE_CASE );
xNatNum.init( xServiceManager );
@@ -449,7 +449,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
pStdFormat->SetLastInsertKey( sal_uInt16(nLastKey - nCLOffset) );
// append new system additional formats
- NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
+ NumberFormatCodeWrapper aNumberFormatCode( comphelper::getComponentContext(xServiceManager), GetLocale() );
ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, true );
}
@@ -744,7 +744,7 @@ bool SvNumberFormatter::Load( SvStream& rStream )
// generate additional i18n standard formats for all used locales
LanguageType eOldLanguage = ActLnge;
- NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
+ NumberFormatCodeWrapper aNumberFormatCode( comphelper::getComponentContext(xServiceManager), GetLocale() );
std::vector<sal_uInt16> aList;
GetUsedLanguages( aList );
for ( std::vector<sal_uInt16>::const_iterator it(aList.begin()); it != aList.end(); ++it )
@@ -2163,7 +2163,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
if (bOldConvertMode)
pFormatScanner->SetConvertMode(false); // switch off for this function
- NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
+ NumberFormatCodeWrapper aNumberFormatCode( comphelper::getComponentContext(xServiceManager), GetLocale() );
xub_StrLen nCheckPos = 0;
SvNumberformat* pNewFormat = NULL;
@@ -3546,7 +3546,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
LanguageType eSysLang = SvtSysLocale().GetLanguage();
LocaleDataWrapper* pLocaleData = new LocaleDataWrapper(
- ::comphelper::getProcessServiceFactory(),
+ ::comphelper::getProcessComponentContext(),
MsLangId::convertLanguageToLocale( eSysLang ) );
// get user configured currency
String aConfiguredCurrencyAbbrev;
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index fb3649c424ea..243bd2a1affb 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -223,7 +223,7 @@ void ImpSvNumberformatScan::SetDependentKeywords()
// requested Locale, otherwise number format codes might not match
lang::Locale aLoadedLocale = pLocaleData->getLoadedLocale();
LanguageType eLang = MsLangId::convertLocaleToLanguage( aLoadedLocale );
- NumberFormatCodeWrapper aNumberFormatCode( pFormatter->GetServiceManager(), aLoadedLocale );
+ NumberFormatCodeWrapper aNumberFormatCode( comphelper::getComponentContext(pFormatter->GetServiceManager()), aLoadedLocale );
i18n::NumberFormatCode aFormat = aNumberFormatCode.getFormatCode( NF_NUMBER_STANDARD );
sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code);
diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx
index 0b6ad20c74ff..fabd1befecc0 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -164,9 +164,7 @@ void ODocumentInfoPreview::insertDateTime(
Time(
value.Hours, value.Minutes, value.Seconds, value.HundredthSeconds));
if (aToolsDT.IsValidAndGregorian()) {
- LocaleDataWrapper aLocaleWrapper(
- comphelper::getProcessServiceFactory(),
- Application::GetSettings().GetLocale());
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
rtl::OUStringBuffer buf(aLocaleWrapper.getDate(aToolsDT));
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
buf.append(aLocaleWrapper.getTime(aToolsDT));
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 4cda4dbcc08f..84baaf091698 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -257,7 +257,7 @@ void Calendar::ImplInitSettings()
Calendar::Calendar( Window* pParent, WinBits nWinStyle ) :
Control( pParent, nWinStyle & (WB_TABSTOP | WB_GROUP | WB_BORDER | WB_3DLOOK | WB_RANGESELECT | WB_MULTISELECT) ),
- maCalendarWrapper( comphelper::getComponentContext(Application::GetAppLocaleDataWrapper().getServiceFactory()) ),
+ maCalendarWrapper( Application::GetAppLocaleDataWrapper().getComponentContext() ),
maOldFormatFirstDate( 0, 0, 1900 ),
maOldFormatLastDate( 0, 0, 1900 ),
maFirstDate( 0, 0, 1900 ),
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 3d543e28ac41..56195511230b 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -1146,7 +1146,7 @@ void DoubleNumericField::ResetConformanceTester()
{
Locale aLocale;
MsLangId::convertLanguageToLocale( pFormatEntry->GetLanguage(), aLocale );
- LocaleDataWrapper aLocaleInfo(::comphelper::getProcessServiceFactory(), aLocale);
+ LocaleDataWrapper aLocaleInfo( aLocale );
String sSeparator = aLocaleInfo.getNumThousandSep();
if (sSeparator.Len())
@@ -1238,7 +1238,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
// build a new format string with the base class' and my own settings
Locale aLocale;
MsLangId::convertLanguageToLocale( eLanguage, aLocale );
- LocaleDataWrapper aLocaleInfo(::comphelper::getProcessServiceFactory(), aLocale);
+ LocaleDataWrapper aLocaleInfo( aLocale );
XubString sNewFormat;
if (bThSep)
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 5827495b22dd..90c0fc3d8e92 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -568,7 +568,7 @@ IMPL_LINK( SvxSuperContourDlg, MousePosHdl, ContourWindow*, pWnd )
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
const Point& rMousePos = pWnd->GetMousePos();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
@@ -585,7 +585,7 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd )
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
const Size& rSize = pWnd->GetGraphicSize();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 547d51ca87b4..73c4face8330 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -106,7 +106,7 @@ CompressGraphicsDialog::~CompressGraphicsDialog()
void CompressGraphicsDialog::Update()
{
const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
VirtualDevice* pDummyVDev = new VirtualDevice();
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index b70dc32cfd90..fa07b8153215 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -665,7 +665,7 @@ IMPL_LINK( SvxIMapDlg, MousePosHdl, IMapWindow*, pWnd )
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
const Point& rMousePos = pWnd->GetMousePos();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
@@ -682,7 +682,7 @@ IMPL_LINK( SvxIMapDlg, GraphSizeHdl, IMapWindow*, pWnd )
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
const Size& rSize = pWnd->GetGraphicSize();
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
+ LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 8c7fc1e70f98..dd3854b5a316 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3172,7 +3172,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW );
xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
Locale aAppLocale = Application::GetSettings().GetUILocale();
- LocaleDataWrapper aLocaleWrapper( m_aContext.getLegacyServiceFactory(), aAppLocale );
+ LocaleDataWrapper aLocaleWrapper( m_aContext.getUNOContext(), aAppLocale );
// retrieving the filter
const Sequence < PropertyValue >* pRow = aFilterRows.getConstArray();
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index 4ed10f99b0f8..1ce59f76b4b8 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -31,7 +31,7 @@
#include <boost/noncopyable.hpp>
#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/XScriptTypeDetector.hpp>
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
@@ -45,7 +45,7 @@
class SW_DLLPUBLIC SwBreakIt : private ::boost::noncopyable
{
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
com::sun::star::lang::Locale * m_pLocale;
@@ -61,13 +61,13 @@ class SW_DLLPUBLIC SwBreakIt : private ::boost::noncopyable
// private (see @ _Create, _Delete).
explicit SwBreakIt(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rxContext);
~SwBreakIt();
public:
// private (see @ source/core/bastyp/init.cxx).
static void _Create(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rxContext);
static void _Delete();
public:
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 7ed2c5749ba6..b4c42753ef55 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -43,9 +43,9 @@ using namespace com::sun::star;
SwBreakIt* pBreakIt = 0;
-void SwBreakIt::_Create( const uno::Reference<lang::XMultiServiceFactory> & rxMSF )
+void SwBreakIt::_Create( const uno::Reference<uno::XComponentContext> & rxContext )
{
- delete pBreakIt, pBreakIt = new SwBreakIt( rxMSF );
+ delete pBreakIt, pBreakIt = new SwBreakIt( rxContext );
}
void SwBreakIt::_Delete()
@@ -58,14 +58,14 @@ SwBreakIt * SwBreakIt::Get()
return pBreakIt;
}
-SwBreakIt::SwBreakIt( const uno::Reference<lang::XMultiServiceFactory> & rxMSF )
- : m_xMSF( rxMSF ),
+SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext )
+ : m_xContext( rxContext ),
m_pLocale( NULL ),
m_pForbidden( NULL ),
aLast( LANGUAGE_DONTKNOW ),
aForbiddenLang( LANGUAGE_DONTKNOW )
{
- OSL_ENSURE( m_xMSF.is(), "SwBreakIt: no MultiServiceFactory" );
+ OSL_ENSURE( m_xContext.is(), "SwBreakIt: no MultiServiceFactory" );
}
SwBreakIt::~SwBreakIt()
@@ -76,8 +76,8 @@ SwBreakIt::~SwBreakIt()
void SwBreakIt::createBreakIterator() const
{
- if ( m_xMSF.is() && !xBreak.is() )
- xBreak.set( i18n::BreakIterator::create(comphelper::getComponentContext(m_xMSF)) );
+ if ( m_xContext.is() && !xBreak.is() )
+ xBreak.set( i18n::BreakIterator::create(m_xContext) );
}
void SwBreakIt::_GetLocale( const LanguageType aLang )
@@ -89,7 +89,7 @@ void SwBreakIt::_GetLocale( const LanguageType aLang )
void SwBreakIt::_GetForbidden( const LanguageType aLang )
{
- LocaleDataWrapper aWrap( m_xMSF, GetLocale( aLang ) );
+ LocaleDataWrapper aWrap( m_xContext, GetLocale( aLang ) );
aForbiddenLang = aLang;
delete m_pForbidden;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 434069dbe116..b484381ec38e 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -258,10 +258,8 @@ SwCalc::SwCalc( SwDoc& rD )
eLang != SvxLocaleToLanguage( pCharClass->getLocale() ) )
{
::com::sun::star::lang::Locale aLocale( SvxCreateLocale( eLang ));
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF(
- ::comphelper::getProcessServiceFactory() );
pCharClass = new CharClass( ::comphelper::getProcessComponentContext(), aLocale );
- pLclData = new LocaleDataWrapper( xMSF, aLocale );
+ pLclData = new LocaleDataWrapper( aLocale );
}
sCurrSym = comphelper::string::strip(pLclData->getCurrSymbol(), ' ');
@@ -1543,9 +1541,7 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
if (eLang !=
SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale()))
{
- pLclD.reset( new LocaleDataWrapper(
- ::comphelper::getProcessServiceFactory(),
- SvxCreateLocale( eLang ) ) );
+ pLclD.reset( new LocaleDataWrapper( SvxCreateLocale( eLang ) ) );
}
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 117b7e02f3ef..ede0dbdb1f6f 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -701,9 +701,7 @@ void _InitCore()
for ( i = 38; i <= 136; ++i )
SwAttrPool::pVersionMap6[ i-1 ] = i + 3;
- uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
-
- SwBreakIt::_Create( xMSF );
+ SwBreakIt::_Create( ::comphelper::getProcessComponentContext() );
pCheckIt = NULL;
_FrmInit();
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index bfdfca27403c..26ba1a9d21ab 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -425,10 +425,7 @@ void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
{
if( !xForbiddenCharsTable.is() )
{
- uno::Reference<
- lang::XMultiServiceFactory > xMSF =
- ::comphelper::getProcessServiceFactory();
- xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
+ xForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() );
}
xForbiddenCharsTable->SetForbiddenCharacters( nLang, rFChars );
if( pDrawModel )
@@ -453,10 +450,7 @@ rtl::Reference<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
{
if( !xForbiddenCharsTable.is() )
{
- uno::Reference<
- lang::XMultiServiceFactory > xMSF =
- ::comphelper::getProcessServiceFactory();
- xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
+ xForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() );
}
return xForbiddenCharsTable;
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index d028a30e9ff2..363594b42fa6 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -117,8 +117,7 @@ SwSortElement::~SwSortElement()
double SwSortElement::StrToDouble( const String& rStr ) const
{
if( !pLclData )
- pLclData = new LocaleDataWrapper(
- ::comphelper::getProcessServiceFactory(), *pLocale );
+ pLclData = new LocaleDataWrapper( *pLocale );
rtl_math_ConversionStatus eStatus;
sal_Int32 nEnd;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index d3550fd200bf..c0c88e9c3225 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -895,7 +895,6 @@ static void lcl_GetLocalDataWrapper( sal_uLong nLang,
*ppLocalData = *ppAppLocalData;
if( nLang != SvxLocaleToLanguage( (*ppLocalData)->getLocale() ) )
*ppLocalData = new LocaleDataWrapper(
- ::comphelper::getProcessServiceFactory(),
SvxCreateLocale( static_cast<LanguageType>(nLang) ) );
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 485a72411b5d..6690cead08fc 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -470,9 +470,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
if( !pFldTxtAttr || !pFldTxtAttr->GetpTxtNode() )
break;
- LocaleDataWrapper aLocaleData(
- ::comphelper::getProcessServiceFactory(),
- SvxCreateLocale( GetLanguage() ) );
+ LocaleDataWrapper aLocaleData( SvxCreateLocale( GetLanguage() ) );
// erstmal ein "Kurz" - Test - falls beide im selben
// Node stehen!
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index b4d08a89b97d..fe875092398d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2342,7 +2342,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
if( pNumFmt )
{
sal_uInt16 nLng = rFld.GetLanguage();
- LocaleDataWrapper aLocDat(pNFmtr->GetServiceManager(),
+ LocaleDataWrapper aLocDat(comphelper::getComponentContext(pNFmtr->GetServiceManager()),
MsLangId::convertLanguageToLocale(nLng));
String sFmt(pNumFmt->GetMappedFormatstring(GetNfKeywordTable(),
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 8bb57ba606ec..f74bd1dc4702 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5590,7 +5590,7 @@ WW8Fib::WW8Fib(sal_uInt8 nVer)
Locale aTempLocale;
SvxLanguageToLocale( aTempLocale, lid );
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale );
+ LocaleDataWrapper aLocaleWrapper( aTempLocale );
nNumDecimalSep = aLocaleWrapper.getNumDecimalSep()[0];
}
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 0b2dd95ce129..f61a3234ee08 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -337,7 +337,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
aLocale.Country = sDefaultCurrency.copy( nSepPos + 1 );
}
- LocaleDataWrapper aLocaleInfo( maContext.getLegacyServiceFactory(), aLocale );
+ LocaleDataWrapper aLocaleInfo( maContext.getUNOContext(), aLocale );
if ( sBankSymbol.isEmpty() )
sBankSymbol = aLocaleInfo.getCurrBankSymbol();
diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx
index 1b6e95beae6d..1198895753d9 100644
--- a/unotools/inc/unotools/localedatawrapper.hxx
+++ b/unotools/inc/unotools/localedatawrapper.hxx
@@ -30,8 +30,8 @@
#include "unotools/unotoolsdllapi.h"
namespace com { namespace sun { namespace star {
- namespace lang {
- class XMultiServiceFactory;
+ namespace uno {
+ class XComponentContext;
}
}}}
class Date;
@@ -56,7 +56,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable
{
static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData4 > xLD;
::com::sun::star::lang::Locale aLocale;
::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > xDefaultCalendar;
@@ -111,7 +111,10 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable
public:
LocaleDataWrapper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext,
+ const ::com::sun::star::lang::Locale& rLocale
+ );
+ LocaleDataWrapper(
const ::com::sun::star::lang::Locale& rLocale
);
~LocaleDataWrapper();
@@ -122,8 +125,8 @@ public:
lives "on the grassland". The CalendarWrapper ctor can handle that
though. */
const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory > & getServiceFactory()
- const { return xSMgr; }
+ ::com::sun::star::uno::XComponentContext > & getComponentContext()
+ const { return m_xContext; }
/// set a new Locale to request
void setLocale( const ::com::sun::star::lang::Locale& rLocale );
diff --git a/unotools/inc/unotools/numberformatcodewrapper.hxx b/unotools/inc/unotools/numberformatcodewrapper.hxx
index 4c92ba9ede2f..82e254e7ea1d 100644
--- a/unotools/inc/unotools/numberformatcodewrapper.hxx
+++ b/unotools/inc/unotools/numberformatcodewrapper.hxx
@@ -24,15 +24,14 @@
#include "unotools/unotoolsdllapi.h"
namespace com { namespace sun { namespace star {
- namespace lang {
- class XMultiServiceFactory;
+ namespace uno {
+ class XComponentContext;
}
}}}
class UNOTOOLS_DLLPUBLIC NumberFormatCodeWrapper
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XNumberFormatCode > xNFC;
::com::sun::star::lang::Locale aLocale;
@@ -42,7 +41,7 @@ class UNOTOOLS_DLLPUBLIC NumberFormatCodeWrapper
public:
NumberFormatCodeWrapper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext,
const ::com::sun::star::lang::Locale& rLocale
);
diff --git a/unotools/source/i18n/intlwrapper.cxx b/unotools/source/i18n/intlwrapper.cxx
index f68f4ea803cb..092c90bb07fd 100644
--- a/unotools/source/i18n/intlwrapper.cxx
+++ b/unotools/source/i18n/intlwrapper.cxx
@@ -21,6 +21,7 @@
#include "unotools/intlwrapper.hxx"
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <i18npool/mslangid.hxx>
+#include <comphelper/processfactory.hxx>
IntlWrapper::IntlWrapper(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF,
@@ -60,7 +61,7 @@ IntlWrapper::~IntlWrapper()
void IntlWrapper::ImplNewLocaleData() const
{
- ((IntlWrapper*)this)->pLocaleData = new LocaleDataWrapper( xSMgr, aLocale );
+ ((IntlWrapper*)this)->pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(xSMgr), aLocale );
}
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index bdeb2d661471..e224f194a179 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -66,18 +66,29 @@ namespace
sal_uInt8 LocaleDataWrapper::nLocaleDataChecking = 0;
LocaleDataWrapper::LocaleDataWrapper(
- const Reference< lang::XMultiServiceFactory > & xSF,
+ const Reference< uno::XComponentContext > & rxContext,
const lang::Locale& rLocale
)
:
- xSMgr( xSF ),
- xLD( LocaleData::create(comphelper::getComponentContext(xSMgr)) ),
+ m_xContext( rxContext ),
+ xLD( LocaleData::create(rxContext) ),
bLocaleDataItemValid( sal_False ),
bReservedWordValid( sal_False )
{
setLocale( rLocale );
}
+LocaleDataWrapper::LocaleDataWrapper(
+ const lang::Locale& rLocale
+ )
+ :
+ m_xContext( comphelper::getProcessComponentContext() ),
+ xLD( LocaleData::create(m_xContext) ),
+ bLocaleDataItemValid( sal_False ),
+ bReservedWordValid( sal_False )
+{
+ setLocale( rLocale );
+}
LocaleDataWrapper::~LocaleDataWrapper()
{
@@ -240,7 +251,7 @@ void LocaleDataWrapper::invalidateData()
if ( !rInstalledLocales.getLength() )
{
- LocaleDataWrapper aLDW( ::comphelper::getProcessServiceFactory(), lang::Locale() );
+ LocaleDataWrapper aLDW( ::comphelper::getProcessComponentContext(), lang::Locale() );
aLDW.getAllInstalledLocaleNames();
}
return rInstalledLocales;
@@ -698,7 +709,7 @@ void LocaleDataWrapper::scanCurrFormatImpl( const rtl::OUString& rCode,
void LocaleDataWrapper::getCurrFormatsImpl()
{
- NumberFormatCodeWrapper aNumberFormatCode( xSMgr, getLocale() );
+ NumberFormatCodeWrapper aNumberFormatCode( m_xContext, getLocale() );
uno::Sequence< NumberFormatCode > aFormatSeq
= aNumberFormatCode.getAllFormatCode( KNumberFormatUsage::CURRENCY );
sal_Int32 nCnt = aFormatSeq.getLength();
@@ -955,7 +966,7 @@ DateFormat LocaleDataWrapper::scanDateFormatImpl( const rtl::OUString& rCode )
void LocaleDataWrapper::getDateFormatsImpl()
{
- NumberFormatCodeWrapper aNumberFormatCode( xSMgr, getLocale() );
+ NumberFormatCodeWrapper aNumberFormatCode( m_xContext, getLocale() );
uno::Sequence< NumberFormatCode > aFormatSeq
= aNumberFormatCode.getAllFormatCode( KNumberFormatUsage::DATE );
sal_Int32 nCnt = aFormatSeq.getLength();
diff --git a/unotools/source/i18n/numberformatcodewrapper.cxx b/unotools/source/i18n/numberformatcodewrapper.cxx
index 444ed5cbd2f7..6c7954f0595b 100644
--- a/unotools/source/i18n/numberformatcodewrapper.cxx
+++ b/unotools/source/i18n/numberformatcodewrapper.cxx
@@ -19,8 +19,8 @@
#include <unotools/numberformatcodewrapper.hxx>
+#include <com/sun/star/i18n/NumberFormatMapper.hpp>
#include <tools/debug.hxx>
-#include "instance.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
@@ -28,17 +28,12 @@ using namespace ::com::sun::star::uno;
NumberFormatCodeWrapper::NumberFormatCodeWrapper(
- const Reference< lang::XMultiServiceFactory > & xSF,
+ const Reference< uno::XComponentContext > & rxContext,
const lang::Locale& rLocale
)
- :
- xSMgr( xSF )
{
setLocale( rLocale );
- xNFC = Reference< XNumberFormatCode > (
- intl_createInstance( xSMgr, "com.sun.star.i18n.NumberFormatMapper",
- "NumberFormatCodeWrapper" ), uno::UNO_QUERY );
- DBG_ASSERT( xNFC.is(), "NumberFormatCodeWrapper: no NumberFormatMapper" );
+ xNFC = i18n::NumberFormatMapper::create( rxContext );
}
@@ -58,8 +53,7 @@ NumberFormatCodeWrapper::getFormatCode( sal_Int16 formatIndex ) const
{
try
{
- if ( xNFC.is() )
- return xNFC->getFormatCode( formatIndex, aLocale );
+ return xNFC->getFormatCode( formatIndex, aLocale );
}
catch ( const Exception& )
{
@@ -74,8 +68,7 @@ NumberFormatCodeWrapper::getAllFormatCode( sal_Int16 formatUsage ) const
{
try
{
- if ( xNFC.is() )
- return xNFC->getAllFormatCode( formatUsage, aLocale );
+ return xNFC->getAllFormatCode( formatUsage, aLocale );
}
catch ( const Exception& )
{
@@ -90,8 +83,7 @@ NumberFormatCodeWrapper::getAllFormatCodes() const
{
try
{
- if ( xNFC.is() )
- return xNFC->getAllFormatCodes( aLocale );
+ return xNFC->getAllFormatCodes( aLocale );
}
catch ( const Exception& )
{
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index 43950737e4b5..a769e8ba4593 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -57,7 +57,7 @@ private:
SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL)
{
- pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), aSysLocaleOptions.GetRealLocale() );
+ pLocaleData = new LocaleDataWrapper( aSysLocaleOptions.GetRealLocale() );
setDateAcceptancePatternsConfig();
// listen for further changes
diff --git a/vcl/inc/vcl/i18nhelp.hxx b/vcl/inc/vcl/i18nhelp.hxx
index 4735d7df4161..54b05743cc10 100644
--- a/vcl/inc/vcl/i18nhelp.hxx
+++ b/vcl/inc/vcl/i18nhelp.hxx
@@ -29,8 +29,8 @@
namespace com {
namespace sun {
namespace star {
-namespace lang {
- class XMultiServiceFactory;
+namespace uno {
+ class XComponentContext;
}
}}}
@@ -50,7 +50,7 @@ class VCL_DLLPUBLIC I18nHelper
private:
::osl::Mutex maMutex;
::com::sun::star::lang::Locale maLocale;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
LocaleDataWrapper* mpLocaleDataWrapper;
utl::TransliterationWrapper* mpTransliterationWrapper;
@@ -67,7 +67,7 @@ protected:
public:
- I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale );
+ I18nHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::lang::Locale& rLocale );
~I18nHelper();
sal_Int32 CompareString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const;
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 6e63220ff4e9..0448bc7be075 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -33,9 +33,9 @@
using namespace ::com::sun::star;
-vcl::I18nHelper::I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale )
+vcl::I18nHelper::I18nHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::lang::Locale& rLocale )
{
- mxMSF = rxMSF;
+ m_xContext = rxContext;
maLocale = rLocale;
mpLocaleDataWrapper = NULL;
mpTransliterationWrapper= NULL;
@@ -64,7 +64,7 @@ utl::TransliterationWrapper& vcl::I18nHelper::ImplGetTransliterationWrapper() co
if ( mbTransliterateIgnoreCase )
nModules |= i18n::TransliterationModules_IGNORE_CASE;
- ((vcl::I18nHelper*)this)->mpTransliterationWrapper = new utl::TransliterationWrapper( comphelper::getComponentContext(mxMSF), (i18n::TransliterationModules)nModules );
+ ((vcl::I18nHelper*)this)->mpTransliterationWrapper = new utl::TransliterationWrapper( m_xContext, (i18n::TransliterationModules)nModules );
((vcl::I18nHelper*)this)->mpTransliterationWrapper->loadModuleIfNeeded( MsLangId::convertLocaleToLanguage( maLocale ) );
}
return *mpTransliterationWrapper;
@@ -74,7 +74,7 @@ LocaleDataWrapper& vcl::I18nHelper::ImplGetLocaleDataWrapper() const
{
if ( !mpLocaleDataWrapper )
{
- ((vcl::I18nHelper*)this)->mpLocaleDataWrapper = new LocaleDataWrapper( mxMSF, maLocale );
+ ((vcl::I18nHelper*)this)->mpLocaleDataWrapper = new LocaleDataWrapper( m_xContext, maLocale );
}
return *mpLocaleDataWrapper;
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 29588d9a1316..72dc9066a6c7 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1579,7 +1579,7 @@ LanguageType AllSettings::GetUILanguage() const
const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const
{
if ( !mpData->mpLocaleDataWrapper )
- ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetLocale() );
+ ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetLocale() );
return *mpData->mpLocaleDataWrapper;
}
@@ -1588,7 +1588,7 @@ const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const
const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const
{
if ( !mpData->mpUILocaleDataWrapper )
- ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetUILocale() );
+ ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetUILocale() );
return *mpData->mpUILocaleDataWrapper;
}
@@ -1597,8 +1597,7 @@ const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const
const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const
{
if ( !mpData->mpI18nHelper ) {
- ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> aFactory(comphelper::getProcessServiceFactory());
- ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( aFactory, GetLocale() );
+ ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetLocale() );
}
return *mpData->mpI18nHelper;
}
@@ -1608,8 +1607,7 @@ const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const
const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const
{
if ( !mpData->mpUII18nHelper ) {
- ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> aFactory(comphelper::getProcessServiceFactory());
- ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( aFactory, GetUILocale() );
+ ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetUILocale() );
}
return *mpData->mpUII18nHelper;
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index b410e5cde653..9600e447c9bb 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -309,7 +309,7 @@ LocaleDataWrapper& FormatterBase::ImplGetLocaleDataWrapper() const
{
if ( !mpLocaleDataWrapper )
{
- ((FormatterBase*)this)->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetLocale() );
+ ((FormatterBase*)this)->mpLocaleDataWrapper = new LocaleDataWrapper( GetLocale() );
}
return *mpLocaleDataWrapper;
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 41be7a3a1eb5..b719b7eed54f 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2970,7 +2970,7 @@ void TextEngine::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
LocaleDataWrapper* TextEngine::ImpGetLocaleDataWrapper()
{
if ( !mpLocaleDataWrapper )
- mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetLocale() );
+ mpLocaleDataWrapper = new LocaleDataWrapper( GetLocale() );
return mpLocaleDataWrapper;
}
diff --git a/xmloff/inc/xmloff/xmlnumfi.hxx b/xmloff/inc/xmloff/xmlnumfi.hxx
index cd93e810461c..b38a45f8ef4e 100644
--- a/xmloff/inc/xmloff/xmlnumfi.hxx
+++ b/xmloff/inc/xmloff/xmlnumfi.hxx
@@ -71,6 +71,10 @@ class SvXMLStylesContext;
struct SvXMLNumberInfo;
class SvNumberFormatter;
class SvtSysLocale;
+namespace com { namespace sun { namespace star { namespace lang {
+ class XMultiServiceFactory;
+}}}}
+
// use SvXMLNumFmtHelper in the context for <office:styles> to create
// child contexts for data styles
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 2bc69affc454..e23ec22a2f17 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -247,7 +247,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
{
pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()),
pFormatter->GetLocale() );
- pLocaleData = new LocaleDataWrapper( pFormatter->GetServiceManager(),
+ pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()),
pFormatter->GetLocale() );
}
else
@@ -255,7 +255,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) );
pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale );
- pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale );
+ pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale );
}
pUsedList = new SvXMLNumUsedList_Impl;
@@ -282,7 +282,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
{
pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()),
pFormatter->GetLocale() );
- pLocaleData = new LocaleDataWrapper( pFormatter->GetServiceManager(),
+ pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()),
pFormatter->GetLocale() );
}
else
@@ -290,7 +290,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) );
pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale );
- pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale );
+ pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale );
}
pUsedList = new SvXMLNumUsedList_Impl;
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 13cfef1e57c6..d36c12887c28 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -609,8 +609,8 @@ const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang )
{
if ( !pLocaleData )
pLocaleData = new LocaleDataWrapper(
- (pFormatter ? pFormatter->GetServiceManager() :
- mxServiceFactory),
+ comphelper::getComponentContext(
+ pFormatter ? pFormatter->GetServiceManager() : mxServiceFactory),
MsLangId::convertLanguageToLocale( nLang ) );
else
pLocaleData->setLocale( MsLangId::convertLanguageToLocale( nLang ) );