[Libreoffice-commits] .: 10 commits - idl/inc idl/source Makefile.in rsc/inc rsc/source sal/cppunittester tools/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Wed Sep 21 01:49:59 PDT 2011


 Makefile.in                         |    2 +
 idl/inc/types.hxx                   |    5 ++--
 idl/source/cmptools/lex.cxx         |   23 +++++++++---------
 idl/source/objects/object.cxx       |   13 ++++++----
 idl/source/objects/slot.cxx         |   44 +++++++++++++++++++++++-------------
 idl/source/objects/types.cxx        |   38 +++++++++++++++----------------
 idl/source/prj/database.cxx         |    8 +++---
 rsc/inc/rscdb.hxx                   |    1 
 rsc/source/parser/rscibas.cxx       |   24 ++++++++-----------
 rsc/source/res/rscmgr.cxx           |   21 +++++++----------
 rsc/source/res/rscstr.cxx           |    8 +++---
 rsc/source/rsc/rsc.cxx              |   18 ++++++++------
 sal/cppunittester/cppunittester.cxx |   36 ++++++++++++++++++++++++++++-
 tools/source/memtools/multisel.cxx  |   17 +++++++------
 unusedcode.easy                     |   33 ++++++++-------------------
 15 files changed, 164 insertions(+), 127 deletions(-)

New commits:
commit 94f6a72f7ade62a146a1e1254cc0a4638d48efc5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 21 09:21:46 2011 +0100

    Revert "remove newly unused methods", used again
    
    This reverts commit 9693764946ac3f27a0170d7556ee62276d7c3dcb.

diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index a96ee46..3b9bc50 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -500,7 +500,7 @@ void FiltersTest::testDatabaseRanges()
 void FiltersTest::testFormats()
 {
     const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("formats."));
-    for(int i = 2; i < 3; ++i)
+    for(int i = 0; i < 3; ++i)
     {
         rtl::OUString aFileExtension(aFileFormats[i].pName, strlen(aFileFormats[i].pName), RTL_TEXTENCODING_UTF8 );
         rtl::OUString aFilterName(aFileFormats[i].pFilterName, strlen(aFileFormats[i].pFilterName), RTL_TEXTENCODING_UTF8) ;
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index b8fb677..82c720e 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -130,6 +130,12 @@ Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs(
     return xInt;
 }
 
+Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs(
+        const OUString& rServiceName, const Sequence< Any >& rArgs )
+{
+    return CreateInstanceWithArgs( ::comphelper::getProcessServiceFactory(), rServiceName, rArgs );
+}
+
 uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( SfxMedium& rMedium,
         ::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< OUString >* pDefaultPasswords )
 {
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index 7a5f4dc..f8a338f 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -97,6 +97,11 @@ public:
                             const ::rtl::OUString& rServiceName,
                             const UnoAnySequence& rArgs );
 
+    /** Creates an instance from the passed service name, using the process service factory. */
+    static XInterfaceRef CreateInstanceWithArgs(
+                            const ::rtl::OUString& rServiceName,
+                            const UnoAnySequence& rArgs );
+
     /** Opens a password dialog and returns the encryption data.
         @return  The encryption data or an empty sequence on 'Cancel' or any error. */
     static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium,
commit ec0581d0421bdd4eb8de682758fe0b481cf0f59f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 21 09:10:44 2011 +0100

    add a simple timer for unit tests

diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 49ae0b3..c1904b4 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -86,10 +86,34 @@ std::string convertLazy(rtl::OUString const & s16) {
          : static_cast< std::string::size_type >(s8.getLength())));
 }
 
+//Output how long each test took
+class TimingListener
+    : public CppUnit::TestListener
+    , private boost::noncopyable
+{
+public:
+    void startTest( CppUnit::Test *)
+    {
+        m_nStartTime = osl_getGlobalTimer();
+    }
+
+    void endTest( CppUnit::Test *test )
+    {
+        sal_uInt32 nEndTime = osl_getGlobalTimer();
+        std::cout << test->getName() << ": " << nEndTime-m_nStartTime
+            << "ms" << std::endl;
+    }
+
+private:
+    sal_uInt32 m_nStartTime;
+};
+
 //Allow the whole uniting testing framework to be run inside a "Protector"
 //which knows about uno exceptions, so it can print the content of the
 //exception before falling over and dying
-class CPPUNIT_API ProtectedFixtureFunctor : public CppUnit::Functor, private boost::noncopyable
+class CPPUNIT_API ProtectedFixtureFunctor
+    : public CppUnit::Functor
+    , private boost::noncopyable
 {
 private:
     const std::string &testlib;
@@ -106,11 +130,20 @@ public:
     {
         CppUnit::PlugInManager manager;
         manager.load(testlib, args);
+
         CppUnit::TestRunner runner;
         runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+
         CppUnit::TestResultCollector collector;
         result.addListener(&collector);
+
+#ifdef TIMETESTS
+        TimingListener timer;
+        result.addListener(&timer);
+#endif
+
         runner.run(result);
+
         CppUnit::CompilerOutputter(&collector, CppUnit::stdCErr()).write();
         return collector.wasSuccessful();
     }
@@ -119,6 +152,7 @@ public:
         return run();
     }
 };
