summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-17 15:47:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-17 16:39:33 +0100
commit0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214 (patch)
tree484d55e20e414c16202163b766fdd87777ebb46d
parent0ba6360363fb73b5b200bbc486ed8eeac5f3d337 (diff)
Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API (instead of having to go via an intermediary OUString ctor call). Especially useful for character literals that are defined as const variables or via macros ("direct" uses of character literals in the OUString API can often simply be replaced with single-character string literals, for improved readability). (The functions overloaded for OUStringLiteral1 are those that are actually used by the existing LO code; more could potentially be added. The asymmetry in the operator ==/!= parameter types is by design, though---writing code like 'x' == s is an abomination that shall not be abetted.) Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
-rw-r--r--basic/source/classes/sbunoobj.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
-rw-r--r--extensions/source/bibliography/general.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_asian.cxx2
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx2
-rw-r--r--include/rtl/ustring.hxx70
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx4
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx2
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--oox/source/ole/axcontrol.cxx4
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx24
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx2
-rw-r--r--svx/source/core/extedit.cxx2
-rw-r--r--sw/qa/core/uwriter.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx5
-rw-r--r--sw/source/core/fields/cellfml.cxx6
-rw-r--r--sw/source/core/fields/dbfld.cxx2
-rw-r--r--sw/source/core/fields/tblcalc.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx4
-rw-r--r--sw/source/core/tox/txmsrt.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx12
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx8
-rw-r--r--sw/source/ui/misc/glossary.cxx12
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx88
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx4
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx10
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx2
-rw-r--r--unotools/source/config/optionsdlg.cxx6
-rw-r--r--unoxml/source/dom/element.cxx4
-rw-r--r--uui/source/iahndl.cxx2
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx2
-rw-r--r--xmloff/source/style/impastpl.cxx2
54 files changed, 222 insertions, 129 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 0627a7f3981d..80cbb6ea7e28 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1702,11 +1702,11 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const OUString& rClass )
sal_Int32 nClassNameDot = rClass.lastIndexOf( '.' );
if( nClassNameDot >= 0 )
{
- aClassName += rClass.copy( 0, nClassNameDot + 1 ) + OUString( 'X' ) + rClass.copy( nClassNameDot + 1 );
+ aClassName += rClass.copy( 0, nClassNameDot + 1 ) + "X" + rClass.copy( nClassNameDot + 1 );
}
else
{
- aClassName += OUString( 'X' ) + rClass;
+ aClassName += "X" + rClass;
}
}
else // assume extended type declaration support for basic ( can't get here
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 95b2efe09ef5..6436af471214 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -367,7 +367,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
aMatchString = pAtom->getTokenValue();
// Determine where '%' character is...
- if( aMatchString.equals( OUString( WILDCARD ) ) )
+ if( aMatchString == OUStringLiteral1<WILDCARD>() )
{
// String containing only a '%' and nothing else matches everything
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS,
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 3b14b9402483..0230fc0c3c41 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -437,7 +437,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark )
if( nPos != -1 )
aStrURL = aStrURL.copy(0, nPos);
- aStrURL += OUString(sUHash) + aStrMark;
+ aStrURL += OUStringLiteral1<sUHash>() + aStrMark;
m_pCbbTarget->SetText ( aStrURL );
}
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 539d9ded484c..72f664e7c4cc 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -174,7 +174,7 @@ namespace dbaui
// our label should equal the UI text of the "Open" command
OUString sLabel(GetCommandText(".uno:Open", m_sModule));
- SetText(OUString(' ') + sLabel.replaceAll("~", OUString()));
+ SetText(" " + sLabel.replaceAll("~", OUString()));
// Place icon left of text and both centered in the button.
SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) );
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 3d2d1bd56a9e..07a149e1578e 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -139,7 +139,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno
if (!nTempVal || xCol->wasNull())
{
OUString sTempVal = xCol->getString();
- if(sTempVal != OUString('0'))
+ if(sTempVal != "0")
nTempVal = -1;
}
}
diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
index 3c25ffae61aa..4cb4d7e3c353 100644
--- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
@@ -89,7 +89,7 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry,
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 )
func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_TW_"+rAlgorithm).pData);
if (!func)
- func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+OUString('_')+rAlgorithm).pData);
+ func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_"+rAlgorithm).pData);
}
#else
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) {
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 681bf479a6b4..07f7d100bf5f 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -710,7 +710,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// Ensure only one default per usage and type.
if (bDefault)
{
- OUString aKey( aUsage + OUString( ',') + aType);
+ OUString aKey( aUsage + "," + aType);
if (!aDefaultsSet.insert( aKey).second)
{
OUString aStr( "Duplicated default for usage=\"");
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 72048b31eee3..f14eba808a0a 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -53,6 +53,21 @@ namespace rtl
#undef rtl
#endif
+#if defined RTL_FAST_STRING
+/// @cond INTERNAL
+/** A simple wrapper around an ASCII character literal, for use in certain
+ OUString functions designed for efficient processing of string literals.
+
+ @since LibreOffice 4.5
+*/
+template<char C> struct SAL_WARN_UNUSED OUStringLiteral1 {
+ static_assert(
+ static_cast<unsigned char>(C) < 0x80,
+ "non-ASCII character in OUStringLiteral1");
+};
+/// @endcond
+#endif
+
/* ======================================================================= */
/**
@@ -344,6 +359,20 @@ public:
return *this;
}
+#if defined RTL_FAST_STRING
+ /// @cond INTERNAL
+ /** Assign a new string from a single ASCII character literal.
+
+ @since LibreOffice 4.5
+ */
+ template<char C> OUString & operator =(OUStringLiteral1<C>) {
+ sal_Unicode const c = C;
+ rtl_uString_newFromStr_WithLength(&pData, &c, 1);
+ return *this;
+ }
+ /// @endcond
+#endif
+
/**
Append a string to this string.
@@ -2343,6 +2372,32 @@ public:
}
};
+#if defined RTL_FAST_STRING
+/// @cond INTERNAL
+
+/** Compare a string and an ASCII character literal for equality.
+
+ @since LibreOffice 4.5
+*/
+template<char C> bool operator ==(OUString const & string, OUStringLiteral1<C>)
+{
+ char const c = C;
+ return string.equalsAsciiL(&c, 1);
+}
+
+/** Compare a string and an ASCII character literal for inequality.
+
+ @since LibreOffice 4.5
+*/
+template<char C> bool operator !=(
+ OUString const & string, OUStringLiteral1<C> literal)
+{
+ return !(string == literal);
+}
+
+/// @endcond
+#endif
+
/* ======================================================================= */
#ifdef RTL_FAST_STRING
@@ -2389,6 +2444,18 @@ struct ToStringHelper< OUStringLiteral >
/**
@internal
*/
+template<char C> struct ToStringHelper<OUStringLiteral1<C>>
+{
+ static int length(OUStringLiteral1<C>) { return 1; }
+ static sal_Unicode * addData(sal_Unicode * buffer, OUStringLiteral1<C>)
+ { *buffer++ = C; return buffer; }
+ static const bool allowOStringConcat = false;
+ static const bool allowOUStringConcat = true;
+};
+
+/**
+ @internal
+*/
template< typename charT, typename traits, typename T1, typename T2 >
inline std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, const OUStringConcat< T1, T2 >& concat)
@@ -2511,6 +2578,9 @@ using ::rtl::OUStringHash;
using ::rtl::OStringToOUString;
using ::rtl::OUStringToOString;
using ::rtl::OUStringLiteral;
+#if defined RTL_FAST_STRING
+using ::rtl::OUStringLiteral1;
+#endif
#endif
#endif /* _RTL_USTRING_HXX */
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 2f66dd8d15b0..cde93636194f 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -126,9 +126,9 @@ void LangGuess_Impl::EnsureInitialized()
OUString aURL( SvtPathOptions().GetFingerprintPath() );
utl::LocalFileHelper::ConvertURLToPhysicalName( aURL, aPhysPath );
#ifdef WNT
- aPhysPath = aPhysPath + OUString(static_cast<sal_Unicode>('\\'));
+ aPhysPath += "\\";
#else
- aPhysPath = aPhysPath + OUString(static_cast<sal_Unicode>('/'));
+ aPhysPath += "/";
#endif
SetFingerPrintsDB( aPhysPath );
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index 0aeba99d7ca0..79863f56d1c4 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -122,7 +122,7 @@ Reference< XFormattedString > TextConverter::appendFormattedString(
try
{
xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
- xFmtStr->setString( bAddNewLine ? (rString + OUString( '\n' )) : rString );
+ xFmtStr->setString( bAddNewLine ? (rString + "\n") : rString );
orStringVec.push_back( xFmtStr );
}
catch( Exception& )
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 556b685ab5c4..404bd9f5d07c 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1877,7 +1877,7 @@ OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUS
aFileName = aFileName.replace( *pcChar, '_' );
// build full path
- return rSysOutPath + OUString( '/' ) + aFileName;
+ return rSysOutPath + "/" + aFileName;
}
void StorageObjectBase::extractStream( StorageBase& rStrg, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 8efc05bf952c..08eab4cb15e7 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -536,9 +536,9 @@ void ControlConverter::convertToAxState( PropertySet& rPropSet,
rValue.clear(); // empty e.g. 'don't know'
if ( nState == API_STATE_UNCHECKED )
- rValue = OUString('0');
+ rValue = "0";
else if ( nState == API_STATE_CHECKED )
- rValue = OUString('1');
+ rValue = "1";
// tristate
if( bSupportsTriState && rPropSet.getProperty( bTmp, PROP_TriState ) )
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 192eeb5ae63b..0693fc2a3e08 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -31,6 +31,7 @@ private:
void checkExtraIntArgument();
void checkNonconstChar();
void checkBuffer();
+ void checkOUStringLiteral1();
void testcall( const char str[] );
@@ -40,6 +41,7 @@ CPPUNIT_TEST(checkUsage);
CPPUNIT_TEST(checkExtraIntArgument);
CPPUNIT_TEST(checkNonconstChar);
CPPUNIT_TEST(checkBuffer);
+CPPUNIT_TEST(checkOUStringLiteral1);
CPPUNIT_TEST_SUITE_END();
};
@@ -170,6 +172,28 @@ void test::oustring::StringLiterals::checkBuffer()
CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUStringBuffer( d ))));
}
+void test::oustring::StringLiterals::checkOUStringLiteral1()
+{
+ rtl::OUString s1;
+ s1 = rtlunittest::OUStringLiteral1<'A'>();
+ CPPUNIT_ASSERT_EQUAL(1, s1.getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), s1[0]);
+
+ CPPUNIT_ASSERT_EQUAL(
+ true, rtl::OUString("A") == rtlunittest::OUStringLiteral1<'A'>());
+ CPPUNIT_ASSERT_EQUAL(
+ false, rtl::OUString("AB") == rtlunittest::OUStringLiteral1<'A'>());
+ CPPUNIT_ASSERT_EQUAL(
+ false, rtl::OUString("A") != rtlunittest::OUStringLiteral1<'A'>());
+ CPPUNIT_ASSERT_EQUAL(
+ true, rtl::OUString("AB") != rtlunittest::OUStringLiteral1<'A'>());
+
+ rtl::OUString s2("A" + rtlunittest::OUStringLiteral1<'b'>());
+ CPPUNIT_ASSERT_EQUAL(2, s2.getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode('A'), s2[0]);
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode('b'), s2[1]);
+}
+
}} // namespace
CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::StringLiterals);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 53d327fa2684..685dbefe77eb 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3261,7 +3261,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
}
else if ( c1 != cQuote && c2 == cQuote )
{ // ..."
- aCorrectedSymbol = OUString(cQuote) + aCorrectedSymbol;
+ aCorrectedSymbol = OUStringLiteral1<cQuote>() + aCorrectedSymbol;
bCorrected = true;
}
else if ( nPos == 0 && (c1 == cx || c1 == cX) )
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 305067872e7a..55b06ab93518 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1122,7 +1122,7 @@ void XclExpChFrLabelProps::Convert( const ScfPropertySet& rPropSet, bool bShowSe
// label value separator
maData.maSeparator = rPropSet.GetStringProperty( EXC_CHPROP_LABELSEPARATOR );
if( maData.maSeparator.isEmpty() )
- maData.maSeparator = OUString(' ');
+ maData.maSeparator = " ";
}
void XclExpChFrLabelProps::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index bd34008f0967..a347dceb4caf 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1441,7 +1441,7 @@ XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, const OUString& r
XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET )
{
// reference to own sheet: \03<sheetname>
- Init(OUString(EXC_EXTSH_TABNAME) + rTabName);
+ Init(OUStringLiteral1<EXC_EXTSH_TABNAME>() + rTabName);
}
void XclExpExternSheet::Save( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 4a1ef2096b94..4a96220bb198 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -99,7 +99,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
if( (GetBiff() == EXC_BIFF5) && (maXclName == XclTools::GetXclBuiltInDefName(EXC_BUILTIN_FILTERDATABASE)) )
{
bBuiltIn = true;
- maXclName = OUString(EXC_BUILTIN_FILTERDATABASE);
+ maXclName = OUStringLiteral1<EXC_BUILTIN_FILTERDATABASE>();
}
// convert Excel name to Calc name
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 3768613a3a08..642ddec429a6 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2934,7 +2934,7 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException, std
if( Text.hasValue() && !(Text >>= aNoteText) )
throw uno::RuntimeException();
if( aNoteText.isEmpty() )
- aNoteText = OUString( ' ' );
+ aNoteText = " ";
// try to create a new annotation
table::CellRangeAddress aRangePos = lclGetRangeAddress( mxRange );
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7cc8f2ab0a92..7eb45c7056cf 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2216,7 +2216,7 @@ void ScViewData::WriteUserData(OUString& rData)
( maTabData[i]->eVSplitMode == SC_SPLIT_FIX &&
maTabData[i]->nFixPosY > MAXROW_30 ) )
{
- cTabSep = OUString(SC_NEW_TABSEP); // in order to not kill a 3.1-version
+ cTabSep = OUStringLiteral1<SC_NEW_TABSEP>(); // in order to not kill a 3.1-version
}
rData += OUString::number( maTabData[i]->nCurX ) + cTabSep +
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 995a7566b905..405fb72a828f 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -106,7 +106,7 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo
{
if ( eTranslateMode & TRANSLATE_VALUE )
{
- rString = OUString( (sal_Unicode)'#' );
+ rString = "#";
rString += OUString::createFromAscii( p->mpMSName );
}
else
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 632ed078249d..15dbfe6c3179 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -543,7 +543,7 @@ void SdTpOptionsMisc::SetDrawMode()
OUString SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
- return OUString::number(nX) + OUString(TOKEN) + OUString::number(nY);
+ return OUString::number(nX) + OUStringLiteral1<TOKEN>() + OUString::number(nY);
}
bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY )
diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 78f5bd0bfc41..c06457c38325 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -99,7 +99,7 @@ void ExternalToolEdit::Edit( GraphicObject* pGraphicObject )
osl::FileBase::createTempFile(0, &pHandle, &aTempFileBase);
// Move it to a file name with image extension properly set
- aTempFileName = aTempFileBase + OUString('.') + OUString(fExtension);
+ aTempFileName = aTempFileBase + "." + OUString(fExtension);
osl::File::move(aTempFileBase, aTempFileName);
//Write Graphic to the Temp File
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index e1de0209d6f4..f1232ccb4662 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -402,7 +402,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAAA CCCCC " + OUString(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAAA CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
sViewText);
}
@@ -413,7 +413,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEDELETIONS);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
- OUString("AAAABB " + OUString(CH_TXTATR_BREAKWORD) + " CCCCC " + OUString(CH_TXTATR_BREAKWORD) + " DDDDD"),
+ OUString("AAAABB " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
sViewText);
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index e3d7ebf92853..1410cac9a320 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -936,8 +936,7 @@ CHECK_ROMAN_5:
{
eScan |= CHG;
if( pPrefix )
- *pPrefix += OUString((sal_Unicode)1)
- + OUString::number( nStart );
+ *pPrefix += "\x01" + OUString::number( nStart );
}
eScan &= ~NO_DELIM; // remove Delim
eScan |= DELIM; // add Digit
@@ -954,7 +953,7 @@ CHECK_ROMAN_5:
return USHRT_MAX;
if( (NO_DELIM & eScan) && pPrefix ) // do not forget the last one
- *pPrefix += OUString((sal_Unicode)1) + OUString::number( nStart );
+ *pPrefix += "\x01" + OUString::number( nStart );
rPos = nPos;
return nDigitLvl; // 0 .. 9 (MAXLEVEL - 1)
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 247a9391af84..ad34b2d179a5 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -856,12 +856,12 @@ static OUString lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
const OUString sCpy = sTmp; //JP 01.11.95: add rest from box name
- sTmp = OUString(cRelIdentifier) + OUString::number( nBox )
- + OUString(cRelSeparator) + OUString::number( nLine );
+ sTmp = OUStringLiteral1<cRelIdentifier>() + OUString::number( nBox )
+ + OUStringLiteral1<cRelSeparator>() + OUString::number( nLine );
if (!sCpy.isEmpty())
{
- sTmp += OUString(cRelSeparator) + sCpy;
+ sTmp += OUStringLiteral1<cRelSeparator>() + sCpy;
}
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index eca0e539ff62..fb724d29bcdf 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -474,7 +474,7 @@ OUString SwDBNameInfField::GetFieldName() const
OUString sStr( SwField::GetFieldName() );
if (!aDBData.sDataSource.isEmpty())
{
- sStr += OUString(':')
+ sStr += ":"
+ aDBData.sDataSource
+ OUString(DB_DELIM)
+ aDBData.sCommand;
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index ce191fbe4b97..2f2087f00d3b 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -56,7 +56,7 @@ SwTblField::SwTblField( SwTblFieldType* pInitType, const OUString& rFormel,
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
nSubType(nType)
{
- sExpand = OUString('0');
+ sExpand = "0";
}
SwField* SwTblField::Copy() const
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 35ab82331489..cef2cee83c70 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2275,7 +2275,7 @@ bool SwFEShell::GetAutoSum( OUString& rFml ) const
GetTabBox()->GetFrmFmt()->GetTblBoxFormula(), aCells ))
break;
else if( USHRT_MAX != nBoxW )
- sFields = OUString(cListDelim) + sFields;
+ sFields = OUStringLiteral1<cListDelim>() + sFields;
else
break;
}
@@ -2300,7 +2300,7 @@ bool SwFEShell::GetAutoSum( OUString& rFml ) const
}
}
else
- sFields = OUString(cListDelim) + sFields;
+ sFields = OUStringLiteral1<cListDelim>() + sFields;
}
else if( USHRT_MAX == nBoxW )
break;
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index f3518494e017..50f23702c46a 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -232,7 +232,7 @@ bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
bool SwPostItsPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsPostIts() )
- rTxt = OUString(' ');
+ rTxt = " ";
else
rTxt.clear();
return true;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 7b9a73702d1d..2db653d07a21 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -438,7 +438,7 @@ bool SwFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() &&
SwViewOption::IsFieldShadings() &&
!HasFollow() )
- rTxt = OUString(' ');
+ rTxt = " ";
return true;
}
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 3e13274be437..146ce53b974c 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -626,9 +626,9 @@ OUString SwFormToken::GetString() const
+ OUString::number( nOutlineLevel );
break;
case TOKEN_TEXT:
- sData += OUString(TOX_STYLE_DELIMITER)
+ sData += OUStringLiteral1<TOX_STYLE_DELIMITER>()
+ sText.replaceAll(OUString(TOX_STYLE_DELIMITER), OUString())
- + OUString(TOX_STYLE_DELIMITER);
+ + OUStringLiteral1<TOX_STYLE_DELIMITER>();
break;
case TOKEN_AUTHORITY:
if (nAuthorityField<10)
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 9dd601411c0f..ce75ce98950b 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -586,7 +586,7 @@ OUString SwTOXPara::GetURL() const
SwFrmFmt* pFly = pNd->GetFlyFmt();
if( pFly )
{
- aTxt = "#" + pFly->GetName() + OUString(cMarkSeparator);
+ aTxt = "#" + pFly->GetName() + OUStringLiteral1<cMarkSeparator>();
const sal_Char* pStr;
switch( eType )
{
@@ -602,7 +602,7 @@ OUString SwTOXPara::GetURL() const
break;
case nsSwTOXElement::TOX_SEQUENCE:
{
- aTxt = "#" + m_sSequenceName + OUString(cMarkSeparator)
+ aTxt = "#" + m_sSequenceName + OUStringLiteral1<cMarkSeparator>()
+ "sequence";
}
break;
@@ -654,7 +654,7 @@ OUString SwTOXTable::GetURL() const
if ( sName.isEmpty() )
return OUString();
- return "#" + sName + OUString(cMarkSeparator) + "table";
+ return "#" + sName + OUStringLiteral1<cMarkSeparator>() + "table";
}
SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index fdead9ace3fe..07aa27f6bac7 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1171,7 +1171,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark,
if( !rMark.isEmpty() && !aImplicitMarks.empty() )
{
OUString sMark( rMark );
- sMark + OUString(cMarkSeparator) + OUString::createFromAscii(pMarkType);
+ sMark + OUStringLiteral1<cMarkSeparator>() + OUString::createFromAscii(pMarkType);
if( 0 != aImplicitMarks.erase( sMark ) )
{
OutAnchor(sMark.replace('?', '_')); // '?' causes problems in IE/Netscape 5
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 12339906c9a0..4bcd6225b31f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2234,7 +2234,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
{
// Insert tab for aesthetic purposes #i24762#
if ( aSnippet[0] != 0x09 )
- aSnippet = OUString( 0x09 ) + aSnippet;
+ aSnippet = "\x09" + aSnippet;
}
if ( bPostponeWritingText && ( FLY_POSTPONED != nStateOfFlyFrame ) )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 94962bc07ad3..7c42b694dc37 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6351,7 +6351,7 @@ bool SwMSDffManager::GetOLEStorageName(long nOLEId, OUString& rStorageName,
if( bRet )
{
- rStorageName = OUString('_');
+ rStorageName = "_";
rStorageName += OUString::number(nPictureId);
rSrcStorage = rReader.pStg->OpenSotStorage(OUString(
SL::aObjectPool));
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 4bbcd590f175..e25749690afc 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -573,7 +573,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
// first delete the existing selection
aStr = aStr.replaceAt( nPos, nSel, "" );
- aFld = OUString(cDBFldStart) + aFld + OUString(cDBFldEnd);
+ aFld = OUStringLiteral1<cDBFldStart>() + aFld + OUStringLiteral1<cDBFldEnd>();
if( !aStr.isEmpty() )
{
if( nPos ) // one blank in front
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 90d09a5476a4..f097f0f89903 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -277,7 +277,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
if( -1 != nEnd )
GetExtraData() = GetExtraData().replaceAt( nStt, nEnd - nStt + 1, "" );
}
- GetExtraData() += sFindNm + sData + OUString(cDialogExtraDataClose);
+ GetExtraData() += sFindNm + sData + OUStringLiteral1<cDialogExtraDataClose>();
}
}
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 94f5b90ed8ae..fbea5bf60151 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -82,7 +82,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
if(pStr)
{
- SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + OUString(')'));
+ SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")");
}
m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 1703860b10d9..8bf0653b43d4 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3536,9 +3536,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
OUString aStr( SW_RES( STR_TITLE ));
if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() )
{
- aStr += " " + OUString(aDeliStart)
+ aStr += " " + OUStringLiteral1<aDeliStart>()
+ m_pCurrentForm->GetTemplate( 0 )
- + OUString(aDeliEnd);
+ + OUStringLiteral1<aDeliEnd>();
}
m_pLevelLB->InsertEntry(aStr);
@@ -3556,9 +3556,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
}
if( !m_pCurrentForm->GetTemplate( i ).isEmpty() )
{
- aStr += " " + OUString(aDeliStart)
+ aStr += " " + OUStringLiteral1<aDeliStart>()
+ m_pCurrentForm->GetTemplate( i )
- + OUString(aDeliEnd);
+ + OUStringLiteral1<aDeliEnd>();
}
m_pLevelLB->InsertEntry( aStr );
}
@@ -3622,9 +3622,9 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl)
nTemplPos != LISTBOX_ENTRY_NOTFOUND)
{
const OUString aStr(m_pLevelLB->GetEntry(nLevPos).getToken(0, aDeliStart)
- + " " + OUString(aDeliStart)
+ + " " + OUStringLiteral1<aDeliStart>()
+ m_pParaLayLB->GetSelectEntry()
- + OUString(aDeliEnd));
+ + OUStringLiteral1<aDeliEnd>());
m_pCurrentForm->SetTemplate(nLevPos, m_pParaLayLB->GetSelectEntry());
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index e70c697e8013..6e76ef318c5f 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1214,7 +1214,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl)
OUString sFields;
for(int i = 0; i < AUTH_FIELD_END; i++)
{
- sFields += m_sFields[i] + OUString(TOX_STYLE_DELIMITER);
+ sFields += m_sFields[i] + OUStringLiteral1<TOX_STYLE_DELIMITER>();
}
if(bNewEntry)
{
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 6f93bc1e30ae..ca1eff0631ad 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -198,7 +198,7 @@ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl)
{
OUString sGroup = m_pNameED->GetText()
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(m_pPathLB->GetSelectEntryPos());
OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!");
m_InsertedArr.push_back(sGroup);
@@ -274,7 +274,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
const OUString sNewTitle(m_pNameED->GetText());
OUString sNewName = sNewTitle
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(m_pPathLB->GetSelectEntryPos());
OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!");
@@ -293,8 +293,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
}
if(!bDone)
{
- sEntry += OUString(RENAME_TOKEN_DELIM) + sNewName
- + OUString(RENAME_TOKEN_DELIM) + sNewTitle;
+ sEntry += OUStringLiteral1<RENAME_TOKEN_DELIM>() + sNewName
+ + OUStringLiteral1<RENAME_TOKEN_DELIM>() + sNewTitle;
m_RenamedArr.push_back(sEntry);
}
delete (GlosBibUserData*)pEntry->GetUserData();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 2b9a3d536b13..db6123318cb7 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -245,7 +245,7 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
SvTreeListEntry* pParent = pBox->GetParent(pEntry) ? pBox->GetParent(pEntry) : pEntry;
GroupUserData* pGroupData = (GroupUserData*)pParent->GetUserData();
::SetCurrGlosGroup(pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx));
pGlossaryHdl->SetCurGroup(::GetCurrGlosGroup());
// set current text block
@@ -629,7 +629,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
{
GroupUserData* pGroupData = (GroupUserData*)pEntry->GetUserData();
const OUString sGroup = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
if(sGroup == sNewGroup)
{
@@ -901,7 +901,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag(
GroupUserData* pGroupData = (GroupUserData*)pParent->GetUserData();
OUString sEntry = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
sal_Int8 nDragOption = DND_ACTION_COPY;
eRet = SV_DRAGDROP_CTRL_COPY;
@@ -966,7 +966,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData();
OUString sSourceGroup = pGroupData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
pDlg->pGlossaryHdl->SetCurGroup(sSourceGroup);
@@ -975,7 +975,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
GroupUserData* pDestData = (GroupUserData*)pDestParent->GetUserData();
OUString sDestName = pDestData->sGroupName
- + OUString(GLOS_DELIM)
+ + OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pDestData->nPathIdx);
bRet = pDlg->pGlossaryHdl->CopyOrMove( sSourceGroup, sShortName,
@@ -1001,7 +1001,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const
pEntry =
m_pCategoryBox->GetParent(pEntry) ? m_pCategoryBox->GetParent(pEntry) : pEntry;
GroupUserData* pGroupData = (GroupUserData*)pEntry->GetUserData();
- return pGroupData->sGroupName + OUString(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx);
+ return pGroupData->sGroupName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(pGroupData->nPathIdx);
}
return OUString();
}
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 542302e0ccc0..2cec7b34bcbf 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -151,7 +151,7 @@ void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeExcepti
}
case 2:
{
- aBulletChar = OUString( sal_Unicode( CHAR_EMPTY_DOT ) );
+ aBulletChar = OUStringLiteral1<CHAR_EMPTY_DOT>();
break;
}
case 3:
@@ -204,43 +204,43 @@ void SwVbaListHelper::CreateNumberListTemplate() throw( css::uno::RuntimeExcepti
case 1:
{
nNumberingType = style::NumberingType::ARABIC;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ARABIC;
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 4:
{
nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 7:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
default:
@@ -319,56 +319,56 @@ void SwVbaListHelper::CreateOutlineNumberForType1() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ARABIC;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
}
@@ -465,14 +465,14 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 1:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
sal_Int16 nParentNumbering = 0;
setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PARENT_NUMBERING ), uno::makeAny( nParentNumbering ) );
break;
@@ -480,50 +480,50 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce
case 2:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
}
@@ -569,63 +569,63 @@ void SwVbaListHelper::CreateOutlineNumberForType6() throw( css::uno::RuntimeExce
{
nNumberingType = style::NumberingType::ROMAN_UPPER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 1:
{
nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
sPrefix.clear();
- sSuffix = OUString( '.' );
+ sSuffix = ".";
break;
}
case 2:
{
nNumberingType = style::NumberingType::ARABIC;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 3:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
sPrefix.clear();
- sSuffix = OUString( ')' );
+ sSuffix = ")";
break;
}
case 4:
{
nNumberingType = style::NumberingType::ARABIC;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 5:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 6:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( ')' );
+ sPrefix = "(";
+ sSuffix = ")";
break;
}
case 7:
{
nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( '.' );
+ sPrefix = "(";
+ sSuffix = ".";
break;
}
case 8:
{
nNumberingType = style::NumberingType::ROMAN_LOWER;
- sPrefix = OUString( '(' );
- sSuffix = OUString( '.' );
+ sPrefix = "(";
+ sSuffix = ".";
break;
}
}
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index eada932a3124..cf9ae1509940 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -106,7 +106,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre
OUString sGroup(rGrp);
if (sGroup.indexOf(GLOS_DELIM)<0 && !FindGroupName(sGroup))
{
- sGroup += OUString(GLOS_DELIM) + "0";
+ sGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
if(pCurGrp)
{
@@ -204,7 +204,7 @@ bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt
OUString sNewGroup(rNew);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUString(GLOS_DELIM) + "0";
+ sNewGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
bRet = rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle);
rNew = sNewGroup;
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 38bdfc6fe42a..8acbe1e754df 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -188,7 +188,7 @@ bool SwGlossaries::NewGroupDoc(OUString& rGroupName, const OUString& rTitle)
return false;
const OUString sNewFilePath(m_PathArr[nNewPath]);
const OUString sNewGroup = lcl_CheckFileName(sNewFilePath, rGroupName.getToken(0, GLOS_DELIM))
- + OUString(GLOS_DELIM) + sNewPath;
+ + OUStringLiteral1<GLOS_DELIM>() + sNewPath;
SwTextBlocks *pBlock = GetGlosDoc( sNewGroup );
if(pBlock)
{
@@ -236,7 +236,7 @@ bool SwGlossaries::RenameGroupDoc(
RemoveFileFromList( rOldGroup );
- rNewGroup = sNewFileName + OUString(GLOS_DELIM) + OUString::number(nNewPath);
+ rNewGroup = sNewFileName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(nNewPath);
if (m_GlosArr.empty())
{
GetNameList();
@@ -260,7 +260,7 @@ bool SwGlossaries::DelGroupDoc(const OUString &rName)
return false;
const OUString sBaseName(rName.getToken(0, GLOS_DELIM));
const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName);
- const OUString aName = sBaseName + OUString(GLOS_DELIM) + OUString::number(nPath);
+ const OUString aName = sBaseName + OUStringLiteral1<GLOS_DELIM>() + OUString::number(nPath);
// Even if the file doesn't exist it has to be deleted from
// the list of text block regions
// no && because of CFfront
@@ -323,14 +323,14 @@ std::vector<OUString> & SwGlossaries::GetNameList()
{
const OUString aTitle = *filesIt;
const OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() )
- + OUString(GLOS_DELIM) + OUString::number( static_cast<sal_Int16>(i) ));
+ + OUStringLiteral1<GLOS_DELIM>() + OUString::number( static_cast<sal_Int16>(i) ));
m_GlosArr.push_back(sName);
}
}
if (m_GlosArr.empty())
{
// the standard block is inside of the path's first part
- m_GlosArr.push_back( SwGlossaries::GetDefName() + OUString(GLOS_DELIM) + "0" );
+ m_GlosArr.push_back( SwGlossaries::GetDefName() + OUStringLiteral1<GLOS_DELIM>() + "0" );
}
}
return m_GlosArr;
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 02870aaf5851..9b237ffe2c1a 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -197,7 +197,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
OUString sGroup(aGroupName);
if (sGroup.indexOf(GLOS_DELIM)<0)
{
- sGroup += OUString(GLOS_DELIM) + "0";
+ sGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM));
@@ -505,7 +505,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
OUString sNewGroup(rName);
if (sNewGroup.indexOf(GLOS_DELIM)<0)
{
- sNewGroup += OUString(GLOS_DELIM) + "0";
+ sNewGroup += OUStringLiteral1<GLOS_DELIM>() + "0";
}
//the name must be saved, the group may be invalidated while in RenameGroupDoc()
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index ad506f5fcf0b..13f148656ac8 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -290,7 +290,7 @@ void SwGlossaryList::Update()
OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() ));
aFoundGroupNames.push_back(sName);
- sName += OUString(GLOS_DELIM) + OUString::number( static_cast<sal_uInt16>(nPath) );
+ sName += OUStringLiteral1<GLOS_DELIM>() + OUString::number( static_cast<sal_uInt16>(nPath) );
AutoTextGroup* pFound = FindGroup( sName );
if( !pFound )
{
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 93af251b0e9d..96d05e18d391 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -352,7 +352,7 @@ namespace ucb { namespace ucp { namespace ext
OUString sRelativeURL( sURL.copy( sRootURL.getLength() ) );
// cut the extension ID
- const OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + OUString( '/' ) );
+ const OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + "/" );
if ( !sRelativeURL.match( sSeparatedExtensionId ) )
{
SAL_INFO( "ucb.ucp.ext", "illegal URL structure - no extension ID" );
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 048767cfa21a..d439e6051691 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -159,7 +159,7 @@ namespace ucb { namespace ucp { namespace ext
const OUString& rLocalId = (*pExtInfo)[0];
ResultListEntry aEntry;
- aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + OUString( '/' );
+ aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + "/";
m_pImpl->m_aResults.push_back( aEntry );
}
}
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index c318e6f1c70e..afe61b806a8b 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -162,15 +162,15 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp
OUString getGroupPath( const OUString& _rGroup )
{
- return OUString( ROOT_NODE + OUString('/') + _rGroup + OUString('/') );
+ return OUString( ROOT_NODE + "/" + _rGroup + "/" );
}
OUString getPagePath( const OUString& _rPage )
{
- return OUString( PAGES_NODE + OUString('/') + _rPage + OUString('/') );
+ return OUString( PAGES_NODE + "/" + _rPage + "/" );
}
OUString getOptionPath( const OUString& _rOption )
{
- return OUString( OPTIONS_NODE + OUString('/') + _rOption + OUString('/') );
+ return OUString( OPTIONS_NODE + "/" + _rOption + "/" );
}
bool SvtOptionsDlgOptions_Impl::IsHidden( const OUString& _rPath ) const
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index f1f10506501f..1b935050043d 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -81,14 +81,14 @@ namespace DOM
OUString prefix = pNode->getPrefix();
OUString name = (prefix.isEmpty())
? pNode->getLocalName()
- : prefix + OUString(':') + pNode->getLocalName();
+ : prefix + ":" + pNode->getLocalName();
OUString val = pNode->getNodeValue();
pAttrs->AddAttribute(name, type, val);
}
OUString prefix = getPrefix();
OUString name = (prefix.isEmpty())
? getLocalName()
- : prefix + OUString(':') + getLocalName();
+ : prefix + ":" + getLocalName();
Reference< XAttributeList > xAttrList(pAttrs);
i_xHandler->startElement(name, xAttrList);
// recurse
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 6178d5925f30..42080180de6f 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -437,7 +437,7 @@ UUIInteractionHelper::handleRequest_impl(
for ( sal_Int32 index=0; index< sModules.getLength(); ++index )
{
if ( index )
- aName = aName + OUString( ',' ) + sModules[index];
+ aName = aName + "," + sModules[index];
else
aName = sModules[index]; // 1st name
}
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 4800c0506675..c121842cbed9 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -174,7 +174,7 @@ OUString XMLFontAutoStylePool::Add(
}
if( sName.isEmpty() )
- sName = OUString( 'F' );
+ sName = "F";
if( m_aNames.find(sName) != m_aNames.end() )
{
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index 365fd5e2c5c9..fc4cbb455271 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -415,7 +415,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily(
OUString aPrefix( rStrPrefix );
if( bStylesOnly )
{
- aPrefix = OUString( 'M' );
+ aPrefix = "M";
aPrefix += rStrPrefix;
}