[Libreoffice-commits] core.git: 3 commits - basic/source connectivity/source cui/source dbaccess/source extensions/source i18npool/source include/rtl lingucomponent/source oox/source sal/qa sc/source sd/source svx/source sw/qa sw/source ucb/source unotools/source unoxml/source uui/source writerfilter/source xmloff/source

Stephan Bergmann sbergman at redhat.com
Wed Dec 17 08:42:47 PST 2014


 basic/source/classes/sbunoobj.cxx                       |    4 
 connectivity/source/drivers/evoab2/NStatement.cxx       |    2 
 cui/source/dialogs/hlinettp.cxx                         |    2 
 dbaccess/source/ui/control/opendoccontrols.cxx          |    2 
 extensions/source/bibliography/general.cxx              |    2 
 i18npool/source/indexentry/indexentrysupplier_asian.cxx |    2 
 i18npool/source/localedata/LocaleNode.cxx               |    2 
 include/rtl/ustring.hxx                                 |  123 ++++++++++++++--
 lingucomponent/source/languageguessing/guesslang.cxx    |    4 
 oox/source/drawingml/chart/titleconverter.cxx           |    2 
 oox/source/dump/dumperbase.cxx                          |    2 
 oox/source/ole/axcontrol.cxx                            |    4 
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx     |   42 +++++
 sc/source/core/tool/compiler.cxx                        |    2 
 sc/source/filter/excel/xechart.cxx                      |    2 
 sc/source/filter/excel/xelink.cxx                       |    2 
 sc/source/filter/excel/xiname.cxx                       |    2 
 sc/source/ui/vba/vbarange.cxx                           |    2 
 sc/source/ui/view/viewdata.cxx                          |    2 
 sd/source/filter/eppt/pptexanimations.cxx               |    2 
 sd/source/ui/dlg/tpoption.cxx                           |    2 
 svx/source/core/extedit.cxx                             |    2 
 sw/qa/core/uwriter.cxx                                  |    4 
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx               |    7 
 sw/source/core/edit/autofmt.cxx                         |    5 
 sw/source/core/fields/cellfml.cxx                       |    6 
 sw/source/core/fields/dbfld.cxx                         |    2 
 sw/source/core/fields/tblcalc.cxx                       |    2 
 sw/source/core/frmedt/fetab.cxx                         |    4 
 sw/source/core/text/porexp.cxx                          |    2 
 sw/source/core/text/porfld.cxx                          |    2 
 sw/source/core/tox/tox.cxx                              |    4 
 sw/source/core/tox/txmsrt.cxx                           |    6 
 sw/source/filter/html/wrthtml.cxx                       |    2 
 sw/source/filter/ww8/wrtw8nds.cxx                       |    2 
 sw/source/filter/ww8/ww8par.cxx                         |    2 
 sw/source/ui/dbui/dbinsdlg.cxx                          |    2 
 sw/source/ui/dialog/ascfldlg.cxx                        |    2 
 sw/source/ui/frmdlg/frmdlg.cxx                          |    2 
 sw/source/ui/index/cnttab.cxx                           |   12 -
 sw/source/ui/index/swuiidxmrk.cxx                       |    2 
 sw/source/ui/misc/glosbib.cxx                           |    8 -
 sw/source/ui/misc/glossary.cxx                          |   12 -
 sw/source/ui/vba/vbalisthelper.cxx                      |   88 +++++------
 sw/source/uibase/dochdl/gloshdl.cxx                     |    4 
 sw/source/uibase/misc/glosdoc.cxx                       |   10 -
 sw/source/uibase/uno/unoatxt.cxx                        |    4 
 sw/source/uibase/utlui/gloslst.cxx                      |    2 
 ucb/source/ucp/ext/ucpext_content.cxx                   |    2 
 ucb/source/ucp/ext/ucpext_datasupplier.cxx              |    2 
 unotools/source/config/optionsdlg.cxx                   |    6 
 unoxml/source/dom/element.cxx                           |    4 
 uui/source/iahndl.cxx                                   |    2 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx          |    4 
 xmloff/source/style/XMLFontAutoStylePool.cxx            |    2 
 xmloff/source/style/impastpl.cxx                        |    2 
 56 files changed, 287 insertions(+), 146 deletions(-)

