summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-05 11:28:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-15 08:28:44 +0100
commitd2f6a87ac7adb3f60f7eae7c5a8f8a9076b7a75c (patch)
tree0bcc19623fa6cda27b78df47c54192bd3e73ef41 /sfx2
parent5837402fb1daa437d9a1a37edc9ede57319944f1 (diff)
fdo#46808, use service constructor for i18n::NumberFormatMapper
Also create a utility constructor for LocaleDataWrapper, which simplifies many of the calling sites. Change-Id: Ic8510b51c4201fa17fc0620e18d3e258e43636ba
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/dialog/versdlg.cxx5
3 files changed, 6 insertions, 7 deletions
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 );