summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-07-03 21:18:15 -0300
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-07-03 21:20:58 -0300
commitc6c99966cd4515b574e9cd21e89954dabf56009a (patch)
treef700771b96649bd421329b127fc25ed85fe1c86f /svl/source
parentc675575ce507320b6f866d02fd7eee68462f7823 (diff)
Get rid of RTL_CONSTASCII_USTRINGPARAM in svl/
Change-Id: I64f3f966011bf07a2ee0c7327feb4a46df595210
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/config/asiancfg.cxx26
-rw-r--r--svl/source/config/cjkoptions.cxx21
-rw-r--r--svl/source/config/ctloptions.cxx15
-rw-r--r--svl/source/config/languageoptions.cxx4
-rw-r--r--svl/source/items/macitem.cxx6
-rw-r--r--svl/source/misc/inettype.cxx4
-rw-r--r--svl/source/misc/lockfilecommon.cxx4
-rw-r--r--svl/source/misc/urihelper.cxx26
-rw-r--r--svl/source/numbers/zforfind.cxx8
-rw-r--r--svl/source/numbers/zforlist.cxx148
-rw-r--r--svl/source/numbers/zformat.cxx16
11 files changed, 108 insertions, 170 deletions
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index e1181fb142ea..3d51c751e44f 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -146,14 +146,8 @@ bool SvxAsianConfig::GetStartEndChars(
css::uno::Reference< css::beans::XPropertySet > el(
v.get< css::uno::Reference< css::beans::XPropertySet > >(),
css::uno::UNO_SET_THROW);
- startChars =
- el->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCharacters"))).
- get< rtl::OUString >();
- endChars =
- el->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndCharacters"))).
- get< rtl::OUString >();
+ startChars = el->getPropertyValue("StartCharacters").get< rtl::OUString >();
+ endChars = el->getPropertyValue("EndCharacters").get< rtl::OUString >();
return true;
}
@@ -183,24 +177,16 @@ void SvxAsianConfig::SetStartEndChars(
css::uno::Reference< css::beans::XPropertySet > el(
v.get< css::uno::Reference< css::beans::XPropertySet > >(),
css::uno::UNO_SET_THROW);
- el->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCharacters")),
- css::uno::makeAny(*startChars));
- el->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndCharacters")),
- css::uno::makeAny(*endChars));
+ el->setPropertyValue("StartCharacters", css::uno::makeAny(*startChars));
+ el->setPropertyValue("EndCharacters", css::uno::makeAny(*endChars));
} else {
css::uno::Reference< css::beans::XPropertySet > el(
(css::uno::Reference< css::lang::XSingleServiceFactory >(
set, css::uno::UNO_QUERY_THROW)->
createInstance()),
css::uno::UNO_QUERY_THROW);
- el->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCharacters")),
- css::uno::makeAny(*startChars));
- el->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndCharacters")),
- css::uno::makeAny(*endChars));
+ el->setPropertyValue("StartCharacters", css::uno::makeAny(*startChars));
+ el->setPropertyValue("EndCharacters", css::uno::makeAny(*endChars));
css::uno::Any v2(css::uno::makeAny(el));
try {
set->insertByName(name, v2);
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 9ba924a0ea3a..897c9c8aefce 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -34,7 +34,6 @@
using namespace ::com::sun::star::uno;
using namespace ::rtl;
-#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
#define CFG_READONLY_DEFAULT sal_False
class SvtCJKOptions_Impl : public utl::ConfigItem
@@ -92,7 +91,7 @@ namespace
}
SvtCJKOptions_Impl::SvtCJKOptions_Impl() :
- utl::ConfigItem(C2U("Office.Common/I18N/CJK")),
+ utl::ConfigItem("Office.Common/I18N/CJK"),
bIsLoaded(sal_False),
bCJKFont(sal_True),
bVerticalText(sal_True),
@@ -157,15 +156,15 @@ void SvtCJKOptions_Impl::Load()
rPropertyNames.realloc(9);
OUString* pNames = rPropertyNames.getArray();
- pNames[0] = C2U("CJKFont");
- pNames[1] = C2U("VerticalText");
- pNames[2] = C2U("AsianTypography");
- pNames[3] = C2U("JapaneseFind");
- pNames[4] = C2U("Ruby");
- pNames[5] = C2U("ChangeCaseMap");
- pNames[6] = C2U("DoubleLines");
- pNames[7] = C2U("EmphasisMarks");
- pNames[8] = C2U("VerticalCallOut");
+ pNames[0] = "CJKFont";
+ pNames[1] = "VerticalText";
+ pNames[2] = "AsianTypography";
+ pNames[3] = "JapaneseFind";
+ pNames[4] = "Ruby";
+ pNames[5] = "ChangeCaseMap";
+ pNames[6] = "DoubleLines";
+ pNames[7] = "EmphasisMarks";
+ pNames[8] = "VerticalCallOut";
EnableNotification( rPropertyNames );
}
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index aaed4d45370f..e7cb760cb8be 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -35,7 +35,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-#define ASCII_STR(s) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) )
#define CFG_READONLY_DEFAULT sal_False
// SvtCJKOptions_Impl ----------------------------------------------------------
@@ -114,7 +113,7 @@ sal_Bool SvtCTLOptions_Impl::IsReadOnly(SvtCTLOptions::EOption eOption) const
//------------------------------------------------------------------------------
SvtCTLOptions_Impl::SvtCTLOptions_Impl() :
- utl::ConfigItem( ASCII_STR("Office.Common/I18N/CTL") ),
+ utl::ConfigItem("Office.Common/I18N/CTL"),
m_bIsLoaded ( sal_False ),
m_bCTLFontEnabled ( sal_False ),
@@ -242,12 +241,12 @@ void SvtCTLOptions_Impl::Load()
{
rPropertyNames.realloc(6);
rtl::OUString* pNames = rPropertyNames.getArray();
- pNames[0] = ASCII_STR("CTLFont");
- pNames[1] = ASCII_STR("CTLSequenceChecking");
- pNames[2] = ASCII_STR("CTLCursorMovement");
- pNames[3] = ASCII_STR("CTLTextNumerals");
- pNames[4] = ASCII_STR("CTLSequenceCheckingRestricted");
- pNames[5] = ASCII_STR("CTLSequenceCheckingTypeAndReplace");
+ pNames[0] = "CTLFont";
+ pNames[1] = "CTLSequenceChecking";
+ pNames[2] = "CTLCursorMovement";
+ pNames[3] = "CTLTextNumerals";
+ pNames[4] = "CTLSequenceCheckingRestricted";
+ pNames[5] = "CTLSequenceCheckingTypeAndReplace";
EnableNotification( rPropertyNames );
}
Sequence< Any > aValues = GetProperties( rPropertyNames );
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index d0bced05cb43..5f7678a5c7d0 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -168,11 +168,11 @@ sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang )
// -----------------------------------------------------------------------------
SvtSystemLanguageOptions::SvtSystemLanguageOptions() :
- utl::ConfigItem( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("System/L10N") ))
+ utl::ConfigItem( "System/L10N")
{
uno::Sequence< rtl::OUString > aPropertyNames(1);
rtl::OUString* pNames = aPropertyNames.getArray();
- pNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SystemLocale"));
+ pNames[0] = "SystemLocale";
uno::Sequence< uno::Any > aValues = GetProperties( aPropertyNames );
if ( aValues.getLength() )
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index d5d5f9ef8e11..5f7714fd3aad 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -61,15 +61,15 @@ SvxMacro::~SvxMacro()
{
if(eType==STARBASIC)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_STARBASIC));
+ return ::rtl::OUString(SVX_MACRO_LANGUAGE_STARBASIC);
}
else if(eType==JAVASCRIPT)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT));
+ return ::rtl::OUString(SVX_MACRO_LANGUAGE_JAVASCRIPT);
}
else if(eType==EXTENDED_STYPE)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_SF));
+ return ::rtl::OUString(SVX_MACRO_LANGUAGE_SF);
}
return aLibName;
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 8d0244e3930f..5bbe31c4cc8d 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -807,9 +807,7 @@ INetContentType INetContentTypes::GetContentTypeFromURL(UniString const &
if (aToken.EqualsIgnoreCaseAscii(INETTYPE_URL_PROT_FILE))
if (rURL.GetChar(rURL.Len() - 1) == '/') // folder
if (rURL.Len() > RTL_CONSTASCII_LENGTH("file:///"))
- if (WildCard(UniString(RTL_CONSTASCII_USTRINGPARAM(
- "*/{*}/"))).
- Matches(rURL)) // special folder
+ if (WildCard("*/{*}/").Matches(rURL)) // special folder
eTypeID = CONTENT_TYPE_X_CNT_FSYSSPECIALFOLDER;
else
// drive? -> "file:///?|/"
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index e6597bd4db65..7df914d7f6f5 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -65,7 +65,7 @@ LockFileCommon::LockFileCommon( const ::rtl::OUString& aOrigURL, const uno::Refe
::rtl::OUString aShareURLString = aDocURL.GetPartBeforeLastName();
aShareURLString += aPrefix;
aShareURLString += aDocURL.GetName();
- aShareURLString += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%23" ) ); // '#'
+ aShareURLString += "%23"; // '#'
m_aURL = INetURLObject( aShareURLString ).GetMainURL( INetURLObject::NO_DECODE );
}
@@ -193,7 +193,7 @@ uno::Sequence< ::rtl::OUString > LockFileCommon::ParseEntry( const uno::Sequence
SvtUserOptions aUserOpt;
::rtl::OUString aName = aUserOpt.GetFirstName();
if ( !aName.isEmpty() )
- aName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) );
+ aName += " ";
aName += aUserOpt.GetLastName();
return aName;
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index d1cd8b27d0c4..a080eda28095 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -178,10 +178,7 @@ Result normalizePrefix(
#endif
(css::uno::Reference< css::ucb::XCommandProcessor >(
content, css::uno::UNO_QUERY_THROW)->execute(
- css::ucb::Command(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "getCasePreservingURL")),
+ css::ucb::Command("getCasePreservingURL",
-1, css::uno::Any()),
0,
css::uno::Reference< css::ucb::XCommandEnvironment >())
@@ -292,22 +289,17 @@ URIHelper::normalizedMakeRelative(
css::uno::Reference< css::lang::XMultiComponentFactory > componentFactory(
context->getServiceManager());
if (!componentFactory.is()) {
- throw css::uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "component context has no service manager")),
+ throw css::uno::RuntimeException("component context has no service manager",
css::uno::Reference< css::uno::XInterface >());
}
css::uno::Sequence< css::uno::Any > args(2);
- args[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
- args[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ args[0] <<= rtl::OUString("Local");
+ args[1] <<= rtl::OUString("Office");
css::uno::Reference< css::ucb::XContentProvider > broker;
try {
broker = css::uno::Reference< css::ucb::XContentProvider >(
componentFactory->createInstanceWithArgumentsAndContext(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.UniversalContentBroker")),
+ "com.sun.star.ucb.UniversalContentBroker",
args, context),
css::uno::UNO_QUERY_THROW);
} catch (css::uno::RuntimeException &) {
@@ -315,9 +307,7 @@ URIHelper::normalizedMakeRelative(
} catch (css::uno::Exception &) {
css::uno::Any exception(cppu::getCaughtException());
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "creating com.sun.star.ucb.UniversalContentBroker failed")),
+ "creating com.sun.star.ucb.UniversalContentBroker failed",
css::uno::Reference< css::uno::XInterface >(),
exception);
}
@@ -340,9 +330,7 @@ rtl::OUString URIHelper::simpleNormalizedMakeRelative(
com::sun::star::beans::XPropertySet >(
comphelper::getProcessServiceFactory(),
com::sun::star::uno::UNO_QUERY_THROW)->
- getPropertyValue(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("DefaultContext")))),
+ getPropertyValue("DefaultContext")),
com::sun::star::uno::UNO_QUERY_THROW),
baseUriReference, uriReference));
return rel.is() ? rel->getUriReference() : uriReference;
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 3e587b546d4c..58c6c148d86d 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -549,8 +549,8 @@ short ImpSvNumberInputScan::GetMonth( const String& rString, xub_StrLen& nPos )
{
// #102136# The correct English form of month September abbreviated is
// SEPT, but almost every data contains SEP instead.
- static const String aSeptCorrect( RTL_CONSTASCII_USTRINGPARAM( "SEPT" ) );
- static const String aSepShortened( RTL_CONSTASCII_USTRINGPARAM( "SEP" ) );
+ static const String aSeptCorrect(RTL_CONSTASCII_USTRINGPARAM("SEPT") );
+ static const String aSepShortened(RTL_CONSTASCII_USTRINGPARAM("SEP") );
short res = 0; // no month found
@@ -1738,9 +1738,7 @@ input for the following reasons:
uno::Reference< lang::XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
uno::Reference< ::com::sun::star::i18n::XCalendar3 > xCal(
- xSMgr->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.i18n.LocaleCalendar" ) ) ),
+ xSMgr->createInstance( "com.sun.star.i18n.LocaleCalendar" ),
uno::UNO_QUERY );
for ( const entry* p = cals; p->lan; ++p )
{
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9e4dfb0b37e8..934a043b8ee4 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -921,15 +921,12 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
if ( aLoadedLocale.Language != aLocale.Language ||
aLoadedLocale.Country != aLocale.Country )
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumerFormatter::ImpGenerateCL: locales don't match:"));
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg ));
+ rtl::OUString aMsg("SvNumerFormatter::ImpGenerateCL: locales don't match:");
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg ));
}
// test XML locale data FormatElement entries
{
- uno::Sequence< i18n::FormatElement > xSeq =
- xLocaleData->getAllFormats();
+ uno::Sequence< i18n::FormatElement > xSeq = xLocaleData->getAllFormats();
// A test for completeness of formatindex="0" ...
// formatindex="47" is not needed here since it is done in
// ImpGenerateFormats().
@@ -938,30 +935,26 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
for ( sal_Int32 j = 0; j < xSeq.getLength(); j++ )
{
sal_Int16 nIdx = xSeq[j].formatIndex;
- String aDupes;
+ rtl::OUString aDupes;
for ( sal_Int32 i = 0; i < xSeq.getLength(); i++ )
{
if ( i != j && xSeq[i].formatIndex == nIdx )
{
- aDupes += String::CreateFromInt32( i );
- aDupes += '(';
- aDupes += String( xSeq[i].formatKey );
- aDupes += ')';
- aDupes += ' ';
+ aDupes += rtl::OUString::valueOf( i );
+ aDupes += "(";
+ aDupes += rtl::OUString( xSeq[i].formatKey );
+ aDupes += ") ";
}
}
- if ( aDupes.Len() )
+ if ( !aDupes.isEmpty() )
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "XML locale data FormatElement formatindex dupe: "));
- aMsg += String::CreateFromInt32( nIdx );
- aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
- "\nFormatElements: "));
- aMsg += String::CreateFromInt32( j );
- aMsg += '(';
- aMsg += String( xSeq[j].formatKey );
- aMsg += ')';
- aMsg += ' ';
+ rtl::OUString aMsg("XML locale data FormatElement formatindex dupe: ");
+ aMsg += rtl::OUString::valueOf( nIdx );
+ aMsg += "\nFormatElements: ";
+ aMsg += rtl::OUString::valueOf( j );
+ aMsg += "(";
+ aMsg += rtl::OUString( xSeq[j].formatKey );
+ aMsg += ") ";
aMsg += aDupes;
LocaleDataWrapper::outputCheckMessage(
xLocaleData->appendLocaleInfo( aMsg ));
@@ -1746,13 +1739,11 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
if (LocaleDataWrapper::areChecksEnabled() &&
rCode.Index != NF_CURRENCY_1000DEC2_CCC )
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index "));
- aMsg += String::CreateFromInt32( rCode.Index );
- aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ":\n"));
- aMsg += String( rCode.Code );
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
+ rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index ");
+ aMsg += rtl::OUString::valueOf( rCode.Index );
+ aMsg += ":\n";
+ aMsg += rCode.Code;
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
}
}
@@ -1766,13 +1757,11 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
{
if (LocaleDataWrapper::areChecksEnabled())
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpInsertFormat: bad format code, index "));
- aMsg += String::CreateFromInt32( rCode.Index );
- aMsg += '\n';
- aMsg += String( rCode.Code );
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
+ rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: bad format code, index " );
+ aMsg += rtl::OUString::valueOf( rCode.Index );
+ aMsg += "\n";
+ aMsg += rCode.Code;
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
return NULL;
@@ -1798,13 +1787,11 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
break;
default:
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpInsertFormat: dup format code, index "));
- aMsg += String::CreateFromInt32( rCode.Index );
- aMsg += '\n';
- aMsg += String( rCode.Code );
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
+ rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: dup format code, index ");
+ aMsg += rtl::OUString::valueOf( rCode.Index );
+ aMsg += "\n";
+ aMsg += rCode.Code;
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
}
}
@@ -1815,13 +1802,11 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
{
if (LocaleDataWrapper::areChecksEnabled())
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpInsertFormat: too many format codes, index "));
- aMsg += String::CreateFromInt32( rCode.Index );
- aMsg += '\n';
- aMsg += String( rCode.Code );
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
+ rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: too many format codes, index ");
+ aMsg += rtl::OUString::valueOf( rCode.Index );
+ aMsg += "\n";
+ aMsg += rCode.Code;
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
return NULL;
@@ -1831,15 +1816,13 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
{
if (LocaleDataWrapper::areChecksEnabled())
{
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "ImpInsertFormat: can't insert number format key pos: "));
- aMsg += String::CreateFromInt32( nPos );
- aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", code index "));
- aMsg += String::CreateFromInt32( rCode.Index );
- aMsg += '\n';
- aMsg += String( rCode.Code );
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
+ rtl::OUString aMsg( "ImpInsertFormat: can't insert number format key pos: ");
+ aMsg += rtl::OUString::valueOf( sal_Int32( nPos ) );
+ aMsg += ", code index ";
+ aMsg += rtl::OUString::valueOf( rCode.Index );
+ aMsg += "\n";
+ aMsg += rCode.Code;
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
return NULL;
@@ -1970,11 +1953,9 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
|| nTabOff == NF_CURRENCY_1000INT_RED
|| nTabOff == NF_CURRENCY_1000DEC2_CCC))
{ // currency entries with decimals might not exist, e.g. Italian Lira
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpGetFormatCodeIndex: not found: "));
- aMsg += String::CreateFromInt32( nTabOff );
- LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo(
- aMsg));
+ rtl::OUString aMsg( "SvNumberFormatter::ImpGetFormatCodeIndex: not found: " );
+ aMsg += rtl::OUString::valueOf( nTabOff );
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo(aMsg));
}
if ( nLen )
{
@@ -2178,14 +2159,10 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
if (pStdFormat)
{
// This is _the_ standard format.
- if (LocaleDataWrapper::areChecksEnabled() &&
- pStdFormat->GetType() != NUMBERFORMAT_NUMBER)
- {
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpGenerateFormats: General format not NUMBER"));
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
- }
+ if (LocaleDataWrapper::areChecksEnabled() && pStdFormat->GetType() != NUMBERFORMAT_NUMBER)
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->
+ appendLocaleInfo( "SvNumberFormatter::ImpGenerateFormats: General format not NUMBER"));
+
pStdFormat->SetType( NUMBERFORMAT_NUMBER );
pStdFormat->SetStandard();
pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE );
@@ -2193,12 +2170,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
else
{
if (LocaleDataWrapper::areChecksEnabled())
- {
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "SvNumberFormatter::ImpGenerateFormats: General format not insertable, nothing will work"));
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
- }
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->
+ appendLocaleInfo( "SvNumberFormatter::ImpGenerateFormats: General format not insertable, nothing will work"));
}
// Boolean
@@ -2541,24 +2514,24 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
aSingleFormatCode.Usage = i18n::KNumberFormatUsage::FRACTION_NUMBER;
// # ?/?
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) );
+ aSingleFormatCode.Code = "# ?/?";
ImpInsertFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_1, ZF_STANDARD_FRACTION ));
// # ??/??
//! "??/" would be interpreted by the compiler as a trigraph for '\'
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?\?/?\?" ) );
+ aSingleFormatCode.Code = "# ?\?/?\?";
ImpInsertFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_2, ZF_STANDARD_FRACTION+1 ));
// # ?/4
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/4" ) );
+ aSingleFormatCode.Code = "# ?/4";
ImpInsertNewStandardFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_3, ZF_STANDARD_FRACTION+2 ),
SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION );
// # ??/100
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?\?/100" ) );
+ aSingleFormatCode.Code = "# ?\?/100";
ImpInsertNewStandardFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_4, ZF_STANDARD_FRACTION+3 ),
SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION );
@@ -3448,12 +3421,9 @@ void SvNumberFormatter::GetCompatibilityCurrency( String& rSymbol, String& rAbbr
if ( j >= nCurrencies )
{
if (LocaleDataWrapper::areChecksEnabled())
- {
- String aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "GetCompatibilityCurrency: none?"));
- LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo( aMsg));
- }
+ LocaleDataWrapper::outputCheckMessage( xLocaleData->
+ appendLocaleInfo( "GetCompatibilityCurrency: none?"));
+
rSymbol = xLocaleData->getCurrSymbol();
rAbbrev = xLocaleData->getCurrBankSymbol();
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 9808bc031646..7b6679759222 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -56,7 +56,7 @@ namespace {
struct Gregorian
: public rtl::StaticWithInit<const ::rtl::OUString, Gregorian> {
const ::rtl::OUString operator () () {
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gregorian"));
+ return ::rtl::OUString("gregorian");
}
};
@@ -940,9 +940,9 @@ SvNumberformat::SvNumberformat(String& rString,
// e.g. Thai T speciality
if (pSc->GetNatNumModifier() && !NumFor[nIndex].GetNatNum().IsSet())
{
- String aNat( RTL_CONSTASCII_USTRINGPARAM( "[NatNum"));
- aNat += String::CreateFromInt32( pSc->GetNatNumModifier());
- aNat += ']';
+ rtl::OUString aNat( "[NatNum");
+ aNat += rtl::OUString::valueOf( pSc->GetNatNumModifier());
+ aNat += "]";
sStr.Insert( aNat, 0);
NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), false );
}
@@ -966,10 +966,10 @@ SvNumberformat::SvNumberformat(String& rString,
NumFor[nIndex].GetNatNum().GetLang() ==
LANGUAGE_DONTKNOW)
{
- String aLID( RTL_CONSTASCII_USTRINGPARAM( "[$-"));
- aLID += String::CreateFromInt32( sal_Int32(
- eLanguage), 16 ).ToUpperAscii();
- aLID += ']';
+ rtl::OUString aLID("[$-");
+ aLID += rtl::OUString::valueOf( sal_Int32(
+ eLanguage), 16 ).toAsciiUpperCase();
+ aLID += "]";
sStr.Insert( aLID, 0);
NumFor[nIndex].SetNatNumLang( eLanguage);
}