summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-22 19:48:13 +0100
committerEike Rathke <erack@redhat.com>2012-11-22 19:50:20 +0100
commit1b329fd5ccc0ff270d776dfd03571da3f4d6f34d (patch)
tree160192cce8a16201503843650491f05b9b15a844 /cui
parent677f13f0e2567bcf667b016ef5e173766cc89cbf (diff)
get rid of unnecessary LocaleDataWrapper temporary instances
Change-Id: I17d9a502565d445b0eab9ef6e9123661850292b7
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/postdlg.cxx14
-rw-r--r--cui/source/options/optgdlg.cxx6
-rw-r--r--cui/source/tabpages/tabstpge.cxx4
3 files changed, 11 insertions, 13 deletions
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 90fe48c5e00e..7a944e29019a 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -124,8 +124,8 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,
}
else
{
- LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
- aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) );
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+ aDateStr = rLocaleWrapper.getDate( Date( Date::SYSTEM ) );
}
nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT );
@@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
String aTmp( SvtUserOptions().GetID() );
- LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
String aStr( aEditED.GetText() );
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
@@ -221,9 +221,9 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
aStr += aTmp;
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
}
- aStr += aLocaleWrapper.getDate(aDate);
+ aStr += rLocaleWrapper.getDate(aDate);
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
- aStr += aLocaleWrapper.getTime(aTime, sal_False, sal_False);
+ aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False);
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) );
aStr = convertLineEnd(aStr, GetSystemLineEnd());
@@ -239,11 +239,11 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
IMPL_LINK_NOARG(SvxPostItDialog, OKHdl)
{
- LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
pOutSet = new SfxItemSet( rSet );
pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
- pOutSet->Put( SvxPostItDateItem( aLocaleWrapper.getDate( Date( Date::SYSTEM ) ),
+ pOutSet->Put( SvxPostItDateItem( rLocaleWrapper.getDate( Date( Date::SYSTEM ) ),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
pOutSet->Put( SvxPostItTextItem( aEditED.GetText(),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 38d050d55b24..f4d8abab76d7 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1696,10 +1696,8 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
OUString aDatePatternsString = pLangConfig->aSysLocaleOptions.GetDatePatternsConfigString();
if (aDatePatternsString.isEmpty())
{
- Locale aTempLocale;
- SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguageTag().getLanguageType());
- LocaleDataWrapper aLocaleWrapper( aTempLocale );
- aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+ aDatePatternsString = lcl_getDatePatternsConfigString( rLocaleWrapper);
}
aDatePatternsED.SetText( aDatePatternsString);
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_DATEPATTERNS);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index d0d429b4df3c..ef6d44b9a5fc 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -186,8 +186,8 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent,
aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial);
// Get the default decimal char from the system
- LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
- aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep()[0];
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+ aAktTab.GetDecimal() = rLocaleWrapper.getNumDecimalSep()[0];
FreeResource();
}