[Libreoffice-commits] .: 9 commits - cosv/inc cosv/source udm/inc udm/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jun 20 07:17:20 PDT 2011


 cosv/inc/cosv/dirchain.hxx        |    7 ---
 cosv/inc/cosv/ploc.hxx            |    1 
 cosv/inc/cosv/streamstr.hxx       |   12 -----
 cosv/source/storage/dirchain.cxx  |   21 ---------
 cosv/source/storage/ploc.cxx      |   12 -----
 cosv/source/strings/streamstr.cxx |   80 --------------------------------------
 udm/inc/udm/xml/xmlitem.hxx       |   19 ---------
 udm/source/xml/xmlitem.cxx        |   32 ---------------
 8 files changed, 184 deletions(-)

New commits:
commit cb112b51237d3b282a6ab1d54532d13b9a7e428b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:54:17 2011 +0100

    remove unused ASglTag class

diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx
index d6fd5eb..3e186fe 100644
--- a/udm/inc/udm/xml/xmlitem.hxx
+++ b/udm/inc/udm/xml/xmlitem.hxx
@@ -243,23 +243,6 @@ class APureElement : public PureElement
     Dyn< Item >			pContent;
 };
 
-class ASglTag : public SglTag
-{
-  public:
-                        ASglTag(
-                            const ::csv::String & i_sTagName );
-                        ASglTag(
-                            const char *          i_sTagName );
-                        ~ASglTag();
-  private:
-    // Interface Element:
-    virtual const ::csv::String &
-                        inq_TagName() const;
-    // DATA
-    ::csv::String         sTagName;
-};
-
-
 /* Standard Attribute implementation
 */
 class AnAttribute : public Attribute
diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx
index 25f814e..8c3e10d 100644
--- a/udm/source/xml/xmlitem.cxx
+++ b/udm/source/xml/xmlitem.cxx
@@ -380,31 +380,6 @@ APureElement::inq_RefContent()
     return pContent;
 }
 
-
-
-//***************************     ASglTag	 		**************************//
-
-ASglTag::ASglTag( const String &   i_sTagName )
-    :	sTagName( i_sTagName )
-{
-}
-
-ASglTag::ASglTag( const char *  i_sTagName )
-    :	sTagName( i_sTagName )
-{
-}
-
-ASglTag::~ASglTag()
-{
-}
-
-const String &
-ASglTag::inq_TagName() const
-{
-    return sTagName;
-}
-
-
 //***************************		AnAttribute		**************************//
 AnAttribute::AnAttribute( const String &   i_sName,
                           const String &   i_sValue )
commit 102600a930b611c54e962298f867a73681174ea1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:53:27 2011 +0100

    remove unused ctor

diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx
index fbb85f1..d6fd5eb 100644
--- a/udm/inc/udm/xml/xmlitem.hxx
+++ b/udm/inc/udm/xml/xmlitem.hxx
@@ -203,8 +203,6 @@ class AnElement : public Element
 {
   public:
                         AnElement(
-                            const ::csv::String& i_sTagName );
-                        AnElement(
                             const char *         i_sTagName );
                         ~AnElement();
   private:
diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx
index 4c6be5e..25f814e 100644
--- a/udm/source/xml/xmlitem.cxx
+++ b/udm/source/xml/xmlitem.cxx
@@ -309,13 +309,6 @@ SglTag::inq_Attrs() const
 
 //***************************		AnElement		**************************//
 
-AnElement::AnElement( const String &   i_sTagName )
-    :	sTagName( i_sTagName )
-        // pContent,
-        // aAttrs
-{
-}
-
 AnElement::AnElement( const char * i_sTagName )
     :	sTagName( i_sTagName )
         // pContent,
commit a5d36ccc70a3cc2b7783736198983f51126d92b1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:42:50 2011 +0100

    remove unused PopFront

diff --git a/cosv/inc/cosv/dirchain.hxx b/cosv/inc/cosv/dirchain.hxx
index d531d0c..d6fc54a 100644
--- a/cosv/inc/cosv/dirchain.hxx
+++ b/cosv/inc/cosv/dirchain.hxx
@@ -85,8 +85,6 @@ class DirectoryChain
     void                PushBack(
                             const DirectoryChain &
                                                 i_sPath );
-    void                PopFront(
-                            uintt               i_nCount = 1 );
     void                PopBack(
                             uintt               i_nCount = 1 );
 
diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx
index 7eb1be8..69c2078 100644
--- a/cosv/source/storage/dirchain.cxx
+++ b/cosv/source/storage/dirchain.cxx
@@ -93,15 +93,6 @@ DirectoryChain::PushBack( const DirectoryChain & i_sPath )
 }
 
 void
