[Libreoffice-commits] .: 6 commits - basebmp/test canvas/workben comphelper/inc comphelper/Library_comphelp.mk comphelper/Package_inc.mk comphelper/source connectivity/source connectivity/workben dbaccess/source desktop/source idl/source svtools/source svx/source svx/workben unotools/inc unotools/Package_inc.mk unotools/source unusedcode.easy vcl/test vcl/unx vcl/workben xmloff/inc xmloff/source xmlscript/test

Caolán McNamara caolan at kemper.freedesktop.org
Wed Dec 14 01:53:21 PST 2011


 basebmp/test/bmpdemo.cxx                                   |    1 
 canvas/workben/canvasdemo.cxx                              |    1 
 comphelper/Library_comphelp.mk                             |    1 
 comphelper/Package_inc.mk                                  |    1 
 comphelper/inc/comphelper/regpathhelper.hxx                |   73 ----
 comphelper/source/misc/regpathhelper.cxx                   |  235 -------------
 connectivity/source/drivers/dbase/DTable.cxx               |    8 
 connectivity/source/drivers/dbase/dindexnode.cxx           |    2 
 connectivity/source/drivers/hsqldb/HDriver.cxx             |   12 
 connectivity/workben/testmoz/main.cxx                      |    1 
 connectivity/workben/testmoz/mozthread.cxx                 |    1 
 dbaccess/source/ui/app/AppControllerDnD.cxx                |    4 
 dbaccess/source/ui/dlg/dbfindex.cxx                        |   21 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx      |    4 
 desktop/source/app/appinit.cxx                             |    1 
 idl/source/objects/module.cxx                              |    6 
 idl/source/objects/object.cxx                              |   20 -
 idl/source/prj/command.cxx                                 |    6 
 idl/source/prj/database.cxx                                |   13 
 idl/source/prj/globals.cxx                                 |    2 
 svtools/source/config/test/test.cxx                        |    1 
 svx/source/gengal/gengal.cxx                               |    1 
 svx/workben/edittest.cxx                                   |    1 
 unotools/Package_inc.mk                                    |    1 
 unotools/inc/unotools/accessiblestatesethelper.hxx         |   14 
 unotools/inc/unotools/atom.hxx                             |    6 
 unotools/inc/unotools/regpathhelper.hxx                    |   73 ----
 unotools/source/accessibility/accessiblestatesethelper.cxx |   40 --
 unotools/source/misc/atom.cxx                              |   16 
 unusedcode.easy                                            |   13 
 vcl/test/canvasbitmaptest.cxx                              |    1 
 vcl/unx/generic/app/i18n_cb.cxx                            |    2 
 vcl/unx/generic/printer/ppdparser.cxx                      |   24 -
 vcl/unx/generic/printer/printerinfomanager.cxx             |   18 
 vcl/workben/outdevgrind.cxx                                |    1 
 xmloff/inc/xmloff/txtparae.hxx                             |    1 
 xmloff/source/draw/sdxmlexp_impl.hxx                       |    1 
 xmloff/source/text/txtparae.cxx                            |    3 
 xmlscript/test/imexp.cxx                                   |    1 
 39 files changed, 72 insertions(+), 559 deletions(-)

New commits:
commit 68d26c57c22005bbf81d56bdadcd1a3065883f06
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 14 09:40:49 2011 +0000

    update list

diff --git a/unusedcode.easy b/unusedcode.easy
index 02282ea..47b983a 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2197,6 +2197,8 @@ unicode::isPunctuation(unsigned short)
 unicode::isTitle(unsigned short)
 unicode::isUnicodeScriptType(unsigned short, short)
 unographic::GraphicDescriptor::isValid() const
+unotools::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const
+unotools::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<unotools::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const
 utl::NodeValueAccessor::bind(com::sun::star::uno::Any*)
 utl::OConfigurationNode::appendNode(rtl::OUString const&, utl::OConfigurationNode const&) const
 utl::OConfigurationValueContainer::getServiceFactory() const
commit fbfeb0cb787ff010a4c96bbce3e21c9029421b63
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 13 23:32:59 2011 +0000

    callcatcher: remove some unused code

diff --git a/unotools/inc/unotools/accessiblestatesethelper.hxx b/unotools/inc/unotools/accessiblestatesethelper.hxx
index 5ef72a8..9f60052 100644
--- a/unotools/inc/unotools/accessiblestatesethelper.hxx
+++ b/unotools/inc/unotools/accessiblestatesethelper.hxx
@@ -139,20 +139,6 @@ public:
     void    RemoveState(sal_Int16 aState)
         throw (::com::sun::star::uno::RuntimeException);
 
