[Libreoffice-commits] .: 7 commits - automation/source basic/source connectivity/source dbaccess/source desktop/source editeng/source filter/source idl/inc idl/source l10ntools/inc l10ntools/source linguistic/source oox/inc oox/source padmin/source rsc/inc rsc/source sc/source svtools/bmpmaker svtools/source svx/source toolkit/source tools/bootstrp tools/source unotools/source unusedcode.easy vcl/generic vcl/inc vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Mon Nov 28 01:55:42 PST 2011


 automation/source/communi/communi.cxx            |    2 
 automation/source/server/server.cxx              |    2 
 automation/source/server/statemnt.cxx            |    6 
 automation/source/simplecm/simplecm.cxx          |   12 -
 automation/source/testtool/comm_bas.cxx          |    2 
 automation/source/testtool/objtest.cxx           |   10 -
 automation/source/testtool/tcommuni.cxx          |    2 
 basic/source/app/app.cxx                         |   14 -
 basic/source/app/appwin.cxx                      |    2 
 basic/source/app/brkpnts.cxx                     |    4 
 basic/source/app/dialogs.cxx                     |   34 +--
 basic/source/app/msgedit.cxx                     |   12 -
 basic/source/app/textedit.cxx                    |    2 
 basic/source/classes/disas.cxx                   |   10 -
 basic/source/classes/image.cxx                   |    4 
 basic/source/comp/buffer.cxx                     |    4 
 basic/source/runtime/iosys.cxx                   |    2 
 basic/source/runtime/methods.cxx                 |    9 -
 basic/source/runtime/methods1.cxx                |    9 -
 basic/source/runtime/step0.cxx                   |    8 
 basic/source/runtime/step2.cxx                   |    2 
 basic/source/sbx/sbxobj.cxx                      |   58 +++---
 basic/source/sbx/sbxvar.cxx                      |   16 -
 connectivity/source/drivers/dbase/DIndex.cxx     |    6 
 connectivity/source/drivers/dbase/dindexnode.cxx |    4 
 connectivity/source/drivers/hsqldb/HDriver.cxx   |    4 
 dbaccess/source/ui/misc/TokenWriter.cxx          |   13 -
 desktop/source/app/cmdlinehelp.cxx               |   24 +-
 editeng/source/editeng/editobj.cxx               |   11 -
 editeng/source/items/frmitems.cxx                |    6 
 editeng/source/misc/svxacorr.cxx                 |    4 
 filter/source/msfilter/msdffimp.cxx              |    2 
 idl/inc/command.hxx                              |    1 
 idl/source/objects/basobj.cxx                    |    2 
 idl/source/objects/bastype.cxx                   |    2 
 idl/source/objects/module.cxx                    |   16 +
 idl/source/objects/object.cxx                    |    4 
 idl/source/objects/slot.cxx                      |    4 
 idl/source/prj/command.cxx                       |   20 +-
 idl/source/prj/database.cxx                      |   10 -
 idl/source/prj/svidl.cxx                         |   61 +++---
 l10ntools/inc/gsicheck.hxx                       |    2 
 l10ntools/inc/xmlparse.hxx                       |    2 
 l10ntools/source/cfgmerge.cxx                    |   32 ++-
 l10ntools/source/export.cxx                      |   10 -
 l10ntools/source/export2.cxx                     |   20 +-
 l10ntools/source/gsicheck.cxx                    |   33 +--
 l10ntools/source/helpmerge.cxx                   |   50 +++--
 l10ntools/source/lngmerge.cxx                    |    9 -
 l10ntools/source/localize.cxx                    |   29 +--
 l10ntools/source/tagtest.cxx                     |    8 
 l10ntools/source/xmlparse.cxx                    |  173 +++++++++++--------
 l10ntools/source/xrmmerge.cxx                    |   21 +-
 linguistic/source/dicimp.cxx                     |   21 +-
 oox/inc/oox/export/utils.hxx                     |   15 -
 oox/source/export/drawingml.cxx                  |   14 -
 padmin/source/adddlg.cxx                         |    4 
 padmin/source/cmddlg.cxx                         |    2 
 padmin/source/fontentry.cxx                      |    2 
 padmin/source/newppdlg.cxx                       |    8 
 rsc/inc/rscdb.hxx                                |    2 
 rsc/inc/rscdef.hxx                               |    2 
 rsc/inc/rscrsc.hxx                               |    2 
 rsc/inc/rsctree.hxx                              |    2 
 rsc/source/parser/rscibas.cxx                    |    4 
 rsc/source/parser/rscicpx.cxx                    |    4 
 rsc/source/parser/rscyacc.y                      |   10 -
 rsc/source/rsc/rsc.cxx                           |   38 ++--
 rsc/source/tools/rscdef.cxx                      |    2 
 rsc/source/tools/rsctools.cxx                    |    2 
 rsc/source/tools/rsctree.cxx                     |    6 
 sc/source/core/tool/interpr4.cxx                 |   25 +-
 sc/source/filter/dif/difexp.cxx                  |    8 
 sc/source/ui/docshell/docsh.cxx                  |   10 -
 svtools/bmpmaker/bmp.cxx                         |   18 +-
 svtools/bmpmaker/bmpcore.cxx                     |    3 
 svtools/bmpmaker/bmpsum.cxx                      |   11 -
 svtools/bmpmaker/g2g.cxx                         |   20 +-
 svtools/source/filter/ixbm/xbmread.cxx           |    3 
 svtools/source/filter/sgvtext.cxx                |    2 
 svtools/source/filter/wmf/enhwmf.cxx             |    7 
 svtools/source/filter/wmf/winwmf.cxx             |    7 
 svtools/source/filter/wmf/wmfwr.cxx              |   13 -
 svtools/source/svhtml/htmlout.cxx                |    2 
 svx/source/dialog/sendreportunx.cxx              |   39 +---
 svx/source/fmcomp/gridcell.cxx                   |    2 
 svx/source/form/ParseContext.cxx                 |    4 
 svx/source/gallery2/gallery1.cxx                 |   11 -
 svx/source/gallery2/galobj.cxx                   |    2 
 svx/source/xml/xmlgrhlp.cxx                      |    3 
 toolkit/source/awt/vclxtoolkit.cxx               |    7 
 toolkit/source/awt/vclxwindows.cxx               |    2 
 tools/bootstrp/cppdep.cxx                        |   70 ++-----
 tools/bootstrp/cppdep.hxx                        |   12 -
 tools/bootstrp/mkunroll/mkunroll.cxx             |   12 -
 tools/bootstrp/rscdep.cxx                        |   39 +---
 tools/source/inet/inetstrm.cxx                   |   35 ++-
 unotools/source/i18n/calendarwrapper.cxx         |  195 +++++++++++-----------
 unotools/source/i18n/charclass.cxx               |   12 -
 unotools/source/i18n/localedatawrapper.cxx       |   78 ++++----
 unotools/source/i18n/transliterationwrapper.cxx  |   34 +--
 unusedcode.easy                                  |    9 -
 vcl/generic/fontmanager/fontmanager.cxx          |    7 
 vcl/generic/print/common_gfx.cxx                 |    3 
 vcl/generic/print/genprnpsp.cxx                  |   16 -
 vcl/inc/vcl/fixed.hxx                            |    4 
 vcl/inc/vcl/gdimtf.hxx                           |   10 -
 vcl/source/control/fixed.cxx                     |    8 
 vcl/source/gdi/gdimtf.cxx                        |  203 -----------------------
 vcl/unx/generic/printer/ppdparser.cxx            |    2 
 110 files changed, 856 insertions(+), 1041 deletions(-)

New commits:
commit 74534364f9ce285079467aab11bfde8620f6d2f2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 27 21:19:46 2011 +0000

    getenv/putenv->osl_setEnvironment

diff --git a/svx/source/dialog/sendreportunx.cxx b/svx/source/dialog/sendreportunx.cxx
index 8586d49..35a5cb5 100644
--- a/svx/source/dialog/sendreportunx.cxx
+++ b/svx/source/dialog/sendreportunx.cxx
@@ -29,6 +29,7 @@
 
 #include "docrecovery.hxx"
 #include "osl/file.hxx"
+#include "osl/process.h"
 #include "rtl/bootstrap.hxx"
 #include "rtl/strbuf.hxx"
 #include "tools/appendunixshellword.hxx"
@@ -209,16 +210,9 @@ namespace svx{
 
         bool ErrorRepSendDialog::SendReport()
         {
-            rtl::OString strSubject(rtl::OUStringToOString(GetDocType(), RTL_TEXTENCODING_UTF8));
-
-#if defined( LINUX ) || defined (MACOSX )
-            setenv( "ERRORREPORT_SUBJECT", strSubject.getStr(), 1 );
-#else
-            static ::rtl::OString strEnvSubject = "ERRORREPORT_SUBJECT";
-            strEnvSubject += "=";
-            strEnvSubject += strSubject;
-            putenv( (char *)strEnvSubject.getStr() );
-#endif
+            rtl::OUString sSubEnvVar(RTL_CONSTASCII_USTRINGPARAM("ERRORREPORT_SUBJECT"));
+            rtl::OUString strSubject(GetDocType());
+            osl_setEnvironment(sSubEnvVar.pData, strSubject.pData);
 
             char szBodyFile[L_tmpnam] = "";
             FILE *fp = fopen( tmpnam( szBodyFile ), "w" );
@@ -230,14 +224,11 @@ namespace svx{
                 size_t nWritten = fwrite(strUTF8.getStr(), 1, strUTF8.getLength(), fp);
                 OSL_VERIFY(nWritten == static_cast<size_t>(strUTF8.getLength()));
                 fclose( fp );
-#if defined( LINUX ) || defined (MACOSX)
-                setenv("ERRORREPORT_BODYFILE", szBodyFile, 1);
-#else
-                static ::rtl::OString strEnvBodyFile = "ERRORREPORT_BODYFILE";
-                strEnvBodyFile += "=";
-                strEnvBodyFile += szBodyFile;
-                putenv((char *)strEnvBodyFile.getStr());
-#endif
+
+                rtl::OUString sBodyEnvVar(RTL_CONSTASCII_USTRINGPARAM("ERRORREPORT_BODYFILE"));
+                rtl::OUString strBodyFile(rtl::OStringToOUString(rtl::OString(szBodyFile),
+                    osl_getThreadTextEncoding()));
+                osl_setEnvironment(sBodyEnvVar.pData, strBodyFile.pData);
             }
 
             int ret = -1;
commit bdaadf8fdde23f05ba151a9b0a1108e8d713cf40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 27 21:10:18 2011 +0000

    is there any point to aSrcLine and "rsc" directive in idl?

diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index dad01dc..6d89717 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -57,7 +57,6 @@ public:
     String      aCHeaderFile;
     String      aCSourceFile;
     String      aTargetFile;
-    ByteString      aSrsLine;
     String      aHelpIdFile;
     String      aCSVFile;
     String      aExportFile;
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 9366d7c..0eece07 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -333,10 +333,9 @@ SvCommand::SvCommand( int argc, char ** argv )
             }
             else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) )
             { // first line in *.srs file
+                OSL_ENSURE(false, "does anything use this option, doesn't look like it belong here");
                 if( aList[ i + 1 ] )
                 {
-                    aSrsLine = rtl::OUStringToOString(*aList[ i +1 ],
-                        RTL_TEXTENCODING_UTF8);
                     i++;
                 }
             }
commit 963fd1696cb3563ed434a0af8b13d99145e43073
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 27 20:54:05 2011 +0000

    callcatcher: remove unused methods

diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx
index 0ff8221..8f94b50 100644
--- a/rsc/inc/rsctree.hxx
+++ b/rsc/inc/rsctree.hxx
@@ -79,8 +79,6 @@ public:
                         // return ist neue Root
             NameNode*   Remove( NameNode * );
             void        OrderTree();
-            sal_Bool        IsOrderTree() const;
-
 };
 
 /*************************************************************************/
diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx
index b714ecb..3c9846d 100644
--- a/rsc/source/tools/rsctree.cxx
+++ b/rsc/source/tools/rsctree.cxx
@@ -381,12 +381,6 @@ IMPL_LINK_INLINE_START( OrderCtrl, CallBackFunc, NameNode *, pNext )
 }
 IMPL_LINK_INLINE_END( OrderCtrl, CallBackFunc, NameNode *, pNext )
 
