Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4246
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/46/4246/1
String->OUString unotools syslocaloptions and related
Change-Id: I9e04db9f7352e3f9c43f240390c21665f8e2e8b3
---
M cui/source/options/optgdlg.cxx
M include/unotools/defaultoptions.hxx
M include/unotools/syslocaleoptions.hxx
M svl/source/numbers/zforlist.cxx
M unotools/source/config/defaultoptions.cxx
M unotools/source/config/syslocaleoptions.cxx
6 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 12a46f0..e397236 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1443,7 +1443,7 @@
LocaleSettingHdl(m_pLocaleSettingLB);
// configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default
- String aAbbrev;
+ OUString aAbbrev;
LanguageType eLang;
const NfCurrencyEntry* pCurr = NULL;
sLang = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
diff --git a/include/unotools/defaultoptions.hxx b/include/unotools/defaultoptions.hxx
index 175fd32..b548241 100644
--- a/include/unotools/defaultoptions.hxx
+++ b/include/unotools/defaultoptions.hxx
@@ -19,11 +19,11 @@
#ifndef INCLUDED_unotools_DEFAULTOPTIONS_HXX
#define INCLUDED_unotools_DEFAULTOPTIONS_HXX
+#include <rtl/ustring.hxx>
#include "unotools/unotoolsdllapi.h"
#include "tools/solar.h"
#include <unotools/options.hxx>
-class String;
class SvtDefaultOptions_Impl;
// class SvtDefaultOptions -----------------------------------------------
@@ -39,7 +39,7 @@
SvtDefaultOptions();
virtual ~SvtDefaultOptions();
- String GetDefaultPath( sal_uInt16 nId ) const;
+ OUString GetDefaultPath( sal_uInt16 nId ) const;
};
#endif // #ifndef INCLUDED_unotools_DEFAULTOPTIONS_HXX
diff --git a/include/unotools/syslocaleoptions.hxx b/include/unotools/syslocaleoptions.hxx
index 8c93789..53a5434 100644
--- a/include/unotools/syslocaleoptions.hxx
+++ b/include/unotools/syslocaleoptions.hxx
@@ -133,17 +133,17 @@
/// Get currency abbreviation and locale from an USD-en-US or EUR-de-DE string
static void GetCurrencyAbbrevAndLanguage(
- String& rAbbrev,
+ OUString& rAbbrev,
LanguageType& eLang,
const OUString& rConfigString );
/// Create an USD-en-US or EUR-de-DE string
static OUString CreateCurrencyConfigString(
- const String& rAbbrev,
+ const OUString& rAbbrev,
LanguageType eLang );
void GetCurrencyAbbrevAndLanguage(
- String& rAbbrev,
+ OUString& rAbbrev,
LanguageType& eLang ) const
{
GetCurrencyAbbrevAndLanguage( rAbbrev,
@@ -151,7 +151,7 @@
}
void SetCurrencyAbbrevAndLanguage(
- const String& rAbbrev,
+ const OUString& rAbbrev,
LanguageType eLang )
{
SetCurrencyConfigString(
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index ae0a163..f591e94 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3274,7 +3274,7 @@
IMPL_STATIC_LINK_NOINSTANCE( SvNumberFormatter, CurrencyChangeLink, SAL_UNUSED_PARAMETER void*,
EMPTYARG )
{
::osl::MutexGuard aGuard( GetMutex() );
- String aAbbrev;
+ OUString aAbbrev;
LanguageType eLang = LANGUAGE_SYSTEM;
SvtSysLocaleOptions().GetCurrencyAbbrevAndLanguage( aAbbrev, eLang );
SetDefaultSystemCurrency( aAbbrev, eLang );
@@ -3704,7 +3704,7 @@
::comphelper::getProcessComponentContext(),
SvtSysLocale().GetLanguageTag() );
// get user configured currency
- String aConfiguredCurrencyAbbrev;
+ OUString aConfiguredCurrencyAbbrev;
LanguageType eConfiguredCurrencyLanguage = LANGUAGE_SYSTEM;
SvtSysLocaleOptions().GetCurrencyAbbrevAndLanguage(
aConfiguredCurrencyAbbrev, eConfiguredCurrencyLanguage );
@@ -3755,7 +3755,7 @@
lcl_CheckCurrencySymbolPosition( *pEntry );
}
rCurrencyTable.insert( rCurrencyTable.begin() + nCurrencyPos++, pEntry );
- if ( !nSystemCurrencyPosition && (aConfiguredCurrencyAbbrev.Len() ?
+ if ( !nSystemCurrencyPosition && (!aConfiguredCurrencyAbbrev.isEmpty() ?
pEntry->GetBankSymbol() ==
OUString(aConfiguredCurrencyAbbrev) &&
pEntry->GetLanguage() == eConfiguredCurrencyLanguage :
false) )
{
@@ -3800,7 +3800,7 @@
{
rCurrencyTable.insert( rCurrencyTable.begin() + nCurrencyPos++, pEntry );
if ( !nSecondarySystemCurrencyPosition &&
- (aConfiguredCurrencyAbbrev.Len() ?
+ (!aConfiguredCurrencyAbbrev.isEmpty() ?
pEntry->GetBankSymbol() == OUString(aConfiguredCurrencyAbbrev) :
pEntry->GetLanguage() == eConfiguredCurrencyLanguage) )
{
@@ -3820,7 +3820,7 @@
{
nSystemCurrencyPosition = nSecondarySystemCurrencyPosition;
}
- if ((aConfiguredCurrencyAbbrev.Len() && !nSystemCurrencyPosition) &&
+ if ((!aConfiguredCurrencyAbbrev.isEmpty() && !nSystemCurrencyPosition) &&
LocaleDataWrapper::areChecksEnabled())
{
LocaleDataWrapper::outputCheckMessage(
@@ -3831,7 +3831,7 @@
{
nSystemCurrencyPosition = nMatchingSystemCurrencyPosition;
}
- if ((!aConfiguredCurrencyAbbrev.Len() && !nSystemCurrencyPosition) &&
+ if ((aConfiguredCurrencyAbbrev.isEmpty() && !nSystemCurrencyPosition) &&
LocaleDataWrapper::areChecksEnabled())
{
LocaleDataWrapper::outputCheckMessage(
diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx
index 2006b26..ebe2ce1 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -340,7 +340,7 @@
// -----------------------------------------------------------------------
-String SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const
+OUString SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const
{
return pImp->GetDefaultPath( nId );
}
diff --git a/unotools/source/config/syslocaleoptions.cxx
b/unotools/source/config/syslocaleoptions.cxx
index 372387f..06f5bda 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -667,32 +667,32 @@
}
// static
-void SvtSysLocaleOptions::GetCurrencyAbbrevAndLanguage( String& rAbbrev,
+void SvtSysLocaleOptions::GetCurrencyAbbrevAndLanguage( OUString& rAbbrev,
LanguageType& eLang, const OUString& rConfigString )
{
sal_Int32 nDelim = rConfigString.indexOf( '-' );
if ( nDelim >= 0 )
{
rAbbrev = rConfigString.copy( 0, nDelim );
- String aIsoStr( rConfigString.copy( nDelim+1 ) );
+ OUString aIsoStr( rConfigString.copy( nDelim+1 ) );
eLang = LanguageTag( aIsoStr ).getLanguageType();
}
else
{
rAbbrev = rConfigString;
- eLang = (rAbbrev.Len() ? LANGUAGE_NONE : LANGUAGE_SYSTEM);
+ eLang = (!rAbbrev.isEmpty() ? LANGUAGE_NONE : LANGUAGE_SYSTEM);
}
}
// static
OUString SvtSysLocaleOptions::CreateCurrencyConfigString(
- const String& rAbbrev, LanguageType eLang )
+ const OUString& rAbbrev, LanguageType eLang )
{
- String aIsoStr( LanguageTag( eLang ).getBcp47() );
- if ( aIsoStr.Len() )
+ OUString aIsoStr( LanguageTag( eLang ).getBcp47() );
+ if ( !aIsoStr.isEmpty() )
{
- OUStringBuffer aStr( rAbbrev.Len() + 1 + aIsoStr.Len() );
+ OUStringBuffer aStr( rAbbrev.getLength() + 1 + aIsoStr.getLength() );
aStr.append( rAbbrev );
aStr.append( sal_Unicode('-') );
aStr.append( aIsoStr );
--
To view, visit https://gerrit.libreoffice.org/4246
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e04db9f7352e3f9c43f240390c21665f8e2e8b3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Norbert Thiebaud <nthiebaud@gmail.com>
Context
- [PATCH] String->OUString unotools syslocaloptions and related · Norbert Thiebaud (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.