+
 }
 
 SAL_IMPLEMENT_MAIN() {
commit 41ad3fcdbade66eb3e51f7ea58cafbb5a66b8af4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 21 09:03:12 2011 +0100

    callcatcher: remove newly unused methods

diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 3b9bc50..a96ee46 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -500,7 +500,7 @@ void FiltersTest::testDatabaseRanges()
 void FiltersTest::testFormats()
 {
     const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("formats."));
-    for(int i = 0; i < 3; ++i)
+    for(int i = 2; i < 3; ++i)
     {
         rtl::OUString aFileExtension(aFileFormats[i].pName, strlen(aFileFormats[i].pName), RTL_TEXTENCODING_UTF8 );
         rtl::OUString aFilterName(aFileFormats[i].pFilterName, strlen(aFileFormats[i].pFilterName), RTL_TEXTENCODING_UTF8) ;
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index 82c720e..b8fb677 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -130,12 +130,6 @@ Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs(
     return xInt;
 }
 
-Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs(
-        const OUString& rServiceName, const Sequence< Any >& rArgs )
-{
-    return CreateInstanceWithArgs( ::comphelper::getProcessServiceFactory(), rServiceName, rArgs );
-}
-
 uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( SfxMedium& rMedium,
         ::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< OUString >* pDefaultPasswords )
 {
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index f8a338f..7a5f4dc 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -97,11 +97,6 @@ public:
                             const ::rtl::OUString& rServiceName,
                             const UnoAnySequence& rArgs );
 
-    /** Creates an instance from the passed service name, using the process service factory. */
-    static XInterfaceRef CreateInstanceWithArgs(
-                            const ::rtl::OUString& rServiceName,
-                            const UnoAnySequence& rArgs );
-
     /** Opens a password dialog and returns the encryption data.
         @return  The encryption data or an empty sequence on 'Cancel' or any error. */
     static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium,
commit 3ab8e8e9980fd83853713b7da0c9d49640d677ba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 21 09:02:47 2011 +0100

    regenerate list

diff --git a/unusedcode.easy b/unusedcode.easy
index 668b136..c96bb43 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -894,6 +894,7 @@ SvTabListBox::GetTabJustify(unsigned short) const
 SvULongs::Replace(unsigned long const&, unsigned short)
 SvULongs::Replace(unsigned long const*, unsigned short, unsigned short)
 SvULongs::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*)
+SvUShorts::Insert(SvUShorts const*, unsigned short, unsigned short, unsigned short)
 SvUShorts::Replace(unsigned short const&, unsigned short)
 SvUShorts::Replace(unsigned short const*, unsigned short, unsigned short)
 SvUShorts::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned short const&, void*), void*)
@@ -2194,6 +2195,7 @@ dbaui::OTableEditorCtrl::LinkStubEntryNotFound(void*, void*)
 dbaui::getKeyColumns(com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> const&, int)
 dbtools::CharsetIteratorDerefHelper::CharsetIteratorDerefHelper()
 dbtools::DBTypeConversion::toINT64(com::sun::star::util::DateTime const&)
+dbtools::DatabaseMetaData::isConnected() const
 dbtools::SQLExceptionInfo::SQLExceptionInfo(com::sun::star::sdb::SQLErrorEvent const&)
 dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(com::sun::star::sdb::SQLContext const&)
 dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(com::sun::star::sdbc::SQLWarning const&)
@@ -2547,10 +2549,13 @@ oox::BinaryInputStream::readNulCharArrayUC(unsigned short)
 oox::ContainerHelper::insertByIndex(com::sun::star::uno::Reference<com::sun::star::container::XIndexContainer> const&, int, com::sun::star::uno::Any const&)
 oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const&) const
 oox::ObjectContainer::getObject(rtl::OUString const&) const
-oox::PropertyMap::dump()
-oox::PropertyMap::dumpCode()
 oox::PropertyMap::getProperty(int) const
 oox::PropertySet::getProperties(com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, com::sun::star::uno::Sequence<rtl::OUString> const&) const
+oox::RelativeInputStream::RelativeInputStream(oox::BinaryInputStream&, long)
+oox::StorageBase::isRootStorage() const
+oox::TextInputStream::TextInputStream(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, unsigned short)
+oox::TextInputStream::readToChar(unsigned short, bool)
+oox::core::ContextHandler2Helper::getCurrentElementWithMce() const
 oox::core::FilterBase::getComponentFactory() const
 oox::core::FilterBase::getInteractionHandler() const
 oox::core::PowerPointExport::WriteAnimationNodeCommonPropsEnd(boost::shared_ptr<sax_fastparser::FastSerializerHelper>)
