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

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jun 17 06:13:35 PDT 2011


 autodoc/source/display/html/outfile.cxx |    5 -
 cosv/inc/cosv/comfunc.hxx               |   48 ------------
 cosv/inc/cosv/mbstream.hxx              |   95 -------------------------
 cosv/inc/cosv/streamstr.hxx             |    2 
 cosv/source/service/comfunc.cxx         |   91 ------------------------
 cosv/source/storage/makefile.mk         |    1 
 cosv/source/storage/mbstream.cxx        |  121 --------------------------------
 cosv/source/strings/streamstr.cxx       |    7 -
 udm/inc/udm/html/htmlitem.hxx           |   48 ------------
 udm/inc/udm/xml/xmlitem.hxx             |   23 ------
 udm/source/html/htmlitem.cxx            |   34 --------
 udm/source/xml/xmlitem.cxx              |   39 ----------
 12 files changed, 514 deletions(-)

New commits:
commit 33f5edc31b9c8ed7203465186aa2bdefd62ba2a4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:45:13 2011 +0100

    throw out some unused code

diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
index 5676572..b8e271d 100644
--- a/cosv/inc/cosv/streamstr.hxx
+++ b/cosv/inc/cosv/streamstr.hxx
@@ -216,8 +216,6 @@ class StreamStr : public bostream
                             char                i_cToRemove );
     void                strip_back(
                             char                i_cToRemove );
-    void                strip_frontback(
-                            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 0ae9dfd..45884ff 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -581,13 +581,6 @@ StreamStr::strip_back(char i_cToRemove)
 }
 
 void
-StreamStr::strip_frontback(char i_cToRemove)
-{
-    strip_front(i_cToRemove);
-    strip_back(i_cToRemove);
-}
-
-void
 StreamStr::strip_front_whitespace()
 {
     const_iterator it = begin();
diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx
index 85394d9..fbb85f1 100644
--- a/udm/inc/udm/xml/xmlitem.hxx
+++ b/udm/inc/udm/xml/xmlitem.hxx
@@ -231,8 +231,6 @@ class APureElement : public PureElement
 {
   public:
                         APureElement(
-                            const ::csv::String &	i_sTagName );
-                        APureElement(
                             const char *            i_sTagName );
                         ~APureElement();
   private:
diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx
index 33e0042..4c6be5e 100644
--- a/udm/source/xml/xmlitem.cxx
+++ b/udm/source/xml/xmlitem.cxx
@@ -365,12 +365,6 @@ AnElement::inq_Attrs() const
 
 //***************************     APureElement	 	**************************//
 
-APureElement::APureElement( const String &   i_sTagName )
-    :	sTagName( i_sTagName )
-        // pContent
-{
-}
-
 APureElement::APureElement( const char * i_sTagName )
     :	sTagName( i_sTagName )
         // pContent
commit 66544fa1152857f37315269703bb353f8c66fd5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:42:29 2011 +0100

    remove unused AnEmptyElement

diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx
index fbb7618..85394d9 100644
--- a/udm/inc/udm/xml/xmlitem.hxx
+++ b/udm/inc/udm/xml/xmlitem.hxx
@@ -227,27 +227,6 @@ class AnElement : public Element
     AttrList			aAttrs;
 };
 
-
-class AnEmptyElement : public EmptyElement
-{
-  public:
-                        AnEmptyElement(
-                            const ::csv::String & i_sTagName );
-                        AnEmptyElement(
-                            const char * i_sTagName );
-                        ~AnEmptyElement();
-  private:
-    // Interface Element:
-    virtual const ::csv::String &
-                        inq_TagName() const;
-    // Interface EmptyElement:
-    virtual AttrList &	inq_RefAttrs();
-
-    // DATA
-    ::csv::String	    sTagName;
-    AttrList			aAttrs;
-};
-
 class APureElement : public PureElement
 {
   public:
diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx
index 78143a7..33e0042 100644
--- a/udm/source/xml/xmlitem.cxx
+++ b/udm/source/xml/xmlitem.cxx
@@ -363,39 +363,6 @@ AnElement::inq_Attrs() const
     return &aAttrs;
 }
 
-
-//***************************     AnEmptyElement	**************************//
-
-AnEmptyElement::AnEmptyElement( const String &   i_sTagName )
-    :	sTagName( i_sTagName )
-        // aAttrs
-{
-}
-
-AnEmptyElement::AnEmptyElement( const char * i_sTagName )
-    :	sTagName( i_sTagName )
-        // aAttrs
-{
-}
-
-AnEmptyElement::~AnEmptyElement()
-{
-
-}
-
-const String &
-AnEmptyElement::inq_TagName() const
-{
-    return sTagName;
-}
-
-AttrList &
-AnEmptyElement::inq_RefAttrs()
-{
-    return aAttrs;
-}
-
-
 //***************************     APureElement	 	**************************//
 
 APureElement::APureElement( const String &   i_sTagName )
commit 280c4e8a866d7dfda65e494a2eb176b2ca6ca9e9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:39:49 2011 +0100

    get rid if unused Image

diff --git a/udm/inc/udm/html/htmlitem.hxx b/udm/inc/udm/html/htmlitem.hxx
index d7ad2d7..f54d227 100644
--- a/udm/inc/udm/html/htmlitem.hxx
+++ b/udm/inc/udm/html/htmlitem.hxx
@@ -61,19 +61,6 @@ class HorizontalLine : public xml::XmlCode
                                 : 	xml::XmlCode("<hr>\n") {}
 };
 