New commits:
commit d0ec8c49017b07862f8228c039bebe348eb28b0c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 17 16:37:41 2014 +0100

    rtl::OUStringLiteral to the rescue
    
    ...for cases where ? "a" : "bb" does not work, as well as to work around the
    MSVC bug for cases like ? "a" : "b".
    
    Change-Id: Id404716047aca5cc81440f291616d92365379b8f

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index f14eba8..0d4a715 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -55,6 +55,23 @@ namespace rtl
 
 #if defined RTL_FAST_STRING
 /// @cond INTERNAL
+
+/**
+A simple wrapper around string literal. It is usually not necessary to use, can
+be mostly used to force OUString operator+ working with operands that otherwise would
+not trigger it.
+
+This class is not part of public API and is meant to be used only in LibreOffice code.
+ at since LibreOffice 4.0
+*/
+struct SAL_WARN_UNUSED OUStringLiteral
+{
+    template< int N >
+    OUStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); }
+    int size;
+    const char* data;
+};
+
 /** A simple wrapper around an ASCII character literal, for use in certain
     OUString functions designed for efficient processing of string literals.
 
@@ -65,6 +82,7 @@ template<char C> struct SAL_WARN_UNUSED OUStringLiteral1 {
         static_cast<unsigned char>(C) < 0x80,
         "non-ASCII character in OUStringLiteral1");
 };
+
 /// @endcond
 #endif
 
@@ -232,6 +250,29 @@ public:
     }
 #endif
 
+#ifdef RTL_FAST_STRING
+    /// @cond INTERNAL
+    /**
+      New string from an 8-Bit string literal that is expected to contain only
+      characters in the ASCII set (i.e. first 128 characters).
+
+      This constructor is similar to the "direct template" one, but can be
+      useful in cases where the latter does not work, like in
+
+        OUString(flag ? "a" : "bb")
+
+      written as
+
+        OUString(flag ? OUStringLiteral("a") : OUStringLiteral("bb"))
+
+      @since LibreOffice 4.5
+    */
+    OUString(OUStringLiteral literal): pData(0) {
+        rtl_uString_newFromLiteral(&pData, literal.data, literal.size, 0);
+    }
+    /// @endcond
+#endif
+
     /**
       New string from an 8-Bit character buffer array.
 
@@ -2402,22 +2443,6 @@ template<char C> bool operator !=(
 
 #ifdef RTL_FAST_STRING
 /**
-A simple wrapper around string literal. It is usually not necessary to use, can
-be mostly used to force OUString operator+ working with operands that otherwise would
-not trigger it.
-
-This class is not part of public API and is meant to be used only in LibreOffice code.
- at since LibreOffice 4.0
-*/
-struct SAL_WARN_UNUSED OUStringLiteral
-{
-    template< int N >
-    OUStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); }
-    int size;
-    const char* data;
-};
-
-/**
  @internal
 */
 template<>
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 0693fc2..0848db1 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 checkOUStringLiteral();
     void checkOUStringLiteral1();
 
     void testcall( const char str[] );
@@ -41,6 +42,7 @@ CPPUNIT_TEST(checkUsage);
 CPPUNIT_TEST(checkExtraIntArgument);
 CPPUNIT_TEST(checkNonconstChar);
 CPPUNIT_TEST(checkBuffer);
+CPPUNIT_TEST(checkOUStringLiteral);
 CPPUNIT_TEST(checkOUStringLiteral1);
 CPPUNIT_TEST_SUITE_END();
 };
@@ -172,6 +174,22 @@ void test::oustring::StringLiterals::checkBuffer()
     CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUStringBuffer( d ))));
 }
 