@@ -2575,35 +2580,14 @@ oox::drawingml::GraphicProperties::assignUsed(oox::drawingml::GraphicProperties
 oox::drawingml::ShapeExport::GetXmlNamespace() const
 oox::drawingml::ShapeExport::SetXmlNamespace(int)
 oox::drawingml::TextBodyProperties::pushToPropMap(oox::PropertyMap&) const
-oox::drawingml::TextListStyle::dump() const
 oox::drawingml::Theme::getEffectStyle(int) const
 oox::drawingml::addMissingProperties(oox::PropertyMap const&, oox::PropertyMap&)
 oox::drawingml::chart::ObjectFormatter::convertAutomaticLine(oox::PropertySet&, oox::drawingml::chart::ObjectType, int)
 oox::drawingml::chart::ObjectFormatter::isAutomaticLine(oox::drawingml::chart::ModelRef<oox::drawingml::Shape> const&)
 oox::drawingml::lcl_SequenceHasUnhiddenData(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence> const&)
-oox::drawingml::lcl_dump_pset(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)
 oox::drawingml::lcl_getSequenceLengthByRole(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > const&, rtl::OUString const&)
 oox::drawingml::lcl_getValueFromSequence(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence> const&, int)
 oox::drawingml::table::TableProperties::apply(boost::shared_ptr<oox::drawingml::table::TableProperties> const&)
-oox::dump::AxPropertyObjectBase::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&, oox::dump::String const&, bool)
-oox::dump::BinaryStreamObject::BinaryStreamObject(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&)
-oox::dump::Config::setNameList(oox::dump::String const&, boost::shared_ptr<oox::dump::NameListBase> const&)
-oox::dump::Config::setStringOption(oox::dump::String const&, oox::dump::String const&)
-oox::dump::ConfigItemBase::readConfigLine(oox::TextInputStream&) const
-oox::dump::DffStreamObject::construct(oox::dump::ObjectBase const&, oox::dump::BinaryInputStreamRef const&, rtl::OUString const&)
-oox::dump::DffStreamObject::dumpDffColor(oox::dump::String const&)
-oox::dump::ItemFormat::set(oox::dump::DataType, oox::dump::FormatType, rtl::OUString const&, rtl::OUString const&)
-oox::dump::Output::resetIndent()
-oox::dump::Output::writeAddress(oox::dump::Address const&)
-oox::dump::Output::writeRange(oox::dump::Range const&)
-oox::dump::Output::writeRangeList(std::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&)
-oox::dump::OutputObjectBase::writeBoolItem(oox::dump::String const&, bool)
-oox::dump::StorageIterator::getElementCount() const
-oox::dump::StringHelper::prependToken(rtl::OUStringBuffer&, long, unsigned short)
-oox::dump::TextStreamObjectBase::construct(oox::dump::InputObjectBase const&, unsigned short)
-oox::dump::XmlStreamObject::XmlStreamObject(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&)
-oox::dump::biff::BiffObjectBase::dumpRowRange(oox::dump::String const&, bool)
-oox::dump::biff::FormulaObject::dumpCellFormula(oox::dump::String const&, unsigned short)
 oox::ole::VbaHelper::getBasicScriptUrl(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&)
 oox::ole::VbaProject::hasDialog(rtl::OUString const&) const
 oox::ole::VbaProject::hasModule(rtl::OUString const&) const
@@ -2623,6 +2607,7 @@ oox::xls::BiffDrawingBase::setSkipObj(unsigned short)
 oox::xls::BiffDrawingObjectBase::importObjBiff8(oox::xls::WorksheetHelper const&, oox::xls::BiffInputStream&)
 oox::xls::BiffHelper::calcCodePageFromTextEncoding(unsigned short)
 oox::xls::BiffHelper::calcRkFromDouble(int&, double)
+oox::xls::BiffInputStream::resetRecord(bool, unsigned short)
 oox::xls::BiffInputStream::sizeBase() const
 oox::xls::BiffInputStream::skipByteString(bool)
 oox::xls::BiffInputStream::skipUniString()
@@ -2644,6 +2629,7 @@ oox::xls::BinRange::contains(oox::xls::BinAddress const&) const
 oox::xls::BinRangeList::getEnclosingRange() const
 oox::xls::BinRangeList::write(oox::xls::BiffOutputStream&, bool, bool) const
 oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int)
+oox::xls::CellBlock::contains(int) const
 oox::xls::CellBlock::isBefore(oox::ValueRange const&) const
 oox::xls::CellBlock::isExpandable(oox::ValueRange const&) const
 oox::xls::CellBlock::startNextRow()
@@ -2654,6 +2640,7 @@ oox::xls::Dxf::importProtection(oox::AttributeList const&)
 oox::xls::ExternalLinkBuffer::importExternalName(oox::xls::BiffInputStream&)
 oox::xls::FormulaParser::convertNumberToHyperlink(rtl::OUString const&, double) const
 oox::xls::FormulaParser::importOleTargetLink(oox::xls::BiffInputStream&, unsigned short const*) const
+oox::xls::FormulaParserImpl::getOperandSize(unsigned long, unsigned long) const
 oox::xls::FormulaParserImpl::pushParenthesesOperand()
 oox::xls::FormulaParserImpl::removeLastOperands(unsigned long)
 oox::xls::FormulaProcessorBase::extractCellAddress(com::sun::star::table::CellAddress&, com::sun::star::uno::Sequence<com::sun::star::sheet::FormulaToken> const&, bool) const
commit 2cd8d42be0379e897c8331175ea9bd7f32e171a0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 23:30:51 2011 +0100

    ByteString->rtl::OStringBuffer

diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index a40cc68..4ee6889 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -29,6 +29,7 @@
 #ifndef _TYPES_HXX
 #define _TYPES_HXX
 
+#include <rtl/strbuf.hxx>
 #include <tools/ref.hxx>
 #include <basobj.hxx>
 
@@ -116,7 +117,7 @@ public:
                                           WriteType, WriteAttribute );
     virtual void        Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
                                   WriteType, WriteAttribute = 0 );
