summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/commontools/sqlerror.cxx3
-rw-r--r--i18nutil/source/utility/paper.cxx3
-rw-r--r--package/source/zipapi/ZipFile.cxx12
-rw-r--r--sfx2/source/doc/docmacromode.cxx4
4 files changed, 12 insertions, 10 deletions
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 9f8608384d1d..513a5cf9dc81 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -229,9 +229,10 @@ namespace connectivity
OUString SQLError_Impl::impl_getSQLState( ErrorCondition _eCondition )
{
+ static constexpr OUStringLiteral DEFAULT_STATE = u"S1000";
OUString sState = lcl_getResourceState(_eCondition);
if (sState.isEmpty())
- sState = OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) );
+ sState = DEFAULT_STATE;
return sState;
}
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 042a82e72f93..995f60ce8c3e 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -349,8 +349,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
if (aLocaleStr.isEmpty())
aLocaleStr = officecfg::System::L10N::Locale::get();
+ static const OUStringLiteral EN_US = u"en-US";
if (aLocaleStr.isEmpty())
- aLocaleStr = OUString::intern(RTL_CONSTASCII_USTRINGPARAM("en-US"));
+ aLocaleStr = EN_US;
// convert locale string to locale struct
css::lang::Locale aSysLocale;
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index fb90ef02e4e1..e0c07537b749 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -805,9 +805,9 @@ void ZipFile::readLOC( ZipEntry &rEntry )
if (nRead < aNameBuffer.getLength())
aNameBuffer.realloc(nRead);
- OUString sLOCPath = OUString::intern( reinterpret_cast<char *>(aNameBuffer.getArray()),
- aNameBuffer.getLength(),
- RTL_TEXTENCODING_UTF8 );
+ OUString sLOCPath( reinterpret_cast<char *>(aNameBuffer.getArray()),
+ aNameBuffer.getLength(),
+ RTL_TEXTENCODING_UTF8 );
if ( rEntry.nPathLen == -1 ) // the file was created
{
@@ -968,9 +968,9 @@ sal_Int32 ZipFile::readCEN()
throw ZipException("name too long");
// read always in UTF8, some tools seem not to set UTF8 bit
- aEntry.sPath = OUString::intern ( reinterpret_cast<char const *>(aMemGrabber.getCurrentPos()),
- aEntry.nPathLen,
- RTL_TEXTENCODING_UTF8 );
+ aEntry.sPath = OUString( reinterpret_cast<char const *>(aMemGrabber.getCurrentPos()),
+ aEntry.nPathLen,
+ RTL_TEXTENCODING_UTF8 );
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aEntry.sPath, true ) )
throw ZipException("Zip entry has an invalid name." );
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 0e1ad424831e..faf38e70748a 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -383,8 +383,8 @@ namespace sfx2
{
try
{
- const OUString s_sBasicStorageName( OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ) );
- const OUString s_sScriptsStorageName( OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Scripts" ) ) );
+ static constexpr OUStringLiteral s_sBasicStorageName( u"Basic" );
+ static constexpr OUStringLiteral s_sScriptsStorageName( u"Scripts" );
bHasMacros =( ( rxStorage->hasByName( s_sBasicStorageName )
&& rxStorage->isStorageElement( s_sBasicStorageName )