-    /** Compares the set with the set given by rComparativeValue and puts the results
-        into rOldStates and rNewStates.
-
-        rOldStates contains after call all states which are in the own set and
-        not in the comparative set.
-
-        rNewStates contains after call all states which are in the comparative
-         set and not in the own set.
-    */
-    sal_Bool Compare(const AccessibleStateSetHelper& rComparativeValue,
-                        AccessibleStateSetHelper& rOldStates,
-                        AccessibleStateSetHelper& rNewStates)
-        throw (::com::sun::star::uno::RuntimeException);
-
     //=====  XTypeProvider  ===================================================
 
     /** Returns a sequence of all supported interfaces.
diff --git a/unotools/inc/unotools/atom.hxx b/unotools/inc/unotools/atom.hxx
index 40f707c..ed57113 100644
--- a/unotools/inc/unotools/atom.hxx
+++ b/unotools/inc/unotools/atom.hxx
@@ -58,8 +58,6 @@ namespace utl {
 
         int getAtom( const ::rtl::OUString&, sal_Bool bCreate = sal_False );
         const ::rtl::OUString& getString( int ) const;
-
-        void overrideAtom( int atom, const ::rtl::OUString& description );
     };
 
 
@@ -73,10 +71,6 @@ namespace utl {
         int getAtom( int atomClass, const ::rtl::OUString& rString, sal_Bool bCreate = sal_False );
 
         const ::rtl::OUString& getString( int atomClass, int atom ) const;
-
-        void overrideAtom( int atomClass, int atom, const ::rtl::OUString& description );
-        void overrideAtom( int atomClass, const ::com::sun::star::util::AtomDescription& newDescription )
-            { overrideAtom( atomClass, newDescription.atom, newDescription.description ); }
     };
 }
 
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx
index f28fb99..aa631c4 100644
--- a/unotools/source/accessibility/accessiblestatesethelper.cxx
+++ b/unotools/source/accessibility/accessiblestatesethelper.cxx
@@ -58,10 +58,6 @@ public:
         throw (uno::RuntimeException);
     void RemoveState(sal_Int16 aState)
         throw (uno::RuntimeException);
-    sal_Bool Compare(const AccessibleStateSetHelperImpl* pComparativeValue,
-                        AccessibleStateSetHelperImpl* pOldStates,
-                        AccessibleStateSetHelperImpl* pNewStates) const
-        throw (uno::RuntimeException);
 
     inline void AddStates( const sal_Int64 _nStates ) SAL_THROW( ( ) );
 
@@ -139,31 +135,6 @@ inline void AccessibleStateSetHelperImpl::RemoveState(sal_Int16 aState)
     maStates &= aTempBitSet;
 }
 
-inline sal_Bool AccessibleStateSetHelperImpl::Compare(
-    const AccessibleStateSetHelperImpl* pComparativeValue,
-        AccessibleStateSetHelperImpl* pOldStates,
-        AccessibleStateSetHelperImpl* pNewStates) const
-    throw (uno::RuntimeException)
-{
-    sal_Bool bResult(sal_False);
-    if (pComparativeValue && pOldStates && pNewStates)
-    {
-        if (maStates == pComparativeValue->maStates)
-            bResult = sal_True;
-        else
-        {
-            sal_uInt64 aTempBitSet(maStates);
-            aTempBitSet ^= pComparativeValue->maStates;
-            pOldStates->maStates = aTempBitSet;
-            pOldStates->maStates &= maStates;
-            pNewStates->maStates = aTempBitSet;
-            pNewStates->maStates &= pComparativeValue->maStates;
-        }
-    }
-    return bResult;
-}
-
-
 //=====  internal  ============================================================
 
 AccessibleStateSetHelper::AccessibleStateSetHelper ()
@@ -280,17 +251,6 @@ void AccessibleStateSetHelper::RemoveState(sal_Int16 aState)
     mpHelperImpl->RemoveState(aState);
 }
 
-sal_Bool AccessibleStateSetHelper::Compare(
-    const AccessibleStateSetHelper& rComparativeValue,
-        AccessibleStateSetHelper& rOldStates,
-        AccessibleStateSetHelper& rNewStates)
-    throw (uno::RuntimeException)
-{
-    osl::MutexGuard aGuard (maMutex);
-    return mpHelperImpl->Compare(rComparativeValue.mpHelperImpl,
-        rOldStates.mpHelperImpl, rNewStates.mpHelperImpl);
-}
-
 //=====  XTypeProvider  =======================================================
 
 uno::Sequence< ::com::sun::star::uno::Type>
diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx
index 614cb91..a5093a9 100644
--- a/unotools/source/misc/atom.cxx
+++ b/unotools/source/misc/atom.cxx
@@ -64,14 +64,6 @@ const ::rtl::OUString& AtomProvider::getString( int nAtom ) const
     return it == m_aStringMap.end() ? aEmpty : it->second;
 }
 
-void AtomProvider::overrideAtom( int atom, const ::rtl::OUString& description )
-{
-    m_aAtomMap[ description ] = atom;
-    m_aStringMap[ atom ] = description;
-    if( m_nAtoms <= atom )
-        m_nAtoms=atom+1;
-}
-
 // -----------------------------------------------------------------------
 
 MultiAtomProvider::MultiAtomProvider()
@@ -111,12 +103,4 @@ const ::rtl::OUString& MultiAtomProvider::getString( int atomClass, int atom ) c
     return aEmpty;
 }
 
-void MultiAtomProvider::overrideAtom( int atomClass, int atom, const ::rtl::OUString& description )
-{
-    ::boost::unordered_map< int, AtomProvider*, ::boost::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass );
-    if( it == m_aAtomLists.end() )
-        m_aAtomLists[ atomClass ] = new AtomProvider();
-    m_aAtomLists[ atomClass ]->overrideAtom( atom, description );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 56212d8..02282ea 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2197,8 +2197,6 @@ unicode::isPunctuation(unsigned short)
 unicode::isTitle(unsigned short)
 unicode::isUnicodeScriptType(unsigned short, short)
 unographic::GraphicDescriptor::isValid() const
-utl::AccessibleStateSetHelper::Compare(utl::AccessibleStateSetHelper const&, utl::AccessibleStateSetHelper&, utl::AccessibleStateSetHelper&)
-utl::MultiAtomProvider::overrideAtom(int, int, rtl::OUString const&)
 utl::NodeValueAccessor::bind(com::sun::star::uno::Any*)
 utl::OConfigurationNode::appendNode(rtl::OUString const&, utl::OConfigurationNode const&) const
 utl::OConfigurationValueContainer::getServiceFactory() const
commit 59bf1b583f235dbf0ffee971840f2c6524effa06
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 13 23:26:11 2011 +0000

    regpathhelper: unused, so we've got to have two of them

diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index 4f53c3c..f300a02 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -32,7 +32,6 @@
 #include <math.h>
 
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 00bcec9..963fd77 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -30,7 +30,6 @@
 // This code strongly inspired by Miguel / Federico's Gnome Canvas demo code.
 
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk
index be36994..7534de6 100644
--- a/comphelper/Library_comphelp.mk
+++ b/comphelper/Library_comphelp.mk
@@ -101,7 +101,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
     comphelper/source/misc/officeresourcebundle \
     comphelper/source/misc/officerestartmanager \
     comphelper/source/misc/proxyaggregation \
-    comphelper/source/misc/regpathhelper \
     comphelper/source/misc/scopeguard \
     comphelper/source/misc/SelectionMultiplex \
     comphelper/source/misc/sequenceashashmap \
diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk
index bb5490b..ba1344a 100644
--- a/comphelper/Package_inc.mk
+++ b/comphelper/Package_inc.mk
@@ -60,7 +60,6 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertystatecon
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysetinfo.hxx,comphelper/propertysetinfo.hxx))
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accimplaccess.hxx,comphelper/accimplaccess.hxx))
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordrequest.hxx,comphelper/docpasswordrequest.hxx))
-$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/regpathhelper.hxx,comphelper/regpathhelper.hxx))
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/extract.hxx,comphelper/extract.hxx))
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/interaction.hxx,comphelper/interaction.hxx))
 $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uno3.hxx,comphelper/uno3.hxx))
diff --git a/comphelper/inc/comphelper/regpathhelper.hxx b/comphelper/inc/comphelper/regpathhelper.hxx
deleted file mode 100644
index 27bbcb8..0000000
--- a/comphelper/inc/comphelper/regpathhelper.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _COMPHELPER_REGPATHHELPER_HXX_
-#define _COMPHELPER_REGPATHHELPER_HXX_
-
-#include <rtl/ustring.hxx>
-
-namespace comphelper
-{
-
-/**
- * This function returns a path to the user registry file.
- * Search for the user registry using the following rules:
- * <dl>
- * <dt> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
- *      REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
- *      [Registry]. If found, then take this value instead of the name "user.rdb".
- * <dt> 2. Search in the config directory of the user for a file "user.rdb". If
- *      found return the full path and name of the file. If not found, retry this
- *      step with a dot before ".user.rdb".
- * <dt> 3. If not found a new user registry with name "user.rdb" will be created in the user
- *      config directory.
- * </dl>
- *<BR>
- * @author Juergen Schmidt
- */
-::rtl::OUString getPathToUserRegistry();
-
-/**
- * This function returns a path to the system registry file.
- * The system registry will always be searched in the same directory of the
- * executable. The name of the system registry is "applicat.rdb". If the system
- * registry was not found, then the environment variable STAR_REGISTRY will be checked.
- * If this variable was set, it must contain a full path to a valid system registry.
- * Search for the user registry using the following rules:
- *
- *<BR>
- * @author Juergen Schmidt
- */
-
-::rtl::OUString getPathToSystemRegistry();
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx
deleted file mode 100644
index 647019e..0000000
--- a/comphelper/source/misc/regpathhelper.cxx
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include <stdio.h>
-#include <osl/file.hxx>
-#include <osl/security.hxx>
-#include <osl/thread.h>
-#include <osl/process.h>
-#include <rtl/textenc.h>
-#include <rtl/uri.h>
-#include <rtl/uri.hxx>
-
-using namespace osl;
-
-using ::rtl::OUString;
-using ::rtl::OString;
-using ::rtl::OStringToOUString;
-
-#define PATH_DELEMITTER '/'
-
-#define USER_REGISTRY_NAME_ENV      "STAR_USER_REGISTRY"
-#define SYSTEM_REGISTRY_NAME_ENV    "STAR_REGISTRY"
-#define REGISTRY_SYSTEM_NAME    "services.rdb"
-
-#define REGISTRY_LOCAL_NAME     "user60.rdb"
-
-#ifdef SAL_UNX
-#define CONFIG_PATH_PREFIX      "."
-#else
-#define CONFIG_PATH_PREFIX      ""
-#endif
-
-namespace comphelper
-{
-
-/**
-   @return sal_True, if the office is started in a portal
-                     environment.
-           sal_False, if the common office is started
- */
-static sal_Bool retrievePortalUserDir( OUString *pDirectory )
-{
-    sal_uInt32 nArgs = osl_getCommandArgCount();
-    sal_Bool bIsPortalUser = sal_False;
-    OUString sArg;
-    while( nArgs > 0 )
-    {
-        if ( !osl_getCommandArg(--nArgs, &sArg.pData) )
-        {
-            if ( sArg.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "-userid" ))) == 0 )
-            {
-
-                bIsPortalUser = sal_True;
-                sal_Int32 nStart = sArg.lastIndexOf( '[' );
-                sal_Int32 nEnd   = sArg.lastIndexOf( ']' );
-                if( -1 == nStart || -1 == nEnd || nEnd < nStart)
-                {
-                    *pDirectory = OUString();
-                }
-                else
-                {
-                    OUString aEncHome = sArg.copy( nStart + 1 , nEnd - nStart -1 );
-                    *pDirectory = rtl::Uri::decode(aEncHome,
-                                                   rtl_UriDecodeWithCharset,
-                                                   RTL_TEXTENCODING_UTF8);
-                }
-                  break;
-            }
-          }
-     }
-    return bIsPortalUser;
-}
-
-
-static OUString getDefaultLocalRegistry()
-{
-    OUString uBuffer, userRegistryName;
-    OUString portalUserDir;
-
-    sal_Bool bIsPortalUser = retrievePortalUserDir( &portalUserDir );
-
-    if ( bIsPortalUser )
-       {
-        if(  !portalUserDir.isEmpty() )
-        {
-            FileBase::getFileURLFromSystemPath( portalUserDir , portalUserDir );
-            userRegistryName = portalUserDir;
-            userRegistryName += OUString( RTL_CONSTASCII_USTRINGPARAM(
-                "/user/" REGISTRY_LOCAL_NAME ) );
-
-            // Directory creation is probably necessary for bootstrapping a new
-            // user in the portal environment (the ucb uses this function).
-            // This should be solved differently, as
-            // no one expects this function to create anything ...
-            OUString sSeparator(RTL_CONSTASCII_USTRINGPARAM("/"));
-            OUString sPath(RTL_CONSTASCII_USTRINGPARAM("file://"));
-            FileBase::RC retRC = FileBase::E_None;
-
-            sal_Int32 nIndex = 3;
-            sPath += userRegistryName.getToken(2, '/', nIndex);
-            while( nIndex != -1 )
-            {
-                sPath += sSeparator;
-                sPath += userRegistryName.getToken(0, '/', nIndex);
-                if( nIndex == -1 )
-                    break;
-                Directory aDir( sPath );
-                if( aDir.open() == FileBase::E_NOENT )
-                {
-                    retRC = Directory::create(sPath);
-                    if ( retRC != FileBase::E_None && retRC != FileBase::E_EXIST)
-                    {
-                        return OUString();
-                    }
-                }
-            }
-        }
-    }
-    else /* bIsPortalUser */
-    {
-        ::osl::Security aUserSecurity;
-        aUserSecurity.getConfigDir( userRegistryName );
-        userRegistryName += OUString( RTL_CONSTASCII_USTRINGPARAM(
-            "/" CONFIG_PATH_PREFIX REGISTRY_LOCAL_NAME ) );
-    }
-
-    return userRegistryName;
-}
-
-
-OUString getPathToUserRegistry()
-{
-    OUString    userRegistryName;
-    FILE        *f=NULL;
-
-    // search the environment STAR_USER_REGISTRY
-    OString sBuffer( getenv(USER_REGISTRY_NAME_ENV) );
-    if ( !sBuffer.isEmpty() )
-    {
-        f = fopen( sBuffer.getStr(), "r" );
-
-        if (f != NULL)
-        {
-            fclose(f);
-            userRegistryName = OStringToOUString( sBuffer, osl_getThreadTextEncoding() );
-        }
-    }
-
-    if ( userRegistryName.isEmpty() )
-    {
-        userRegistryName = getDefaultLocalRegistry();
-    }
-
-    return userRegistryName;
-}
-
-OUString getPathToSystemRegistry()
-{
-    OUString uBuffer;
-    OUString registryBaseName( RTL_CONSTASCII_USTRINGPARAM(REGISTRY_SYSTEM_NAME) );
-    OUString systemRegistryName;
-    FILE     *f=NULL;
-
-    // search in the directory of the executable
-    if(osl_Process_E_None == osl_getExecutableFile(&uBuffer.pData))
-    {
-        sal_uInt32  lastIndex = uBuffer.lastIndexOf(PATH_DELEMITTER);
-        if (lastIndex > 0)
-        {
-            uBuffer = uBuffer.copy(0, lastIndex + 1);
-        }
-
-        uBuffer += registryBaseName;
-
-        if (!FileBase::getSystemPathFromFileURL(uBuffer, systemRegistryName))
-        {
-            OString tmpStr( OUStringToOString(systemRegistryName, osl_getThreadTextEncoding()) );
-            f = fopen( tmpStr.getStr(), "r" );
-        }
-    }
-
-    if (f == NULL)
-    {
-        // search the environment STAR_REGISTRY
-        OString tmpStr( getenv(SYSTEM_REGISTRY_NAME_ENV) );
-        if ( !tmpStr.isEmpty() )
-        {
-            f = fopen(tmpStr.getStr(), "r");
-
-            if (f != NULL)
-            {
-                fclose(f);
-                systemRegistryName = OStringToOUString( tmpStr, osl_getThreadTextEncoding() );
-            } else
-            {
-                systemRegistryName = OUString();
-            }
-        }
-    } else
-    {
-        fclose(f);
-    }
-
-    return systemRegistryName;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx
index 45d7e2c..df07060 100644
--- a/connectivity/workben/testmoz/main.cxx
+++ b/connectivity/workben/testmoz/main.cxx
@@ -51,7 +51,6 @@
 
 #include "connectivity/sqlnode.hxx"
 #include <ucbhelper/contentbroker.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <osl/process.h>
diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index 9ff10f6..2e11a08 100644
--- a/connectivity/workben/testmoz/mozthread.cxx
+++ b/connectivity/workben/testmoz/mozthread.cxx
@@ -51,7 +51,6 @@
 
 #include "connectivity/sqlnode.hxx"
 #include <ucbhelper/contentbroker.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <osl/process.h>
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 8964185..c4c8f4b 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -54,7 +54,6 @@
 #include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/bootstrap.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <tools/debug.hxx>
 #include <tools/tempfile.hxx>
 #include <ucbhelper/configurationkeys.hxx>
diff --git a/svtools/source/config/test/test.cxx b/svtools/source/config/test/test.cxx
index 474a38e..09d11c8 100644
--- a/svtools/source/config/test/test.cxx
+++ b/svtools/source/config/test/test.cxx
@@ -52,7 +52,6 @@
 //  other includes
 //_________________________________________________________________________________________________________________
 
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 438194d..a868e0e 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -36,7 +36,6 @@
 #include <unotools/ucbstreamhelper.hxx>
 
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/uno/Reference.h>
diff --git a/svx/workben/edittest.cxx b/svx/workben/edittest.cxx
index 3ff6f8d..79f6eda 100644
--- a/svx/workben/edittest.cxx
+++ b/svx/workben/edittest.cxx
@@ -54,7 +54,6 @@
 
 #define SERVICE_SIMPLEREGISTRY             "com.sun.star.registry.SimpleRegistry"
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/unotools/Package_inc.mk b/unotools/Package_inc.mk
index 615e762..7d031fb 100644
--- a/unotools/Package_inc.mk
+++ b/unotools/Package_inc.mk
@@ -85,7 +85,6 @@ $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/printwarningoptions.
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/progresshandlerwrap.hxx,unotools/progresshandlerwrap.hxx))
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/querydeep.hxx,unotools/querydeep.hxx))
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/readwritemutexguard.hxx,unotools/readwritemutexguard.hxx))
-$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/regpathhelper.hxx,unotools/regpathhelper.hxx))
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/saveopt.hxx,unotools/saveopt.hxx))
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/searchopt.hxx,unotools/searchopt.hxx))
 $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/securityoptions.hxx,unotools/securityoptions.hxx))