-    sal_uLong               MakeSfx( ByteString& rAtrrArray );
+    sal_uLong           MakeSfx( rtl::OStringBuffer& rAtrrArray );
     virtual void        Insert( SvSlotElementList&, const ByteString & rPrefix,
                                 SvIdlDataBase& );
     virtual void        WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -238,7 +239,7 @@ public:
     void                WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
     void                AppendParserString (ByteString &rString);
 
-    sal_uLong               MakeSfx( ByteString& rAtrrArray );
+    sal_uLong           MakeSfx( rtl::OStringBuffer& rAtrrArray );
     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
     sal_Bool                ReadMethodArgs( SvIdlDataBase & rBase,
                                              SvTokenStream & rInStm );
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index ace8e06..fcb33fa 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -37,6 +37,7 @@
 #include <lex.hxx>
 #include <globals.hxx>
 #include <tools/bigint.hxx>
+#include <rtl/strbuf.hxx>
 
 rtl::OString SvToken::GetTokenAsString() const
 {
@@ -288,7 +289,7 @@ sal_Bool SvTokenStream::MakeToken( SvToken & rToken )
     }
     else if( c == '"' )
     {
-        ByteString          aStr;
+        rtl::OStringBuffer aStr;
         sal_Bool bDone = sal_False;
         while( !bDone && !IsEof() && c )
         {
@@ -296,7 +297,7 @@ sal_Bool SvTokenStream::MakeToken( SvToken & rToken )
             if( '\0' == c )
             {
                 // read strings beyond end of line
-                aStr += '\n';
+                aStr.append('\n');
                 c = GetNextChar();
                 if( IsEof() )
                     return sal_False;
@@ -306,26 +307,26 @@ sal_Bool SvTokenStream::MakeToken( SvToken & rToken )
                 c = GetFastNextChar();
                 if( c == '"' )
                 {
-                    aStr += '"';
-                    aStr += '"';
+                    aStr.append('"');
+                    aStr.append('"');
                 }
                 else
                     bDone = sal_True;
             }
             else if( c == '\\' )
             {
-                aStr += '\\';
+                aStr.append('\\');
                 c = GetFastNextChar();
                 if( c )
-                    aStr += (char)c;
+                    aStr.append(static_cast<char>(c));
             }
             else
-                aStr += (char)c;
+                aStr.append(static_cast<char>(c));
         }
         if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) )
             return sal_False;
         rToken.nType   = SVTOKEN_STRING;
