[Libreoffice-commits] .: sc/source sfx2/source svl/inc svl/source svtools/source svx/source xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 2 04:45:47 PDT 2012


 sc/source/core/tool/interpr1.cxx    |    6 
 sc/source/filter/lotus/tool.cxx     |   42 ++--
 sc/source/ui/docshell/docsh8.cxx    |    3 
 sc/source/ui/view/viewfunc.cxx      |    5 
 sfx2/source/view/viewsh.cxx         |    4 
 svl/inc/svl/zforlist.hxx            |   62 +++---
 svl/source/numbers/numfmuno.cxx     |    6 
 svl/source/numbers/zforlist.cxx     |  326 +++++++++++++++++-------------------
 svtools/source/control/fmtfield.cxx |    8 
 svx/source/fmcomp/gridcell.cxx      |  281 ++++++++++++++-----------------
 svx/source/inc/gridcell.hxx         |   94 +++++-----
 svx/source/items/numfmtsh.cxx       |   16 -
 xmloff/source/style/xmlnumfi.cxx    |    3 
 13 files changed, 417 insertions(+), 439 deletions(-)

New commits:
commit 857a26eb173f9e0a2ac550da14812ba80500f114
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 2 10:19:18 2012 +0100

    XubString->OUString
    
    Change-Id: I49d2d41ad4d5ee4ececf5a57eae070898e33075f

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index dfbf8da..db4d30e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7639,8 +7639,7 @@ void ScInterpreter::ScCurrency()
                                         ScGlobal::eLnge);
         if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) )
         {
-            String sFormatString;
-            pFormatter->GenerateFormat(sFormatString,
+            String sFormatString = pFormatter->GenerateFormat(
                                                    nIndex,
                                                    ScGlobal::eLnge,
                                                    true,        // mit Tausenderpunkt
@@ -7728,13 +7727,12 @@ void ScInterpreter::ScFixed()
         else
             fVal = floor(fVal*fFac+0.5)/fFac;
         Color* pColor = NULL;
-        String sFormatString;
         if (fDec < 0.0)
             fDec = 0.0;
         sal_uLong nIndex = pFormatter->GetStandardFormat(
                                             NUMBERFORMAT_NUMBER,
                                             ScGlobal::eLnge);
-        pFormatter->GenerateFormat(sFormatString,
+        String sFormatString = pFormatter->GenerateFormat(
                                                nIndex,
                                                ScGlobal::eLnge,
                                                bThousand,   // mit Tausenderpunkt
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 44bf491..b1b3b2d 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -209,8 +209,6 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
     sal_uInt32      nHandle;
     NfIndexTableOffset eIndexTableOffset = NF_NUMERIC_START;
     sal_Bool        bDefault = false;
-    //void GenerateFormat( aFormString, eType, COUNTRY_SYSTEM, LANGUAGE_SYSTEM,
-    //  sal_Bool bThousand, sal_Bool IsRed, sal_uInt16 nPrecision, sal_uInt16 nAnzLeading );
 
     if( nForm == 0xFF ) // Default-Format?
         nForm = nDefaultFormat;
@@ -226,50 +224,50 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
             //fStandard;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_NUMBER, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             break;
         case 0x01:  // Exponentdarstellung (scientific notation)
             //fExponent;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_SCIENTIFIC, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             break;
         case 0x02:  // Waehrungsdarstellung (currency)
             //fMoney;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_CURRENCY, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             break;
         case 0x03:  // Prozent
             //fPercent;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_PERCENT, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             break;
         case 0x04:  // Komma
             //fStandard;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_NUMBER, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, sal_True, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, sal_True, false, nL, 1);
             break;
         case 0x05:  // frei
             //fStandard;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_NUMBER, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             break;
         case 0x06:  // frei
             //fStandard;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_NUMBER, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             nIndex1 = 0;
             break;
         case 0x07:  // Spezialformat
@@ -279,15 +277,15 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
                     //fStandard;nSt;
                     nIndex1 = pFormTable->GetStandardFormat(
                         NUMBERFORMAT_NUMBER, eLanguage );
-                    pFormTable->GenerateFormat( aFormString, nIndex1,
-                        eLanguage, false, sal_True, nSt, 1 );
+                    aFormString = pFormTable->GenerateFormat(nIndex1,
+                        eLanguage, false, sal_True, nSt, 1);
                     break;
                 case 0x01:  // generelles Format
                     //fStandard;nSt;
                     nIndex1 = pFormTable->GetStandardFormat(
                         NUMBERFORMAT_NUMBER, eLanguage );
-                    pFormTable->GenerateFormat( aFormString, nIndex1,
-                        eLanguage, false, false, nSt, 1 );
+                    aFormString = pFormTable->GenerateFormat(nIndex1,
+                        eLanguage, false, false, nSt, 1);
                     break;
                 case 0x02:  // Datum: Tag, Monat, Jahr
                     //fDate;dfDayMonthYearLong;
@@ -362,8 +360,8 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
             //fStandard;nL;
             nIndex1 = pFormTable->GetStandardFormat(
                 NUMBERFORMAT_NUMBER, eLanguage );
-            pFormTable->GenerateFormat( aFormString, nIndex1,
-                eLanguage, false, false, nL, 1 );
+            aFormString = pFormTable->GenerateFormat(nIndex1,
+                eLanguage, false, false, nL, 1);
             nIndex1 = 0;
             break;
     }
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 63330ba..6453631 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -282,8 +282,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
         pOldEntry->GetFormatSpecialInfo(bThousand, bNegRed, nPrecision, nLeading);
 
         nPrecision = static_cast<sal_uInt16>(rScales[i]);
-        String aNewPicture;
-        pFormatter->GenerateFormat(aNewPicture, nOldFormat, eLang,
+        String aNewPicture = pFormatter->GenerateFormat(nOldFormat, eLang,
                                    bThousand, bNegRed, nPrecision, nLeading);
 
         sal_uInt32 nNewFormat = pFormatter->GetEntryKey(aNewPicture, eLang);
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index f999b52..b302d2b 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2724,9 +2724,8 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
 
     if (!bError)
     {
-        String aNewPicture;
-        pFormatter->GenerateFormat( aNewPicture, nOldFormat, eLanguage,
-                                    bThousand, bNegRed, nPrecision, nLeading );
+        String aNewPicture = pFormatter->GenerateFormat(nOldFormat, eLanguage,
+                                    bThousand, bNegRed, nPrecision, nLeading);
 
         nNewFormat = pFormatter->GetEntryKey( aNewPicture, eLanguage );
         if ( nNewFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 2b1c8fa..c61e300 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -499,8 +499,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                                 for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem )
                                 {
                                     sal_uInt16 nItemId = pTextToolbox->GetItemId( nItem );
-                                    const XubString& rCommand = pTextToolbox->GetItemCommand( nItemId );
-                                    if( rCommand.EqualsAscii( ".uno:StyleApply" ) )
+                                    const OUString& rCommand = pTextToolbox->GetItemCommand( nItemId );
+                                    if (rCommand == ".uno:StyleApply")
                                     {
                                         Window* pItemWin = pTextToolbox->GetItemWindow( nItemId );
                                         if( pItemWin )
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 0d82c0f..5a86329 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -20,14 +20,16 @@
 #define _ZFORLIST_HXX
 
 #include "svl/svldllapi.h"
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
 #include <tools/string.hxx>
 #include <i18npool/lang.h>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/i18n/NumberFormatCode.hpp>
 #include <unotools/localedatawrapper.hxx>
-#include <svl/ondemand.hxx>
 #include <tools/link.hxx>
+#include <svl/ondemand.hxx>
 #include <svl/nfkeytab.hxx>
 
 #include <map>
@@ -50,10 +52,6 @@ namespace com { namespace sun { namespace star {
     }
 }}}
 
-namespace rtl {
-    class OUString;
-}
-
 #define SV_COUNTRY_LANGUAGE_OFFSET  5000    // Max count of formats per country/language
 #define SV_MAX_ANZ_STANDARD_FORMATE  100    // Max count of builtin default formats per CL
 
@@ -273,25 +271,25 @@ public:
     OUString            BuildSymbolString(bool bBank,
                             bool bWithoutExtension = false) const;
 
-                        /** #,##0.00 [$DM-407] is assigned to rStr, separators
+                        /** #,##0.00 [$DM-407] is returned, separators
                               from rLoc,    incl. minus sign but without [RED] */
-    void                BuildPositiveFormatString( String& rStr, bool bBank,
-                            const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
-    void                BuildNegativeFormatString( String& rStr, bool bBank,
-                            const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
+    OUString            BuildPositiveFormatString(bool bBank,
+                            const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1) const;
+    OUString            BuildNegativeFormatString(bool bBank,
+                            const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1) const;
 
                         /** [$DM-407] (or [$DEM] if bBank==true)
                             is appended/prepended to rStr, incl. minus sign */
-    void                CompletePositiveFormatString( String& rStr, bool bBank,
-                            sal_uInt16 nPosiFormat ) const;
-    void                CompleteNegativeFormatString( String& rStr, bool bBank,
-                            sal_uInt16 nNegaFormat ) const;
+    void                CompletePositiveFormatString(OUStringBuffer& rStr, bool bBank,
+                            sal_uInt16 nPosiFormat) const;
+    void                CompleteNegativeFormatString(OUStringBuffer& rStr, bool bBank,
+                            sal_uInt16 nNegaFormat) const;
 
                         /// rSymStr is appended/prepended to rStr, incl. minus sign
-    static  void        CompletePositiveFormatString( String& rStr,
-                            const String& rSymStr, sal_uInt16 nPosiFormat );
-    static  void        CompleteNegativeFormatString( String& rStr,
-                            const String& rSymStr, sal_uInt16 nNegaFormat );
+    static  void        CompletePositiveFormatString(OUStringBuffer& rStr,
+                            const String& rSymStr, sal_uInt16 nPosiFormat);
+    static  void        CompleteNegativeFormatString(OUStringBuffer& rStr,
+                            const String& rSymStr, sal_uInt16 nNegaFormat);
 
                         /** Representation of a currency (symbol position and
                              negative sign) in other language settings */
@@ -309,7 +307,7 @@ public:
 
 typedef boost::ptr_vector<NfCurrencyEntry> NfCurrencyTable;
 
-typedef std::vector< ::rtl::OUString > NfWSStringsDtor;
+typedef std::vector< OUString > NfWSStringsDtor;
 
 class SvNumberFormatterRegistry_Impl;
 
@@ -397,7 +395,7 @@ public:
     bool PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
                   LanguageType eLnge = LANGUAGE_DONTKNOW );
 
-    bool PutEntry( rtl::OUString& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
+    bool PutEntry( OUString& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
                   LanguageType eLnge = LANGUAGE_DONTKNOW );
 
     /** Same as <method>PutEntry</method> but the format code string is
@@ -407,7 +405,7 @@ public:
                              short& nType, sal_uInt32& nKey,
                              LanguageType eLnge, LanguageType eNewLnge );
 
-    bool PutandConvertEntry( rtl::OUString& rString, xub_StrLen& nCheckPos,
+    bool PutandConvertEntry( OUString& rString, xub_StrLen& nCheckPos,
                              short& nType, sal_uInt32& nKey,
                              LanguageType eLnge, LanguageType eNewLnge );
 
@@ -463,10 +461,10 @@ public:
 
     /** Create a format code string using format nIndex as a template and
         applying other settings (passed from the dialog) */
-    void GenerateFormat( String& sString, sal_uInt32 nIndex,
-                        LanguageType eLnge = LANGUAGE_DONTKNOW,
-                        bool bThousand = false, bool IsRed = false,
-                        sal_uInt16 nPrecision = 0, sal_uInt16 nAnzLeading = 1 );
+    OUString GenerateFormat(sal_uInt32 nIndex,
+                            LanguageType eLnge = LANGUAGE_DONTKNOW,
+                            bool bThousand = false, bool IsRed = false,
+                            sal_uInt16 nPrecision = 0, sal_uInt16 nAnzLeading = 1);
 
     /** Analyze an input string
         @return
@@ -483,7 +481,7 @@ public:
 
     /// Format a number according to a format index, return string and color
     void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,
-                          rtl::OUString& sOutString, Color** ppColor, bool bUseStarFormat = false );
+                          OUString& sOutString, Color** ppColor, bool bUseStarFormat = false );
 
     /** Format a string according to a format index, return string and color.
         Formats only if the format code is of type text or the 4th subcode
@@ -495,8 +493,8 @@ public:
     /** Format a string according to a format index, return string and color.
         Formats only if the format code is of type text or the 4th subcode
         of a format code is specified, otherwise sOutString will be == "" */
-    void GetOutputString( rtl::OUString& sString, sal_uInt32 nFIndex,
-                          rtl::OUString& sOutString, Color** ppColor, bool bUseStarFormat = false );
+    void GetOutputString( OUString& sString, sal_uInt32 nFIndex,
+                          OUString& sOutString, Color** ppColor, bool bUseStarFormat = false );
 
     /** Format a number according to the standard default format matching
         the given format index */
@@ -504,7 +502,7 @@ public:
                              sal_uInt32 nFIndex, String& sOutString );
 
     void GetInputLineString( const double& fOutNumber,
-                             sal_uInt32 nFIndex, rtl::OUString& rOutString );
+                             sal_uInt32 nFIndex, OUString& rOutString );
 
     /** Format a number according to a format code string to be scanned.
         @return
@@ -878,9 +876,9 @@ private:
     SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, bool bNoAdditionalFormats = false );
 
     // Build negative currency format, old compatibility style
-    SVL_DLLPRIVATE void ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol );
+    SVL_DLLPRIVATE void ImpGetNegCurrFormat(OUStringBuffer& sNegStr, const OUString& rCurrSymbol);
     // Build positive currency format, old compatibility style
-    SVL_DLLPRIVATE void ImpGetPosCurrFormat( String& sPosStr, const String& rCurrSymbol );
+    SVL_DLLPRIVATE void ImpGetPosCurrFormat(OUStringBuffer& sPosStr, const OUString& rCurrSymbol);
 
     // Create <type>theCurrencyTable</type> with all <type>NfCurrencyEntry</type>
     SVL_DLLPRIVATE static void ImpInitCurrencyTable();
@@ -978,7 +976,7 @@ public:
 
     // return corresponding Transliteration wrapper with loadModuleByImplName()
     inline const ::utl::TransliterationWrapper* GetTransliterationForModule(
-            const String& rModule, LanguageType eLang ) const
+            const OUString& rModule, LanguageType eLang ) const
                 { return xTransliteration.getForModule( rModule, eLang ); }
 
     // return the corresponding CharacterClassification wrapper
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index e712255..461ff8b 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -566,19 +566,19 @@ void SAL_CALL SvNumberFormatsObj::removeByKey( sal_Int32 nKey ) throw(uno::Runti
     }
 }
 
-rtl::OUString SAL_CALL SvNumberFormatsObj::generateFormat( sal_Int32 nBaseKey,
+OUString SAL_CALL SvNumberFormatsObj::generateFormat( sal_Int32 nBaseKey,
                                     const lang::Locale& nLocale, sal_Bool bThousands,
                                     sal_Bool bRed, sal_Int16 nDecimals, sal_Int16 nLeading )
                             throw(uno::RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    String aRet;
+    OUString aRet;
     SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
     if (pFormatter)
     {
         LanguageType eLang = lcl_GetLanguage( nLocale );
-        pFormatter->GenerateFormat( aRet, nBaseKey, eLang, bThousands, bRed, nDecimals, nLeading );
+        aRet = pFormatter->GenerateFormat(nBaseKey, eLang, bThousands, bRed, nDecimals, nLeading);
     }
     else
         throw uno::RuntimeException();
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index cdc689a..22872d1 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <comphelper/string.hxx>
 #include <tools/debug.hxx>
 #include <unotools/charclass.hxx>
 #include <i18npool/mslangid.hxx>
@@ -54,9 +55,6 @@ using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::lang;
 using namespace ::std;
 
-using ::rtl::OUString;
-
-
 // Constants for type offsets per Country/Language (CL)
 #define ZF_STANDARD              0
 #define ZF_STANDARD_PERCENT     10
@@ -535,7 +533,7 @@ bool SvNumberFormatter::PutEntry(
     OUString& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
     LanguageType eLnge)
 {
-    // Wrapper to allow rtl::OUString to be used.
+    // Wrapper to allow OUString to be used.
     String aStr(rString);
     bool bRet = PutEntry(aStr, nCheckPos, nType, nKey, eLnge);
     rString = aStr;
@@ -559,7 +557,7 @@ bool SvNumberFormatter::PutandConvertEntry(String& rString,
     return bRes;
 }
 
-bool SvNumberFormatter::PutandConvertEntry(rtl::OUString& rString,
+bool SvNumberFormatter::PutandConvertEntry(OUString& rString,
                                            xub_StrLen& nCheckPos,
                                            short& nType,
                                            sal_uInt32& nKey,
@@ -925,7 +923,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
             if ( aLoadedLocale.Language != aLocale.Language ||
                     aLoadedLocale.Country != aLocale.Country )
             {
-                rtl::OUString aMsg("SvNumerFormatter::ImpGenerateCL: locales don't match:");
+                OUString aMsg("SvNumerFormatter::ImpGenerateCL: locales don't match:");
                 LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg ));
             }
             // test XML locale data FormatElement entries
@@ -939,25 +937,25 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
                 for ( sal_Int32 j = 0; j < xSeq.getLength(); j++ )
                 {
                     sal_Int16 nIdx = xSeq[j].formatIndex;
-                    rtl::OUString aDupes;
+                    OUString aDupes;
                     for ( sal_Int32 i = 0; i < xSeq.getLength(); i++ )
                     {
                         if ( i != j && xSeq[i].formatIndex == nIdx )
                         {
-                            aDupes += rtl::OUString::valueOf( i );
+                            aDupes += OUString::valueOf( i );
                             aDupes += "(";
-                            aDupes += rtl::OUString( xSeq[i].formatKey );
+                            aDupes += OUString( xSeq[i].formatKey );
                             aDupes += ") ";
                         }
                     }
                     if ( !aDupes.isEmpty() )
                     {
-                        rtl::OUString aMsg("XML locale data FormatElement formatindex dupe: ");
-                        aMsg += rtl::OUString::valueOf( sal_Int32(nIdx) );
+                        OUString aMsg("XML locale data FormatElement formatindex dupe: ");
+                        aMsg += OUString::valueOf( sal_Int32(nIdx) );
                         aMsg += "\nFormatElements: ";
-                        aMsg += rtl::OUString::valueOf( j );
+                        aMsg += OUString::valueOf( j );
                         aMsg += "(";
-                        aMsg += rtl::OUString( xSeq[j].formatKey );
+                        aMsg += OUString( xSeq[j].formatKey );
                         aMsg += ") ";
                         aMsg += aDupes;
                         LocaleDataWrapper::outputCheckMessage(
@@ -1322,7 +1320,7 @@ sal_uInt32 SvNumberFormatter::GetEditFormat( double fNumber, sal_uInt32 nFIndex,
     switch ( eType )
     {   // #61619# always edit using 4-digit year
         case NUMBERFORMAT_DATE :
-            if (::rtl::math::approxFloor( fNumber) != fNumber)
+            if (rtl::math::approxFloor( fNumber) != fNumber)
                 nKey = GetFormatIndex( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, eLang );
                 // fdo#34977 preserve time when editing even if only date was
                 // displayed.
@@ -1414,7 +1412,7 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
 
 void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
                                            sal_uInt32 nFIndex,
-                                           rtl::OUString& rOutString)
+                                           OUString& rOutString)
 {
     String aTmp;
     GetInputLineString(fOutNumber, nFIndex, aTmp);
@@ -1470,13 +1468,13 @@ void SvNumberFormatter::GetOutputString(String& sString,
 
 void SvNumberFormatter::GetOutputString(const double& fOutNumber,
                                         sal_uInt32 nFIndex,
-                                        rtl::OUString& sOutString,
+                                        OUString& sOutString,
                                         Color** ppColor,
                                         bool bUseStarFormat )
 {
     if (bNoZero && fOutNumber == 0.0)
     {
-        sOutString = rtl::OUString();
+        sOutString = OUString();
         return;
     }
     SvNumberformat* pFormat = GetFormatEntry( nFIndex );
@@ -1492,9 +1490,9 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber,
     sOutString = aOutString;
 }
 
-void SvNumberFormatter::GetOutputString(rtl::OUString& sString,
+void SvNumberFormatter::GetOutputString(OUString& sString,
                                         sal_uInt32 nFIndex,
-                                        rtl::OUString& sOutString,
+                                        OUString& sOutString,
                                         Color** ppColor,
                                         bool bUseStarFormat )
 {
@@ -1760,8 +1758,8 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
             if (LocaleDataWrapper::areChecksEnabled() &&
                     rCode.Index != NF_CURRENCY_1000DEC2_CCC )
             {
-                rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index ");
-                aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) );
+                OUString aMsg("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index ");
+                aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
                 aMsg += ":\n";
                 aMsg += rCode.Code;
                 LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
@@ -1778,8 +1776,8 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
     {
         if (LocaleDataWrapper::areChecksEnabled())
         {
-            rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: bad format code, index " );
-            aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) );
+            OUString aMsg( "SvNumberFormatter::ImpInsertFormat: bad format code, index " );
+            aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
             aMsg += "\n";
             aMsg += rCode.Code;
             LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
@@ -1808,8 +1806,8 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
                         break;
                     default:
                     {
-                        rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: dup format code, index ");
-                        aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) );
+                        OUString aMsg("SvNumberFormatter::ImpInsertFormat: dup format code, index ");
+                        aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
                         aMsg += "\n";
                         aMsg += rCode.Code;
                         LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
@@ -1823,8 +1821,8 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
         {
             if (LocaleDataWrapper::areChecksEnabled())
             {
-                rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: too many format codes, index ");
-                aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) );
+                OUString aMsg( "SvNumberFormatter::ImpInsertFormat: too many format codes, index ");
+                aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
                 aMsg += "\n";
                 aMsg +=  rCode.Code;
                 LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
@@ -1837,10 +1835,10 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
     {
         if (LocaleDataWrapper::areChecksEnabled())
         {
-            rtl::OUString aMsg( "ImpInsertFormat: can't insert number format key pos: ");
-            aMsg += rtl::OUString::valueOf( sal_Int32( nPos ) );
+            OUString aMsg( "ImpInsertFormat: can't insert number format key pos: ");
+            aMsg += OUString::valueOf( sal_Int32( nPos ) );
             aMsg += ", code index ";
-            aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) );
+            aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
             aMsg += "\n";
             aMsg += rCode.Code;
             LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
@@ -1974,8 +1972,8 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
                 || nTabOff == NF_CURRENCY_1000INT_RED
                 || nTabOff == NF_CURRENCY_1000DEC2_CCC))
     {   // currency entries with decimals might not exist, e.g. Italian Lira
-        rtl::OUString aMsg( "SvNumberFormatter::ImpGetFormatCodeIndex: not found: " );
-        aMsg += rtl::OUString::valueOf( sal_Int32( nTabOff ) );
+        OUString aMsg( "SvNumberFormatter::ImpGetFormatCodeIndex: not found: " );
+        aMsg += OUString::valueOf( sal_Int32( nTabOff ) );
         LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo(aMsg));
     }
     if ( nLen )
@@ -2009,7 +2007,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
     {   // we need at least _some_ format
         rSeq.realloc(1);
         rSeq[0] = ::com::sun::star::i18n::NumberFormatCode();
-        rSeq[0].Code = rtl::OUStringBuffer().
+        rSeq[0].Code = OUStringBuffer().
             append('0').
             append(GetNumDecimalSep()).
             appendAscii(RTL_CONSTASCII_STRINGPARAM("############")).
@@ -2030,7 +2028,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
     if (bCheckCorrectness && LocaleDataWrapper::areChecksEnabled())
     {
         // check the locale data for correctness
-        rtl::OStringBuffer aMsg;
+        OStringBuffer aMsg;
         sal_Int32 nElem, nShort, nMedium, nLong, nShortDef, nMediumDef, nLongDef;
         nShort = nMedium = nLong = nShortDef = nMediumDef = nLongDef = -1;
         for ( nElem = 0; nElem < nCnt; nElem++ )
@@ -2075,7 +2073,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
                 aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM("SvNumberFormatter::ImpAdjustFormatCodeDefault: "));
                 aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nXML locale data FormatElement formatindex: "));
                 aMsg.append(static_cast<sal_Int32>(pFormatArr[nElem].Index));
-                rtl::OUString aUMsg(rtl::OStringToOUString(aMsg.makeStringAndClear(),
+                OUString aUMsg(OStringToOUString(aMsg.makeStringAndClear(),
                     RTL_TEXTENCODING_ASCII_US));
                 LocaleDataWrapper::outputCheckMessage(xLocaleData->appendLocaleInfo(aUMsg));
             }
@@ -2090,7 +2088,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
         {
             aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM("SvNumberFormatter::ImpAdjustFormatCodeDefault: "));
             aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nXML locale data FormatElement group of: "));
-            rtl::OUString aUMsg(rtl::OStringToOUString(aMsg.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US));
+            OUString aUMsg(OStringToOUString(aMsg.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US));
             LocaleDataWrapper::outputCheckMessage(
                 xLocaleData->appendLocaleInfo(aUMsg + pFormatArr[0].NameID));
         }
@@ -2659,32 +2657,30 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
 }
 
 
-void SvNumberFormatter::ImpGetPosCurrFormat( String& sPosStr, const String& rCurrSymbol )
+void SvNumberFormatter::ImpGetPosCurrFormat(OUStringBuffer& sPosStr, const OUString& rCurrSymbol)
 {
     NfCurrencyEntry::CompletePositiveFormatString( sPosStr,
         rCurrSymbol, xLocaleData->getCurrPositiveFormat() );
 }
 
-void SvNumberFormatter::ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol )
+void SvNumberFormatter::ImpGetNegCurrFormat(OUStringBuffer& sNegStr, const OUString& rCurrSymbol)
 {
     NfCurrencyEntry::CompleteNegativeFormatString( sNegStr,
         rCurrSymbol, xLocaleData->getCurrNegativeFormat() );
 }
 
-void SvNumberFormatter::GenerateFormat(String& sString,
-                                       sal_uInt32 nIndex,
-                                       LanguageType eLnge,
-                                       bool bThousand,
-                                       bool IsRed,
-                                       sal_uInt16 nPrecision,
-                                       sal_uInt16 nAnzLeading)
+OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
+                                           LanguageType eLnge,
+                                           bool bThousand,
+                                           bool IsRed,
+                                           sal_uInt16 nPrecision,
+                                           sal_uInt16 nAnzLeading)
 {
     if (eLnge == LANGUAGE_DONTKNOW)
         eLnge = IniLnge;
     short eType = GetType(nIndex);
     sal_uInt16 i;
     ImpGenerateCL(eLnge);           // create new standard formats if necessary
-    sString.Erase();
 
     utl::DigitGroupingIterator aGrouping( xLocaleData->getDigitGrouping());
     const xub_StrLen nDigitsInFirstGroup = static_cast<xub_StrLen>(aGrouping.get());
@@ -2692,15 +2688,18 @@ void SvNumberFormatter::GenerateFormat(String& sString,
 
     SvNumberformat* pFormat = GetFormatEntry( nIndex );
 
+    OUStringBuffer sString;
+    using comphelper::string::padToLength;
+
     if (nAnzLeading == 0)
     {
         if (!bThousand)
-            sString += '#';
+            sString.append('#');
         else
         {
-            sString += '#';
-            sString += rThSep;
-            sString.Expand( sString.Len() + nDigitsInFirstGroup, '#' );
+            sString.append('#');
+            sString.append(rThSep);
+            padToLength(sString, sString.getLength() + nDigitsInFirstGroup, '#');
         }
     }
     else
@@ -2709,31 +2708,31 @@ void SvNumberFormatter::GenerateFormat(String& sString,
         {
             if (bThousand && i > 0 && i == aGrouping.getPos())
             {
-                sString.Insert( rThSep, 0 );
+                sString.insert(0, rThSep);
                 aGrouping.advance();
             }
-            sString.Insert('0',0);
+            sString.insert(0, '0');
         }
         if (bThousand && nAnzLeading < nDigitsInFirstGroup + 1)
         {
             for (i = nAnzLeading; i < nDigitsInFirstGroup + 1; i++)
             {
                 if (bThousand && i % nDigitsInFirstGroup == 0)
-                    sString.Insert( rThSep, 0 );
-                sString.Insert('#',0);
+                    sString.insert(0, rThSep);
+                sString.insert(0, '#');
             }
         }
     }
     if (nPrecision > 0)
     {
-        sString += GetNumDecimalSep();
-        sString.Expand( sString.Len() + nPrecision, '0' );
+        sString.append(GetNumDecimalSep());
+        padToLength(sString, sString.getLength() + nPrecision, '0');
     }
     if (eType == NUMBERFORMAT_PERCENT)
-        sString += '%';
+        sString.append('%');
     else if (eType == NUMBERFORMAT_CURRENCY)
     {
-        String sNegStr = sString;
+        OUStringBuffer sNegStr(sString);
         String aCurr;
         const NfCurrencyEntry* pEntry;
         bool bBank;
@@ -2775,14 +2774,14 @@ void SvNumberFormatter::GenerateFormat(String& sString,
         }
         if (IsRed)
         {
-            sString += ';';
-            sString += '[';
-            sString += pFormatScanner->GetRedString();
-            sString += ']';
+            sString.append(';');
+            sString.append('[');
+            sString.append(pFormatScanner->GetRedString());
+            sString.append(']');
         }
         else
-            sString += ';';
-        sString += sNegStr;
+            sString.append(';');
+        sString.append(sNegStr.makeStringAndClear());
     }
     if (eType != NUMBERFORMAT_CURRENCY)
     {
@@ -2791,36 +2790,37 @@ void SvNumberFormatter::GenerateFormat(String& sString,
             insertBrackets = pFormat->IsNegativeInBracket();
         if (IsRed || insertBrackets)
         {
-            String sTmpStr = sString;
+            OUStringBuffer sTmpStr(sString);
 
             if ( pFormat->HasPositiveBracketPlaceholder() )
             {
-                 sTmpStr += '_';
-                 sTmpStr += ')';
+                 sTmpStr.append('_');
+                 sTmpStr.append(')');
             }
-            sTmpStr += ';';
+            sTmpStr.append(';');
 
             if (IsRed)
             {
-                sTmpStr += '[';
-                sTmpStr += pFormatScanner->GetRedString();
-                sTmpStr += ']';
+                sTmpStr.append('[');
+                sTmpStr.append(pFormatScanner->GetRedString());
+                sTmpStr.append(']');
             }
 
             if (insertBrackets)
             {
-                sTmpStr += '(';
-                sTmpStr += sString;
-                sTmpStr += ')';
+                sTmpStr.append('(');
+                sTmpStr.append(sString.toString());
+                sTmpStr.append(')');
             }
             else
             {
-                sTmpStr += '-';
-                sTmpStr +=sString;
+                sTmpStr.append('-');
+                sTmpStr.append(sString.toString());
             }
             sString = sTmpStr;
-            }
+        }
     }
+    return sString.makeStringAndClear();
 }
 
 bool SvNumberFormatter::IsUserDefined(const String& sStr,
@@ -3358,7 +3358,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( bool & bFoundBank,
     LanguageType eExtLang;
     if ( nExtLen )
     {
-        sal_Int32 nExtLang = ::rtl::OUString( rExtension ).toInt32( 16 );
+        sal_Int32 nExtLang = OUString( rExtension ).toInt32( 16 );
         if ( !nExtLang )
             eExtLang = LANGUAGE_DONTKNOW;
         else
@@ -3652,7 +3652,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
 sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
             const NfCurrencyEntry& rCurr, bool bBank ) const
 {
-    rtl::OUString aRed = rtl::OUStringBuffer().
+    OUString aRed = OUStringBuffer().
         append('[').
         append(pFormatScanner->GetRedString()).
         append(']').makeStringAndClear();
@@ -3661,16 +3661,15 @@ sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr
     if ( bBank )
     {
         // Only bank symbols.
-        String aPositiveBank, aNegativeBank;
-        rCurr.BuildPositiveFormatString( aPositiveBank, true, *xLocaleData, 1 );
-        rCurr.BuildNegativeFormatString( aNegativeBank, true, *xLocaleData, 1 );
+        OUString aPositiveBank = rCurr.BuildPositiveFormatString(true, *xLocaleData, 1);
+        OUString aNegativeBank = rCurr.BuildNegativeFormatString(true, *xLocaleData, 1 );
 
-        ::rtl::OUStringBuffer format1(aPositiveBank);
+        OUStringBuffer format1(aPositiveBank);
         format1.append(';');
         format1.append(aNegativeBank);
         rStrArr.push_back(format1.makeStringAndClear());
 
-        ::rtl::OUStringBuffer format2(aPositiveBank);
+        OUStringBuffer format2(aPositiveBank);
         format2.append(';');
 
         format2.append(aRed);
@@ -3684,22 +3683,19 @@ sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr
     {
         // Mixed formats like in SvNumberFormatter::ImpGenerateFormats() but no
         // duplicates if no decimals in currency.
-        String aPositive, aNegative, aPositiveNoDec, aNegativeNoDec,
-            aPositiveDashed, aNegativeDashed;
-
-        rCurr.BuildPositiveFormatString( aPositive, false, *xLocaleData, 1 );
-        rCurr.BuildNegativeFormatString( aNegative, false, *xLocaleData, 1 );
-        ::rtl::OUStringBuffer format1;
-        ::rtl::OUStringBuffer format2;
-        ::rtl::OUStringBuffer format3;
-        ::rtl::OUStringBuffer format4;
-        ::rtl::OUStringBuffer format5;
-        if ( rCurr.GetDigits() )
+        OUString aPositive = rCurr.BuildPositiveFormatString(false, *xLocaleData, 1);
+        OUString aNegative = rCurr.BuildNegativeFormatString(false, *xLocaleData, 1 );
+        OUStringBuffer format1;
+        OUStringBuffer format2;
+        OUStringBuffer format3;
+        OUStringBuffer format4;
+        OUStringBuffer format5;
+        if (rCurr.GetDigits())
         {
-            rCurr.BuildPositiveFormatString( aPositiveNoDec, false, *xLocaleData, 0 );
-            rCurr.BuildNegativeFormatString( aNegativeNoDec, false, *xLocaleData, 0 );
-            rCurr.BuildPositiveFormatString( aPositiveDashed, false, *xLocaleData, 2 );
-            rCurr.BuildNegativeFormatString( aNegativeDashed, false, *xLocaleData, 2 );
+            OUString aPositiveNoDec = rCurr.BuildPositiveFormatString(false, *xLocaleData, 0);
+            OUString aNegativeNoDec = rCurr.BuildNegativeFormatString(false, *xLocaleData, 0 );
+            OUString aPositiveDashed = rCurr.BuildPositiveFormatString(false, *xLocaleData, 2);
+            OUString aNegativeDashed = rCurr.BuildNegativeFormatString(false, *xLocaleData, 2);
 
             format1.append(aPositiveNoDec);
             format1.append(';');
@@ -3821,64 +3817,66 @@ OUString NfCurrencyEntry::Impl_BuildFormatStringNumChars(
 }
 
 
-void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, bool bBank,
-            const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
+OUString NfCurrencyEntry::BuildPositiveFormatString(bool bBank,
+            const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat) const
 {
-    rStr = Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat);
+    OUStringBuffer sBuf(Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat));
     sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
         rLoc.getCurrPositiveFormat(), nPositiveFormat, bBank );
-    CompletePositiveFormatString( rStr, bBank, nPosiForm );
+    CompletePositiveFormatString(sBuf, bBank, nPosiForm);
+    return sBuf.makeStringAndClear();
 }
 
 
-void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, bool bBank,
+OUString NfCurrencyEntry::BuildNegativeFormatString(bool bBank,
             const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
 {
-    rStr = Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat);
+    OUStringBuffer sBuf(Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat));
     sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
         rLoc.getCurrNegativeFormat(), nNegativeFormat, bBank );
-    CompleteNegativeFormatString( rStr, bBank, nNegaForm );
+    CompleteNegativeFormatString(sBuf, bBank, nNegaForm);
+    return sBuf.makeStringAndClear();
 }
 
 
-void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, bool bBank,
-            sal_uInt16 nPosiForm ) const
+void NfCurrencyEntry::CompletePositiveFormatString(OUStringBuffer& rStr, bool bBank,
+            sal_uInt16 nPosiForm) const
 {
-    String aSymStr = BuildSymbolString(bBank);
+    OUString aSymStr = BuildSymbolString(bBank);
     NfCurrencyEntry::CompletePositiveFormatString( rStr, aSymStr, nPosiForm );
 }
 
 
-void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, bool bBank,
-            sal_uInt16 nNegaForm ) const
+void NfCurrencyEntry::CompleteNegativeFormatString(OUStringBuffer& rStr, bool bBank,
+            sal_uInt16 nNegaForm) const
 {
-    String aSymStr = BuildSymbolString(bBank);
+    OUString aSymStr = BuildSymbolString(bBank);
     NfCurrencyEntry::CompleteNegativeFormatString( rStr, aSymStr, nNegaForm );
 }
 
 
 // static
-void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
-        const String& rSymStr, sal_uInt16 nPositiveFormat )
+void NfCurrencyEntry::CompletePositiveFormatString(OUStringBuffer& rStr,
+        const String& rSymStr, sal_uInt16 nPositiveFormat)
 {
     switch( nPositiveFormat )
     {
         case 0:                                         // $1
-            rStr.Insert( rSymStr , 0 );
+            rStr.insert(0, rSymStr);
         break;
         case 1:                                         // 1$
-            rStr += rSymStr;
+            rStr.append(rSymStr);
         break;
         case 2:                                         // $ 1
         {
-            rStr.Insert( ' ', 0 );
-            rStr.Insert( rSymStr, 0 );
+            rStr.insert(0, ' ');
+            rStr.insert(0, rSymStr);
         }
         break;
         case 3:                                         // 1 $
         {
-            rStr += ' ';
-            rStr += rSymStr;
+            rStr.append(' ');
+            rStr.append(rSymStr);
         }
         break;
         default:
@@ -3889,80 +3887,80 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
 
 
 // static
-void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
-        const String& rSymStr, sal_uInt16 nNegativeFormat )
+void NfCurrencyEntry::CompleteNegativeFormatString(OUStringBuffer& rStr,
+        const String& rSymStr, sal_uInt16 nNegativeFormat)
 {
     switch( nNegativeFormat )
     {
         case 0:                                         // ($1)
         {
-            rStr.Insert( rSymStr, 0);
-            rStr.Insert('(',0);
-            rStr += ')';
+            rStr.insert(0, rSymStr);
+            rStr.insert(0, '(');
+            rStr.append(')');
         }
         break;
         case 1:                                         // -$1
         {
-            rStr.Insert( rSymStr, 0);
-            rStr.Insert('-',0);
+            rStr.insert(0, rSymStr);
+            rStr.insert(0, '-');
         }
         break;
         case 2:                                         // $-1
         {
-            rStr.Insert('-',0);
-            rStr.Insert( rSymStr, 0);
+            rStr.insert(0, '-');
+            rStr.insert(0, rSymStr);
         }
         break;
         case 3:                                         // $1-
         {
-            rStr.Insert( rSymStr, 0);
-            rStr += '-';
+            rStr.insert(0, rSymStr);
+            rStr.append('-');
         }
         break;
         case 4:                                         // (1$)
         {
-            rStr.Insert('(',0);
-            rStr += rSymStr;
-            rStr += ')';
+            rStr.insert(0, '(');
+            rStr.append(rSymStr);
+            rStr.append(')');
         }
         break;
         case 5:                                         // -1$
         {
-            rStr += rSymStr;
-            rStr.Insert('-',0);
+            rStr.append(rSymStr);
+            rStr.insert(0, '-');
         }
         break;
         case 6:                                         // 1-$
         {
-            rStr += '-';
-            rStr += rSymStr;
+            rStr.append('-');
+            rStr.append(rSymStr);
         }
         break;
         case 7:                                         // 1$-
         {
-            rStr += rSymStr;
-            rStr += '-';
+            rStr.append(rSymStr);
+            rStr.append('-');
         }
         break;
         case 8:                                         // -1 $
         {
-            rStr += ' ';
-            rStr += rSymStr;
-            rStr.Insert('-',0);
+            rStr.append(' ');
+            rStr.append(rSymStr);
+            rStr.insert(0, '-');
         }
         break;
         case 9:                                         // -$ 1
         {
-            rStr.Insert(' ',0);
-            rStr.Insert( rSymStr, 0);
-            rStr.Insert('-',0);
+            rStr.insert(0, ' ');
+            rStr.insert(0, rSymStr);
+            rStr.insert(0, '-');
         }
         break;
         case 10:                                        // 1 $-
         {
-            rStr += ' ';
-            rStr += rSymStr;
-            rStr += '-';
+            rStr.append(' ');
+            rStr.append(rSymStr);
+            rStr.append('-');
         }
         break;
         case 11:                                        // $ -1
@@ -3970,37 +3968,37 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
             String aTmp( rSymStr );
             aTmp += ' ';
             aTmp += '-';
-            rStr.Insert( aTmp, 0 );
+            rStr.insert(0, aTmp);
         }
         break;
         case 12 :                                       // $ 1-
         {
-            rStr.Insert(' ', 0);
-            rStr.Insert( rSymStr, 0);
-            rStr += '-';
+            rStr.insert(0, ' ');
+            rStr.insert(0, rSymStr);
+            rStr.append('-');
         }
         break;
         case 13 :                                       // 1- $
         {
-            rStr += '-';
-            rStr += ' ';
-            rStr += rSymStr;
+            rStr.append('-');
+            rStr.append(' ');
+            rStr.append(rSymStr);
         }
         break;
         case 14 :                                       // ($ 1)
         {
-            rStr.Insert(' ',0);
-            rStr.Insert( rSymStr, 0);
-            rStr.Insert('(',0);
-            rStr += ')';
+            rStr.insert(0, ' ');
+            rStr.insert(0, rSymStr);
+            rStr.insert(0, '(');
+            rStr.append(')');
         }
         break;
         case 15 :                                       // (1 $)
         {
-            rStr.Insert('(',0);
-            rStr += ' ';
-            rStr += rSymStr;
-            rStr += ')';
+            rStr.insert(0, '(');
+            rStr.append(' ');
+            rStr.append(rSymStr);
+            rStr.append(')');
         }
         break;
         default:
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index d4a4c5b..acaaa1e 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -710,10 +710,10 @@ void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
 
     // we need the language for the following
     LanguageType eLang;
-    String sFmtDescription = GetFormat(eLang);
+    GetFormat(eLang);
 
     // generate a new format ...
-    ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
+    OUString sFmtDescription = ImplGetFormatter()->GenerateFormat(m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
     // ... and introduce it to the formatter
     sal_uInt16 nCheckPos;
     sal_uInt32  nNewKey;
@@ -753,10 +753,10 @@ void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision)
 
     // we need the language for the following
     LanguageType eLang;
-    String sFmtDescription = GetFormat(eLang);
+    GetFormat(eLang);
 
     // generate a new format ...
-    ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
+    OUString sFmtDescription = ImplGetFormatter()->GenerateFormat(m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
     // ... and introduce it to the formatter
     sal_uInt16 nCheckPos;
     sal_uInt32 nNewKey;
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index d24fd26..230dd3e 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -415,14 +415,14 @@ void DbGridColumn::setLock(sal_Bool _bLock)
 }
 
 //------------------------------------------------------------------------------
-String DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) const
+OUString DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) const
 {
-    String aText;
+    OUString aText;
     if (m_pCell && m_pCell->ISA(FmXFilterCell))
         return aText;
 
     if (!pRow || !pRow->IsValid())
-        aText = rtl::OUString(INVALIDTEXT);
+        aText = OUString(INVALIDTEXT);
     else if (pRow->HasField(m_nFieldPos))
     {
         aText = GetCellText( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
@@ -431,16 +431,16 @@ String DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumber
 }
 
 //------------------------------------------------------------------------------
-String DbGridColumn::GetCellText(const Reference< ::com::sun::star::sdb::XColumn >& xField, const Reference< XNumberFormatter >& xFormatter) const
+OUString DbGridColumn::GetCellText(const Reference< ::com::sun::star::sdb::XColumn >& xField, const Reference< XNumberFormatter >& xFormatter) const
 {
-    String aText;
+    OUString aText;
     if (xField.is())
     {
         FmXTextCell* pTextCell = PTR_CAST(FmXTextCell, m_pCell);
         if (pTextCell)
             aText = pTextCell->GetText(xField, xFormatter);
         else if (m_bObject)
-            aText = rtl::OUString(OBJECTTEXT);
+            aText = OUString(OBJECTTEXT);
     }
     return aText;
 }
@@ -475,11 +475,10 @@ void DbGridColumn::Paint(OutputDevice& rDev,
             if ( !bEnabled )
                 nStyle |= TEXT_DRAW_DISABLE;
 
-            rDev.DrawText(rRect, rtl::OUString(INVALIDTEXT), nStyle);
+            rDev.DrawText(rRect, OUString(INVALIDTEXT), nStyle);
         }
         else if (m_bAutoValue && pRow->IsNew())
         {
-            static String aAutoText(SVX_RES(RID_STR_AUTOFIELD));
             sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER;
             if ( !bEnabled )
                 nStyle |= TEXT_DRAW_DISABLE;
@@ -496,7 +495,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
                     nStyle |= TEXT_DRAW_LEFT;
             }
 
-            rDev.DrawText(rRect, aAutoText , nStyle);
+            rDev.DrawText(rRect, SVX_RESSTR(RID_STR_AUTOFIELD), nStyle);
         }
         else if (pRow->HasField(m_nFieldPos))
         {
@@ -511,14 +510,14 @@ void DbGridColumn::Paint(OutputDevice& rDev,
             if ( !bEnabled )
                 nStyle |= TEXT_DRAW_DISABLE;
 
-            rDev.DrawText(rRect, rtl::OUString(INVALIDTEXT), nStyle);
+            rDev.DrawText(rRect, OUString(INVALIDTEXT), nStyle);
         }
         else if (pRow->HasField(m_nFieldPos) && m_bObject)
         {
             sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
             if ( !bEnabled )
                 nStyle |= TEXT_DRAW_DISABLE;
-            rDev.DrawText(rRect, rtl::OUString(OBJECTTEXT), nStyle);
+            rDev.DrawText(rRect, OUString(OBJECTTEXT), nStyle);
         }
     }
     else if ( m_pCell->ISA( FmXFilterCell ) )
@@ -602,7 +601,7 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ )
 }
 
 //------------------------------------------------------------------------------
-void DbCellControl::implDoPropertyListening( const ::rtl::OUString& _rPropertyName, sal_Bool _bWarnIfNotExistent )
+void DbCellControl::implDoPropertyListening(const OUString& _rPropertyName, sal_Bool _bWarnIfNotExistent)
 {
     try
     {
@@ -625,7 +624,7 @@ void DbCellControl::implDoPropertyListening( const ::rtl::OUString& _rPropertyNa
 }
 
 //------------------------------------------------------------------------------
-void DbCellControl::doPropertyListening( const ::rtl::OUString& _rPropertyName )
+void DbCellControl::doPropertyListening(const OUString& _rPropertyName)
 {
     implDoPropertyListening( _rPropertyName );
 }
@@ -1186,9 +1185,9 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect
 }
 
 //------------------------------------------------------------------------------
-String DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
+OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
 {
-    ::rtl::OUString aString;
+    OUString aString;
     if ( _rxField.is() )
         try
         {
@@ -1214,14 +1213,14 @@ void DbTextField::updateFromModel( Reference< XPropertySet > _rxModel )
 {
     OSL_ENSURE( _rxModel.is() && m_pWindow, "DbTextField::updateFromModel: invalid call!" );
 
-    ::rtl::OUString sText;
+    OUString sText;
     _rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText;
 
     xub_StrLen nMaxTextLen = m_pEdit->GetMaxTextLen();
     if ( EDIT_NOLIMIT != nMaxTextLen && sText.getLength() > nMaxTextLen )
     {
         sal_Int32 nDiff = sText.getLength() - nMaxTextLen;
-        sText = sText.replaceAt(sText.getLength() - nDiff,nDiff,::rtl::OUString());
+        sText = sText.replaceAt(sText.getLength() - nDiff,nDiff, OUString());
     }
 
 
@@ -1232,12 +1231,12 @@ void DbTextField::updateFromModel( Reference< XPropertySet > _rxModel )
 //------------------------------------------------------------------------------
 sal_Bool DbTextField::commitControl()
 {
-    ::rtl::OUString aText( m_pEdit->GetText( getModelLineEndSetting( m_rColumn.getModel() ) ) );
+    OUString aText( m_pEdit->GetText( getModelLineEndSetting( m_rColumn.getModel() ) ) );
     // we have to check if the length before we can decide if the value was modified
     xub_StrLen nMaxTextLen = m_pEdit->GetMaxTextLen();
     if ( EDIT_NOLIMIT != nMaxTextLen )
     {
-        ::rtl::OUString sOldValue;
+        OUString sOldValue;
         m_rColumn.getModel()->getPropertyValue( FM_PROP_TEXT ) >>= sOldValue;
         // if the new value didn't change we must set the old long value again
         if ( sOldValue.getLength() > nMaxTextLen && sOldValue.compareTo(aText,nMaxTextLen) == 0 )
@@ -1461,7 +1460,7 @@ void DbFormattedField::Init( Window& rParent, const Reference< XRowSet >& xCurso
                 break;
             case TypeClass_STRING:
             {
-                String sDefault( ::comphelper::getString(aDefault) );
+                OUString sDefault( ::comphelper::getString(aDefault) );
                 if (m_rColumn.IsNumeric())
                 {
                     double dVal;
@@ -1513,7 +1512,7 @@ void DbFormattedField::_propertyChanged( const PropertyChangeEvent& _rEvent ) th
 }
 
 //------------------------------------------------------------------------------
-String DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** ppColor)
+OUString DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** ppColor)
 {
     // defaultmaessig keine Farb-Angabe
     if (ppColor != NULL)
@@ -1521,9 +1520,9 @@ String DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb::X
 
     // NULL-Wert -> leerer Text
     if (!_rxField.is())
-        return String();
+        return OUString();
 
-    String aText;
+    OUString aText;
     try
     {
         if (m_rColumn.IsNumeric())
@@ -1568,7 +1567,7 @@ void DbFormattedField::UpdateFromField(const Reference< ::com::sun::star::sdb::X
         FormattedField* pFormattedWindow = static_cast<FormattedField*>(m_pWindow);
         if (!_rxField.is())
         {   // NULL-Wert -> leerer Text
-            m_pWindow->SetText(String());
+            m_pWindow->SetText(OUString());
         }
         else if (m_rColumn.IsNumeric())
         {
@@ -1579,7 +1578,7 @@ void DbFormattedField::UpdateFromField(const Reference< ::com::sun::star::sdb::X
             // ich den Rest (die Formatierung) dem FormattedField ueberlassen.
             double dValue = getValue( _rxField, m_rColumn.GetParent().getNullDate() );
             if (_rxField->wasNull())
-                m_pWindow->SetText(String());
+                m_pWindow->SetText(OUString());
             else
                 pFormattedWindow->SetValue(dValue);
         }
@@ -1587,7 +1586,7 @@ void DbFormattedField::UpdateFromField(const Reference< ::com::sun::star::sdb::X
         {
             // Hier kann ich nicht mit einem double arbeiten, da das Feld mir keines liefern kann.
             // Also einfach den Text vom ::com::sun::star::util::NumberFormatter in die richtige ::com::sun::star::form::component::Form brinden lassen.
-            String sText( _rxField->getString());
+            OUString sText( _rxField->getString());
 
             pFormattedWindow->SetTextFormatted( sText );
             pFormattedWindow->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
@@ -1606,7 +1605,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
 
     FormattedField* pFormattedWindow = static_cast< FormattedField* >( m_pWindow );
 
-    ::rtl::OUString sText;
+    OUString sText;
     Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE );
     if ( aValue >>= sText )
     {   // our effective value is transfered as string
@@ -1634,7 +1633,7 @@ sal_Bool DbFormattedField::commitControl()
         // ein LeerString wird erst mal standardmaessig als void weitergereicht
     }
     else
-        aNewVal <<= ::rtl::OUString(rField.GetTextValue());
+        aNewVal <<= OUString(rField.GetTextValue());
 
     m_rColumn.getModel()->setPropertyValue(FM_PROP_EFFECTIVE_VALUE, aNewVal);
     return sal_True;
@@ -1764,9 +1763,9 @@ sal_Bool DbCheckBox::commitControl()
 }
 
 //------------------------------------------------------------------------------
-XubString DbCheckBox::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbCheckBox::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
-    return XubString();
+    return OUString();
 }
 
 //==============================================================================
@@ -1788,15 +1787,15 @@ void DbPatternField::implAdjustGenericFieldSetting( const Reference< XPropertySe
     DBG_ASSERT( _rxModel.is(), "DbPatternField::implAdjustGenericFieldSetting: invalid model!" );
     if ( m_pWindow && _rxModel.is() )
     {
-        ::rtl::OUString aLitMask;
-        ::rtl::OUString aEditMask;
+        OUString aLitMask;
+        OUString aEditMask;
         sal_Bool bStrict = sal_False;
 
         _rxModel->getPropertyValue( FM_PROP_LITERALMASK ) >>= aLitMask;
         _rxModel->getPropertyValue( FM_PROP_EDITMASK ) >>= aEditMask;
         _rxModel->getPropertyValue( FM_PROP_STRICTFORMAT ) >>= bStrict;
 
-        rtl::OString aAsciiEditMask(rtl::OUStringToOString(aEditMask, RTL_TEXTENCODING_ASCII_US));
+        OString aAsciiEditMask(OUStringToOString(aEditMask, RTL_TEXTENCODING_ASCII_US));
 
         static_cast< PatternField* >( m_pWindow )->SetMask( aAsciiEditMask, aLitMask );
         static_cast< PatternField* >( m_pPainter )->SetMask( aAsciiEditMask, aLitMask );
@@ -1826,7 +1825,7 @@ CellControllerRef DbPatternField::CreateController() const
 }
 
 //------------------------------------------------------------------------------
-String DbPatternField::impl_formatText( const String& _rText )
+OUString DbPatternField::impl_formatText( const OUString& _rText )
 {
     m_pPainter->SetText( _rText );
     static_cast< PatternField* >( m_pPainter )->ReformatAll();
@@ -1834,7 +1833,7 @@ String DbPatternField::impl_formatText( const String& _rText )
 }
 
 //------------------------------------------------------------------------------
-String DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
     bool bIsForPaint = _rxField != m_rColumn.GetField();
     SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -1852,7 +1851,7 @@ String DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::XCo
         OSL_ENSURE( rpFormatter->getColumn() == _rxField, "DbPatternField::GetFormatText: my value formatter is working for another field ...!" );
         // re-creating the value formatter here everytime would be quite expensive ...
 
-    String sText;
+    OUString sText;
     if ( rpFormatter.get() )
         sText = rpFormatter->getFormattedValue();
 
@@ -1871,7 +1870,7 @@ void DbPatternField::updateFromModel( Reference< XPropertySet > _rxModel )
 {
     OSL_ENSURE( _rxModel.is() && m_pWindow, "DbPatternField::updateFromModel: invalid call!" );
 
-    ::rtl::OUString sText;
+    OUString sText;
     _rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText;
 
     static_cast< Edit* >( m_pWindow )->SetText( impl_formatText( sText ) );
@@ -1881,8 +1880,8 @@ void DbPatternField::updateFromModel( Reference< XPropertySet > _rxModel )
 //------------------------------------------------------------------------------
 sal_Bool DbPatternField::commitControl()
 {
-    String aText(m_pWindow->GetText());
-    m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, makeAny(::rtl::OUString(aText)));
+    OUString aText(m_pWindow->GetText());
+    m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, makeAny(aText));
     return sal_True;
 }
 
@@ -1986,9 +1985,8 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
         static_cast< DoubleNumericField* >( m_pPainter )->SetFormatter( pFormatterUsed );
 
         // und dann ein Format generieren, dass die gewuenschten Nachkommastellen usw. hat
-        String sFormatString;
         LanguageType aAppLanguage = Application::GetSettings().GetUILanguage();
-        pFormatterUsed->GenerateFormat( sFormatString, 0, aAppLanguage, bThousand, sal_False, nScale );
+        OUString sFormatString = pFormatterUsed->GenerateFormat(0, aAppLanguage, bThousand, sal_False, nScale);
 
         static_cast< DoubleNumericField* >( m_pWindow )->SetFormat( sFormatString, aAppLanguage );
         static_cast< DoubleNumericField* >( m_pPainter )->SetFormat( sFormatString, aAppLanguage );
@@ -2004,10 +2002,10 @@ SpinField* DbNumericField::createField( Window* _pParent, WinBits _nFieldStyle,
 namespace
 {
     //--------------------------------------------------------------------------
-    static String lcl_setFormattedNumeric_nothrow( DoubleNumericField& _rField, const DbCellControl& _rControl,
+    static OUString lcl_setFormattedNumeric_nothrow( DoubleNumericField& _rField, const DbCellControl& _rControl,
         const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter )
     {
-        String sValue;
+        OUString sValue;
         if ( _rxField.is() )
         {
             try
@@ -2029,7 +2027,7 @@ namespace
 }
 
 //------------------------------------------------------------------------------
-String DbNumericField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
+OUString DbNumericField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
 {
     return lcl_setFormattedNumeric_nothrow( *dynamic_cast< DoubleNumericField* >( m_pPainter ), *this, _rxField, _rxFormatter );
 }
@@ -2049,16 +2047,16 @@ void DbNumericField::updateFromModel( Reference< XPropertySet > _rxModel )
     if ( _rxModel->getPropertyValue( FM_PROP_VALUE ) >>= dValue )
         static_cast< DoubleNumericField* >( m_pWindow )->SetValue( dValue );
     else
-        m_pWindow->SetText( String() );
+        m_pWindow->SetText( OUString() );
 }
 
 //------------------------------------------------------------------------------
 sal_Bool DbNumericField::commitControl()
 {
-    String aText( m_pWindow->GetText());
+    OUString aText( m_pWindow->GetText());
     Any aVal;
 
-    if (aText.Len() != 0)   // nicht null
+    if (!aText.isEmpty())   // not empty
     {
         double fValue = ((DoubleNumericField*)m_pWindow)->GetValue();
         aVal <<= (double)fValue;
@@ -2097,7 +2095,7 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
         double  nStep           = getDouble( _rxModel->getPropertyValue( FM_PROP_VALUESTEP ) );
         sal_Bool    bStrict     = getBOOL( _rxModel->getPropertyValue( FM_PROP_STRICTFORMAT ) );
         sal_Bool    bThousand   = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) );
-        ::rtl::OUString aStr( getString( _rxModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL ) ) );
+        OUString aStr( getString( _rxModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL ) ) );
 
         static_cast< LongCurrencyField* >( m_pWindow )->SetUseThousandSep( bThousand );
         static_cast< LongCurrencyField* >( m_pWindow )->SetDecimalDigits( m_nScale );
@@ -2142,10 +2140,10 @@ double DbCurrencyField::GetCurrency(const Reference< ::com::sun::star::sdb::XCol
 namespace
 {
     //--------------------------------------------------------------------------
-    static String lcl_setFormattedCurrency_nothrow( LongCurrencyField& _rField, const DbCurrencyField& _rControl,
+    static OUString lcl_setFormattedCurrency_nothrow( LongCurrencyField& _rField, const DbCurrencyField& _rControl,
         const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter )
     {
-        String sValue;
+        OUString sValue;
         if ( _rxField.is() )
         {
             try
@@ -2169,7 +2167,7 @@ namespace
 }
 
 //------------------------------------------------------------------------------
-String DbCurrencyField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
+OUString DbCurrencyField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
 {
     return lcl_setFormattedCurrency_nothrow( *dynamic_cast< LongCurrencyField* >( m_pPainter ), *this, _rxField, _rxFormatter );
 }
@@ -2197,21 +2195,20 @@ void DbCurrencyField::updateFromModel( Reference< XPropertySet > _rxModel )
         static_cast< LongCurrencyField* >( m_pWindow )->SetValue( dValue );
     }
     else
-        m_pWindow->SetText( String() );
+        m_pWindow->SetText( OUString() );
 }
 
 //------------------------------------------------------------------------------
 sal_Bool DbCurrencyField::commitControl()
 {
-    String aText( m_pWindow->GetText());
+    OUString aText(m_pWindow->GetText());
     Any aVal;
-    if (aText.Len() != 0)   // nicht null
+    if (!aText.isEmpty())   // not empty
     {
         double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
         if (m_nScale)
         {
             fValue /= ::rtl::math::pow10Exp(1.0, m_nScale);
-            //fValue = ::rtl::math::round(fValue, m_nScale);
         }
         aVal <<= (double)fValue;
     }
@@ -2288,9 +2285,9 @@ void DbDateField::implAdjustGenericFieldSetting( const Reference< XPropertySet >
 namespace
 {
     //--------------------------------------------------------------------------
-    static String lcl_setFormattedDate_nothrow( DateField& _rField, const Reference< XColumn >& _rxField )
+    static OUString lcl_setFormattedDate_nothrow( DateField& _rField, const Reference< XColumn >& _rxField )
     {
-        String sDate;
+        OUString sDate;
         if ( _rxField.is() )
         {
             try
@@ -2313,7 +2310,7 @@ namespace
     }
 }
 //------------------------------------------------------------------------------
-String DbDateField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbDateField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
      return lcl_setFormattedDate_nothrow( *dynamic_cast< DateField* >( m_pPainter ), _rxField );
 }
@@ -2333,15 +2330,15 @@ void DbDateField::updateFromModel( Reference< XPropertySet > _rxModel )
     if ( _rxModel->getPropertyValue( FM_PROP_DATE ) >>= nDate )
         static_cast< DateField* >( m_pWindow )->SetDate( ::Date( nDate ) );
     else
-        static_cast< DateField* >( m_pWindow )->SetText( String() );
+        static_cast< DateField* >( m_pWindow )->SetText( OUString() );
 }
 
 //------------------------------------------------------------------------------
 sal_Bool DbDateField::commitControl()
 {
-    String aText( m_pWindow->GetText());
+    OUString aText(m_pWindow->GetText());
     Any aVal;
-    if (aText.Len() != 0)
+    if (!aText.isEmpty())
         aVal <<= (sal_Int32)static_cast<DateField*>(m_pWindow)->GetDate().GetDate();
     else
         aVal.clear();
@@ -2398,9 +2395,9 @@ void DbTimeField::implAdjustGenericFieldSetting( const Reference< XPropertySet >
 namespace
 {
     //--------------------------------------------------------------------------
-    static String lcl_setFormattedTime_nothrow( TimeField& _rField, const Reference< XColumn >& _rxField )
+    static OUString lcl_setFormattedTime_nothrow( TimeField& _rField, const Reference< XColumn >& _rxField )
     {
-        String sTime;
+        OUString sTime;
         if ( _rxField.is() )
         {
             try
@@ -2423,7 +2420,7 @@ namespace
     }
 }
 //------------------------------------------------------------------------------
-String DbTimeField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbTimeField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
     return lcl_setFormattedTime_nothrow( *static_cast< TimeField* >( m_pPainter ), _rxField );
 }
@@ -2443,15 +2440,15 @@ void DbTimeField::updateFromModel( Reference< XPropertySet > _rxModel )
     if ( _rxModel->getPropertyValue( FM_PROP_DATE ) >>= nTime )
         static_cast< TimeField* >( m_pWindow )->SetTime( ::Time( nTime ) );
     else
-        static_cast< TimeField* >( m_pWindow )->SetText( String() );
+        static_cast< TimeField* >( m_pWindow )->SetText( OUString() );
 }
 
 //------------------------------------------------------------------------------
 sal_Bool DbTimeField::commitControl()
 {
-    String aText( m_pWindow->GetText());
+    OUString aText(m_pWindow->GetText());
     Any aVal;
-    if (aText.Len() != 0)
+    if (!aText.isEmpty())
         aVal <<= (sal_Int32)static_cast<TimeField*>(m_pWindow)->GetTime().GetTime();
     else
         aVal.clear();
@@ -2496,7 +2493,7 @@ void DbComboBox::SetList(const Any& rItems)
     ::comphelper::StringSequence aTest;
     if (rItems >>= aTest)
     {
-        const ::rtl::OUString* pStrings = aTest.getConstArray();
+        const OUString* pStrings = aTest.getConstArray();
         sal_Int32 nItems = aTest.getLength();
         for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
              pField->InsertEntry(*pStrings, LISTBOX_APPEND);
@@ -2551,9 +2548,9 @@ CellControllerRef DbComboBox::CreateController() const
 }
 
 //------------------------------------------------------------------------------
-String DbComboBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
+OUString DbComboBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
 {
-    ::rtl::OUString aString;
+    OUString aString;
     if (_rxField.is())
         try
         {
@@ -2577,7 +2574,7 @@ void DbComboBox::updateFromModel( Reference< XPropertySet > _rxModel )
 {
     OSL_ENSURE( _rxModel.is() && m_pWindow, "DbComboBox::updateFromModel: invalid call!" );
 
-    ::rtl::OUString sText;
+    OUString sText;
     _rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText;
 
     static_cast< ComboBox* >( m_pWindow )->SetText( sText );
@@ -2587,8 +2584,8 @@ void DbComboBox::updateFromModel( Reference< XPropertySet > _rxModel )
 //------------------------------------------------------------------------------
 sal_Bool DbComboBox::commitControl()
 {
-    String aText( m_pWindow->GetText());
-    m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, makeAny(::rtl::OUString(aText)));
+    OUString aText( m_pWindow->GetText());
+    m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, makeAny(aText));
     return sal_True;
 }
 
@@ -2627,7 +2624,7 @@ void DbListBox::SetList(const Any& rItems)
     ::comphelper::StringSequence aTest;
     if (rItems >>= aTest)
     {
-        const ::rtl::OUString* pStrings = aTest.getConstArray();
+        const OUString* pStrings = aTest.getConstArray();
         sal_Int32 nItems = aTest.getLength();
         if (nItems)
         {
@@ -2677,9 +2674,9 @@ CellControllerRef DbListBox::CreateController() const
 }
 
 //------------------------------------------------------------------------------
-String DbListBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbListBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
-    String sText;
+    OUString sText;
     if ( _rxField.is() )
     {
         try
@@ -2705,8 +2702,8 @@ String DbListBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn
 //------------------------------------------------------------------------------
 void DbListBox::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter)
 {
-    String sFormattedText( GetFormatText( _rxField, xFormatter ) );
-    if ( sFormattedText.Len() )
+    OUString sFormattedText( GetFormatText( _rxField, xFormatter ) );
+    if (!sFormattedText.isEmpty())
         static_cast< ListBox* >( m_pWindow )->SelectEntry( sFormattedText );
     else
         static_cast< ListBox* >( m_pWindow )->SetNoSelection();
@@ -2794,7 +2791,7 @@ void DbFilterField::SetList(const Any& rItems, sal_Bool bComboBox)
 {
     ::comphelper::StringSequence aTest;
     rItems >>= aTest;
-    const ::rtl::OUString* pStrings = aTest.getConstArray();
+    const OUString* pStrings = aTest.getConstArray();
     sal_Int32 nItems = aTest.getLength();
     if (nItems)
     {
@@ -2950,13 +2947,13 @@ void DbFilterField::updateFromModel( Reference< XPropertySet > _rxModel )
 //------------------------------------------------------------------------------
 sal_Bool DbFilterField::commitControl()
 {
-    String aText(m_aText);
+    OUString aText(m_aText);
     switch (m_nControlClass)
     {
         case ::com::sun::star::form::FormComponentType::CHECKBOX:
             return sal_True;
         case ::com::sun::star::form::FormComponentType::LISTBOX:
-            aText.Erase();
+            aText = OUString();
             if (static_cast<ListBox*>(m_pWindow)->GetSelectEntryCount())
             {
                 sal_Int16 nPos = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
@@ -2977,16 +2974,16 @@ sal_Bool DbFilterField::commitControl()
     if (m_aText != aText)
     {
         // check the text with the SQL-Parser
-        String aNewText(comphelper::string::stripEnd(aText, ' '));
-        if (aNewText.Len() != 0)
+        OUString aNewText(comphelper::string::stripEnd(aText, ' '));
+        if (!aNewText.isEmpty())
         {
-            ::rtl::OUString aErrorMsg;
+            OUString aErrorMsg;
             Reference< XNumberFormatter >  xNumberFormatter(m_rColumn.GetParent().getNumberFormatter());
 
             ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree(aErrorMsg, aNewText,xNumberFormatter, m_rColumn.GetField());
             if (xParseNode.is())
             {
-                ::rtl::OUString aPreparedText;
+                OUString aPreparedText;
 
                 ::com::sun::star::lang::Locale aAppLocale = Application::GetSettings().GetUILocale();
 
@@ -3004,7 +3001,7 @@ sal_Bool DbFilterField::commitControl()
             else
             {
                 // display the error and return sal_False
-                String aTitle( SVX_RES(RID_STR_SYNTAXERROR) );
+                OUString aTitle( SVX_RESSTR(RID_STR_SYNTAXERROR) );
 
                 SQLException aError;
                 aError.Message = aErrorMsg;
@@ -3024,7 +3021,7 @@ sal_Bool DbFilterField::commitControl()
 }
 
 //------------------------------------------------------------------------------
-void DbFilterField::SetText(const String& rText)
+void DbFilterField::SetText(const OUString& rText)
 {
     m_aText = rText;
     switch (m_nControlClass)
@@ -3032,9 +3029,9 @@ void DbFilterField::SetText(const String& rText)
         case ::com::sun::star::form::FormComponentType::CHECKBOX:
         {
             TriState eState;
-            if (rText.EqualsAscii("1"))
+            if (rText == "1")
                 eState = STATE_CHECK;
-            else if (rText.EqualsAscii("0"))
+            else if (rText == "0")
                 eState = STATE_NOCHECK;
             else
                 eState = STATE_DONTKNOW;
@@ -3044,7 +3041,7 @@ void DbFilterField::SetText(const String& rText)
         }   break;
         case ::com::sun::star::form::FormComponentType::LISTBOX:
         {
-            String aText;
+            OUString aText;
             Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, sal_True);
             if (aPosSeq.getLength())
                 static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], sal_True);
@@ -3070,7 +3067,7 @@ void DbFilterField::Update()
         if (!xField.is())
             return;
 
-        ::rtl::OUString aName;
+        OUString aName;
         xField->getPropertyValue(FM_PROP_NAME) >>= aName;
 
         // the columnmodel
@@ -3083,7 +3080,7 @@ void DbFilterField::Update()
 
         Reference<XPropertySet> xFormProp(xForm,UNO_QUERY);
         Reference< XTablesSupplier > xSupTab;
-        xFormProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSupTab;
+        xFormProp->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupTab;
 
         Reference< XConnection >  xConnection(getRowSetConnection(xForm));
         if (!xSupTab.is())
@@ -3101,8 +3098,8 @@ void DbFilterField::Update()
         if (xComposerFieldAsSet.is() && ::comphelper::hasProperty(FM_PROP_TABLENAME, xComposerFieldAsSet) &&
             ::comphelper::hasProperty(FM_PROP_FIELDSOURCE, xComposerFieldAsSet))
         {
-            ::rtl::OUString aFieldName;
-            ::rtl::OUString aTableName;
+            OUString aFieldName;
+            OUString aTableName;
             xComposerFieldAsSet->getPropertyValue(FM_PROP_FIELDSOURCE)  >>= aFieldName;
             xComposerFieldAsSet->getPropertyValue(FM_PROP_TABLENAME)    >>= aTableName;
 
@@ -3121,27 +3118,25 @@ void DbFilterField::Update()
             {
                 Reference< XDatabaseMetaData >  xMeta = xConnection->getMetaData();
 
-                String aQuote( xMeta->getIdentifierQuoteString());
-                String aStatement;
-                aStatement.AssignAscii("SELECT DISTINCT ");
-
-                aStatement += String(quoteName(aQuote, aName));
+                OUString aQuote(xMeta->getIdentifierQuoteString());
+                OUStringBuffer aStatement("SELECT DISTINCT ");
+                aStatement.append(quoteName(aQuote, aName));
                 if (!aFieldName.isEmpty() && aName != aFieldName)
                 {
-                    aStatement.AppendAscii(" AS ");
-                    aStatement += quoteName(aQuote, aFieldName).getStr();
+                    aStatement.append(" AS ");
+                    aStatement.append(quoteName(aQuote, aFieldName));
                 }
 
-                aStatement.AppendAscii(" FROM ");
+                aStatement.append(" FROM ");
 
-                Reference< XPropertySet > xTableNameAccess( xTablesNames->getByName(aTableName), UNO_QUERY_THROW );
-                aStatement += composeTableNameForSelect( xConnection, xTableNameAccess ).getStr();
+                Reference< XPropertySet > xTableNameAccess(xTablesNames->getByName(aTableName), UNO_QUERY_THROW);
+                aStatement.append(composeTableNameForSelect(xConnection, xTableNameAccess));
 
                 xStatement = xConnection->createStatement();
                 Reference< ::com::sun::star::beans::XPropertySet >  xStatementProps(xStatement, UNO_QUERY);
                 xStatementProps->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, makeAny((sal_Bool)sal_True));
 
-                xListCursor = xStatement->executeQuery(aStatement);
+                xListCursor = xStatement->executeQuery(aStatement.makeStringAndClear());
 
                 Reference< ::com::sun::star::sdbcx::XColumnsSupplier >  xSupplyCols(xListCursor, UNO_QUERY);
                 Reference< ::com::sun::star::container::XIndexAccess >  xFields(xSupplyCols->getColumns(), UNO_QUERY);
@@ -3156,9 +3151,9 @@ void DbFilterField::Update()
             }
 
             sal_Int16 i = 0;
-            ::std::vector< ::rtl::OUString >   aStringList;
+            ::std::vector< OUString >   aStringList;
             aStringList.reserve(16);
-            ::rtl::OUString aStr;
+            OUString aStr;
             com::sun::star::util::Date aNullDate = m_rColumn.GetParent().getNullDate();
             sal_Int32 nFormatKey = m_rColumn.GetKey();
             Reference< XNumberFormatter >  xFormatter = m_rColumn.GetParent().getNumberFormatter();
@@ -3172,7 +3167,7 @@ void DbFilterField::Update()
             }
 
             // filling the entries for the combobox
-            for (::std::vector< ::rtl::OUString >::const_iterator iter = aStringList.begin();
+            for (::std::vector< OUString >::const_iterator iter = aStringList.begin();
                  iter != aStringList.end(); ++iter)
                 ((ComboBox*)m_pWindow)->InsertEntry(*iter, LISTBOX_APPEND);
         }
@@ -3180,9 +3175,9 @@ void DbFilterField::Update()
 }
 
 //------------------------------------------------------------------------------
-XubString DbFilterField::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbFilterField::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
 {
-    return XubString();
+    return OUString();
 }
 
 //------------------------------------------------------------------
@@ -3195,18 +3190,17 @@ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, co
 IMPL_LINK_NOARG(DbFilterField, OnClick)
 {
     TriState eState = ((CheckBoxControl*)m_pWindow)->GetBox().GetState();
-    String aText;
+    OUString aText;
 
     switch (eState)
     {
         case STATE_CHECK:
-            aText.AssignAscii("1");
+            aText = "1";
             break;
         case STATE_NOCHECK:
-            aText.AssignAscii("0");
+            aText = "0";
             break;
         case STATE_DONTKNOW:
-            aText = String();
             break;
     }
 
@@ -3641,7 +3635,7 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
     }
 
     Color* pColor = NULL;
-    String aText = GetText(_rxField, xFormatter, &pColor);
+    OUString aText = GetText(_rxField, xFormatter, &pColor);
     if (pColor != NULL)
     {
         Color aOldTextColor( rDev.GetTextColor() );
@@ -3748,7 +3742,7 @@ void SAL_CALL FmXEditCell::removeTextListener(const Reference< ::com::sun::star:
 }
 
 //------------------------------------------------------------------------------
-void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( RuntimeException )
+void SAL_CALL FmXEditCell::setText( const OUString& aText ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
@@ -3763,7 +3757,7 @@ void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( Runtim
 }
 
 //------------------------------------------------------------------------------
-void SAL_CALL FmXEditCell::insertText(const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText) throw(RuntimeException)
+void SAL_CALL FmXEditCell::insertText(const ::com::sun::star::awt::Selection& rSel, const OUString& aText) throw(RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
@@ -3775,11 +3769,11 @@ void SAL_CALL FmXEditCell::insertText(const ::com::sun::star::awt::Selection& rS
 }
 
 //------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXEditCell::getText() throw( RuntimeException )
+OUString SAL_CALL FmXEditCell::getText() throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    ::rtl::OUString aText;
+    OUString aText;
     if ( m_pEditImplementation )
     {
         if ( m_pEditImplementation->GetControl().IsVisible() && m_pColumn->GetParent().getDisplaySynchron())
@@ -3799,11 +3793,11 @@ void SAL_CALL FmXEditCell::insertText(const ::com::sun::star::awt::Selection& rS
 }
 
 //------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXEditCell::getSelectedText( void ) throw( RuntimeException )
+OUString SAL_CALL FmXEditCell::getSelectedText( void ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    ::rtl::OUString aText;
+    OUString aText;
     if ( m_pEditImplementation )
     {
         LineEnd eLineEndFormat = m_pColumn ? getModelLineEndSetting( m_pColumn->getModel() ) : LINEEND_LF;
@@ -4042,7 +4036,7 @@ void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActi
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException)
+void SAL_CALL FmXCheckBoxCell::setLabel( const OUString& _Label ) throw (RuntimeException)
 {
     SolarMutexGuard aGuard;
     if ( m_pColumn )
@@ -4053,7 +4047,7 @@ void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXCheckBoxCell::setActionCommand( const ::rtl::OUString& _Command ) throw (RuntimeException)
+void SAL_CALL FmXCheckBoxCell::setActionCommand( const OUString& _Command ) throw (RuntimeException)
 {
     m_aActionCommand = _Command;
 }
@@ -4191,7 +4185,7 @@ void SAL_CALL FmXListBoxCell::removeActionListener(const Reference< ::com::sun::
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXListBoxCell::addItem(const ::rtl::OUString& aItem, sal_Int16 nPos) throw( RuntimeException )
+void SAL_CALL FmXListBoxCell::addItem(const OUString& aItem, sal_Int16 nPos) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     if (m_pBox)
@@ -4233,13 +4227,10 @@ sal_Int16 SAL_CALL FmXListBoxCell::getItemCount() throw( RuntimeException )
 }
 
 //------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXListBoxCell::getItem(sal_Int16 nPos) throw( RuntimeException )
+OUString SAL_CALL FmXListBoxCell::getItem(sal_Int16 nPos) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
-    String aItem;
-    if (m_pBox)
-        aItem = m_pBox->GetEntry( nPos );
-    return aItem;
+    return m_pBox ? OUString(m_pBox->GetEntry(nPos)) : OUString();
 }
 //------------------------------------------------------------------
 ::comphelper::StringSequence SAL_CALL FmXListBoxCell::getItems() throw( RuntimeException )
@@ -4289,11 +4280,12 @@ Sequence< sal_Int16 > SAL_CALL FmXListBoxCell::getSelectedItemsPos() throw( Runt
     return aSeq;
 }
 //------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXListBoxCell::getSelectedItem() throw( RuntimeException )
+OUString SAL_CALL FmXListBoxCell::getSelectedItem() throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    String aItem;
+    OUString aItem;
+
     if (m_pBox)
     {
         UpdateFromColumn();
@@ -4343,7 +4335,7 @@ void SAL_CALL FmXListBoxCell::selectItemsPos(const Sequence< sal_Int16 >& aPosit
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXListBoxCell::selectItem(const ::rtl::OUString& aItem, sal_Bool bSelect) throw( RuntimeException )
+void SAL_CALL FmXListBoxCell::selectItem(const OUString& aItem, sal_Bool bSelect) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
@@ -4528,7 +4520,7 @@ void SAL_CALL FmXComboBoxCell::removeActionListener(const Reference< awt::XActio
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXComboBoxCell::addItem( const ::rtl::OUString& _Item, sal_Int16 _Pos ) throw( RuntimeException )
+void SAL_CALL FmXComboBoxCell::addItem( const OUString& _Item, sal_Int16 _Pos ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     if ( m_pComboBox )
@@ -4536,7 +4528,7 @@ void SAL_CALL FmXComboBoxCell::addItem( const ::rtl::OUString& _Item, sal_Int16
 }
 
 //------------------------------------------------------------------
-void SAL_CALL FmXComboBoxCell::addItems( const Sequence< ::rtl::OUString >& _Items, sal_Int16 _Pos ) throw( RuntimeException )
+void SAL_CALL FmXComboBoxCell::addItems( const Sequence< OUString >& _Items, sal_Int16 _Pos ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     if ( m_pComboBox )
@@ -4570,25 +4562,22 @@ sal_Int16 SAL_CALL FmXComboBoxCell::getItemCount() throw( RuntimeException )
 }
 
 //------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXComboBoxCell::getItem( sal_Int16 _Pos ) throw( RuntimeException )
+OUString SAL_CALL FmXComboBoxCell::getItem( sal_Int16 _Pos ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
-    String sItem;
-    if ( m_pComboBox )
-        sItem = m_pComboBox->GetEntry( _Pos );
-    return sItem;
+    return m_pComboBox ? OUString(m_pComboBox->GetEntry(_Pos)) : OUString();
 }
 //------------------------------------------------------------------
-Sequence< ::rtl::OUString > SAL_CALL FmXComboBoxCell::getItems() throw( RuntimeException )
+Sequence< OUString > SAL_CALL FmXComboBoxCell::getItems() throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    Sequence< ::rtl::OUString > aItems;
+    Sequence< OUString > aItems;
     if ( m_pComboBox )
     {
         sal_uInt16 nEntries = m_pComboBox->GetEntryCount();
         aItems.realloc( nEntries );
-        ::rtl::OUString* pItem = aItems.getArray();
+        OUString* pItem = aItems.getArray();
         for ( sal_uInt16 n=0; n<nEntries; ++n, ++pItem )
             *pItem = m_pComboBox->GetEntry( n );
     }
@@ -4755,26 +4744,26 @@ void SAL_CALL FmXFilterCell::removeTextListener(const Reference< ::com::sun::sta
 }
 
 //------------------------------------------------------------------------------
-void SAL_CALL FmXFilterCell::setText( const ::rtl::OUString& aText ) throw( RuntimeException )
+void SAL_CALL FmXFilterCell::setText( const OUString& aText ) throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     ((DbFilterField*)m_pCellControl)->SetText(aText);
 }
 
 //------------------------------------------------------------------------------
-void SAL_CALL FmXFilterCell::insertText( const ::com::sun::star::awt::Selection& /*rSel*/, const ::rtl::OUString& /*aText*/ ) throw( RuntimeException )
+void SAL_CALL FmXFilterCell::insertText( const ::com::sun::star::awt::Selection& /*rSel*/, const OUString& /*aText*/ ) throw( RuntimeException )
 {
 }
 
 //------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXFilterCell::getText() throw( RuntimeException )
+OUString SAL_CALL FmXFilterCell::getText() throw( RuntimeException )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     return ((DbFilterField*)m_pCellControl)->GetText();
 }
 
 //------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXFilterCell::getSelectedText( void ) throw( RuntimeException )
+OUString SAL_CALL FmXFilterCell::getSelectedText( void ) throw( RuntimeException )
 {
     return getText();
 }
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 4f780cc..3e56d98 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -178,8 +178,8 @@ public:
     //      freigeben aller Daten, die fuer den AliveMode noetig sind
     void    Clear();
 
-    XubString  GetCellText(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
-    XubString  GetCellText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+    OUString  GetCellText(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+    OUString  GetCellText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
 
     void    SetReadOnly(sal_Bool bRead){m_bReadOnly = bRead;}
     void    SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = sal_True; m_nFieldPos = nPos;}
@@ -266,7 +266,7 @@ protected:
 
 protected:
     // adds the given property to the list of properties which we listen for
-    void    doPropertyListening( const ::rtl::OUString& _rPropertyName );
+    void    doPropertyListening( const OUString& _rPropertyName );
 
     // called whenever a property which affects field settings in general is called
     // you should overwrite this method for every property you add yourself as listener to
@@ -304,7 +304,7 @@ public:
     sal_Bool Commit();
 
     // Formatting the field data to output text
-    virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) = 0;
+    virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) = 0;
 
     virtual void Update(){}
     // Refresh the control by the field data
@@ -345,7 +345,7 @@ protected:
     virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
 
 private:

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list