+namespace {
+
+rtl::OUString conditional(bool flag) {
+    return flag
+        ? rtlunittest::OUStringLiteral("a")
+        : rtlunittest::OUStringLiteral("bb");
+}
+
+}
+
+void test::oustring::StringLiterals::checkOUStringLiteral()
+{
+    CPPUNIT_ASSERT(conditional(true) == "a");
+    CPPUNIT_ASSERT(conditional(false) == "bb");
+}
+
 void test::oustring::StringLiterals::checkOUStringLiteral1()
 {
     rtl::OUString s1;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 151daa8..babc266 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5202,8 +5202,8 @@ int RTFDocumentImpl::popState()
             break; // not for nested group
         OUString str(m_aStates.top().pDestinationText->makeStringAndClear());
         // dmapper expects this as a field, so let's fake something...
-        OUString const field = OUString::createFromAscii(
-            (DESTINATION_INDEXENTRY == aState.nDestinationState) ? "XE" : "TC");
+        OUString const field(
+            (DESTINATION_INDEXENTRY == aState.nDestinationState) ? OUStringLiteral("XE") : OUStringLiteral("TC"));
         str = field + " \"" + str.replaceAll("\"", "\\\"") + "\"";
         singleChar(0x13);
         Mapper().utext(reinterpret_cast<sal_uInt8 const*>(str.getStr()), str.getLength());
commit 0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 17 15:47:01 2014 +0100

    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

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 0627a7f..80cbb6e 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 95b2efe..6436af4 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 3b14b94..0230fc0 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 539d9de..72f664e 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 3d2d1bd..07a149e 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 3c25ffa..4cb4d7e 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 681bf47..07f7d10 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 72048b3..f14eba8 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 2f66dd8..cde9363 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 0aeba99..79863f5 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 556b685..404bd9f 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 8efc05b..08eab4c 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 192eeb5..0693fc2 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 53d327f..685dbef 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 3050678..55b06ab 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 bd34008..a347dce 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 4a1ef20..4a96220 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 3768613..642ddec 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 7cc8f2a..7eb45c7 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 995a756..405fb72 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 632ed07..15dbfe6 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 78f5bd0..c06457c 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 e1de020..f1232cc 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 e3d7ebf..1410cac9 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 247a939..ad34b2d 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 eca0e53..fb724d2 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 ce191fb..2f2087f 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 35ab823..cef2cee 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 f351849..50f2370 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 7b9a737..2db653d 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 3e13274..146ce53 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 9dd6014..ce75ce9 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 fdead9a..07aa27f 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 1233990..4bcd622 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 94962bc..7c42b69 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 4bbcd59..e257496 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 90d09a5..f097f0f 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 94f5b90..fbea5bf 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 1703860..8bf0653 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 e70c697..6e76ef3 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 6f93bc1..ca1eff0 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 2b9a3d5..db61233 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 542302e..2cec7b3 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 eada932..cf9ae15 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 38bdfc6..8acbe1e 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 02870aa..9b237ff 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 ad506f5..13f1486 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 93af251..96d05e1 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 048767c..d439e60 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 c318e6f..afe61b8 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 f1f1050..1b93505 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 6178d59..4208018 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 4800c05..c121842 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 365fd5e..fc4cbb4 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;
     }
 
commit 0ba6360363fb73b5b200bbc486ed8eeac5f3d337
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 17 15:34:14 2014 +0100

    Garbage in, garbage out?
    
    Non-ASCII characters (like Unicode "é", represented as two bytes \xC3 \xA9 in
    the UTF-8--encoded source file, and presumably passed trhough unchanged by
    compilers into the resulting string literal object) in the OUString "literal"
    ctor trigger a SAL_WARN_IF in rtl_uString_newFromLiteral, but are copied
    "verbatim" into the resulting OUString, which will thus contain UTF-16 code
    units \x00C3 \x00A9 (if char is unsigned) resp. \xFFC3 \xFFA9 (if char is
    signed).
    
    That assertXPathContent shall indeed match such an odd OUString value looks
    suspiciously like a bug elsewhere, papered over by a broken test.  To be
    investigated.
    
    Change-Id: I07c995ad0e17235c214d7630fb34e8ef35d5ad30

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index e187959..c953ad1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -589,7 +589,12 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, "date-control.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date", "fullDate", "2014-03-05T00:00:00Z");
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:dateFormat", "val", "dddd, dd' de 'MMMM' de 'yyyy");
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:lid", "val", "es-ES");
-    assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "miércoles, 05 de marzo de 2014");
+    static sal_Unicode const Broken[] = {
+        'm', 'i', static_cast<sal_Unicode>('\xC3'),
+        static_cast<sal_Unicode>('\xA9'), 'r', 'c', 'o', 'l', 'e', 's', ',',
+        ' ', '0', '5', ' ', 'd', 'e', ' ', 'm', 'a', 'r', 'z', 'o', ' ', 'd',
+        'e', ' ', '2', '0', '1', '4' };
+    assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", OUString(Broken, SAL_N_ELEMENTS(Broken)));
 
     // check imported control
     uno::Reference<drawing::XControlShape> xControl(getShape(1), uno::UNO_QUERY);


More information about the Libreoffice-commits mailing list