-sal_Bool NameNode::IsOrderTree() const{
-    OrderCtrl aOrder;
-
-    return aOrder.IsOrder( this );
-}
-
 /****************** I d N o d e ******************************************/
 /*************************************************************************
 |*
diff --git a/unusedcode.easy b/unusedcode.easy
index af938e0..e11ba88 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -114,7 +114,6 @@ FileStream::FileStream(rtl::OString const&, FileAccessMode)
 FixedBorder::FixedBorder(Window*, long)
 FixedBorder::SetBorderType(unsigned short)
 FixedBorder::SetTransparent(unsigned char)
-FixedImage::CalcImagePos(Point const&, Size const&, Size const&)
 FmEntryDataArray::DeleteAndDestroy(unsigned short, unsigned short)
 FmEntryDataArray::Insert(FmEntryData* const&, unsigned short&)
 FmEntryDataArray::Insert(FmEntryData* const*, unsigned short)
@@ -132,14 +131,7 @@ FontStyleMenu::Fill(String const&, FontList const*)
 FontStyleMenu::FontStyleMenu()
 FormattedField::SetValidateText(String const&, String const*)
 FormatterBase::SetFieldText(String const&, unsigned char)
-GDIMetaFile::CopyAction(unsigned long) const
-GDIMetaFile::GetActionPos(String const&)
-GDIMetaFile::GetLabel(unsigned long)
-GDIMetaFile::GetLabelCount() const
-GDIMetaFile::InsertLabel(String const&, unsigned long)
 GDIMetaFile::IsEqual(GDIMetaFile const&) const
-GDIMetaFile::RemoveLabel(String const&)
-GDIMetaFile::RenameLabel(String const&, String const&)
 GDIMetaFile::ReplaceColors(Color const&, Color const&, unsigned long)
 GDIMetaFile::SaveStatus()
 GDIMetaFile::Wind(unsigned long)
@@ -236,7 +228,6 @@ MultiLineEdit::IsFocusSelectionHideEnabled() const
 MultiLineEdit::IsRightToLeft() const
 MultiSelection::Append(long)
 MultiSelection::PrevSelected()
-NameNode::IsOrderTree() const
 NativeNumberWrapper::isValidNatNum(com::sun::star::lang::Locale const&, short) const
 NfCurrencyEntry::ApplyVariableInformation(NfCurrencyEntry const&)
 NfCurrencyEntry::NfCurrencyEntry()
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index 769a61c..a894905 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -186,9 +186,7 @@ public:
 
     sal_Bool        SetModeImage( const Image& rImage );
     const Image&    GetModeImage( ) const;
-
-    Point           CalcImagePos( const Point& rPos,
-                                  const Size& rObjSize, const Size& rWinSize );
+;
 };
 
 #endif  // _SV_FIXED_HXX
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index e15a536..aaf0012 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -37,7 +37,6 @@
 #include <vector>
 
 class OutputDevice;
-class ImpLabelList;
 class MetaAction;
 class MetaCommentAction;
 class SvStream;
@@ -114,7 +113,6 @@ private:
     GDIMetaFile*    pPrev;
     GDIMetaFile*    pNext;
     OutputDevice*   pOutDev;
-    ImpLabelList*   pLabelList;
     sal_Bool            bPause;
     sal_Bool            bRecord;
     sal_Bool            bUseCanvas;
@@ -215,7 +213,6 @@ public:
     void            WindNext();
 
     size_t          GetActionSize() const;
-    size_t          GetActionPos( const String& rLabel );
 
     void            AddAction( MetaAction* pAction );
     void            AddAction( MetaAction* pAction, size_t nPos );
@@ -225,16 +222,9 @@ public:
     MetaAction*     FirstAction();
     MetaAction*     NextAction();
     MetaAction*     GetAction( size_t nAction ) const;
-    MetaAction*     CopyAction( size_t nPos ) const;
     MetaAction*     GetCurAction() const { return GetAction( nCurrentActionElement ); }
     MetaAction*     ReplaceAction( MetaAction* pAction, size_t nAction );
 
-    sal_Bool        InsertLabel( const String& rLabel, size_t nActionPos );
-    void            RemoveLabel( const String& rLabel );
-    void            RenameLabel( const String& rLabel, const String& rNewLabel );
-    size_t          GetLabelCount() const;
-    String          GetLabel( size_t nLabel );
-
     sal_Bool        SaveStatus();
 
     const Size&     GetPrefSize() const { return aPrefSize; }
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 29d582d..0606073 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -1138,12 +1138,4 @@ const Image& FixedImage::GetModeImage( ) const
     return maImage;
 }
 
-// -----------------------------------------------------------------------
-
-Point FixedImage::CalcImagePos( const Point& rPos,
-                                const Size& rObjSize, const Size& rWinSize )
-{
-    return ImplCalcPos( GetStyle(), rPos, rObjSize, rWinSize );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 309c9e2..bd6abfb 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -132,106 +132,6 @@ struct ImplBmpReplaceParam
     const sal_uLong*    pTols;
 };
 
-
-// ---------
-// - Label -
-// ---------
-
-struct ImpLabel
-{
-    String  aLabelName;
-    sal_uLong   nActionPos;
-
-            ImpLabel( const String& rLabelName, sal_uLong _nActionPos ) :
-                aLabelName( rLabelName ),
-                nActionPos( _nActionPos ) {}
-};
-
-// -------------
-// - LabelList -
-// -------------
-
-typedef ::std::vector< ImpLabel* > ImpLabelVector;
-
-class ImpLabelList
-{
-private:
-    ImpLabelVector  aList;
-    size_t          nListPos;
-
-public:
-
-                   ImpLabelList() {}
-                    ImpLabelList( const ImpLabelList& rList );
-                    ~ImpLabelList();
-
-    void            ImplInsert( ImpLabel* p ) { aList.push_back( p ); }
-
-    ImpLabel*       ImplGetLabel( size_t nPos ) const;
-    ImpLabel*       ImplRemove( size_t nPos );
-
-    size_t          ImplGetLabelPos( const String& rLabelName );
-    size_t          ImplCount() const { return aList.size(); }
-};
-
-// ------------------------------------------------------------------------
-
-ImpLabelList::ImpLabelList( const ImpLabelList& rList )
-{
-    for( size_t i = 0, n = rList.ImplCount(); i < n; ++i )
-        aList.push_back( new ImpLabel( *rList.ImplGetLabel( i ) ) );
-    nListPos = 0;
-}
-
-// ------------------------------------------------------------------------
-
-ImpLabelList::~ImpLabelList()
-{
-    for( size_t i = 0, n = aList.size(); i < n; ++i )
-        delete aList[ i ];
-    aList.clear();
-}
-
-// ------------------------------------------------------------------------
-
-ImpLabel* ImpLabelList::ImplGetLabel( size_t nPos ) const
-{
-    return ( nPos < aList.size() ) ? aList[ nPos ] : NULL;
-}
-
-// ------------------------------------------------------------------------
-
-ImpLabel* ImpLabelList::ImplRemove( size_t nPos )
-{
-    ImpLabel* return_value = NULL;
-    if ( nPos < aList.size() )
-    {
-        ImpLabelVector::iterator it = aList.begin();
-        ::std::advance( it, nPos );
-        return_value = *it;
-        aList.erase( it );
-    }
-    return return_value;
-}
-
-// ------------------------------------------------------------------------
-
-size_t ImpLabelList::ImplGetLabelPos( const String& rLabelName )
-{
-    size_t nLabelPos = METAFILE_LABEL_NOTFOUND;
-
-    for ( size_t i = 0, n = aList.size(); i < n; ++i )
-    {
-        if ( rLabelName == aList[ i ]->aLabelName )
-        {
-            nLabelPos = i;
-            break;
-        }
-    }
-
-    return nLabelPos;
-}
-
 // ---------------
 // - GDIMetaFile -
 // ---------------
@@ -242,7 +142,6 @@ GDIMetaFile::GDIMetaFile() :
     pPrev       ( NULL ),
     pNext       ( NULL ),
     pOutDev     ( NULL ),
-    pLabelList  ( NULL ),
     bPause      ( sal_False ),
     bRecord     ( sal_False ),
     bUseCanvas  ( sal_False )
@@ -269,11 +168,6 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
         aList.push_back( rMtf.GetAction( i ) );
     }
 
-    if( rMtf.pLabelList )
-        pLabelList = new ImpLabelList( *rMtf.pLabelList );
-    else
-        pLabelList = NULL;
-
     if( rMtf.bRecord )
     {
         Record( rMtf.pOutDev );
@@ -346,11 +240,6 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
             aList.push_back( rMtf.GetAction( i ) );
         }
 
-        if( rMtf.pLabelList )
-            pLabelList = new ImpLabelList( *rMtf.pLabelList );
-        else
-           pLabelList = NULL;
-
         aPrefMapMode = rMtf.aPrefMapMode;
         aPrefSize = rMtf.aPrefSize;
         aHookHdlLink = rMtf.aHookHdlLink;
@@ -439,9 +328,6 @@ void GDIMetaFile::Clear()
     for( size_t i = 0, n = aList.size(); i < n; ++i )
         aList[ i ]->Delete();
     aList.clear();
-
-    delete pLabelList;
-    pLabelList = NULL;
 }
 
 // ------------------------------------------------------------------------
@@ -943,95 +829,6 @@ void GDIMetaFile::RemoveAction( size_t nPos )
 
 // ------------------------------------------------------------------------
 
-MetaAction* GDIMetaFile::CopyAction( size_t nPos ) const
-{
-    return ( nPos < aList.size() ) ? aList[ nPos ]->Clone() : NULL;
-}
-
-// ------------------------------------------------------------------------
-
-size_t GDIMetaFile::GetActionPos( const String& rLabel )
-{
-    ImpLabel* pLabel = NULL;
-
-    if( pLabelList )
-        pLabel = pLabelList->ImplGetLabel( pLabelList->ImplGetLabelPos( rLabel ) );
-    else
-        pLabel = NULL;
-
-    return( pLabel ? pLabel->nActionPos : METAFILE_LABEL_NOTFOUND );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GDIMetaFile::InsertLabel( const String& rLabel, size_t nActionPos )
-{
-    sal_Bool bRet = sal_False;
-
-    if( !pLabelList )
-        pLabelList = new ImpLabelList;
-
-    if( pLabelList->ImplGetLabelPos( rLabel ) == METAFILE_LABEL_NOTFOUND )
-    {
-        pLabelList->ImplInsert( new ImpLabel( rLabel, nActionPos ) );
-        bRet = sal_True;
-    }
-
-    return bRet;
-}
-
-// ------------------------------------------------------------------------
-
-void GDIMetaFile::RemoveLabel( const String& rLabel )
-{
-    if( pLabelList )
-    {
-        const sal_uLong nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
-
-        if( nLabelPos != METAFILE_LABEL_NOTFOUND )
-            delete pLabelList->ImplRemove( nLabelPos );
-    }
-}
-
-// ------------------------------------------------------------------------
-
-void GDIMetaFile::RenameLabel( const String& rLabel, const String& rNewLabel )
-{
-    if( pLabelList )
-    {
-        const sal_uLong nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
-
-        if ( nLabelPos != METAFILE_LABEL_NOTFOUND )
-            pLabelList->ImplGetLabel( nLabelPos )->aLabelName = rNewLabel;
-    }
-}
-
-// ------------------------------------------------------------------------
-
-size_t GDIMetaFile::GetLabelCount() const
-{
-    return( pLabelList ? pLabelList->ImplCount() : 0UL );
-}
-
-// ------------------------------------------------------------------------
-
-String GDIMetaFile::GetLabel( size_t nLabel )
-{
-    String aString;
-
-    if( pLabelList )
-    {
-        const ImpLabel* pLabel = pLabelList->ImplGetLabel( nLabel );
-
-        if( pLabel )
-            aString = pLabel->aLabelName;
-    }
-
-    return aString;
-}
-
-// ------------------------------------------------------------------------
-
 sal_Bool GDIMetaFile::SaveStatus()
 {
     if ( bRecord )
commit 6f33482f8f4329b6c9874397bdb67c1b958b69c2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 27 20:37:42 2011 +0000

    ByteString->rtl::OUStringToOString

diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index 802c07f..4eb45a4 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -394,7 +394,7 @@ CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChanne
 : MultiCommunicationManager( bUseMultiChannel )
 {
     ByteString aApplication("Something inside ");
-    aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) );
+    aApplication.Append( rtl::OUStringToOString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) );
     SetApplication( aApplication );
 }
 
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 46b25b0..7418e88 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -206,7 +206,7 @@ sal_uLong RemoteControlCommunicationManager::GetPort()
         Config aConf(Config::GetConfigName( aIniFileDir, CUniString("testtool") ));
         aConf.SetGroup("Communication");
 
-        ByteString aNoTesttoolKey( ByteString("Exclude_").Append( ByteString( Application::GetAppFileName(), RTL_TEXTENCODING_UTF8 ) ) );
+        rtl::OString aNoTesttoolKey( ByteString("Exclude_").Append( rtl::OUStringToOString(Application::GetAppFileName(), RTL_TEXTENCODING_UTF8) ) );
 // -notesttool
         for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
         {
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 310afe8..15c2c53 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -2502,10 +2502,10 @@ sal_Bool StatementCommand::Execute()
         case RC_Assert:
             {
                 ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgel�st" );
-                aAssertion = ByteString( String( aAssertion, RTL_TEXTENCODING_MS_1252 ), RTL_TEXTENCODING_UTF8 );
-                DBG_ASSERT( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+                aAssertion = rtl::OUStringToOString(String(aAssertion, RTL_TEXTENCODING_MS_1252), RTL_TEXTENCODING_UTF8 );
+                DBG_ASSERT( !aString1.Len(), rtl::OUStringToOString( aString1, RTL_TEXTENCODING_UTF8 ).getStr() );
                 DBG_ASSERT(  aString1.Len(), aAssertion.GetBuffer() );
-                OSL_ENSURE( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+                OSL_ENSURE( !aString1.Len(), rtl::OUStringToOString( aString1, RTL_TEXTENCODING_UTF8 ).getStr() );
                 OSL_ENSURE(  aString1.Len(), aAssertion.GetBuffer() );
             }
             break;
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index fd2c9d0..bd1e83a 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -195,7 +195,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
                     pStreamSocket->getPeerAddr( *pPeerAdr );
                     osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData);
                     delete pPeerAdr;
-                    return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
+                    return rtl::OUStringToOString(aDotted, RTL_TEXTENCODING_UTF8);
                 }
                 //break;
             case CM_FQDN:
@@ -203,7 +203,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
                     if ( !aCommunicationPartner.Len() )
                     {
                         rtl::OUString aFQDN( pStreamSocket->getPeerHost());
-                        aCommunicationPartner = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 );
+                        aCommunicationPartner = rtl::OUStringToOString(aFQDN, RTL_TEXTENCODING_UTF8);
                     }
                     return aCommunicationPartner;
                 }
@@ -226,7 +226,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
                     pStreamSocket->getPeerAddr( *pPeerAdr );
                     osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData);
                     delete pPeerAdr;
-                    return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
+                    return rtl::OUStringToOString(aDotted, RTL_TEXTENCODING_UTF8);
                 }
                 //break;
             case CM_FQDN:
@@ -234,7 +234,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
                     if ( !aMyName.Len() )
                     {
                         rtl::OUString aFQDN(pStreamSocket->getLocalHost());
-                        aMyName = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 );
+                        aMyName = rtl::OUStringToOString(aFQDN, RTL_TEXTENCODING_UTF8);
                     }
                     return aMyName;
                 }
@@ -368,8 +368,8 @@ sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong n
 
 ByteString CommunicationManager::GetMyName( CM_NameType )
 {
-    rtl::OUString aHostname( osl::SocketAddr::getLocalHostname());
-    return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 );
+    rtl::OUString aHostname(osl::SocketAddr::getLocalHostname());
+    return rtl::OUStringToOString(aHostname, RTL_TEXTENCODING_UTF8);
 }
 
 void CommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx
index ef011a7..7d52c68 100644
--- a/automation/source/testtool/comm_bas.cxx
+++ b/automation/source/testtool/comm_bas.cxx
@@ -334,7 +334,7 @@ void CommunicationWrapper::Events( String aType, CommunicationLink* pLink )
 void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ )
 { //    CommunicationLink StartCommunication( Host, Port )
     m_bCatchOpen = sal_True;
-    if ( m_pManager->StartCommunication( ByteString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) )
+    if ( m_pManager->StartCommunication( rtl::OUStringToOString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) )
     {
         while ( !m_pNewLink )
             GetpApp()->Reschedule();
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 04d6799..af677dc 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -330,7 +330,7 @@ void TestToolObj::LoadIniFile()
 
     NEWOLD( "LogBaseDir", "LogBasisverzeichnis" )
     String aLFB;
-    GETSET( aLFB, "LogBaseDir", ByteString( aFB, RTL_TEXTENCODING_UTF8 ) );
+    GETSET( aLFB, "LogBaseDir", rtl::OUStringToOString(aFB, RTL_TEXTENCODING_UTF8) );
     pImpl->aLogFileBase = DirEntry(aLFB);
 
     NEWOLD( "HIDDir", "HIDVerzeichnis" )
@@ -2344,10 +2344,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                             String aSource,aDest;
                             aSource = rPar->Get(1)->GetString();
 #ifdef UNX
-                            ByteString aByteSource( aSource, osl_getThreadTextEncoding() );
+                            rtl::OString aByteSource(rtl::OUStringToOString(aSource, osl_getThreadTextEncoding()));
                             char cDest[1024];
                             int nLen = 0;
-                            if ( ( nLen = readlink( aByteSource.GetBuffer(), cDest, sizeof(cDest) ) ) >= 0 )
+                            if ( ( nLen = readlink( aByteSource.getStr(), cDest, sizeof(cDest) ) ) >= 0 )
                             {
                                 aDest = String( cDest, nLen, osl_getThreadTextEncoding() );
                             }
@@ -2391,7 +2391,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         {
                             if ( !pImpl->pHttpRequest )
                                 pImpl->pHttpRequest = new HttpRequest;
-                            pImpl->pHttpRequest->SetRequest( ByteString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), ByteString( rPar->Get(2)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(3)->GetUShort() );
+                            pImpl->pHttpRequest->SetRequest( rtl::OUStringToOString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rtl::OUStringToOString( rPar->Get(2)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(3)->GetUShort() );
 
                             if ( pImpl->pHttpRequest->Execute() )
                             {
@@ -2418,7 +2418,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         {
                             if ( !pImpl->pHttpRequest )
                                 pImpl->pHttpRequest = new HttpRequest;
-                            pImpl->pHttpRequest->SetProxy( ByteString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(2)->GetUShort() );
+                            pImpl->pHttpRequest->SetProxy( rtl::OUStringToOString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(2)->GetUShort() );
                         }
                         else
                             SetError( SbERR_BAD_NUMBER_OF_ARGS );
diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx
index 7cc85bf..2e0d7b8 100644
--- a/automation/source/testtool/tcommuni.cxx
+++ b/automation/source/testtool/tcommuni.cxx
@@ -52,7 +52,7 @@ CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT()
 sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication()
 {
     bApplicationStarted = sal_False;
-    return CommunicationManagerClientViaSocket::StartCommunication( ByteString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() );
+    return CommunicationManagerClientViaSocket::StartCommunication( rtl::OUStringToOString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() );
 }
 
 
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 14f9633..ac6d801 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -326,9 +326,9 @@ int BasicApp::Main( )
     RemoveAccel( pMainAccel );
 
     }
-    catch(const class Exception & rEx)
+    catch (const class Exception & rEx)
     {
-        printf( "Exception not caught: %s\n", ByteString( String(rEx.Message), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+        printf( "Exception not caught: %s\n", rtl::OUStringToOString(rEx.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
         String aMsg( String::CreateFromAscii( "Exception not caught: " ) );
         aMsg.Append( String( rEx.Message ) );
         InfoBox( NULL, aMsg ).Execute();
@@ -1078,7 +1078,7 @@ void BasicFrame::AddToLRU(String const& aFile)
                 pPopup->SetItemText(IDM_FILE_LRU1 + i-1,FILENAME2MENU( i, MENU2FILENAME( pPopup->GetItemText(IDM_FILE_LRU1 + i-1-1) ) ));
         }
     }
-    aConfig.WriteKey(LRUNr(1), ByteString( aFile, RTL_TEXTENCODING_UTF8 ) );
+    aConfig.WriteKey(LRUNr(1), rtl::OUStringToOString(aFile, RTL_TEXTENCODING_UTF8) );
     if ( pPopup->GetItemPos( IDM_FILE_LRU1 ) == MENU_ITEM_NOTFOUND )
          pPopup->InsertItem(IDM_FILE_LRU1,FILENAME2MENU( 1, aFile));
     else
@@ -1657,7 +1657,7 @@ class NewFileDialog : public FileDialog
 private:
     String aLastPath;
 public:
-    ByteString aFilterType;
+    rtl::OString aFilterType;
     NewFileDialog( Window* pParent, WinBits nWinStyle ):FileDialog( pParent, nWinStyle ){};
     virtual short   Execute();
     virtual void    FilterSelect();
@@ -1677,7 +1677,7 @@ void NewFileDialog::FilterSelect()
     {
         nFilterNr++;
     }
-    aFilterType = ByteString( GetFilterType( nFilterNr ), RTL_TEXTENCODING_UTF8 );
+    aFilterType = rtl::OUStringToOString(GetFilterType(nFilterNr), RTL_TEXTENCODING_UTF8);
 
     Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
     aConf.SetGroup( "Misc" );
@@ -1696,8 +1696,8 @@ short NewFileDialog::Execute()
         aConf.SetGroup( "Misc" );
         ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
         aConf.SetGroup( aCurrentProfile );
-        aConf.WriteKey( aFilterType, ByteString( DirEntry( GetPath() ).GetPath().GetFull(), RTL_TEXTENCODING_UTF8 ) );
-        aConf.WriteKey( "LastFilterName", ByteString( GetCurFilter(), RTL_TEXTENCODING_UTF8 ) );
+        aConf.WriteKey( aFilterType, rtl::OUStringToOString(DirEntry(GetPath()).GetPath().GetFull(), RTL_TEXTENCODING_UTF8) );
+        aConf.WriteKey( "LastFilterName", rtl::OUStringToOString(GetCurFilter(), RTL_TEXTENCODING_UTF8) );
     }
     return bRet;
 }
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 4a612a0..d19da42 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -459,7 +459,7 @@ sal_Bool AppWin::Load( const String& aName )
         aMsg.AppendAscii("\"");
         if ( pFrame->IsAutoRun() )
         {
-            printf( "%s\n", ByteString( aMsg, osl_getThreadTextEncoding() ).GetBuffer() );
+            printf( "%s\n", rtl::OUStringToOString(aMsg, osl_getThreadTextEncoding()).getStr() );
         }
         else
         {
diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx
index fba13a2..bb9b3a0 100644
--- a/basic/source/app/brkpnts.cxx
+++ b/basic/source/app/brkpnts.cxx
@@ -225,9 +225,9 @@ void BreakpointWindow::SaveBreakpoints( String aFilename )
     aConfig.SetGroup("Breakpoints");
 
     if (aBreakpoints.getLength())
-        aConfig.WriteKey( ByteString( aFilename, RTL_TEXTENCODING_UTF8 ), aBreakpoints.makeStringAndClear() );
+        aConfig.WriteKey( rtl::OUStringToOString(aFilename, RTL_TEXTENCODING_UTF8), aBreakpoints.makeStringAndClear() );
     else
-        aConfig.DeleteKey( ByteString( aFilename, RTL_TEXTENCODING_UTF8 ) );
+        aConfig.DeleteKey( rtl::OUStringToOString(aFilename, RTL_TEXTENCODING_UTF8) );
 }
 
 
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index 8b0ec21..ef59b25 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -172,7 +172,7 @@ void ConfEdit::Save( Config &aConf )
     aConf.SetGroup("Misc");
     ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
     aConf.SetGroup( aCurrentProfile );
-    aConf.WriteKey( aKeyName, ByteString( aEdit.GetText(), RTL_TEXTENCODING_UTF8 ) );
+    aConf.WriteKey( aKeyName, rtl::OUStringToOString(aEdit.GetText(), RTL_TEXTENCODING_UTF8) );
 }
 
 void ConfEdit::Reload( Config &aConf )
@@ -408,7 +408,7 @@ IMPL_LINK( ProfileOptions, Select, ComboBox*, EMPTYARG )
     if ( aCbProfile.GetEntryPos( aCbProfile.GetText() ) == LISTBOX_ENTRY_NOTFOUND )
         return 1;
     Save();
-    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( ByteString( aCbProfile.GetText(), RTL_TEXTENCODING_UTF8 ) ) );
+    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( rtl::OUStringToOString(aCbProfile.GetText(), RTL_TEXTENCODING_UTF8) ) );
     rConf.SetGroup( "Misc" );
     rConf.WriteKey( "CurrentProfile", aProfileKey );
     ReloadProfile();
@@ -439,7 +439,7 @@ void ProfileOptions::ReloadProfile()
 IMPL_LINK( ProfileOptions, DelProfile, Button*, EMPTYARG )
 {
     String aProfile = aCbProfile.GetText();
-    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( ByteString( aProfile, RTL_TEXTENCODING_UTF8 ) ) );
+    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( rtl::OUStringToOString(aProfile, RTL_TEXTENCODING_UTF8) ) );
     if ( aCbProfile.GetEntryPos( aProfile ) != COMBOBOX_ENTRY_NOTFOUND )
     {
         aCbProfile.RemoveEntry( aProfile );
@@ -448,7 +448,7 @@ IMPL_LINK( ProfileOptions, DelProfile, Button*, EMPTYARG )
     // Set first remaining profile as current profile
     aCbProfile.SetText( aCbProfile.GetEntry( 0 ) );
     aProfile = aCbProfile.GetText();
-    aProfileKey = ByteString( ProfilePrefix ).Append( ByteString( aProfile, RTL_TEXTENCODING_UTF8 ) );
+    aProfileKey = ByteString( ProfilePrefix ).Append( rtl::OUStringToOString(aProfile, RTL_TEXTENCODING_UTF8) );
     rConf.SetGroup( "Misc" );
     rConf.WriteKey( "CurrentProfile", aProfileKey );
     ReloadProfile();
@@ -460,7 +460,7 @@ IMPL_LINK( ProfileOptions, DelProfile, Button*, EMPTYARG )
 IMPL_LINK( ProfileOptions, NewProfile, Button*, EMPTYARG )
 {
     aCbProfile.InsertEntry( aCbProfile.GetText() );
-    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( ByteString( aCbProfile.GetText(), RTL_TEXTENCODING_UTF8 ) ) );
+    ByteString aProfileKey( ByteString( ProfilePrefix ).Append( rtl::OUStringToOString(aCbProfile.GetText(), RTL_TEXTENCODING_UTF8) ) );
     rConf.SetGroup( "Misc" );
     rConf.WriteKey( "CurrentProfile", aProfileKey );
     // save last profile as new data for new profile
@@ -553,7 +553,7 @@ void CrashreportOptions::Save( Config &aConfig )
     else
         aConfig.WriteKey( "UseProxy", "false" );
 
-    aConfig.WriteKey( "ProxyServer", ByteString( aEDCRHost.GetText(), RTL_TEXTENCODING_UTF8 ) );
+    aConfig.WriteKey( "ProxyServer", rtl::OUStringToOString(aEDCRHost.GetText(), RTL_TEXTENCODING_UTF8) );
     aConfig.WriteKey("ProxyPort",
         rtl::OString::valueOf(static_cast<sal_Int64>(aNFCRPort.GetValue())));
 
@@ -562,7 +562,7 @@ void CrashreportOptions::Save( Config &aConfig )
     else
         aConfig.WriteKey( "AllowContact", "false" );
 
-    aConfig.WriteKey( "ReturnAddress", ByteString( aEDEMail.GetText(), RTL_TEXTENCODING_UTF8 ) );
+    aConfig.WriteKey( "ReturnAddress", rtl::OUStringToOString(aEDEMail.GetText(), RTL_TEXTENCODING_UTF8) );
 }
 
 IMPL_LINK( CrashreportOptions, CheckProxy, void*, EMPTYARG )
@@ -644,7 +644,7 @@ IMPL_LINK( MiscOptions, Click, void*, EMPTYARG )
 void MiscOptions::Save( Config &aConfig )
 {
     aConfig.SetGroup("Communication");
-    aConfig.WriteKey( "Host", ByteString( aEDHost.GetText(), RTL_TEXTENCODING_UTF8 ) );
+    aConfig.WriteKey( "Host", rtl::OUStringToOString(aEDHost.GetText(), RTL_TEXTENCODING_UTF8) );
     aConfig.WriteKey("TTPort",
         rtl::OString::valueOf(static_cast<sal_Int64>(aNFTTPort.GetValue())));
     aConfig.WriteKey("UnoPort",
@@ -668,7 +668,7 @@ void MiscOptions::Save( Config &aConfig )
         rtl::OString::valueOf(static_cast<sal_Int64>(aTFMaxLRU.GetValue())));
 
     aConfig.SetGroup("OOoProgramDir");
-    aConfig.WriteKey( C_KEY_AKTUELL, ByteString( aEDProgDir.GetText(), RTL_TEXTENCODING_UTF8 ) );
+    aConfig.WriteKey( C_KEY_AKTUELL, rtl::OUStringToOString(aEDProgDir.GetText(), RTL_TEXTENCODING_UTF8) );
     aConfig.WriteKey( C_KEY_TYPE, ByteString( "PATH" ) );
 }
 
@@ -743,9 +743,9 @@ void FontOptions::UpdatePreview()
 void FontOptions::Save( Config &aConfig )
 {
     aConfig.SetGroup("Misc");
-    aConfig.WriteKey( "ScriptFontName", ByteString(aFontName.GetText(), RTL_TEXTENCODING_UTF8) );
-    aConfig.WriteKey( "ScriptFontStyle", ByteString(aFontStyle.GetText(), RTL_TEXTENCODING_UTF8) );
-    aConfig.WriteKey( "ScriptFontSize", ByteString(aFontSize.GetText(), RTL_TEXTENCODING_UTF8) );
+    aConfig.WriteKey( "ScriptFontName", rtl::OUStringToOString(aFontName.GetText(), RTL_TEXTENCODING_UTF8) );
+    aConfig.WriteKey( "ScriptFontStyle", rtl::OUStringToOString(aFontStyle.GetText(), RTL_TEXTENCODING_UTF8) );
+    aConfig.WriteKey( "ScriptFontSize", rtl::OUStringToOString(aFontSize.GetText(), RTL_TEXTENCODING_UTF8) );
 }
 
 
@@ -812,7 +812,7 @@ void GenericOptions::LoadData()
     for ( size_t i = 0, n = pGroups->size(); i < n; ++i )
     {
         String* pGroup = pGroups->at( i );
-        aConf.SetGroup( ByteString( *pGroup, RTL_TEXTENCODING_UTF8 ) );
+        aConf.SetGroup( rtl::OUStringToOString(*pGroup, RTL_TEXTENCODING_UTF8) );
         if ( aConf.ReadKey( C_KEY_AKTUELL ).getLength() > 0 )
             aCbArea.InsertEntry( *pGroup );
         delete pGroup;
@@ -896,7 +896,7 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )
         }
 
         aConf.SetGroup( aLastGroupName );
-        aConf.WriteKey( C_KEY_AKTUELL, ByteString( aCurrentValue, RTL_TEXTENCODING_UTF8 ) );
+        aConf.WriteKey( C_KEY_AKTUELL, rtl::OUStringToOString(aCurrentValue, RTL_TEXTENCODING_UTF8) );
         sal_uInt16 i;
         for ( i=0 ; i < aCbValue.GetEntryCount() ; i++ )
         {
@@ -904,12 +904,12 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )
                 aAllValues += ';';
             aAllValues += aCbValue.GetEntry( i );
         }
-        aConf.WriteKey( C_KEY_ALLE, ByteString( aAllValues, RTL_TEXTENCODING_UTF8 ) );
+        aConf.WriteKey( C_KEY_ALLE, rtl::OUStringToOString(aAllValues, RTL_TEXTENCODING_UTF8) );
     }
 
     aCbValue.Clear();
 
-    ByteString aGroupName = ByteString( aCbArea.GetText(), RTL_TEXTENCODING_UTF8 );
+    rtl::OString aGroupName = rtl::OUStringToOString(aCbArea.GetText(), RTL_TEXTENCODING_UTF8);
     aCurrentValue = ReadKey( aGroupName, C_KEY_AKTUELL );
     aAllValues = ReadKey( aGroupName, C_KEY_ALLE );
     aType = ReadKey( aGroupName, C_KEY_TYPE );
@@ -934,7 +934,7 @@ IMPL_LINK( GenericOptions, DelGroup, Button*, EMPTYARG )
     if ( aCbArea.GetEntryPos( aGroup ) != COMBOBOX_ENTRY_NOTFOUND )
     {
         aCbArea.RemoveEntry( aGroup );
-        ByteString aByteGroup( aGroup, RTL_TEXTENCODING_UTF8 );
+        rtl::OString aByteGroup(rtl::OUStringToOString(aGroup, RTL_TEXTENCODING_UTF8));
         aConf.DeleteGroup( aByteGroup );
     }
 
diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx
index 22badf6..06e68bf 100644
--- a/basic/source/app/msgedit.cxx
+++ b/basic/source/app/msgedit.cxx
@@ -165,7 +165,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
             {
                 String aSave = VERSION_STRING.Append( UniString::CreateFromInt32( 3 ) ).AppendAscii("\n");      // Version 3
                 aSave.ConvertLineEnd(LINEEND_CRLF);
-                aStrm << ByteString( aSave, RTL_TEXTENCODING_IBM_850 ).GetBuffer();
+                aStrm << rtl::OUStringToOString(aSave, RTL_TEXTENCODING_IBM_850).getStr();
             }
 
             String aLogMsg = Impl_MakeSaveText( LogMsg->aDebugData ).AppendAscii("\n");
@@ -174,7 +174,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
             {
                 aLogMsg.ConvertLineEnd(LINEEND_CRLF);
                 aStrm.Seek(STREAM_SEEK_TO_END);
-                aStrm << ByteString( aLogMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer();
+                aStrm << rtl::OUStringToOString(aLogMsg, RTL_TEXTENCODING_UTF8).getStr();
                 aStrm.Close();
             }
             if ( !bFileWasChanged )
@@ -195,7 +195,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
                 // restore Original Msg
                 LogMsg->aDebugData.aMsg = aOriginalMsg;
 
-                printf( "%s", ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+                printf( "%s", rtl::OUStringToOString(aPrintMsg, RTL_TEXTENCODING_UTF8).getStr() );
             }
         }
     }
@@ -676,7 +676,7 @@ sal_Bool MsgEdit::Save( const String& aName )
         {
             String aSave = GetText();
             aSave.ConvertLineEnd(LINEEND_CRLF);
-            aStrm << ByteString( aSave, RTL_TEXTENCODING_UTF8 ).GetBuffer();
+            aStrm << rtl::OUStringToOString(aSave, RTL_TEXTENCODING_UTF8).getStr();
         }
         else
         {
@@ -687,7 +687,7 @@ sal_Bool MsgEdit::Save( const String& aName )
                 pRun = aEditTree.NextSibling( pRun );
 
             aSave.ConvertLineEnd(LINEEND_CRLF);
-            aStrm << ByteString( aSave, RTL_TEXTENCODING_IBM_850 ).GetBuffer();
+            aStrm << rtl::OUStringToOString(aSave, RTL_TEXTENCODING_IBM_850).getStr();
 
             SvLBoxEntry *pEntry;
             while ( pRun )
@@ -698,7 +698,7 @@ sal_Bool MsgEdit::Save( const String& aName )
                     aSave = Impl_MakeSaveText( pEntry );
                     aSave += '\n';
                     aSave.ConvertLineEnd(LINEEND_CRLF);
-                    aStrm << ByteString( aSave, RTL_TEXTENCODING_UTF8 ).GetBuffer();
+                    aStrm << rtl::OUStringToOString(aSave, RTL_TEXTENCODING_UTF8).getStr();
                     pEntry = aEditTree.Next( pEntry );
                 }
                 pRun = aEditTree.PrevSibling( pRun );
diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index 294b12e..ad66db9 100644
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -818,7 +818,7 @@ DBG_CHKTHIS(TextEdit,0);
         }
         String aSave = GetText();
         aSave.ConvertLineEnd(LINEEND_LF);
-        aStrm << ByteString( aSave, aFileEncoding ).GetBuffer();
+        aStrm << rtl::OUStringToOString(aSave, aFileEncoding).getStr();
         if( aStrm.GetError() != SVSTREAM_OK )
             bOk = sal_False;
         else
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
index 155720d..2f31c59 100644
--- a/basic/source/classes/disas.cxx
+++ b/basic/source/classes/disas.cxx
@@ -388,16 +388,16 @@ sal_Bool SbiDisas::DisasLine( String& rText )
     if( cLabels[ nPC >> 3 ] & ( 1 << ( nPC & 7 ) ) )
     {
         // Public?
-        ByteString aByteMethName;
+        rtl::OString aByteMethName;
         for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ )
         {
             SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
             if( pMeth )
             {
-                aByteMethName = ByteString( pMeth->GetName(), osl_getThreadTextEncoding() );
+                aByteMethName = rtl::OUStringToOString(pMeth->GetName(), osl_getThreadTextEncoding());
                 if( pMeth->GetId() == nPC )
                 {
-                    p = aByteMethName.GetBuffer();
+                    p = aByteMethName.getStr();
                     break;
                 }
                 if( pMeth->GetId() >= nPC )
@@ -446,8 +446,8 @@ sal_Bool SbiDisas::DisasLine( String& rText )
 void SbiDisas::StrOp( String& rText )
 {
     String aStr = rImg.GetString( (sal_uInt16)nOp1 );
-    ByteString aByteString( aStr, RTL_TEXTENCODING_ASCII_US );
-    const char* p = aByteString.GetBuffer();
+    rtl::OString aByteString(rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US));
+    const char* p = aByteString.getStr();
     if( p )
     {
         rText += '"';
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index a797b3d..08145f5 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -358,8 +358,8 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
         for( i = 0; i < nStrings; i++ )
         {
             sal_uInt16 nOff = (sal_uInt16) pStringOff[ i ];
-            ByteString aStr( pStrings + nOff, eCharSet );
-            memcpy( pByteStrings + nOff, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( char ) );
+            rtl::OString aStr(rtl::OUStringToOString(rtl::OUString(pStrings + nOff), eCharSet));
+            memcpy( pByteStrings + nOff, aStr.getStr(), (aStr.getLength() + 1) * sizeof( char ) );
         }
         r << (sal_uInt32) nStringSize;
         r.Write( pByteStrings, nStringSize );
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 4264632..4512dbf 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -224,8 +224,8 @@ sal_Bool SbiBuffer::operator +=( const String& n )
     sal_uInt16 l = n.Len() + 1;
     if( Check( l ) )
     {
-        ByteString aByteStr( n, osl_getThreadTextEncoding() );
-        memcpy( pCur, aByteStr.GetBuffer(), l );
+        rtl::OString aByteStr(rtl::OUStringToOString(n, osl_getThreadTextEncoding()));
+        memcpy( pCur, aByteStr.getStr(), l );
         pCur += l;
         nOff = nOff + l;
         return sal_True;
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index cbdc27f..2b14640 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -913,7 +913,7 @@ void SbiIoSystem::ReadCon( ByteString& rIn )
     String aPromptStr( aPrompt, osl_getThreadTextEncoding() );
     SbiInputDialog aDlg( NULL, aPromptStr );
     if( aDlg.Execute() )
-        rIn = ByteString( aDlg.GetInput(), osl_getThreadTextEncoding() );
+        rIn = rtl::OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding());
     else
         nError = SbERR_USER_ABORT;
     aPrompt.Erase();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 37c6906..251454b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1714,8 +1714,8 @@ RTLFUNC(Val)
                 nRadix = 8;
             if ( nRadix != 10 )
             {
-                ByteString aByteStr( aStr, osl_getThreadTextEncoding() );
-                sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix);
+                rtl::OString aByteStr(rtl::OUStringToOString(aStr, osl_getThreadTextEncoding()));
+                sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.getStr()+2, &pEndPtr, nRadix);
                 nResult = (double)nlResult;
             }
         }
@@ -2838,8 +2838,9 @@ RTLFUNC(GetAttr)
             aEntry.ToAbs();
 
             // #57064 extract the real-path for virtual URLs
-            ByteString aByteStrFullPath( aEntry.GetFull(), osl_getThreadTextEncoding() );
-            DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.GetBuffer());
+            rtl::OString aByteStrFullPath(rtl::OUStringToOString(aEntry.GetFull(),
+                osl_getThreadTextEncoding()));
+            DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.getStr());
             if (nRealFlags != 0xffffffff)
             {
                 if (nRealFlags == FILE_ATTRIBUTE_NORMAL)
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 23431c9..f4bc91f 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -997,8 +997,8 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
                 {
                     // without any length information! without end-identifier!
                     // What does that mean for Unicode?! Choosing conversion to ByteString...
-                    ByteString aByteStr( rStr, osl_getThreadTextEncoding() );
-                    *pStrm << (const char*)aByteStr.GetBuffer();
+                    rtl::OString aByteStr(rtl::OUStringToOString(rStr, osl_getThreadTextEncoding()));
+                    *pStrm << (const char*)aByteStr.getStr();
                 }
                 }
                 break;
@@ -1252,8 +1252,9 @@ RTLFUNC(Environ)
     }
     String aResult;
     // should be ANSI but that's not possible under Win16 in the DLL
-    ByteString aByteStr( rPar.Get(1)->GetString(), osl_getThreadTextEncoding() );
-    const char* pEnvStr = getenv( aByteStr.GetBuffer() );
+    rtl::OString aByteStr(rtl::OUStringToOString(rPar.Get(1)->GetString(),
+        osl_getThreadTextEncoding()));
+    const char* pEnvStr = getenv(aByteStr.getStr());
     if ( pEnvStr )
         aResult = String::CreateFromAscii( pEnvStr );
     rPar.Get(0)->PutString( aResult );
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index f96364a..4467322 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -1285,7 +1285,7 @@ void SbiRuntime::StepPRINT()        // print TOS
     if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE )
         s = ' ';    // one blank before
     s += s1;
-    ByteString aByteStr( s, osl_getThreadTextEncoding() );
+    rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
     pIosys->Write( aByteStr );
     Error( pIosys->GetError() );
 }
@@ -1299,7 +1299,7 @@ void SbiRuntime::StepPRINTF()       // print TOS in field
         s = ' ';
     s += s1;
     s.Expand( 14, ' ' );
-    ByteString aByteStr( s, osl_getThreadTextEncoding() );
+    rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
     pIosys->Write( aByteStr );
     Error( pIosys->GetError() );
 }
@@ -1323,7 +1323,7 @@ void SbiRuntime::StepWRITE()        // write TOS
     s += p->GetString();
     if( ch )
         s += ch;
-    ByteString aByteStr( s, osl_getThreadTextEncoding() );
+    rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
     pIosys->Write( aByteStr );
     Error( pIosys->GetError() );
 }
@@ -1350,7 +1350,7 @@ void SbiRuntime::StepRENAME()       // Rename Tos+1 to Tos
 void SbiRuntime::StepPROMPT()
 {
     SbxVariableRef p = PopVar();
-    ByteString aStr( p->GetString(), osl_getThreadTextEncoding() );
+    rtl::OString aStr(rtl::OUStringToOString(p->GetString(), osl_getThreadTextEncoding()));
     pIosys->SetPrompt( aStr );
 }
 
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index b18347d..b3dcb6f 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -899,7 +899,7 @@ void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     SbxVariableRef pLen  = PopVar();
     short nBlkLen = pLen->GetInteger();
     short nChan   = pChan->GetInteger();
-    ByteString aName( pName->GetString(), osl_getThreadTextEncoding() );
+    rtl::OString aName(rtl::OUStringToOString(pName->GetString(), osl_getThreadTextEncoding()));
     pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
         static_cast<short>( nOp2 ), nBlkLen );
     Error( pIosys->GetError() );
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 7ad9727..10d2426 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -214,12 +214,12 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t )
     static sal_uInt16 nLvl = 0;
     static const char* pCls[] =
     { "DontCare","Array","Value","Variable","Method","Property","Object" };
-    ByteString aNameStr1( (const UniString&)rName, RTL_TEXTENCODING_ASCII_US );
-    ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aNameStr1(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
+    rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
     DbgOutf( "SBX: Search %.*s %s %s in %s",
         nLvl++, "                              ",
         ( t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT )
-         ? pCls[ t-1 ] : "Unknown class", aNameStr1.GetBuffer(), aNameStr1.GetBuffer() );
+         ? pCls[ t-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
 #endif
 
     if( !GetAll( t ) )
@@ -276,10 +276,10 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t )
     nLvl--;
     if( pRes )
     {
-        ByteString aNameStr3( (const UniString&)rName, RTL_TEXTENCODING_ASCII_US );
-        ByteString aNameStr4( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+        rtl::OString aNameStr3(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
+        rtl::OString aNameStr4(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
         DbgOutf( "SBX: Found %.*s %s in %s",
-            nLvl, "                              ", aNameStr3.GetBuffer(), aNameStr4.GetBuffer() );
+            nLvl, "                              ", aNameStr3.getStr(), aNameStr4.getStr() );
     }
 #endif
     return pRes;
@@ -489,12 +489,12 @@ void SbxObject::Insert( SbxVariable* pVar )
     XubString aVarName( pVar->GetName() );
     if ( !aVarName.Len() && pVar->ISA(SbxObject) )
         aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
-    ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
-    ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+    rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
     DbgOutf( "SBX: Insert %s %s in %s",
         ( pVar->GetClass() >= SbxCLASS_DONTCARE &&
           pVar->GetClass() <= SbxCLASS_OBJECT )
-            ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.GetBuffer(), aNameStr1.GetBuffer() );
+            ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
 #endif
     }
 }
@@ -529,12 +529,12 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
     XubString aVarName( pVar->GetName() );
     if ( !aVarName.Len() && pVar->ISA(SbxObject) )
         aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
-    ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
-    ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+    rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
     DbgOutf( "SBX: Insert %s %s in %s",
         ( pVar->GetClass() >= SbxCLASS_DONTCARE &&
           pVar->GetClass() <= SbxCLASS_OBJECT )
-            ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.GetBuffer(), aNameStr1.GetBuffer() );
+            ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
 #endif
     }
 }
@@ -554,8 +554,8 @@ void SbxObject::Remove( SbxVariable* pVar )
     XubString aVarName( pVar->GetName() );
     if ( !aVarName.Len() && pVar->ISA(SbxObject) )
         aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
-    ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
-    ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+    rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
 #endif
         SbxVariableRef pVar_ = pArray->Get( nIdx );
         if( pVar_->IsBroadcaster() )
@@ -766,38 +766,38 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
         GetAll( SbxCLASS_DONTCARE );
 
     // Output the data of the object itself
-    ByteString aNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US );
-    ByteString aClassNameStr( (const UniString&)aClassName, RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
+    rtl::OString aClassNameStr(rtl::OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US));
     rStrm << "Object( "
           << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='"
-          << ( aNameStr.Len() ? aNameStr.GetBuffer() : "<unnamed>" ) << "', "
-          << "of class '" << aClassNameStr.GetBuffer() << "', "
+          << ( aNameStr.getLength() ? aNameStr.getStr() : "<unnamed>" ) << "', "
+          << "of class '" << aClassNameStr.getStr() << "', "
           << "counts "
           << rtl::OString::valueOf(static_cast<sal_Int64>(GetRefCount())).getStr()
           << " refs, ";
     if ( GetParent() )
     {
-        ByteString aParentNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US );
+        rtl::OString aParentNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
         rStrm << "in parent "
               << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr()
-              << "=='" << ( aParentNameStr.Len() ? aParentNameStr.GetBuffer() : "<unnamed>" ) << "'";
+              << "=='" << ( aParentNameStr.getLength() ? aParentNameStr.getStr() : "<unnamed>" ) << "'";
     }
     else
         rStrm << "no parent ";
     rStrm << " )" << endl;
-    ByteString aIndentNameStr( (const UniString&)aIndent, RTL_TEXTENCODING_ASCII_US );
-    rStrm << aIndentNameStr.GetBuffer() << "{" << endl;
+    rtl::OString aIndentNameStr(rtl::OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US));
+    rStrm << aIndentNameStr.getStr() << "{" << endl;
 
     // Flags
     XubString aAttrs;
     if( CollectAttrs( this, aAttrs ) )
     {
-        ByteString aAttrStr( (const UniString&)aAttrs, RTL_TEXTENCODING_ASCII_US );
-        rStrm << aIndentNameStr.GetBuffer() << "- Flags: " << aAttrStr.GetBuffer() << endl;
+        rtl::OString aAttrStr(rtl::OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US));
+        rStrm << aIndentNameStr.getStr() << "- Flags: " << aAttrStr.getStr() << endl;
     }
 
     // Methods
-    rStrm << aIndentNameStr.GetBuffer() << "- Methods:" << endl;
+    rStrm << aIndentNameStr.getStr() << "- Methods:" << endl;
     for( sal_uInt16 i = 0; i < pMethods->Count(); i++ )
     {
         SbxVariableRef& r = pMethods->GetRef( i );
@@ -829,7 +829,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
     }
 
     // Properties
-    rStrm << aIndentNameStr.GetBuffer() << "- Properties:" << endl;
+    rStrm << aIndentNameStr.getStr() << "- Properties:" << endl;
     {
         for( sal_uInt16 i = 0; i < pProps->Count(); i++ )
         {
@@ -863,7 +863,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
     }
 
     // Objects
-    rStrm << aIndentNameStr.GetBuffer() << "- Objects:" << endl;
+    rStrm << aIndentNameStr.getStr() << "- Objects:" << endl;
     {
         for( sal_uInt16 i = 0; i < pObjs->Count(); i++ )
         {
@@ -871,7 +871,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
             SbxVariable* pVar = r;
             if ( pVar )
             {
-                rStrm << aIndentNameStr.GetBuffer() << "  - Sub";
+                rStrm << aIndentNameStr.getStr() << "  - Sub";
                 if ( pVar->ISA(SbxObject) )
                     ((SbxObject*) pVar)->Dump( rStrm, bFill );
                 else if ( pVar->ISA(SbxVariable) )
@@ -880,7 +880,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
         }
     }
 
-    rStrm << aIndentNameStr.GetBuffer() << "}" << endl << endl;
+    rStrm << aIndentNameStr.getStr() << "}" << endl << endl;
     --nLevel;
 }
 
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index d2332a5..b73532b 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -136,8 +136,8 @@ void removeDimAsNewRecoverItem( SbxVariable* pVar );
 SbxVariable::~SbxVariable()
 {
 #ifdef DBG_UTIL
-    ByteString aBStr( (const UniString&)maName, RTL_TEXTENCODING_ASCII_US );
-    DbgOutf( "SbxVariable::Dtor %lx (%s)", (void*)this, aBStr.GetBuffer() );
+    rtl::OString aBStr(rtl::OUStringToOString(maName, RTL_TEXTENCODING_ASCII_US));
+    DbgOutf( "SbxVariable::Dtor %lx (%s)", (void*)this, aBStr.getStr() );
     static sal_Char const aCellsStr[] = "Cells";
     if ( maName.EqualsAscii( aCellsStr ) )
         maName.AssignAscii( aCellsStr, sizeof( aCellsStr )-1 );
@@ -390,8 +390,8 @@ void SbxVariable::SetParent( SbxObject* p )
             aMsg.AppendAscii( "].SetParent([" );
             aMsg += p->GetName();
             aMsg.AppendAscii( "])" );
-            ByteString aBStr( (const UniString&)aMsg, RTL_TEXTENCODING_ASCII_US );
-            DbgOut( aBStr.GetBuffer(), DBG_OUT_WARNING, __FILE__, __LINE__);
+            rtl::OString aBStr(rtl::OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US));
+            DbgOut( aBStr.getStr(), DBG_OUT_WARNING, __FILE__, __LINE__);
         }
     }
 #endif
@@ -637,13 +637,13 @@ void SbxAlias::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
 
 void SbxVariable::Dump( SvStream& rStrm, sal_Bool bFill )
 {
-    ByteString aBNameStr( (const UniString&)GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString aBNameStr(rtl::OUStringToOString(GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US));
     rStrm << "Variable( "
           << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
-          << aBNameStr.GetBuffer();
-    ByteString aBParentNameStr( (const UniString&)GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US );
+          << aBNameStr.getStr();
+    rtl::OString aBParentNameStr(rtl::OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US));
     if ( GetParent() )
-        rStrm << " in parent '" << aBParentNameStr.GetBuffer() << "'";
+        rStrm << " in parent '" << aBParentNameStr.getStr() << "'";
     else
         rStrm << " no parent";
     rStrm << " ) ";
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 99df624..0e22387 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -416,7 +416,7 @@ void ODbaseIndex::createINFEntry()
             }
         }
     }
-    aInfFile.WriteKey(aNewEntry,ByteString(sEntry,m_pTable->getConnection()->getTextEncoding()));
+    aInfFile.WriteKey(aNewEntry, rtl::OUStringToOString(sEntry, m_pTable->getConnection()->getTextEncoding()));
 }
 // -------------------------------------------------------------------------
 sal_Bool ODbaseIndex::DropImpl()
@@ -563,8 +563,8 @@ sal_Bool ODbaseIndex::CreateImpl()
 
     m_pFileStream->SetStreamSize(PAGE_SIZE);
 
-    ByteString aCol(aName,m_pTable->getConnection()->getTextEncoding());
-    strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((sal_uInt16)sizeof(m_aHeader.db_name), aCol.Len()));
+    rtl::OString aCol(rtl::OUStringToOString(aName, m_pTable->getConnection()->getTextEncoding()));
+    strncpy(m_aHeader.db_name, aCol.getStr(), std::min<size_t>(sizeof(m_aHeader.db_name), aCol.getLength()));
     m_aHeader.db_unique  = m_IsUnique ? 1: 0;
     m_aHeader.db_keyrec  = m_aHeader.db_keylen + 8;
 
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 2c96d46..0b67e1d 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -710,8 +710,8 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
         if (!aKey.getValue().isNull())
         {
             ::rtl::OUString sValue = aKey.getValue();
-            ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding());
-            strncpy(aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len()));
+            rtl::OString aText(rtl::OUStringToOString(sValue, rIndex.m_pTable->getConnection()->getTextEncoding()));
+            strncpy(aData, aText.getStr(), std::min<size_t>(rIndex.getHeader().db_keylen, aText.getLength()));
         }
         rStream.Write((sal_uInt8*)aData,rIndex.getHeader().db_keylen);
     }
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 6408f4a..dab0dce 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -412,11 +412,11 @@ sal_Bool ORTFImportExport::Write()
         m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= nColor;
     ::Color aColor(nColor);
 
-    ByteString aFonts(String(m_aFont.Name),eDestEnc);
+    ByteString aFonts(rtl::OUStringToOString(m_aFont.Name, eDestEnc));
     if(!aFonts.Len())
     {
-        String aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
-        aFonts = ByteString (aName,eDestEnc);
+        rtl::OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
+        aFonts = rtl::OUStringToOString(aName, eDestEnc);
     }
     ByteString aFontNr;
 
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 715f90c..b67a010 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -164,8 +164,8 @@ namespace desktop
             fprintf(stdout, "%s", getToken(bsLeft, i, '\n').getStr());
             fprintf(stdout, "%s\n", getToken(bsRight, i, '\n').getStr());
         }
-        fprintf(stdout, "%s", ByteString(aHelpMessage_bottom,
-                    RTL_TEXTENCODING_ASCII_US).GetBuffer());
+        fprintf(stdout, "%s", rtl::OUStringToOString(aHelpMessage_bottom,
+                    RTL_TEXTENCODING_ASCII_US).getStr());
 #else
         // rest gets a dialog box
         CmdlineHelpDialog aDlg;
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 45de038..678f31a 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1045,7 +1045,8 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
     sal_uInt16 nParagraphs = GetContents().Count();
     rOStream << nParagraphs;
 
-    char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0);
+    sal_Unicode nUniChar = CH_FEATURE;
+    char cFeatureConverted = rtl::OString(&nUniChar, 1, eEncoding).toChar();
 
     // The individual paragraphs ...
     for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
@@ -1053,7 +1054,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
         ContentInfo* pC = GetContents().GetObject( nPara );
 
         // Text...
-        ByteString aText( pC->GetText(), eEncoding );
+        ByteString aText(rtl::OUStringToOString(pC->GetText(), eEncoding));
 
         // Symbols?
         sal_Bool bSymbolPara = sal_False;
@@ -1062,7 +1063,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
             const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
             if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
             {
-                aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL );
+                aText = rtl::OUStringToOString(pC->GetText(), RTL_TEXTENCODING_SYMBOL);
                 bSymbolPara = sal_True;
             }
         }
@@ -1078,7 +1079,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
                 {
                     // Not correctly converted
                     String aPart( pC->GetText(), pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() );
-                    ByteString aNew( aPart, rFontItem.GetCharSet() );
+                    rtl::OString aNew(rtl::OUStringToOString(aPart, rFontItem.GetCharSet()));
                     aText.Erase( pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() );
                     aText.Insert( aNew, pAttr->GetStart() );
                 }
@@ -1133,7 +1134,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
         rOStream.WriteByteString( aText );
 
         // StyleName and Family...
-        rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) );
+        rOStream.WriteByteString( rtl::OUStringToOString(pC->GetStyle(), eEncoding) );
         rOStream << (sal_uInt16)pC->GetFamily();
 
         // Paragraph attributes ...
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 86cf0cc..cdf29de 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3637,9 +3637,9 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                 {
                     DELETEZ( pStrLink );
                     String sTmp( sLink );
-                    ByteString sId( sTmp.Copy(
-                                        sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1),
-                                    RTL_TEXTENCODING_ASCII_US );
+                    rtl::OString sId(rtl::OUStringToOString(sTmp.Copy(
+                        sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1),
+                        RTL_TEXTENCODING_ASCII_US));
                     GraphicObject *pOldGrfObj = pImpl->pGraphicObject;
                     pImpl->pGraphicObject = new GraphicObject( sId );
                     ApplyGraphicTransparency_Impl();
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 9deaf74..1040ba8 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1734,8 +1734,8 @@ void GeneratePackageName ( const String& rShort, String& rPackageName )
     rPackageName = rShort;
     xub_StrLen nPos = 0;
     sal_Unicode pDelims[] = { '!', '/', ':', '.', '\\', 0 };
-    ByteString sByte ( rPackageName, RTL_TEXTENCODING_UTF7);
-    rPackageName = String (sByte, RTL_TEXTENCODING_ASCII_US);
+    rtl::OString sByte(rtl::OUStringToOString(rPackageName, RTL_TEXTENCODING_UTF7));
+    rPackageName = rtl::OStringToOUString(sByte, RTL_TEXTENCODING_ASCII_US);
     while( STRING_NOTFOUND != ( nPos = rPackageName.SearchChar( pDelims, nPos )))
     {
         rPackageName.SetChar( nPos, '_' );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5a71003..6853c13 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4361,7 +4361,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
             if( bLinkGrf && !bGrfRead )     // sj: #i55484# if the graphic was embedded ( bGrfRead == true ) then
             {                               // we do not need to set a link. TODO: not to lose the information where the graphic is linked from
                 INetURLObject aAbsURL;
-                if ( !INetURLObject( maBaseURL ).GetNewAbsURL( ByteString( aFileName, RTL_TEXTENCODING_UTF8 ), &aAbsURL ) )
+                if ( !INetURLObject( maBaseURL ).GetNewAbsURL( rtl::OUStringToOString(aFileName, RTL_TEXTENCODING_UTF8), &aAbsURL ) )
                 {
                     String aValidURL;
                     if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aFileName, aValidURL ) )
diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx
index 971f850..da78d39 100644
--- a/l10ntools/inc/gsicheck.hxx
+++ b/l10ntools/inc/gsicheck.hxx
@@ -70,7 +70,7 @@ public:
     ByteString  const GetQuickHelpText() const { return aQuickHelpText; }
     ByteString  const GetTitle()      const    { return aTitle; }
 
-          void        SetUText( String &aNew ) { aText = ByteString( aNew, RTL_TEXTENCODING_UTF8 ); ReassembleLine(); }
+    void SetUText( String &aNew ) { aText = rtl::OUStringToOString(aNew, RTL_TEXTENCODING_UTF8); ReassembleLine(); }
           void        SetText( ByteString &aNew ) { aText = aNew; ReassembleLine(); }
           void        SetQuickHelpText( ByteString &aNew ) { aQuickHelpText = aNew; ReassembleLine(); }
           void        SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); }
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 75db02e..3e99066 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -245,7 +245,7 @@ protected:
     String      sFileName;
     String      sFullName;
 
-    const ByteString ID,OLDREF,XML_LANG;
+    const rtl::OString ID, OLDREF, XML_LANG;
 
     TagMap      nodes_localize;
     XMLHashMap* XMLStrings;
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 9d513af..f44c1a8 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -216,8 +216,8 @@ extern FILE *GetCfgFile()
             DirEntry aSourceFile( String( sInputFileName , RTL_TEXTENCODING_ASCII_US ) );
             aSourceFile.CopyTo( aTempFile , FSYS_ACTION_COPYFILE );
             String sTempFile = aTempFile.GetFull();
-            Export::RemoveUTF8ByteOrderMarkerFromFile( ByteString( sTempFile , RTL_TEXTENCODING_ASCII_US ) );
-            pFile = fopen( ByteString( sTempFile , RTL_TEXTENCODING_ASCII_US ).GetBuffer(), "r" );
+            Export::RemoveUTF8ByteOrderMarkerFromFile( rtl::OUStringToOString(sTempFile , RTL_TEXTENCODING_ASCII_US) );
+            pFile = fopen(rtl::OUStringToOString(sTempFile , RTL_TEXTENCODING_ASCII_US).getStr(), "r");
             sUsedTempFile = sTempFile;
         }else{
             // able to open file?
@@ -234,15 +234,15 @@ extern FILE *GetCfgFile()
             // create path to project root
             DirEntry aEntry( String( sInputFileName, RTL_TEXTENCODING_ASCII_US ));
             aEntry.ToAbs();
-            sFullEntry= ByteString( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
+            sFullEntry = rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US);
             aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
             aEntry += DirEntry( sPrjRoot );
-            ByteString sPrjEntry( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
+            rtl::OString sPrjEntry(rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US));
 
             // create file name, beginnig with project root
             // (e.g.: source\ui\src\menue.src)
 //            printf("sFullEntry = %s\n",sFullEntry.GetBuffer());
-            sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
+            sActFileName = sFullEntry.Copy( sPrjEntry.getLength() + 1 );
 //            printf("sActFileName = %s\n",sActFileName.GetBuffer());
 
             sActFileName.SearchAndReplaceAll( "/", "\\" );
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 37c26b6..2acbede 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -228,8 +228,8 @@ void Export::RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename )
         if( hasUTF8ByteOrderMarker( sLine ) )
         {
             DirEntry aTempFile = Export::GetTempFile();
-            ByteString sTempFile = ByteString( aTempFile.GetFull() , RTL_TEXTENCODING_ASCII_US );
-            SvFileStream aNewFile( String( sTempFile , RTL_TEXTENCODING_ASCII_US ) , STREAM_WRITE );
+            rtl::OString sTempFile = rtl::OUStringToOString(aTempFile.GetFull() , RTL_TEXTENCODING_ASCII_US);
+            SvFileStream aNewFile(rtl::OStringToOUString(sTempFile , RTL_TEXTENCODING_ASCII_US) , STREAM_WRITE);
             // Remove header
             RemoveUTF8ByteOrderMarker( sLine );
             aNewFile.WriteLine( sLine );
@@ -431,7 +431,7 @@ ByteString Export::GetNativeFile( ByteString sSource )
 /*****************************************************************************/
 {
     DirEntry aTemp( GetTempFile());
-    ByteString sReturn( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString sReturn(rtl::OUStringToOString(aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US));
 
     for ( sal_uInt16 i = 0; i < 10; i++ )
         if ( ConvertLineEnds( sSource, sReturn ))
@@ -509,20 +509,24 @@ DirEntry Export::GetTempFile()
 
     INetURLObject::DecodeMechanism eMechanism = INetURLObject::DECODE_TO_IURI;
     String sDecodedStr = INetURLObject::decode( strTmp , '%' , eMechanism );
-    ByteString sTmp( sDecodedStr , RTL_TEXTENCODING_UTF8 );
+    rtl::OString sTmp(rtl::OUStringToOString(sDecodedStr , RTL_TEXTENCODING_UTF8));
 
 #if defined(WNT)
-    sTmp.SearchAndReplace("file:///","");
-    sTmp.SearchAndReplaceAll('/','\\');
+    sTmp = comphelper::string::replace(sTmp,
+        rtl::OString(RTL_CONSTASCII_STRINGPARAM("file:///")),
+        rtl::OString());
+    sTmp = sTmp.replace('/', '\\');
 #else
     // Set file permission to 644
-     const sal_uInt64 nPerm = osl_File_Attribute_OwnRead | osl_File_Attribute_OwnWrite |
+    const sal_uInt64 nPerm = osl_File_Attribute_OwnRead | osl_File_Attribute_OwnWrite |
                              osl_File_Attribute_GrpRead | osl_File_Attribute_OthRead ;
 
     nRC = osl::File::setAttributes( *sTempFilename , nPerm );
     if( nRC ) printf(" osl::File::setAttributes RC = %d",nRC);
 
-    sTmp.SearchAndReplace("file://","");
+    sTmp = comphelper::string::replace(sTmp,
+        rtl::OString(RTL_CONSTASCII_STRINGPARAM("file://")),
+        rtl::OString());
 #endif
     DirEntry aDirEntry( sTmp );
     delete sTempFilename;
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 17b3d52..5670829 100644
--- a/l10ntools/source/gsicheck.cxx
+++ b/l10ntools/source/gsicheck.cxx
@@ -124,7 +124,8 @@ void LazySvFileStream::LazyOpen()
         Open( aFileName, eOpenMode );
         if ( !IsOpen())
         {
-            fprintf( stderr, "\nERROR: Could not open Output-File %s!\n\n", ByteString( aFileName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+            fprintf( stderr, "\nERROR: Could not open Output-File %s!\n\n",
+                rtl::OUStringToOString(aFileName, RTL_TEXTENCODING_ASCII_US).getStr() );
             exit ( 4 );
         }
         bOpened = sal_True;
@@ -403,8 +404,8 @@ void GSIBlock::PrintList( ParserMessageList *pList, ByteString aPrefix,
 sal_Bool GSIBlock::IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const
 /*****************************************************************************/
 {
-    String aUTF8Tester( aTestee, RTL_TEXTENCODING_UTF8 );
-    if ( STRING_MATCH != (nErrorPos = ByteString( aUTF8Tester, RTL_TEXTENCODING_UTF8 ).Match( aTestee )) )
+    String aUTF8Tester(rtl::OStringToOUString(aTestee, RTL_TEXTENCODING_UTF8));
+    if ( STRING_MATCH != (nErrorPos = ByteString(rtl::OUStringToOString(aUTF8Tester, RTL_TEXTENCODING_UTF8)).Match( aTestee )) )
     {
         aUTF8Tester = String( aTestee.GetBuffer(), nErrorPos, RTL_TEXTENCODING_UTF8 );
         nErrorPos = aUTF8Tester.Len();
@@ -446,23 +447,23 @@ sal_Bool GSIBlock::IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uIn
             }
         }
 
-        ByteString aDelimiter( (String)String( sal_Unicode(0x2016) ), RTL_TEXTENCODING_UTF8 );
+        rtl::OString aDelimiter(rtl::OUStringToOString(String( sal_Unicode(0x2016) ), RTL_TEXTENCODING_UTF8));
 
-        if ( aID.Equals( aDelimiter, 6, aDelimiter.Len() ) )
+        if ( aID.Equals( aDelimiter, 6, aDelimiter.getLength() ) )
         {   // New KeyId     6 Letters, digits and spechial chars followed by delimiter
             bNewId = sal_True;
             nErrorPos = 1;
             aID = aID.Copy( 0, 6 );
             nAfterID += 6;
-            nAfterID = nAfterID + aDelimiter.Len();
+            nAfterID = nAfterID + aDelimiter.getLength();
         }
-        else if ( ( aID.GetChar(6) == '*' ) && aID.Equals( aDelimiter, 7, aDelimiter.Len() ) )
+        else if ( ( aID.GetChar(6) == '*' ) && aID.Equals( aDelimiter, 7, aDelimiter.getLength() ) )
         {   // New KeyId     6 Letters, digits and spechial chars followed by '*delimiter' to indicate translation in progress
             bNewId = sal_True;
             nErrorPos = 1;
             aID = aID.Copy( 0, 6 );
             nAfterID += 7;
-            nAfterID = nAfterID + aDelimiter.Len();
+            nAfterID = nAfterID + aDelimiter.getLength();
         }
         else if ( aID.GetTokenCount( '.' ) > 1 )
         {   // test for old KeyIDs       5 to 6 digits followed by a dot   '44373.'
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 8461df7..9fae808 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -95,15 +95,18 @@ bool HelpParser::CreateSDF(
     String sUsedTempFile;
     String sXmlFile;
 
-    if( Export::fileHasUTF8ByteOrderMarker( sHelpFile ) ){
+    if( Export::fileHasUTF8ByteOrderMarker( sHelpFile ) )
+    {
         DirEntry aTempFile = Export::GetTempFile();
         DirEntry aSourceFile( String( sHelpFile , RTL_TEXTENCODING_ASCII_US ) );
         aSourceFile.CopyTo( aTempFile , FSYS_ACTION_COPYFILE );
         String sTempFile = aTempFile.GetFull();
-        Export::RemoveUTF8ByteOrderMarkerFromFile( ByteString( sTempFile , RTL_TEXTENCODING_ASCII_US ) );
+        Export::RemoveUTF8ByteOrderMarkerFromFile(rtl::OUStringToOString(sTempFile , RTL_TEXTENCODING_ASCII_US));
         sUsedTempFile = sTempFile;
         sXmlFile = sTempFile;
-    }else{
+    }
+    else
+    {
         sUsedTempFile = String::CreateFromAscii("");
         sXmlFile = String( sHelpFile , RTL_TEXTENCODING_ASCII_US );
     }
@@ -121,8 +124,9 @@ bool HelpParser::CreateSDF(
     //printf( "%s\n", fullFilePath.GetBuffer() );
     std::auto_ptr <XMLFile> file ( aParser.Execute( strFullPath , sXmlFile, pXmlFile ) );
 
-    if(file.get() == NULL){
-        printf("%s\n",ByteString(aParser.GetError().sMessage,RTL_TEXTENCODING_ASCII_US).GetBuffer());
+    if(file.get() == NULL)
+    {
+        printf("%s\n", rtl::OUStringToOString(aParser.GetError().sMessage, RTL_TEXTENCODING_ASCII_US).getStr());
         exit(-1);
     }
     file->Extract();
@@ -195,8 +199,9 @@ bool HelpParser::CreateSDF(
                 sBuffer.append( data );
                   sBuffer.append( GSI_SEQUENCE4 );      //"\t\t\t\t";
                 sBuffer.append( sOUTimeStamp );
-                ByteString sOut( sBuffer.makeStringAndClear().getStr() , RTL_TEXTENCODING_UTF8 );
-                if( data.getLength() > 0 ) aSDFStream.WriteLine( sOut );
+                rtl::OString sOut(rtl::OUStringToOString(sBuffer.makeStringAndClear().getStr() , RTL_TEXTENCODING_UTF8));
+                if( data.getLength() > 0 )
+                    aSDFStream.WriteLine( sOut );
                 pXMLElement=NULL;
             }else fprintf(stdout,"\nDBG: NullPointer in HelpParser::CreateSDF , Language %s\n",sCur.GetBuffer() );
         }
@@ -213,18 +218,18 @@ bool HelpParser::CreateSDF(
 
 ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const ByteString& rRoot_in )
 {
-      DirEntry aEntry( String( sHelpFile, RTL_TEXTENCODING_ASCII_US ));
+    DirEntry aEntry( String( sHelpFile, RTL_TEXTENCODING_ASCII_US ));
     aEntry.ToAbs();
     String sFullEntry = aEntry.GetFull();
     aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
     aEntry += DirEntry( rRoot_in );
-    ByteString sPrjEntry( aEntry.GetFull(), osl_getThreadTextEncoding());
-    ByteString sActFileName(
-    sFullEntry.Copy( sPrjEntry.Len() + 1 ), osl_getThreadTextEncoding());
+    rtl::OString sPrjEntry(rtl::OUStringToOString(aEntry.GetFull(), osl_getThreadTextEncoding()));
+    rtl::OString sActFileName(rtl::OUStringToOString(
+        sFullEntry.Copy(sPrjEntry.getLength() + 1), osl_getThreadTextEncoding()));
 
-    sActFileName.SearchAndReplaceAll( "/", "\\" );
-    return sActFileName;
+    return sActFileName.replace('/', '\\');
 }
+
 bool HelpParser::Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile  ,
         ByteString& sLanguage , MergeDataFile& aMergeDataFile )
 {
@@ -242,7 +247,7 @@ bool HelpParser::Merge( const ByteString &rSDFFile, const ByteString &rDestinati
         DirEntry aSourceFile( String( sHelpFile , RTL_TEXTENCODING_ASCII_US ) );
         aSourceFile.CopyTo( aTempFile , FSYS_ACTION_COPYFILE );
         String sTempFile = aTempFile.GetFull();
-        Export::RemoveUTF8ByteOrderMarkerFromFile( ByteString( sTempFile , RTL_TEXTENCODING_ASCII_US ) );
+        Export::RemoveUTF8ByteOrderMarkerFromFile(rtl::OUStringToOString(sTempFile, RTL_TEXTENCODING_ASCII_US));
         sUsedTempFile = sTempFile;
         sXmlFile = sTempFile;
     }else{
@@ -322,7 +327,7 @@ bool HelpParser::Merge(
         DirEntry aSourceFile( String( sHelpFile , RTL_TEXTENCODING_ASCII_US ) );
         aSourceFile.CopyTo( aTempFile , FSYS_ACTION_COPYFILE );
         String sTempFile = aTempFile.GetFull();
-        Export::RemoveUTF8ByteOrderMarkerFromFile( ByteString( sTempFile , RTL_TEXTENCODING_ASCII_US ) );
+        Export::RemoveUTF8ByteOrderMarkerFromFile(rtl::OUStringToOString(sTempFile , RTL_TEXTENCODING_ASCII_US));
         sUsedTempFile = sTempFile;
         sXmlFile = sTempFile;
     }
@@ -342,7 +347,7 @@ bool HelpParser::Merge(
 
     if( xmlfile == NULL)
     {
-        printf("%s\n",ByteString(aParser.GetError().sMessage,RTL_TEXTENCODING_UTF8).GetBuffer());
+        printf("%s\n", rtl::OUStringToOString(aParser.GetError().sMessage, RTL_TEXTENCODING_UTF8).getStr());
         exit(-1);
     }
 
@@ -497,9 +502,10 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile
     return true;
 }
 
-ByteString HelpParser::GetOutpath( const ByteString& rPathX , const ByteString& sCur , const ByteString& rPathY ){
+ByteString HelpParser::GetOutpath( const ByteString& rPathX , const ByteString& sCur , const ByteString& rPathY )
+{
     ByteString testpath = rPathX;
-    static const ByteString sDelimiter( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
+    static const rtl::OString sDelimiter(rtl::OUStringToOString(DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US));
     testpath = comphelper::string::stripEnd(testpath, '/');
     testpath = comphelper::string::stripEnd(testpath, '\\');
     testpath += sDelimiter;
@@ -512,13 +518,15 @@ ByteString HelpParser::GetOutpath( const ByteString& rPathX , const ByteString&
     testpath += sDelimiter;
     return testpath;
 }
-void HelpParser::MakeDir( const ByteString& sPath ){
+
+void HelpParser::MakeDir( const ByteString& sPath )
+{
     ByteString sTPath( sPath );
-    ByteString sDelimiter( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString sDelimiter(rtl::OUStringToOString(DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US));
     sTPath.SearchAndReplaceAll( sDelimiter , rtl::OString('/') );
     sal_uInt16 cnt = sTPath.GetTokenCount( '/' );
     rtl::OStringBuffer sCreateDir;
-    for( sal_uInt16 i = 0 ; i < cnt ; i++ )
+    for (sal_uInt16 i = 0; i < cnt; ++i)
     {
         sCreateDir.append(comphelper::string::getToken(sTPath, i , '/'));
         sCreateDir.append(sDelimiter);
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 0f2a5cf..a641528 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -109,10 +109,11 @@ sal_Bool LngParser::CreateSDF(
     String sFullEntry = aEntry.GetFull();
     aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
     aEntry += DirEntry( rRoot );
-    ByteString sPrjEntry( aEntry.GetFull(), osl_getThreadTextEncoding());
-    ByteString sActFileName(
-        sFullEntry.Copy( sPrjEntry.Len() + 1 ), osl_getThreadTextEncoding());
-    sActFileName.SearchAndReplaceAll( "/", "\\" );
+    rtl::OString sPrjEntry(rtl::OUStringToOString(aEntry.GetFull(),
+        osl_getThreadTextEncoding()));
+    rtl::OString sActFileName(rtl::OUStringToOString(
+        sFullEntry.Copy( sPrjEntry.getLength() + 1 ), osl_getThreadTextEncoding()));
+    sActFileName = sActFileName.replace('/', '\\');
 
     size_t nPos  = 0;
     sal_Bool bStart = true;
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 7325796..4969ba9 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -247,9 +247,9 @@ const ByteString SourceTreeLocalizer::GetProjectName( sal_Bool bAbs )
         if ( aTest.Exists() )
         {
             if ( bAbs )
-                return ByteString( aCur.GetFull(), RTL_TEXTENCODING_ASCII_US );
+                return rtl::OUStringToOString(aCur.GetFull(), RTL_TEXTENCODING_ASCII_US);
             else
-                return ByteString( aCur.GetName(), RTL_TEXTENCODING_ASCII_US );
+                return rtl::OUStringToOString(aCur.GetName(), RTL_TEXTENCODING_ASCII_US);
         }
     }
 
@@ -268,13 +268,13 @@ const ByteString SourceTreeLocalizer::GetProjectRootRel()
     ByteString sProjectRoot( GetProjectName( sal_True ));
     DirEntry aCur;
     aCur.ToAbs();
-    ByteString sCur( aCur.GetFull(), RTL_TEXTENCODING_ASCII_US );
+    ByteString sCur(rtl::OUStringToOString(aCur.GetFull(), RTL_TEXTENCODING_ASCII_US));
 
     if( sCur.SearchAndReplace( sProjectRoot, "" ) == STRING_NOTFOUND )
         return "";
 
-    ByteString sDelimiter(
-        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString sDelimiter(rtl::OUStringToOString(
+        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US));
 
     sCur.SearchAndReplaceAll( sDelimiter, "/" );
     sCur = comphelper::string::stripStart(sCur, '/');
@@ -314,7 +314,7 @@ void SourceTreeLocalizer::WorkOnFile(
 {
         String sFull( rFileName, RTL_TEXTENCODING_ASCII_US );
         DirEntry aEntry( sFull );
-        ByteString sFileName( aEntry.GetName(), RTL_TEXTENCODING_ASCII_US );
+        rtl::OString sFileName(rtl::OUStringToOString(aEntry.GetName(), RTL_TEXTENCODING_ASCII_US));
 
         // set current working directory
         DirEntry aPath( aEntry.GetPath());
@@ -327,7 +327,7 @@ void SourceTreeLocalizer::WorkOnFile(
             ByteString sRoot( GetProjectRootRel());
 
             DirEntry aTemp( Export::GetTempFile());
-            ByteString sTempFile( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US );
+            rtl::OString sTempFile(rtl::OUStringToOString(aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US));
 
             ByteString sDel;
 #if defined(WNT)
@@ -395,8 +395,8 @@ sal_Bool SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
     sal_uLong nIndex = 0;
     sal_Bool bReturn  = sal_True;
 
-    ByteString sDelimiter(
-        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString sDelimiter(rtl::OUStringToOString(
+        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US));
 
     ByteString sFileName( rFileName );
     sFileName.ToLowerAscii();
@@ -424,8 +424,8 @@ sal_Bool SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
     sal_uLong nIndex = 0;
     sal_Bool bReturn  = sal_False;
 
-    ByteString sDelimiter(
-        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
+    rtl::OString sDelimiter(rtl::OUStringToOString(
+        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US));
 
     ByteString sFileName( rFileName );
     sFileName.ToLowerAscii();
@@ -462,9 +462,10 @@ void SourceTreeLocalizer::WorkOnFileType(
     DirEntry aEntry( sWild );
     Dir aDir( sWild, FSYS_KIND_FILE );
 
-    for ( sal_uInt16 i = 0; i < aDir.Count(); i++ ) {
+    for ( sal_uInt16 i = 0; i < aDir.Count(); i++ )
+    {
         DirEntry aFile( aDir[ i ] );
-        ByteString sFile( aFile.GetFull(), RTL_TEXTENCODING_ASCII_US );
+        rtl::OString sFile(rtl::OUStringToOString(aFile.GetFull(), RTL_TEXTENCODING_ASCII_US));
 
         sal_Bool bAllowed = sal_True;
 
@@ -603,7 +604,7 @@ int _cdecl main( int argc, char *argv[] )
     DirEntry aEntry( String( sFileName , RTL_TEXTENCODING_ASCII_US ));
     aEntry.ToAbs();
     String sFullEntry = aEntry.GetFull();
-    ByteString sFileABS(aEntry.GetFull(), osl_getThreadTextEncoding());
+    rtl::OString sFileABS(rtl::OUStringToOString(aEntry.GetFull(), osl_getThreadTextEncoding()));
     sFileName = sFileABS;
 
     string pwd;
diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx
index 621e552..58a1299 100644
--- a/l10ntools/source/tagtest.cxx
+++ b/l10ntools/source/tagtest.cxx
@@ -223,7 +223,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
                             {
                                 if ( !IsPropertyValueValid( aName, aValue ) )
                                 {
-                                    rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' has invalid value '").Append(ByteString( aValue, RTL_TEXTENCODING_UTF8 )).Append("' "), *this );
+                                    rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' has invalid value '").Append(rtl::OUStringToOString(aValue, RTL_TEXTENCODING_UTF8)).Append("' "), *this );
                                     bIsBroken = sal_True;
                                 }
                                 aProperties[ aName ] = aValue;
@@ -334,7 +334,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
             }
             else
             {
-                aName = ByteString( aPortion, RTL_TEXTENCODING_UTF8 );
+                aName = rtl::OUStringToOString(aPortion, RTL_TEXTENCODING_UTF8);
                 // "a-zA-Z_-.0-9"
                 xub_StrLen nCount;
                 sal_Bool bBroken = sal_False;
@@ -364,7 +364,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
         {
             if ( aPortion.Len() )
             {
-                rErrorList.AddError( 25, ByteString("Found displaced characters '").Append(ByteString( aPortion, RTL_TEXTENCODING_UTF8 )).Append("' in Tag "), *this );
+                rErrorList.AddError( 25, ByteString("Found displaced characters '").Append(rtl::OUStringToOString(aPortion, RTL_TEXTENCODING_UTF8)).Append("' in Tag "), *this );
                 bIsBroken = sal_True;
             }
             bCheckEmpty = sal_False;
@@ -1323,7 +1323,7 @@ sal_Bool TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rE
     else
     {
         sTmp += ": ";
-        sTmp += ByteString( aParser.GetLexem( aExpectedToken ), RTL_TEXTENCODING_UTF8 );
+        sTmp += rtl::OUStringToOString(aParser.GetLexem( aExpectedToken ), RTL_TEXTENCODING_UTF8);
         sTmp += " near ";
         ParseError( 7, sTmp, aCurrentToken );
     }
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index e253a7f..382ab42 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -160,23 +160,29 @@ int XMLParentNode::GetPosition( ByteString id ){
 /*****************************************************************************/
     XMLElement* a;
 
-    static const ByteString sEnusStr = ByteString(String::CreateFromAscii(ENGLISH_US_ISO).ToLowerAscii() , RTL_TEXTENCODING_ASCII_US ).ToLowerAscii();
-    static const ByteString sDeStr   = ByteString(String::CreateFromAscii(GERMAN_ISO2).ToLowerAscii()    , RTL_TEXTENCODING_ASCII_US ).ToLowerAscii();
+    static const rtl::OString sEnusStr = rtl::OString(RTL_CONSTASCII_STRINGPARAM(ENGLISH_US_ISO)).toAsciiLowerCase();
+    static const rtl::OString sDeStr   = rtl::OString(RTL_CONSTASCII_STRINGPARAM(GERMAN_ISO2)).toAsciiLowerCase();
 
-    if ( pChildList ){
-        for ( size_t i = 0; i < pChildList->size(); i++ ) {
+    if ( pChildList )
+    {
+        for (size_t i = 0; i < pChildList->size(); ++i)
+        {
             XMLChildNode *pChild = (*pChildList)[ i ];
-            if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
+            if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT )
+            {
                 a = static_cast<XMLElement* >(pChild);
                 ByteString elemid( a->GetId() );
                 elemid.ToLowerAscii();
-                if (   elemid.Equals( id.ToLowerAscii() ) ){
+                if (   elemid.Equals( id.ToLowerAscii() ) )
+                {
                     ByteString elemLID( a->GetLanguageId() );
                     elemLID.ToLowerAscii();
-                    if( elemLID.Equals( sEnusStr) ) {
+                    if( elemLID.Equals( sEnusStr) )
+                    {
                         return i;
                     }
-                    else if( elemLID.Equals( sDeStr) ) {
+                    else if( elemLID.Equals( sDeStr) )
+                    {
                         return i;
                     }
                 }
@@ -318,15 +324,12 @@ sal_Bool XMLFile::Write( ByteString &aFilename )
     exit( -1 );
 }
 
-
-
 void XMLFile::WriteString( ofstream &rStream, const String &sString )
 {
-    ByteString sText( sString, RTL_TEXTENCODING_UTF8 );
-    rStream << sText.GetBuffer();
+    rtl::OString sText(rtl::OUStringToOString(sString, RTL_TEXTENCODING_UTF8));
+    rStream << sText.getStr();
 }
 
-
 sal_Bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
 {
     if ( !pCur )
@@ -408,41 +411,46 @@ void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel )
             case XML_NODE_TYPE_ELEMENT: {
                 XMLElement *pElement = ( XMLElement * ) pCur;
 
-                fprintf( stdout, "<%s", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                fprintf( stdout, "<%s", rtl::OUStringToOString(pElement->GetName(), RTL_TEXTENCODING_UTF8).getStr());
                 if ( pElement->GetAttributeList())
-                    for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ ){
-                        ByteString aAttrName( *(*pElement->GetAttributeList())[ j ], RTL_TEXTENCODING_UTF8 );
-                        if( !aAttrName.EqualsIgnoreCaseAscii( XML_LANG ) ) {
+                {
+                    for (size_t j = 0; j < pElement->GetAttributeList()->size(); ++j)
+                    {
+                        rtl::OString aAttrName(rtl::OUStringToOString(*(*pElement->GetAttributeList())[j],
+                            RTL_TEXTENCODING_UTF8));
+                        if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG))
+                        {
                             fprintf( stdout, " %s=\"%s\"",
-                                aAttrName.GetBuffer(),
-                                ByteString( (*pElement->GetAttributeList())[ j ]->GetValue(),
-                                    RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                                aAttrName.getStr(),
+                                rtl::OUStringToOString( (*pElement->GetAttributeList())[ j ]->GetValue(),
+                                    RTL_TEXTENCODING_UTF8).getStr());
                         }
                     }
+                }
                 if ( !pElement->GetChildList())
                     fprintf( stdout, "/>" );
                 else {
                     fprintf( stdout, ">" );
                     for ( size_t k = 0; k < pElement->GetChildList()->size(); k++ )
                         Print( (*pElement->GetChildList())[ k ], nLevel + 1 );
-                    fprintf( stdout, "</%s>", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                    fprintf( stdout, "</%s>", rtl::OUStringToOString(pElement->GetName(), RTL_TEXTENCODING_UTF8).getStr());
                 }
             }
             break;
             case XML_NODE_TYPE_DATA: {
                 XMLData *pData = ( XMLData * ) pCur;
                 String sData = pData->GetData();
-                fprintf( stdout, "%s", ByteString( sData, RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                fprintf( stdout, "%s", rtl::OUStringToOString(sData, RTL_TEXTENCODING_UTF8).getStr());
             }
             break;
             case XML_NODE_TYPE_COMMENT: {
                 XMLComment *pComment = ( XMLComment * ) pCur;
-                fprintf( stdout, "<!--%s-->", ByteString( pComment->GetComment(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                fprintf( stdout, "<!--%s-->", rtl::OUStringToOString(pComment->GetComment(), RTL_TEXTENCODING_UTF8).getStr());
             }
             break;
             case XML_NODE_TYPE_DEFAULT: {
                 XMLDefault *pDefault = ( XMLDefault * ) pCur;
-                fprintf( stdout, "%s", ByteString( pDefault->GetDefault(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
+                fprintf( stdout, "%s", rtl::OUStringToOString(pDefault->GetDefault(), RTL_TEXTENCODING_UTF8).getStr());
             }
             break;
         }
@@ -470,13 +478,13 @@ XMLFile::XMLFile( const String &rFileName ) // the file name, empty if created f
                   XMLStrings   ( NULL )
 
 {
-    nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
-    nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("variable"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
-    nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("paragraph"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
-    nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("alt"),RTL_TEXTENCODING_ASCII_US) , sal_True) );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list