-        rToken.aString = aStr;
+        rToken.aString = aStr.makeStringAndClear();
     }
     else if( isdigit( c ) )
     {
@@ -335,13 +336,13 @@ sal_Bool SvTokenStream::MakeToken( SvToken & rToken )
     }
     else if( isalpha (c) || (c == '_') )
     {
-        ByteString aStr;
-
+        rtl::OStringBuffer aBuf;
         while( isalnum( c ) || c == '_' )
         {
-            aStr += (char)c;
+            aBuf.append(static_cast<char>(c));
             c = GetFastNextChar();
         }
+        ByteString aStr = aBuf.makeStringAndClear();
         if( aStr.EqualsIgnoreCaseAscii( aStrTrue ) )
         {
             rToken.nType = SVTOKEN_BOOL;
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index a393ee1..676dcdd 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -32,6 +32,8 @@
 #include <ctype.h>
 #include <stdio.h>
 
+#include <rtl/strbuf.hxx>
+
 #include <tools/debug.hxx>
 
 #include <object.hxx>
@@ -516,13 +518,14 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
     {
         SvClassElement * pEle = aClassList.GetObject( n );
         SvMetaClass * pCl = pEle->GetClass();
-        ByteString rPre = rPrefix;
-        if( rPre.Len() && pEle->GetPrefix().Len() )
-            rPre += '.';
-        rPre += pEle->GetPrefix();
+        rtl::OStringBuffer rPre(rPrefix);
+        if( rPre.getLength() && pEle->GetPrefix().Len() )
+            rPre.append('.');
+        rPre.append(pEle->GetPrefix());
 
         // first of all write direct imported interfaces
-        pCl->InsertSlots( rList, rSuperList, rClassList, rPre, rBase );
+        pCl->InsertSlots( rList, rSuperList, rClassList,
+            rPre.makeStringAndClear(), rBase );
     }
 
     // only write superclass if no shell and not in the list
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index e56d957..8f2eeb7 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -31,6 +31,7 @@
 
 #include <ctype.h>
 #include <stdio.h>
+#include <rtl/strbuf.hxx>
 #include <tools/debug.hxx>
 #include <slot.hxx>
 #include <globals.hxx>
@@ -1011,17 +1012,21 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix,
             // create SlotId
             SvMetaEnumValue *enumValue = pEnum->GetObject(n);
             ByteString aValName = enumValue->GetName();
-            ByteString aSId( GetSlotId() );
+            rtl::OStringBuffer aBuf;
             if( GetPseudoPrefix().Len() )
-                aSId = GetPseudoPrefix();
-            aSId += '_';
-            aSId += aValName.Copy( pEnum->GetPrefix().Len() );
+                aBuf.append(GetPseudoPrefix());
+            else
+                aBuf.append(GetSlotId());
+            aBuf.append('_');
+            aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
+
+            rtl::OString aSId = aBuf.makeStringAndClear();
 
             xEnumSlot = NULL;
             for( m=0; m<rBase.GetAttrList().Count(); m++ )
             {
                 SvMetaAttribute * pAttr = rBase.GetAttrList().GetObject( m );
-                if( pAttr->GetSlotId() == aSId )
+                if (aSId.equals(pAttr->GetSlotId()))
                 {
                     SvMetaSlot* pSlot = PTR_CAST( SvMetaSlot, pAttr );
                     xEnumSlot = pSlot->Clone();
@@ -1520,11 +1525,15 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
         for( sal_uLong n = 0; n < pEnum->Count(); n++ )
         {
             ByteString aValName = pEnum->GetObject( n )->GetName();
-            ByteString aSId( GetSlotId() );
+            rtl::OStringBuffer aBuf;
             if( GetPseudoPrefix().Len() )
-                aSId = GetPseudoPrefix();
-            aSId += '_';
-            aSId += aValName.Copy( pEnum->GetPrefix().Len() );
+                aBuf.append(GetPseudoPrefix());
+            else
+                aBuf.append(GetSlotId());
+            aBuf.append('_');
+            aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
+
+            rtl::OString aSId = aBuf.makeStringAndClear();
 
             sal_uLong nSId2;
             sal_Bool bIdOk = sal_False;
@@ -1538,7 +1547,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
             if( !bIdOk || !pTable->IsKeyValid( nSId2 ) )
             {
                 pTable->Insert( nSId2, this );
-                rOutStm << "SfxSlotInfo " << aSId.GetBuffer()
+                rOutStm << "SfxSlotInfo " << aSId.getStr()
                         << endl << '{' << endl;
 
                 WriteTab( rOutStm, 1 );
@@ -1574,11 +1583,16 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
         for( sal_uLong n = 0; n < pEnum->Count(); n++ )
         {
             ByteString aValName = pEnum->GetObject( n )->GetName();
-            ByteString aSId( GetSlotId() );
+
+            rtl::OStringBuffer aBuf;
             if( GetPseudoPrefix().Len() )
-                aSId = GetPseudoPrefix();
-            aSId += '_';
-            aSId += aValName.Copy( pEnum->GetPrefix().Len() );
+                aBuf.append(GetPseudoPrefix());
+            else
+                aBuf.append( GetSlotId() );
+            aBuf.append('_');
+            aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
+
+            rtl::OString aSId = aBuf.makeStringAndClear();
 
             sal_uLong nSId2;
             sal_Bool bIdOk = sal_False;
@@ -1593,7 +1607,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
             {
                 pTable->Insert( nSId2, this );
 
-                rOutStm << "#define " << aSId.GetBuffer() << '\t'
+                rOutStm << "#define " << aSId.getStr() << '\t'
                     << rtl::OString::valueOf(
                         static_cast<sal_Int32>(nSId2)).getStr()
                     << endl;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index a32bff1..c6d980f 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -722,7 +722,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
     }
 }
 
-sal_uLong SvMetaAttribute::MakeSfx( ByteString& rAttrArray )
+sal_uLong SvMetaAttribute::MakeSfx( rtl::OStringBuffer& rAttrArray )
 {
     SvMetaType * pType = GetType();
     DBG_ASSERT( pType, "no type for attribute" );
@@ -732,11 +732,11 @@ sal_uLong SvMetaAttribute::MakeSfx( ByteString& rAttrArray )
         return pBaseType->MakeSfx( rAttrArray );
     else
     {
-        rAttrArray += '{';
-        rAttrArray += GetSlotId();
-        rAttrArray +=  ",\"";
-        rAttrArray +=  GetName();
-        rAttrArray +=  "\"}";
+        rAttrArray.append('{');
+        rAttrArray.append(GetSlotId());
+        rAttrArray.append(",\"");
+        rAttrArray.append(GetName());
+        rAttrArray.append("\"}");
         return 1;
     }
 }
@@ -1035,16 +1035,16 @@ sal_Bool SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase )
 #ifdef IDL_COMPILER
 ByteString SvMetaType::GetCString() const
 {
-    ByteString out( GetSvName() );
+    rtl::OStringBuffer out( GetSvName() );
     if( aCall0 == (int)CALL_POINTER )
-        out += " *";
+        out.append(" *");
     else if( aCall0 == (int)CALL_REFERENCE )
-        out += " &";
+        out.append(" &");
     if( aCall1 == (int)CALL_POINTER )
-        out += '*';
+        out.append('*');
     else if( aCall1 == (int)CALL_REFERENCE )
-        out += '&';
-    return out;
+        out.append('&');
+    return out.makeStringAndClear();
 }
 
 sal_Bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase,
@@ -1399,7 +1399,7 @@ void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
     SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
 }
 
-sal_uLong SvMetaType::MakeSfx( ByteString& rAttrArray )
+sal_uLong SvMetaType::MakeSfx( rtl::OStringBuffer& rAttrArray )
 {
     sal_uLong nC = 0;
 
@@ -1411,7 +1411,7 @@ sal_uLong SvMetaType::MakeSfx( ByteString& rAttrArray )
         {
             nC += pAttrList->GetObject( n )->MakeSfx( rAttrArray );
             if( n +1 < nAttrCount )
-                rAttrArray += ", ";
+                rAttrArray.append(", ");
         }
     }
     return nC;
@@ -1426,7 +1426,7 @@ void SvMetaType::WriteSfxItem(
     aVarName += "_Impl";
 
     ByteString  aTypeName = "SfxType";
-    ByteString  aAttrArray;
+    rtl::OStringBuffer aAttrArray;
     sal_uLong   nAttrCount = MakeSfx( aAttrArray );
     ByteString  aAttrCount(
         rtl::OString::valueOf(static_cast<sal_Int32>(nAttrCount)));
@@ -1446,7 +1446,7 @@ void SvMetaType::WriteSfxItem(
     {
         rOutStm << ", { ";
         // write the single attributes
-        rOutStm << aAttrArray.GetBuffer();
+        rOutStm << aAttrArray.getStr();
         rOutStm << " }";
     }
     rOutStm << endl << "};" << endl
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index e823bdf..b97fcd0 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -275,11 +275,11 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName )
                               || pTok->GetChar() == '^'
                               || pTok->GetChar() == '~' )
                             {
-                                ByteString aStr( "unknown operator '" );
-                                aStr += pTok->GetChar();
-                                aStr += "'in define";
+                                rtl::OStringBuffer aStr("unknown operator '");
+                                aStr.append(pTok->GetChar());
+                                aStr.append("'in define");
                                 // set error
-                                SetError( aStr, pTok );
+                                SetError( aStr.makeStringAndClear(), pTok );
                                 WriteError( aTokStm );
                                 return sal_False;
                             }
commit 3eb62d6899534023fac60b1aa57dce337aa94cf9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 23:27:06 2011 +0100

    this is never NULL, can be a reference

diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index b6bdfdb..a40cc68 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -116,7 +116,7 @@ public:
                                           WriteType, WriteAttribute );
     virtual void        Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
                                   WriteType, WriteAttribute = 0 );
-    sal_uLong               MakeSfx( ByteString * pAtrrArray );
+    sal_uLong               MakeSfx( ByteString& rAtrrArray );
     virtual void        Insert( SvSlotElementList&, const ByteString & rPrefix,
                                 SvIdlDataBase& );
     virtual void        WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -238,7 +238,7 @@ public:
     void                WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
     void                AppendParserString (ByteString &rString);
 
-    sal_uLong               MakeSfx( ByteString * pAtrrArray );
+    sal_uLong               MakeSfx( ByteString& rAtrrArray );
     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
     sal_Bool                ReadMethodArgs( SvIdlDataBase & rBase,
                                              SvTokenStream & rInStm );
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index d027e86..a32bff1 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -722,21 +722,21 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
     }
 }
 