-/**	<IMG .... >
-*/
-class Image : public csi::xml::AnEmptyElement
-{
-  public:
-                        Image(
-                            const ::csv::String & i_sSrc,
-                            const ::csv::String & i_sWidth,
-                            const ::csv::String & i_sHeight,
-                            const ::csv::String & i_sAlign,
-                            const ::csv::String & i_sBorder );
-};
-
 /**	<A name="">
 */
 class Label : public csi::xml::AnElement
diff --git a/udm/source/html/htmlitem.cxx b/udm/source/html/htmlitem.cxx
index 6d4a6c2..3580d54 100644
--- a/udm/source/html/htmlitem.cxx
+++ b/udm/source/html/htmlitem.cxx
@@ -58,21 +58,6 @@ Body::LineBreakAfterBeginTag() const
      return true;
 }
 
-
-Image::Image( const String &   i_sSrc,
-              const String &   i_sWidth,
-              const String &   i_sHeight,
-              const String &   i_sAlign,
-              const String &   i_sBorder )
-    :	AnEmptyElement( "img" )
-{
-    *this << new AnAttribute(String("src"),i_sSrc)
-          << new AnAttribute(String("width"),i_sWidth)
-          << new AnAttribute(String("height"),i_sHeight)
-          << new AnAttribute(String("align"),i_sAlign)
-          << new AnAttribute(String("border"),i_sBorder);
-}
-
 bool
 Paragraph::LineBreakAfterEndTag() const
 {
commit 5c34dedc27c8092e2aa6e623e45d0814de952bb8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:38:39 2011 +0100

    remove unused ifdef branch

diff --git a/autodoc/source/display/html/outfile.cxx b/autodoc/source/display/html/outfile.cxx
index bf290e6..cab2ba0 100644
--- a/autodoc/source/display/html/outfile.cxx
+++ b/autodoc/source/display/html/outfile.cxx
@@ -365,12 +365,7 @@ HtmlDocuFile::WriteBody( csv::File & io_aFile )
     if ( sCopyright.length() > 0 )
     {
         aBodyData
-#ifndef COMPATIBLE_NETSCAPE_47
-            >> *new html::HorizontalLine
-                    <<  new html::SizeAttr( "3" );
-#else
             << new xml::XmlCode("<hr size=\"3\">");
-#endif
 
         aBodyData
             >> *new html::Paragraph
commit 490125271a0308fa53db29183813ebc85b906b0c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:26:18 2011 +0100

    remove unused ifdef branch

diff --git a/udm/inc/udm/html/htmlitem.hxx b/udm/inc/udm/html/htmlitem.hxx
index 932e11e..d7ad2d7 100644
--- a/udm/inc/udm/html/htmlitem.hxx
+++ b/udm/inc/udm/html/htmlitem.hxx
@@ -36,15 +36,11 @@
     // PARAMETERS
 
 
-#define COMPATIBLE_NETSCAPE_47
-
 namespace csi
 {
 namespace html
 {
 
-
-
 /**	<BODY>
 */
 class Body : public csi::xml::AnElement
@@ -56,8 +52,6 @@ class Body : public csi::xml::AnElement
     virtual bool		LineBreakAfterBeginTag() const;
 };
 
-
-#ifdef COMPATIBLE_NETSCAPE_47
 /**	<BR>
 */
 class HorizontalLine : public xml::XmlCode
@@ -67,20 +61,6 @@ class HorizontalLine : public xml::XmlCode
                                 : 	xml::XmlCode("<hr>\n") {}
 };
 
-#else
-/**	<HR>
-*/
-class HorizontalLine : public csi::xml::AnEmptyElement
-{
-  public:
-                        HorizontalLine()
-                                : 	csi::xml::AnEmptyElement("hr") {}
-  private:
-    virtual bool		LineBreakAfterBeginTag() const;
-};
-#endif
-
-
 /**	<IMG .... >
 */
 class Image : public csi::xml::AnEmptyElement
@@ -129,7 +109,6 @@ class Headline : public csi::xml::APureElement
     virtual bool		LineBreakAfterEndTag() const;
 };
 
-#ifdef COMPATIBLE_NETSCAPE_47
 /**	<BR>
 */
 class LineBreak : public xml::XmlCode
@@ -139,20 +118,6 @@ class LineBreak : public xml::XmlCode
                                 : 	xml::XmlCode("<br>\n") {}
 };
 