diff --git a/unotools/inc/unotools/regpathhelper.hxx b/unotools/inc/unotools/regpathhelper.hxx
deleted file mode 100644
index f1986d8..0000000
--- a/unotools/inc/unotools/regpathhelper.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _UNOTOOLS_REGPATHHELPER_HXX_
-#define _UNOTOOLS_REGPATHHELPER_HXX_
-
-#include <rtl/ustring.hxx>
-
-namespace utl
-{
-
-/**
- * This function returns a path to the user registry file.
- * Search for the user registry using the following rules:
- * <dl>
- * <dt> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
- *      REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
- *      [Registry]. If found, then take this value instead of the name "user.rdb".
- * <dt> 2. Search in the config directory of the user for a file "user.rdb". If
- *      found return the full path and name of the file. If not found, retry this
- *      step with a dot before ".user.rdb".
- * <dt> 3. If not found a new user registry with name "user.rdb" will be created in the user
- *      config directory.
- * </dl>
- *<BR>
- * @author Juergen Schmidt
- */
-::rtl::OUString getPathToUserRegistry();
-
-/**
- * This function returns a path to the system registry file.
- * The system registry will always be searched in the same directory of the
- * executable. The name of the system registry is "applicat.rdb". If the system
- * registry was not found, then the environment variable STAR_REGISTRY will be checked.
- * If this variable was set, it must contain a full path to a valid system registry.
- * Search for the user registry using the following rules:
- *
- *<BR>
- * @author Juergen Schmidt
- */
-
-::rtl::OUString getPathToSystemRegistry();
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 41e01dd..56212d8 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1747,8 +1747,6 @@ comphelper::SequenceAsHashMap::getAsConstAnyList(unsigned char) const
 comphelper::ServiceInfoHelper::concatSequences(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
 comphelper::createEventAttacherManager(com::sun::star::uno::Reference<com::sun::star::beans::XIntrospection> const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
 comphelper::findProperty(com::sun::star::beans::Property&, com::sun::star::uno::Sequence<com::sun::star::beans::Property>&, rtl::OUString const&)
-comphelper::getPathToSystemRegistry()
-comphelper::getPathToUserRegistry()
 comphelper::string::isalnumAsciiString(rtl::OUString const&)
 comphelper::string::islowerAsciiString(rtl::OUString const&)
 comphelper::string::isupperAsciiString(rtl::OUString const&)
diff --git a/vcl/test/canvasbitmaptest.cxx b/vcl/test/canvasbitmaptest.cxx
index 2491ef1..66e68c1 100644
--- a/vcl/test/canvasbitmaptest.cxx
+++ b/vcl/test/canvasbitmaptest.cxx
@@ -32,7 +32,6 @@
 #include <rtl/bootstrap.hxx>
 #include <rtl/ref.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 8a8f7f7..77b7c5b 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -30,7 +30,6 @@
 // bootstrap stuff
 #include <rtl/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 871ed75..f754c74 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -41,7 +41,6 @@
 #include <cppuhelper/implbase2.hxx>
 
 #include <comphelper/processfactory.hxx>
-#include <comphelper/regpathhelper.hxx>
 
 #include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
commit 9cdb0ca46b903852b9aee6252bc850c93cfa1fb5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 13 23:16:50 2011 +0000

    there's no point to OUStringsSort_Impl

diff --git a/unusedcode.easy b/unusedcode.easy
index c84d3f1..41e01dd 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -230,13 +230,6 @@ NumericFormatter::ConvertToFraction(long)
 NumericFormatter::ConvertToLong(Fraction const&)
 OLEObjCache::SetSize(unsigned long)
 ORegKey::acquireKey(void*)
-OUStringsSort_Impl::DeleteAndDestroy(unsigned short, unsigned short)
-OUStringsSort_Impl::Insert(OUStringsSort_Impl const*, unsigned short, unsigned short)
-OUStringsSort_Impl::Insert(rtl::OUString* const&)
-OUStringsSort_Impl::Insert(rtl::OUString* const&, unsigned short&)
-OUStringsSort_Impl::Insert(rtl::OUString* const*, unsigned short)
-OUStringsSort_Impl::Remove(rtl::OUString* const&, unsigned short)
-OUStringsSort_Impl::Remove(unsigned short, unsigned short)
 Octree::AddColor(BitmapColor const&)
 Octree::Octree(unsigned long)
 OutputDevice::LogicToPixel(PolyPolygon const&, MapMode const&) const
diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
index cb095eb..0ed0583 100644
--- a/xmloff/inc/xmloff/txtparae.hxx
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -50,7 +50,6 @@ class SvXMLExport;
 class SvXMLAutoStylePoolP;
 class XMLTextFieldExport;
 class OUStrings_Impl;
-class OUStringsSort_Impl;
 class XMLTextNumRuleInfo;
 class XMLTextListAutoStylePool;
 class XMLSectionExport;
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index 252c3b2..0558fae 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -46,7 +46,6 @@ class SvXMLExportItemMapper;
 class SfxPoolItem;
 class SfxItemSet;
 class OUStrings_Impl;
-class OUStringsSort_Impl;
 class Rectangle;
 
 class ImpPresPageDrawStylePropMapper;
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 40d4203..7df0eb5 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -277,9 +277,6 @@ typedef OUString *OUStringPtr;
 SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
 SV_IMPL_PTRARR( OUStrings_Impl, OUStringPtr )
 
-SV_DECL_PTRARR_SORT_DEL( OUStringsSort_Impl, OUStringPtr, 20, 10 )
-SV_IMPL_OP_PTRARR_SORT( OUStringsSort_Impl, OUStringPtr )
-
 #ifdef DBG_UTIL
 static int txtparae_bContainsIllegalCharacters = sal_False;
 #endif
commit 8cbfe4e211e1aafe6cab64682b3e326153bdfb1e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 13 23:13:22 2011 +0000

    ByteString->rtl::OString[Buffer]

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 8d6c467..7200ac2 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1661,7 +1661,7 @@ Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos)
     return Reference<XPropertySet>();
 }
 //------------------------------------------------------------------
-double toDouble(const ByteString& rString)
+static double toDouble(const rtl::OString& rString)
 {
     return ::rtl::math::stringToDouble( rString, '.', ',', NULL, NULL );
 }
@@ -1908,12 +1908,12 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,c
 
                     // one, because const_cast GetFormatPrecision on SvNumberFormat is not constant,
                     // even though it really could and should be
-                    const ByteString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0));
-                    const sal_Int32 nValueLen = aDefaultValue.Len();
+                    const rtl::OString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0));
+                    const sal_Int32 nValueLen = aDefaultValue.getLength();
                     if ( nValueLen <= nLen )
                     {
                         // Write value right-justified, padded with blanks to the left.
-                        memcpy(pData+nLen-nValueLen,aDefaultValue.GetBuffer(),nValueLen);
+                        memcpy(pData+nLen-nValueLen,aDefaultValue.getStr(),nValueLen);
                         // write the resulting double back
                         *rRow.get()[nPos] = toDouble(aDefaultValue);
                     }
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 0b67e1d..c1befc4 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -911,7 +911,7 @@ void ONDXPage::PrintPage()
         }
         else
         {
-            OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
+            OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), rtl::OUStringToOString(rKey.getValue().getString(), rIndex.m_pTable->getConnection()->getTextEncoding()).getStr(),rNode.GetChild().GetPagePos());
         }
     }
     OSL_TRACE("SDB: -----------------------------------------------");
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index bcaa77e..215c0e2 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -278,21 +278,21 @@ namespace connectivity
                             ::std::auto_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) );
                             if ( pStream.get() )
                             {
-                                ByteString sLine;
+                                rtl::OString sLine;
                                 rtl::OString sVersionString;
                                 while ( pStream->ReadLine(sLine) )
                                 {
-                                    if ( sLine.Len() == 0 )
+                                    if ( sLine.getLength() == 0 )
                                         continue;
-                                    const ByteString sIniKey = comphelper::string::getToken(sLine, 0, '=');
-                                    const ByteString sValue = comphelper::string::getToken(sLine, 1, '=');
-                                    if ( sIniKey.Equals( "hsqldb.compatible_version" ) )
+                                    const rtl::OString sIniKey = comphelper::string::getToken(sLine, 0, '=');
+                                    const rtl::OString sValue = comphelper::string::getToken(sLine, 1, '=');
+                                    if (sIniKey.equalsL(RTL_CONSTASCII_STRINGPARAM("hsqldb.compatible_version")))
                                     {
                                         sVersionString = sValue;
                                     }
                                     else
                                     {
-                                        if  (   sIniKey.Equals( "version" )
+                                        if (sIniKey.equalsL(RTL_CONSTASCII_STRINGPARAM("version"))
                                             &&  ( sVersionString.isEmpty() )
                                             )
                                         {
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 2d9135d..0788433 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -202,7 +202,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
     Reference< XHierarchicalNameContainer > xHierarchyName( xNames, UNO_QUERY );
     if ( xNames.is() )
     {
-        ByteString sDialogPosition;
+        rtl::OString sDialogPosition;
         svtools::QueryDeleteResult_Impl eResult = _bConfirm ? svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL;
 
         // The list of elements to delete is allowed to contain related elements: A given element may
@@ -227,7 +227,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
             {
                 svtools::QueryDeleteDlg_Impl aDlg( getView(), *aThisRound );
 
-                if ( sDialogPosition.Len() )
+                if ( sDialogPosition.getLength() )
                     aDlg.SetWindowState( sDialogPosition );
 
                 if ( nObjectsLeft > 1 )
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 3fb9ff5..ffba407 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 using namespace ::svt;
 
-const ByteString aGroupIdent("dBase III");
+const rtl::OString aGroupIdent(RTL_CONSTASCII_STRINGPARAM("dBase III"));
 
 //////////////////////////////////////////////////////////////////////////
 // Klasse ODbaseIndexDialog
@@ -377,19 +377,19 @@ void ODbaseIndexDialog::Init()
 
             ///////////////////////////////////////////////////////////////////////////
             // fill the indexes list
-            ByteString aNDX;
+            rtl::OString aNDX;
             sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
-            ByteString aKeyName;
+            rtl::OString aKeyName;
             String aEntry;
 
             for( sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++ )
             {
                 // does the key point to an index file ?
                 aKeyName = aInfFile.GetKeyName( nKey );
-                aNDX = aKeyName.Copy(0,3);
+                aNDX = aKeyName.copy(0,3);
 
                 // yes -> add to the tables index list
-                if (aNDX == "NDX" )
+                if (aNDX.equalsL(RTL_CONSTASCII_STRINGPARAM("NDX")))
                 {
                     aEntry = rtl::OStringToOUString(aInfFile.ReadKey(aKeyName), osl_getThreadTextEncoding());
                     rTabInfo.aIndexList.push_back( OTableIndex( aEntry ) );
@@ -488,18 +488,18 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
     aInfFile.SetGroup( aGroupIdent );
 
     // Erst einmal alle Tabellenindizes loeschen
-    ByteString aNDX;
+    rtl::OString aNDX;
     sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
     sal_uInt16 nKey = 0;
 
     while( nKey < nKeyCnt )
     {
         // Verweist der Key auf ein Indexfile?...
-        ByteString aKeyName = aInfFile.GetKeyName( nKey );
-        aNDX = aKeyName.Copy(0,3);
+        rtl::OString aKeyName = aInfFile.GetKeyName( nKey );
+        aNDX = aKeyName.copy(0,3);
 
         //...wenn ja, Indexfile loeschen, nKey steht dann auf nachfolgendem Key
-        if( aNDX == "NDX" )
+        if (aNDX.equalsL(RTL_CONSTASCII_STRINGPARAM("NDX")))
         {
             aInfFile.DeleteKey(aKeyName);
             nKeyCnt--;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index d13d5f9..ff46e81 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -204,8 +204,8 @@ void OSelectionBrowseBox::initialize()
         for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
         {
             m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
-            m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);
-
+            m_aFunctionStrings += rtl::OStringToOUString(rContext.getIntlKeywordAscii(eFunctions[i]),
+                RTL_TEXTENCODING_UTF8);
         }
         m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
         m_aFunctionStrings += sGroup;
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 75af0cf..ef141a2 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -154,9 +154,9 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
         sal_uInt32 nTokPos = rInStm.Tell();
         if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.GetBuffer() ) ) )
         {
-            ByteString aStr = "cannot read file: ";
-            aStr += aSlotIdFile;
-            rBase.SetError( aStr, rInStm.GetToken() );
+            rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("cannot read file: "));
+            aStr.append(aSlotIdFile);
+            rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
             rBase.WriteError( rInStm );
 
             rInStm.Seek( nTokPos );
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 01dd2d5..30cd08c 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -341,10 +341,10 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
                 OSL_FAIL( pS->GetSlotId().GetBuffer() );
                 OSL_FAIL( rAttr.GetSlotId().GetBuffer() );
 
-                ByteString aStr( "Attribute's " );
-                aStr += pS->GetName();
-                aStr += " with different id's";
-                rBase.SetError( aStr, rInStm.GetToken() );
+                rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute's "));
+                aStr.append(pS->GetName());
+                aStr.append(RTL_CONSTASCII_STRINGPARAM(" with different id's"));
+                rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken());
                 rBase.WriteError( rInStm );
                 return sal_False;
              }
@@ -361,12 +361,12 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
                 OSL_FAIL( pS->GetSlotId().GetBuffer() );
                 OSL_FAIL( rAttr.GetSlotId().GetBuffer() );
 
-                ByteString aStr( "Attribute " );
-                aStr += pS->GetName();
-                aStr += " and Attribute ";
-                aStr += rAttr.GetName();
-                aStr += " with equal id's";
-                rBase.SetError( aStr, rInStm.GetToken() );
+                rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute "));
+                aStr.append(pS->GetName());
+                aStr.append(RTL_CONSTASCII_STRINGPARAM(" and Attribute "));
+                aStr.append(rAttr.GetName());
+                aStr.append(RTL_CONSTASCII_STRINGPARAM(" with equal id's"));
+                rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken());
                 rBase.WriteError( rInStm );
                 return sal_False;
              }
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 0eece07..b7943b6 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -363,13 +363,13 @@ SvCommand::SvCommand( int argc, char ** argv )
         delete aList[ i ];
     aList.clear();
 
-    ByteString aInc( getenv( "INCLUDE" ) );
+    rtl::OString aInc(getenv("INCLUDE"));
     // append include environment variable
-    if( aInc.Len() )
+    if( aInc.getLength() )
     {
         if( aPath.Len() )
             aPath += DirEntry::GetSearchDelimiter();
-        aPath += String::CreateFromAscii( aInc.GetBuffer() );
+        aPath += String::CreateFromAscii( aInc.getStr() );
     }
 }
 
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index e76434e..06d0037 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -239,12 +239,13 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName )
                 if( pTok->Is( SvHash_define() ) )
                 {
                     pTok = aTokStm.GetToken_Next();
-                    ByteString aDefName;
+                    rtl::OString aDefName;
                     if( pTok->IsIdentifier() )
                         aDefName = pTok->GetString();
                     else
                     {
-                        ByteString aStr( "unexpected token after define" );
+                        rtl::OString aStr(RTL_CONSTASCII_STRINGPARAM(
+                            "unexpected token after define"));
                         // set error
                         SetError( aStr, pTok );
                         WriteError( aTokStm );
@@ -300,7 +301,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName )
                     {
                         if( !InsertId( aDefName, nVal ) )
                         {
-                            ByteString aStr = "hash table overflow: ";
+                            rtl::OString aStr(RTL_CONSTASCII_STRINGPARAM("hash table overflow: "));
                             SetError( aStr, pTok );
                             WriteError( aTokStm );
                             return sal_False;
@@ -616,9 +617,9 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
     }
     if( pTok && pTok->IsIdentifier() )
     {
-        ByteString aN = IDLAPP->pHashTable->GetNearString( pTok->GetString() );
-        if( aN.Len() )
-            fprintf( stderr, "%s versus %s\n", pTok->GetString().GetBuffer(), aN.GetBuffer() );
+        rtl::OString aN = IDLAPP->pHashTable->GetNearString( pTok->GetString() );
+        if( aN.getLength() )
+            fprintf( stderr, "%s versus %s\n", pTok->GetString().GetBuffer(), aN.getStr() );
     }
 }
 
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index 6def78c..6ed455d 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -76,7 +76,7 @@ IdlDll::~IdlDll()
     delete pHashTable;
 }
 
-inline SvStringHashEntry * INS( const ByteString & rName )
+inline SvStringHashEntry * INS( const rtl::OString& rName )
 {
     sal_uInt32  nIdx;
     IDLAPP->pHashTable->Insert( rName, &nIdx );
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index a891ddf..b37d0ab 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -603,7 +603,7 @@ void
 SwitchIMCallback (XIC, XPointer, XPointer call_data)
 {
     XIMSwitchIMNotifyCallbackStruct* pCallData = (XIMSwitchIMNotifyCallbackStruct*)call_data;
-    ::vcl::I18NStatus::get().changeIM( String( ByteString( pCallData->to->name ), RTL_TEXTENCODING_UTF8 ) );
+    ::vcl::I18NStatus::get().changeIM( rtl::OStringToOUString(pCallData->to->name, RTL_TEXTENCODING_UTF8) );
 }
 
 // ----------------------------------------------------------------------------------
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 3aec406..738df2d 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -274,7 +274,7 @@ using ::rtl::OUString;
 using ::rtl::OStringBuffer;
 using ::rtl::OUStringHash;
 
-#define BSTRING(x) ByteString( x, osl_getThreadTextEncoding() )
+#define BSTRING(x) rtl::OUStringToOString( x, osl_getThreadTextEncoding() )
 
 namespace
 {
@@ -328,15 +328,15 @@ void PPDDecompressStream::Open( const rtl::OUString& i_rFile )
         return;
     }
 
-    ByteString aLine;
+    rtl::OString aLine;
     mpFileStream->ReadLine( aLine );
     mpFileStream->Seek( 0 );
 
     // check for compress'ed or gzip'ed file
     sal_uLong nCompressMethod = 0;
-    if( aLine.Len() > 1 && static_cast<unsigned char>(aLine.GetChar( 0 )) == 0x1f )
+    if( aLine.getLength() > 1 && static_cast<unsigned char>(aLine[0]) == 0x1f )
     {
-        if( static_cast<unsigned char>(aLine.GetChar( 1 )) == 0x8b ) // check for gzip
+        if( static_cast<unsigned char>(aLine[1]) == 0x8b ) // check for gzip
             nCompressMethod = ZCODEC_DEFAULT | ZCODEC_GZ_LIB;
     }
 
@@ -743,7 +743,7 @@ PPDParser::PPDParser( const String& rFile ) :
     // now get the Values
     parse( aLines );
 #if OSL_DEBUG_LEVEL > 2
-    fprintf( stderr, "acquired %d Keys from PPD %s:\n", m_aKeys.size(), BSTRING( m_aFile ).GetBuffer() );
+    fprintf( stderr, "acquired %d Keys from PPD %s:\n", m_aKeys.size(), BSTRING( m_aFile ).getStr() );
     for( PPDParser::hash_type::const_iterator it = m_aKeys.begin(); it != m_aKeys.end(); ++it )
     {
         const PPDKey* pKey = it->second;
@@ -759,7 +759,7 @@ PPDParser::PPDParser( const String& rFile ) :
             default: break;
         };
         fprintf( stderr, "\t\"%s\" (%d values) OrderDependency: %d %s\n",
-                 BSTRING( pKey->getKey() ).GetBuffer(),
+                 BSTRING( pKey->getKey() ).getStr(),
                  pKey->countValues(),
                  pKey->m_nOrderDependency,
                  pSetupType );
@@ -780,19 +780,19 @@ PPDParser::PPDParser( const String& rFile ) :
                 default: break;
             };
             fprintf( stderr, "option: \"%s\", value: type %s \"%s\"\n",
-                     BSTRING( pValue->m_aOption ).GetBuffer(),
+                     BSTRING( pValue->m_aOption ).getStr(),
                      pVType,
-                     BSTRING( pValue->m_aValue ).GetBuffer() );
+                     BSTRING( pValue->m_aValue ).getStr() );
         }
     }
     fprintf( stderr, "constraints: (%d found)\n", m_aConstraints.size() );
     for( std::list< PPDConstraint >::const_iterator cit = m_aConstraints.begin(); cit != m_aConstraints.end(); ++cit )
     {
         fprintf( stderr, "*\"%s\" \"%s\" *\"%s\" \"%s\"\n",
-                 BSTRING( cit->m_pKey1->getKey() ).GetBuffer(),
-                 cit->m_pOption1 ? BSTRING( cit->m_pOption1->m_aOption ).GetBuffer() : "<nil>",
-                 BSTRING( cit->m_pKey2->getKey() ).GetBuffer(),
-                 cit->m_pOption2 ? BSTRING( cit->m_pOption2->m_aOption ).GetBuffer() : "<nil>"
+                 BSTRING( cit->m_pKey1->getKey() ).getStr(),
+                 cit->m_pOption1 ? BSTRING( cit->m_pOption1->m_aOption ).getStr() : "<nil>",
+                 BSTRING( cit->m_pKey2->getKey() ).getStr(),
+                 cit->m_pOption2 ? BSTRING( cit->m_pOption2->m_aOption ).getStr() : "<nil>"
                  );
     }
 #endif
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index d8a7f79..be113e1 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -823,9 +823,9 @@ bool PrinterInfoManager::writePrinterConfig()
             for( ::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin();
             subst != it->second.m_aInfo.m_aFontSubstitutes.end(); ++subst )
             {
-                ByteString aKey( "SubstFont_" );
-                aKey.Append( rtl::OUStringToOString( subst->first, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-                pConfig->WriteKey( aKey, rtl::OUStringToOString( subst->second, RTL_TEXTENCODING_ISO_8859_1 ) );
+                rtl::OStringBuffer aKey(RTL_CONSTASCII_STRINGPARAM("SubstFont_"));
+                aKey.append(rtl::OUStringToOString(subst->first, RTL_TEXTENCODING_ISO_8859_1));
+                pConfig->WriteKey( aKey.makeStringAndClear(), rtl::OUStringToOString( subst->second, RTL_TEXTENCODING_ISO_8859_1 ) );
             }
         }
     }