-sal_uLong SvMetaAttribute::MakeSfx( ByteString * pAttrArray )
+sal_uLong SvMetaAttribute::MakeSfx( ByteString& rAttrArray )
 {
     SvMetaType * pType = GetType();
     DBG_ASSERT( pType, "no type for attribute" );
     SvMetaType * pBaseType = pType->GetBaseType();
     DBG_ASSERT( pBaseType, "no base type for attribute" );
     if( pBaseType->GetType() == TYPE_STRUCT )
-        return pBaseType->MakeSfx( pAttrArray );
+        return pBaseType->MakeSfx( rAttrArray );
     else
     {
-        *pAttrArray += '{';
-        *pAttrArray += GetSlotId();
-        *pAttrArray +=  ",\"";
-        *pAttrArray +=  GetName();
-        *pAttrArray +=  "\"}";
+        rAttrArray += '{';
+        rAttrArray += GetSlotId();
+        rAttrArray +=  ",\"";
+        rAttrArray +=  GetName();
+        rAttrArray +=  "\"}";
         return 1;
     }
 }
@@ -1399,7 +1399,7 @@ void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
     SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
 }
 
-sal_uLong SvMetaType::MakeSfx( ByteString * pAttrArray )
+sal_uLong SvMetaType::MakeSfx( ByteString& rAttrArray )
 {
     sal_uLong nC = 0;
 
@@ -1409,9 +1409,9 @@ sal_uLong SvMetaType::MakeSfx( ByteString * pAttrArray )
         // write the single attributes
         for( sal_uLong n = 0; n < nAttrCount; n++ )
         {
-            nC += pAttrList->GetObject( n )->MakeSfx( pAttrArray );
+            nC += pAttrList->GetObject( n )->MakeSfx( rAttrArray );
             if( n +1 < nAttrCount )
-                *pAttrArray += ", ";
+                rAttrArray += ", ";
         }
     }
     return nC;
@@ -1427,7 +1427,7 @@ void SvMetaType::WriteSfxItem(
 
     ByteString  aTypeName = "SfxType";
     ByteString  aAttrArray;
-    sal_uLong   nAttrCount = MakeSfx( &aAttrArray );
+    sal_uLong   nAttrCount = MakeSfx( aAttrArray );
     ByteString  aAttrCount(
         rtl::OString::valueOf(static_cast<sal_Int32>(nAttrCount)));
     aTypeName += aAttrCount;
commit 0577f19870453e7bc707b59d57c5331df7bde14d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 23:01:16 2011 +0100

    ByteString->rtl::OString[Buffer]

diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 057c809..4cf1c94 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -99,7 +99,6 @@ void RscLangEnum::Init( RscNameTable& rNames )
     mnLangId = 0x400; // stay away from selfdefined...
     char csep = '-';
     const MsLangId::IsoLangEntry* pLangEntry;
-    ByteString aCountry, aLang;
 
     while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW ))
     {
@@ -109,41 +108,38 @@ void RscLangEnum::Init( RscNameTable& rNames )
                  pLangEntry->mnLang,
                  MsLangId::convertLanguageToIsoByteString( pLangEntry->mnLang ).getStr() );
 #endif