-#else
-/**	<BR>
-*/
-class LineBreak : public csi::xml::ASglTag
-{
-  public:
-                        LineBreak()
-                                : 	csi::xml::ASglTag("br") {}
-  private:
-    virtual bool		LineBreakAfterBeginTag() const;
-};
-#endif
-
-
 /**	<b>
 */
 class Bold : public csi::xml::APureElement
diff --git a/udm/source/html/htmlitem.cxx b/udm/source/html/htmlitem.cxx
index 057b50f..6d4a6c2 100644
--- a/udm/source/html/htmlitem.cxx
+++ b/udm/source/html/htmlitem.cxx
@@ -58,14 +58,6 @@ Body::LineBreakAfterBeginTag() const
      return true;
 }
 
-#ifndef COMPATIBLE_NETSCAPE_47
-bool
-HorizontalLine::LineBreakAfterBeginTag() const
-{
-     return true;
-}
-#endif
-
 
 Image::Image( const String &   i_sSrc,
               const String &   i_sWidth,
@@ -96,23 +88,12 @@ Headline::LineBreakAfterEndTag() const
      return true;
 }
 
-#ifndef COMPATIBLE_NETSCAPE_47
-bool
-LineBreak::LineBreakAfterBeginTag() const
-{
-     return true;
-}
-#endif
-
-
 bool
 TableCell::LineBreakAfterEndTag() const
 {
      return true;
 }
 