-DirectoryChain::PopFront( uintt i_nCount )
-{
-    if (i_nCount <= aPath.size())
-        aPath.erase( aPath.begin(), aPath.begin() + i_nCount );
-    else
-        aPath.erase( aPath.begin(), aPath.end() );
-}
-
-void
 DirectoryChain::PopBack( uintt i_nCount )
 {
     if (i_nCount <= aPath.size())
commit c751a9edc5115c5c4c8e8e858d53c4676a904436
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:41:18 2011 +0100

    remove unused PushFront

diff --git a/cosv/inc/cosv/dirchain.hxx b/cosv/inc/cosv/dirchain.hxx
index d495497..d531d0c 100644
--- a/cosv/inc/cosv/dirchain.hxx
+++ b/cosv/inc/cosv/dirchain.hxx
@@ -80,11 +80,6 @@ class DirectoryChain
                             const char *        i_sPath,
                             bool                i_bPathIsAlwaysDir = false,
                             const char *        i_sDelimiter = Delimiter() );
-    void                PushFront(
-                            const String &      i_sName );
-    void                PushFront(
-                            const DirectoryChain &
-                                                i_sPath );
     void                PushBack(
                             const String &      i_sName );
     void                PushBack(
diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx
index 52683c2..7eb1be8 100644
--- a/cosv/source/storage/dirchain.cxx
+++ b/cosv/source/storage/dirchain.cxx
@@ -81,18 +81,6 @@ DirectoryChain::Set( const char *        i_sSubPath,
 }
 
 void
-DirectoryChain::PushFront( const String & i_sName )
-{
-    aPath.insert( aPath.begin(), i_sName );
-}
-
-void
-DirectoryChain::PushFront( const DirectoryChain & i_sPath )
-{
-    aPath.insert( aPath.begin(), i_sPath.Begin(), i_sPath.End() );
-}
-
-void
 DirectoryChain::PushBack( const String & i_sName )
 {
     aPath.push_back(i_sName);
commit 66b4832d69f82af816e1aee212ab23bc00974eaa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:38:12 2011 +0100

    FileExtension unused

diff --git a/cosv/inc/cosv/ploc.hxx b/cosv/inc/cosv/ploc.hxx
index e7514c8..1c84c38 100644
--- a/cosv/inc/cosv/ploc.hxx
+++ b/cosv/inc/cosv/ploc.hxx
@@ -79,7 +79,6 @@ class Path
     const DirectoryChain &
                         DirChain() const        { return aPath; }
     const String  &     File() const            { return sFile; }
-    const char *        FileExtension() const;
     bool                IsValid() const;
     bool                IsDirectory() const     { return sFile.length() == 0; }
     bool                IsFile() const          { return sFile.length() > 0; }
diff --git a/cosv/source/storage/ploc.cxx b/cosv/source/storage/ploc.cxx
index 000eafd..de78d01 100644
--- a/cosv/source/storage/ploc.cxx
+++ b/cosv/source/storage/ploc.cxx
@@ -106,18 +106,6 @@ Path::SetFile( const String & i_sName )
     sFile = i_sName;
 }
 
-const char *
-Path::FileExtension() const
-{
-    const char *
-        ext = strrchr(sFile, '.');
-    if (ext != 0)
-        ++ext;
-    else
-        ext = "";
-    return ext;
-}
-
 bool
 Path::IsValid() const
 {
commit 1202e5c48f36c24bf904204239644d0083ea2ed5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:25:08 2011 +0100

    remove unused strip_ methods

diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
index fabcd11..36df797 100644
--- a/cosv/inc/cosv/streamstr.hxx
+++ b/cosv/inc/cosv/streamstr.hxx
@@ -212,10 +212,6 @@ class StreamStr : public bostream
     self &              operator_read_line(
                             bstream &           i_src );
 
-    void                strip_front(
-                            char                i_cToRemove );
-    void                strip_back(
-                            char                i_cToRemove );
     void                strip_front_whitespace();    /// removes space, tab and crlf.
     void                strip_back_whitespace();
     void                strip_frontback_whitespace();
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index b2400fa..dfb4ddb 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -561,26 +561,6 @@ StreamStr::operator_read_line( bstream & i_src )
 }
 
 void
-StreamStr::strip_front(char i_cToRemove)
-{
-    const_iterator it = begin();
-    for ( ;
-          it != end() ? *it == i_cToRemove : false;
-          ++it ) ;
-    pop_front(it - begin());
-}
-
-void
-StreamStr::strip_back(char i_cToRemove)
-{
-    const_iterator it = end();
-    for ( ;
-          it != begin() ? *(it-1) == i_cToRemove : false;
-          --it ) ;
-    pop_back(end() - it);
-}
-
-void
 StreamStr::strip_front_whitespace()
 {
     const_iterator it = begin();
commit 319f7e2524cc40d380c9dc6b449dde1115335789
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:18:34 2011 +0100

    remove unused token_count

diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
index b5c62d0..fabcd11 100644
--- a/cosv/inc/cosv/streamstr.hxx
+++ b/cosv/inc/cosv/streamstr.hxx
@@ -256,8 +256,6 @@ class StreamStr : public bostream
     const_iterator      cur() const;
     const_iterator      end() const;
 
-    size_type           token_count(
-                            char                i_cSplit ) const;
     String              token(
                             position_type       i_nNr,      /// Starting with 0.
                             char                i_cSpli ) const;
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index 4d49488..b2400fa 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -699,13 +699,6 @@ StreamStr::to_upper( position_type       i_nStart,
     return *this;
 }
 
-
-StreamStr::size_type
-StreamStr::token_count( char i_cSplit ) const
-{
-    return count_chars(dpData, i_cSplit) + 1;
-}
-
 String
 StreamStr::token( position_type i_nNr,
                   char          i_cSplit ) const
commit 63b9ad1c6142c7f1b34a180a0bac021d2a403927
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:15:54 2011 +0100

    remove the unused replace_all variant

diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
index 04914ea..b5c62d0 100644
--- a/cosv/inc/cosv/streamstr.hxx
+++ b/cosv/inc/cosv/streamstr.hxx
@@ -235,9 +235,6 @@ class StreamStr : public bostream
     void                replace_all(
                             char                i_cCarToSearch,
                             char                i_cReplacement );
-    void                replace_all(
-                            Area                i_aStrToSearch,
-                            Area                i_aReplacement );
 
     StreamStr &         to_upper(
                             position_type       i_nStart = 0,
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index 32f35b0..4d49488 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -668,28 +668,6 @@ StreamStr::replace_all( char i_cCarToSearch,
    }
 }
 
-void
-StreamStr::replace_all( Area                i_aStrToSearch,
-                        Area                i_aReplacement )
-{
-    position_type p = 0;
-    const char *  pSearch = i_aStrToSearch.sStr;
-    size_type     nSearch = i_aStrToSearch.nLength;
-
-    while ( p <= length() - nSearch )
-    {
-        if ( strncmp(dpData+p, pSearch, nSearch) == 0 )
-        {
-            replace( p, nSearch, i_aReplacement );
-            p += i_aReplacement.nLength;
-        }
-        else
-        {
-            ++p;
-        }
-   }    // end while
-}
-
 StreamStr &
 StreamStr::to_upper( position_type       i_nStart,
                      size_type           i_nLength )
commit f2e4eb17f5c99e7d6cdab0c479a371b9d8a139ed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 14:10:41 2011 +0100

    remove unused StreamStr::to_lower

diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
index b8e271d..04914ea 100644
--- a/cosv/inc/cosv/streamstr.hxx
+++ b/cosv/inc/cosv/streamstr.hxx
@@ -239,9 +239,6 @@ class StreamStr : public bostream
                             Area                i_aStrToSearch,
                             Area                i_aReplacement );
 
-    StreamStr &         to_lower(
-                            position_type       i_nStart = 0,
-                            size_type           i_nLength = str::maxsize );
     StreamStr &         to_upper(
                             position_type       i_nStart = 0,
                             size_type           i_nLength = str::maxsize );
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index 45884ff..32f35b0 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -691,37 +691,6 @@ StreamStr::replace_all( Area                i_aStrToSearch,
 }
 
 StreamStr &
-StreamStr::to_lower( position_type       i_nStart,
-                     size_type           i_nLength )
-{
-    static char cLower[128] =
-    { 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
-     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
-     32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
-     64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
-    112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
-     96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
-    112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127 };
-
-    if ( i_nStart < length() )
-    {
-        char * pStop = i_nStart + i_nLength < length()
-                            ?	dpData + i_nStart + i_nLength
-                            :	pEnd;
-        for ( char * pChange = dpData + i_nStart;
-              pChange != pStop;
-              ++pChange )
-        {
-            *pChange =  (static_cast< unsigned char >(*pChange) & 0x80) == 0
-                            ?   cLower[ UINT8(*pChange) ]
-                            :   *pChange;
-        }
-    }
-    return *this;
-}
-
-StreamStr &
 StreamStr::to_upper( position_type       i_nStart,
                      size_type           i_nLength )
 {


More information about the Libreoffice-commits mailing list