@@ -1324,18 +1324,18 @@ static void lpgetSysQueueTokenHandler(
             nPos = it->indexOf( aDescrStr, 0 );
             if( nPos != -1 )
             {
-                ByteString aComment( WhitespaceToSpace( it->copy(nPos+12) ) );
-                if( aComment.Len() > 0 )
-                    o_rQueues.back().m_aComment = String( aComment, aEncoding );
+                rtl::OString aComment( WhitespaceToSpace( it->copy(nPos+12) ) );
+                if( aComment.getLength() > 0 )
+                    o_rQueues.back().m_aComment = rtl::OStringToOUString(aComment, aEncoding);
                 continue;
             }
             // look for "location" attribute, inser as location
             nPos = it->indexOf( aLocStr, 0 );
             if( nPos != -1 )
             {
-                ByteString aLoc( WhitespaceToSpace( it->copy(nPos+9) ) );
-                if( aLoc.Len() > 0 )
-                    o_rQueues.back().m_aLocation = String( aLoc, aEncoding );
+                rtl::OString aLoc( WhitespaceToSpace( it->copy(nPos+9) ) );
+                if( aLoc.getLength() > 0 )
+                    o_rQueues.back().m_aLocation = rtl::OStringToOUString(aLoc, aEncoding);
                 continue;
             }
         }