-
-
 TableCell &
 TableRow::AddCell( DYN Item * let_dpItem )
 {
commit 643a2082d574a15d3748b620939057c5e7edb8ce
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:15:36 2011 +0100

    ditch unused mbstream

diff --git a/cosv/inc/cosv/mbstream.hxx b/cosv/inc/cosv/mbstream.hxx
deleted file mode 100644
index e04ad6a..0000000
--- a/cosv/inc/cosv/mbstream.hxx
+++ /dev/null
@@ -1,95 +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 CSV_MBSTREAM_HXX
-#define CSV_MBSTREAM_HXX
-
-// USED SERVICES
-    // BASE CLASSES
-#include <cosv/bstream.hxx>
-    // COMPONENTS
-    // PARAMETERS
-
-
-namespace csv
-{
-
-class mbstream : public bstream
-{
-  public:
-    // LIFECYCLE
-                        mbstream(
-                            uintt 				i_nSize);
-                        ~mbstream();
-    // OPERATIONS
-    void				resize(
-                            uintt 				i_nSize );
-    //	INQUIRY
-    uintt 				size() const;
-    const void *	  	data() const;
-
-  private:
-    // Interface bistream:
-    virtual uintt 		do_read(
-                            void *	        out_pDest,
-                            uintt           i_nNrofBytes);
-    virtual bool		inq_eod() const;
-    // Interface bostream:
-    virtual uintt 		do_write(
-                            const void *   	i_pSrc,
-                            uintt           i_nNrofBytes);
-    // Interface bstream:
-    virtual uintt 		do_seek(
-                            intt 			i_nDistance,
-                            seek_dir        i_eStartPoint = ::csv::beg );
-    virtual uintt 		inq_position() const;
-
-    // DYN
-    DYN char *			dpOwnedMemorySpace;
-    uintt 				nSize;
-    uintt 				nCurPosition;
-};
-
-
-// IMPLEMENTATION
-
-inline uintt
-mbstream::size() const
-    { return nSize; }
-inline const void *
-mbstream::data() const
-    { return dpOwnedMemorySpace; }
-
-
-}   // namespace csv
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/makefile.mk b/cosv/source/storage/makefile.mk
index 902e8c7..4d28586 100644
--- a/cosv/source/storage/makefile.mk
+++ b/cosv/source/storage/makefile.mk
@@ -42,7 +42,6 @@ ENABLE_EXCEPTIONS=true
 OBJFILES= \
     $(OBJ)$/dirchain.obj 	\
     $(OBJ)$/file.obj 		\
-    $(OBJ)$/mbstream.obj    \
     $(OBJ)$/persist.obj	    \
     $(OBJ)$/ploc.obj 	    \
     $(OBJ)$/ploc_dir.obj    \
diff --git a/cosv/source/storage/mbstream.cxx b/cosv/source/storage/mbstream.cxx
deleted file mode 100644
index c1bea8b..0000000
--- a/cosv/source/storage/mbstream.cxx
+++ /dev/null
@@ -1,121 +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 <precomp.h>
-#include <cosv/mbstream.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <string.h>
-
-
-namespace csv
-{
-
-
-
-mbstream::mbstream( uintt i_nSize )
-    :	dpOwnedMemorySpace( new char[i_nSize+1] ),
-        nSize( i_nSize ),
-        nCurPosition( 0 )
-{
-    dpOwnedMemorySpace[i_nSize] = '\0';
-}
-
-mbstream::~mbstream()
-{
-    delete [] dpOwnedMemorySpace;
-}
-
-void
-mbstream::resize( uintt  i_nSize )
-{
-    DYN char * pNew = new char[i_nSize];
-    memcpy( pNew, dpOwnedMemorySpace, min(i_nSize,nSize) );
-    delete [] dpOwnedMemorySpace;
-    dpOwnedMemorySpace = pNew;
-    nSize = i_nSize;
-}
-
-uintt
-mbstream::do_read( void *	       out_pDest,
-                   uintt           i_nNrofBytes )
-{
-    uintt  ret = min( i_nNrofBytes, nSize - nCurPosition );
-    memcpy( out_pDest, dpOwnedMemorySpace, ret );
-    nCurPosition += ret;
-    return ret;
-}
-
-bool
-mbstream::inq_eod() const
-{
-     return nCurPosition == nSize;
-}
-
-uintt
-mbstream::do_write( const void *   	i_pSrc,
-                    uintt           i_nNrofBytes )
-{
-    resize( max( 3 * (nSize+1) / 2, nCurPosition + i_nNrofBytes) );
-    memcpy( dpOwnedMemorySpace+nCurPosition, i_pSrc, i_nNrofBytes );
-    nCurPosition += i_nNrofBytes;
-    return i_nNrofBytes;
-}
-
-uintt
-mbstream::do_seek( intt 	i_nDistance,
-                   seek_dir i_eStartPoint )
-{
-    switch ( i_eStartPoint )
-    {
-         case beg:       if ( uintt(i_nDistance) < nSize )
-                            nCurPosition = uintt(i_nDistance);
-                        break;
-         case cur:       if ( i_nDistance < 0
-                                ?   uintt(-i_nDistance) <= nCurPosition
-                                :   uintt(i_nDistance) + nCurPosition < nSize )
-                            nCurPosition = uintt( intt(nCurPosition) + i_nDistance );
-                        break;
-         case end:       if ( i_nDistance < 0
-                             AND uintt(-i_nDistance) < nSize - 1 )
-                            nCurPosition = uintt( intt(nSize) - 1 + i_nDistance );
-                        break;
-    }
-    return position();
-}
-
-uintt
-mbstream::inq_position() const
-{
-    return nCurPosition;
-}
-
-
-}   // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4c4c31303f9915915c56e3bdbe1d8b87b530633f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 23:13:53 2011 +0100

    throw out some unused methods

diff --git a/cosv/inc/cosv/comfunc.hxx b/cosv/inc/cosv/comfunc.hxx
index 8b7bb1c..625f746 100644
--- a/cosv/inc/cosv/comfunc.hxx
+++ b/cosv/inc/cosv/comfunc.hxx
@@ -54,32 +54,6 @@ inline bool         no_str(const char * str);       // return !str || !strlen(st
 intt                count_chars(const char * str, char c);
 
 
-// endian functions
-template <class NUMTYPE>
-void                switch_endian(
-                        NUMTYPE &       o_rNumber,
-                        const NUMTYPE & i_rNumber );
-
-// Zeit-Typecasts
-bool  str2date(const char * str, int & out_day, int & out_month, int & out_year);
-void  date2str(String       & out_Str, int day, int month, int year);
-bool  str2time(const char * str, int & out_hour, int & out_min, int & out_sec);
-void  time2str(String       & out_Str, int hour, int min, int sec);
-
-class noncopyable
-{
-  protected:
-                        noncopyable() {}
-                        ~noncopyable() {}
-  private:
-    // Private to make copying impossible:
-                        noncopyable(const noncopyable&);
-    noncopyable &       operator=(const noncopyable&);
-};
-
-
-
-
 // IMPLEMENTATION
 template <class E>
 inline E
@@ -96,33 +70,11 @@ valid_str(const char * str) { return str != 0 ? str : ""; }
 inline bool
 no_str(const char * str) { return str != 0 ? *str == '\0' : true; }
 
-
-template <class NUMTYPE>
-void
-switch_endian( NUMTYPE &       o_rNumber,
-               const NUMTYPE & i_rNumber )
-{
-    char *          pFront = reinterpret_cast< char* >(&o_rNumber);
-    const char *    pBack  = reinterpret_cast< const char* >(&i_rNumber) + sizeof(NUMTYPE);
-
-    for ( size_t p = 0; p < sizeof(NUMTYPE); --p )
-    {
-        *pFront++ = *(--pBack);
-    }
-}
-
-
 }   // namespace csv
 