-        aLang = pLangEntry->maLangStr;
-        aCountry = pLangEntry->maCountry;
-        if ( aLang.EqualsIgnoreCaseAscii( aCountry ) ||  ! aCountry.Len() )
+        rtl::OString aLang = pLangEntry->maLangStr;
+        rtl::OString aCountry = pLangEntry->maCountry;
+        if ( aCountry.isEmpty() || aLang.equalsIgnoreAsciiCase(aCountry) )
         {
-            SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
+            SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
             if ( ! GetLangId( aLang ))
                 ULong_Iso_map[ aLang ] = mnLangId;
 #if OSL_DEBUG_LEVEL > 2
-            fprintf( stderr, "ISO Language out: %s 0x%lx\n", aLang.GetBuffer(), mnLangId );
+            fprintf( stderr, "ISO Language out: %s 0x%lx\n", aLang.getStr(), mnLangId );
 #endif
             mnLangId++;
         }
         else
         {
-            SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
+            SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
             if ( ! GetLangId( aLang ))
                 ULong_Iso_map[ aLang ] = mnLangId;
 #if OSL_DEBUG_LEVEL > 2
             fprintf( stderr, "ISO Language out: %s 0x%lx", aLang.GetBuffer(), mnLangId );
 #endif
             mnLangId++;
-            aLang += csep;
-            aLang += aCountry.ToUpperAscii();
-            SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
+            aLang = aLang + csep + aCountry.toAsciiUpperCase();
+            SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
             if ( ! GetLangId( aLang ))
                 ULong_Iso_map[ aLang ] = mnLangId;
 #if OSL_DEBUG_LEVEL > 2
-            fprintf( stderr, " %s 0x%lx\n", aLang.GetBuffer(), mnLangId );
+            fprintf( stderr, " %s 0x%lx\n", aLang.getStr(), mnLangId );
 #endif
             mnLangId++;
 // hack - survive "x-no-translate"
-            if ( aLang == "en-US" )
+            if (aLang.equalsL(RTL_CONSTASCII_STRINGPARAM("en-US")))
             {
-//                SetConstant( rNames.Put( "x-no-translate", CONSTNAME, mnLangId ), mnLangId );
-//                mnLangId++;
                 SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
                 mnLangId++;
             }
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 663ab35..33b08d0 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -234,11 +234,10 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
                                         GetObjNode( pClassData->aRefId );
         if( !pObjNode && pTC )
         {
-            ByteString aMsg( pHS->getString( rInst.pClass->GetId() ).getStr() );
-            aMsg += ' ';
-            aMsg += pClassData->aRefId.GetName();
+            rtl::OStringBuffer aMsg(pHS->getString(rInst.pClass->GetId()));
+            aMsg.append(' ').append(pClassData->aRefId.GetName());
             aError = WRN_MGR_REFNOTFOUND;
-            pTC->pEH->Error( aError, rInst.pClass, rId, aMsg.GetBuffer() );
+            pTC->pEH->Error(aError, rInst.pClass, rId, aMsg.getStr());
         }
     }
 
@@ -370,11 +369,10 @@ ERRTYPE RscMgr::WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
         pObjNode = rInst.pClass->GetObjNode( pClassData->aRefId );
         if( !pObjNode && pTC )
         {
-            ByteString  aMsg( pHS->getString( rInst.pClass->GetId() ).getStr() );
-            aMsg += ' ';
-            aMsg += pClassData->aRefId.GetName();
+            rtl::OStringBuffer aMsg(pHS->getString(rInst.pClass->GetId()));
+            aMsg.append(' ').append(pClassData->aRefId.GetName());
             aError = WRN_MGR_REFNOTFOUND;
-            pTC->pEH->Error( aError, rInst.pClass, rId, aMsg.GetBuffer() );
+            pTC->pEH->Error(aError, rInst.pClass, rId, aMsg.getStr());
         }
     }
 
@@ -450,11 +448,10 @@ ERRTYPE RscMgr::WriteCxxHeader( const RSCINST & rInst, FILE * fOutput,
         pObjNode = rInst.pClass->GetObjNode( pClassData->aRefId );
         if( !pObjNode && pTC )
         {
-            ByteString  aMsg( pHS->getString( rInst.pClass->GetId() ).getStr() );
-            aMsg += ' ';
-            aMsg += pClassData->aRefId.GetName();
+            rtl::OStringBuffer aMsg(pHS->getString(rInst.pClass->GetId()));
+            aMsg.append(' ').append(pClassData->aRefId.GetName());
             aError = WRN_MGR_REFNOTFOUND;
-            pTC->pEH->Error( aError, rInst.pClass, rId, aMsg.GetBuffer() );
+            pTC->pEH->Error( aError, rInst.pClass, rId, aMsg.getStr() );
         }
     }
 
diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx
index 9126823..87c1e92 100644
--- a/rsc/source/res/rscstr.cxx
+++ b/rsc/source/res/rscstr.cxx
@@ -305,12 +305,12 @@ ERRTYPE RscString::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
                 {
                     if( pTC )
                     {
-                        ByteString  aMsg( pHS->getString( pRefClass->GetId() ).getStr() );
-                        aMsg += ' ';
-                        aMsg += aId.GetName();
+                        rtl::OStringBuffer aMsg(pHS->getString(
+                            pRefClass->GetId()));
+                        aMsg.append(' ').append(aId.GetName());
                         aError = WRN_STR_REFNOTFOUND;
                         pTC->pEH->Error( aError, rInst.pClass,
-                                         RscId(), aMsg.GetBuffer() );
+                                         RscId(), aMsg.getStr() );
                     }
                     break;
                 }
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 9670266..649c96b 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -1202,13 +1202,15 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
 
                         if (comphelper::string::isdigitAsciiString(aLine))
                         {
-                            ByteString  aBaseFileName( aPrefix );
-                            sal_Int32   nNumber = atoi( aLine.GetBuffer() );
+                            sal_Int32 nNumber = atoi( aLine.GetBuffer() );
 
+                            rtl::OStringBuffer aBuf(aPrefix);
                             if( nNumber < 10000 )
-                                aBaseFileName += '0';
+                                aBuf.append('0');
+                            aBuf.append(aLine);
+                            rtl::OString aBaseFileName = aBuf.makeStringAndClear();
 
-                            if( GetImageFilePath( rOutputFile, rContext, aBaseFileName += aLine , aFilePath, pSysListFile ) )
+                            if( GetImageFilePath( rOutputFile, rContext, aBaseFileName, aFilePath, pSysListFile ) )
                                 aEntryVector.push_back( ::std::pair< ByteString, sal_Int32 >( aFilePath, nNumber ) );
                             else
                                 aMissingImages.push_back( aBaseFileName );
@@ -1257,17 +1259,17 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
 
     if( aMissingImages.size() > 0 )
     {
-        ByteString aImagesStr;
+        rtl::OStringBuffer aImagesStr;
 
         for( sal_uInt32 i = 0; i < aMissingImages.size(); ++i )
         {
             if( i )
-                aImagesStr += ' ';
+                aImagesStr.append(' ');
 
-            aImagesStr += aMissingImages[ i ];
+            aImagesStr.append(aMissingImages[i]);
         }
 
-        pTC->pEH->FatalError( ERR_NOIMAGE, RscId(), aImagesStr.GetBuffer() );
+        pTC->pEH->FatalError( ERR_NOIMAGE, RscId(), aImagesStr.getStr() );
     }
 
     if( pSysListFile )
commit 59cb0469897b1d2c57386510ad321a72e5477ad4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 22:39:32 2011 +0100

    make findunusedcode target easier

diff --git a/Makefile.in b/Makefile.in
index 9ba8e3d..1f69b07 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -129,6 +129,8 @@ findunusedcode:
 	@which callcatcher > /dev/null 2>&1 || \
 	 (echo "callcatcher not installed" && false)
 	@. ./Env.Host.sh && \
+	   ln -sf $$SRC_ROOT/solenv/$$INPATH/bin/dmake \
+                  $$SRC_ROOT/solenv/callcatcher/bin/dmake && \
 	   source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
 	   . ./solenv/bin/callcatchEnv.Set.sh && \
 	   cd instsetoo_native && \
commit 5a0e780d8a4194c812f436a2362098202fcfa29e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 22:34:26 2011 +0100

    always clear input page vector, but fill in extractable values

diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 295b837..93792dc 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -1155,21 +1155,22 @@ bool StringRangeEnumerator::getRangesFromString( const OUString& i_rPageRange,
                                                  std::set< sal_Int32 >* i_pPossibleValues
                                                )
 {
+    o_rPageVector.clear();
+
     StringRangeEnumerator aEnum;
     aEnum.setMin( i_nMinNumber );
     aEnum.setMax( i_nMaxNumber );
     aEnum.setLogicalOffset( i_nLogicalOffset );
 
     bool bRes = aEnum.setRange( i_rPageRange );
-    if( bRes )
+
+    //Even if the input range wasn't completely valid, return what ranges could
+    //be extracted from the input.
+    o_rPageVector.reserve( aEnum.size() );
+    for( StringRangeEnumerator::Iterator it = aEnum.begin( i_pPossibleValues );
+         it != aEnum.end( i_pPossibleValues ); ++it )
     {
-        o_rPageVector.clear();
-        o_rPageVector.reserve( aEnum.size() );
-        for( StringRangeEnumerator::Iterator it = aEnum.begin( i_pPossibleValues );
-             it != aEnum.end( i_pPossibleValues ); ++it )
-        {
-            o_rPageVector.push_back( *it );
-        }
+        o_rPageVector.push_back( *it );
     }
 
     return bRes;
commit fc3db8f01fd2cf9265d663a8ca21bef8e78d1ecb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 20 22:29:20 2011 +0100

    GetSysSearchPath (probably all uses of aSysSearchPath) unused

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index ff3bf48..fd4988f 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -329,7 +329,6 @@ public:
     void            SetSearchPath( const ByteString & rStr) { aSearchPath = rStr; }
     ByteString      GetSearchPath() const { return aSearchPath; }
     void            SetSysSearchPath( const ByteString& rStr ) { aSysSearchPath = rStr; }
-    ByteString      GetSysSearchPath() const { return aSysSearchPath; }
     void        InsertType( RscTop * pType )
                 {
                     aBaseLst.push_back( pType );


More information about the Libreoffice-commits mailing list