commit 2b4aa9198148c1af610df024e3a7cb09752e1819
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 13 22:53:54 2011 +0000

    unused strings

diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 481f33c..3fb9ff5 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -244,7 +244,6 @@ IMPL_LINK( ODbaseIndexDialog, AddAllClickHdl, PushButton*, /*pButton*/ )
 {
     sal_uInt16 nCnt = aLB_FreeIndexes.GetEntryCount();
     String aTableName = aCB_Tables.GetText();
-    String aEntry;
 
     for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos )
         InsertTableIndex( aTableName, RemoveFreeIndex( aLB_FreeIndexes.GetEntry(0), sal_True ) );
@@ -258,7 +257,6 @@ IMPL_LINK( ODbaseIndexDialog, RemoveAllClickHdl, PushButton*, /*pButton*/ )
 {
     sal_uInt16 nCnt = aLB_TableIndexes.GetEntryCount();
     String aTableName = aCB_Tables.GetText();
-    String aEntry;
 
     for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos )
         InsertFreeIndex( RemoveTableIndex( aTableName, aLB_TableIndexes.GetEntry(0), sal_True ) );
@@ -492,7 +490,6 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
     // Erst einmal alle Tabellenindizes loeschen
     ByteString aNDX;
     sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
-    ByteString aEntry;
     sal_uInt16 nKey = 0;
 
     while( nKey < nKeyCnt )


More information about the Libreoffice-commits mailing list