-
-
-
 #define NON_COPYABLE(xy) \
     private: xy(const xy &); xy & operator=(const xy &)
 
-
-
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/service/comfunc.cxx b/cosv/source/service/comfunc.cxx
index 82d0ae8..201f6a9 100644
--- a/cosv/source/service/comfunc.cxx
+++ b/cosv/source/service/comfunc.cxx
@@ -61,97 +61,6 @@ count_chars(const char * str, char c)
     return nCount;
 }
 
-
-
-// Zeit-Typecasts
-bool
-str2date(const char * str, int & out_day, int & out_month, int & out_year)
-{
-   const char * z = str;
-   out_day = 0;
-   out_month = 0;
-   out_year = 0;
-
-   while (isdigit(*z))
-      out_day = 10*out_day + *(z++) - '0';
-   if (*z == 0)
-      return false;
-   z++;
-   while (isdigit(*z))
-      out_month = 10*out_month + *(z++) - '0';
-   if (*z == 0)
-      return false;
-   z++;
-   while (isdigit(*z))
-      out_year = 10*out_year + *(z++) - '0';
-   return true;
-}
-
-void
-date2str(String & out_Str, int day, int month, int year)
-{
-   char buf[11] = "00.00.0000";
-   buf[0] = static_cast<char>(day/10 + '0');
-   buf[1] = static_cast<char>(day%10 + '0');
-   buf[3] = static_cast<char>(month/10 + '0');
-   buf[4] = static_cast<char>(month%10 + '0');
-
-   if (year < 100)
-   {
-      buf[6] = static_cast<char>(year/10 + '0');
-      buf[7] = static_cast<char>(year%10 + '0');
-      buf[8] = 0;
-   }
-   else
-   {
-      buf[6] = static_cast<char>(year/1000 + '0');
-      buf[7] = static_cast<char>(year%1000/100 + '0');
-      buf[8] = static_cast<char>(year%100/10 + '0');
-      buf[9] = static_cast<char>(year%10 + '0');
-   }
-   out_Str = buf;
-}
-
-bool
-str2time(const char * str, int & out_hour, int & out_min, int & out_sec)
-{
-   const char * z = str;
-   out_hour = 0;
-   out_min = 0;
-   out_sec = 0;
-
-   while (isdigit(*z))
-      out_hour = 10*out_hour + *(z++) - '0';
-   if (*z == 0)
-      return false;
-   z++;
-   while (isdigit(*z))
-      out_min = 10*out_min + *(z++) - '0';
-   if (*z == 0)
-      return false;
-   z++;
-   while (isdigit(*z))
-      out_sec = 10*out_sec + *(z++) - '0';
-   return true;
-}
-
-void
-time2str(String & out_Str, int hour, int min, int sec)
-{
-   char buf[9] = "00:00:00";
-   buf[0] = static_cast<char>(hour/10 + '0');
-   buf[1] = static_cast<char>(hour%10 + '0');
-   buf[3] = static_cast<char>(min/10 + '0');
-   buf[4] = static_cast<char>(min%10 + '0');
-   buf[6] = static_cast<char>(sec/10 + '0');
-   buf[7] = static_cast<char>(sec%10 + '0');
-   out_Str = buf;
-}
-
-
-
 }   // namespace csv
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list