[Libreoffice-commits] .: 6 commits - sc/source svtools/source sw/source tools/inc tools/qa tools/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Dec 15 04:23:14 PST 2011


 sc/source/filter/ftools/ftools.cxx |   40 ++++++----------------------------
 sc/source/filter/inc/ftools.hxx    |   22 +++++++-----------
 sc/source/filter/lotus/lotform.cxx |    7 ++----
 sc/source/filter/qpro/qproform.cxx |    2 -
 svtools/source/urlobj/inetimg.cxx  |    9 +++----
 sw/source/ui/dochdl/swdtflvr.cxx   |    6 ++---
 tools/inc/tools/stream.hxx         |   18 +++++++++------
 tools/qa/cppunit/test_stream.cxx   |   21 ++++++++++++++++++
 tools/source/stream/stream.cxx     |   43 +++++++++++++------------------------
 9 files changed, 75 insertions(+), 93 deletions(-)

New commits:
commit 5c1490fa4b69cfc05572dc84c5a9316d5e07a57c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 15 11:55:47 2011 +0000

    add some comments

diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 5dca30f..1554776 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -553,11 +553,15 @@ TOOLS_DLLPUBLIC rtl::OString read_uInt8s_AsOString(SvStream& rStr, sal_Size nLen
 //rtl::OUString's length is number of units successfully read
 TOOLS_DLLPUBLIC rtl::OUString read_LEuInt16s_AsOUString(SvStream& rStr, sal_Size nLen);
 
-//Attempt to read 8bit units to an OString until a zero terminator is encountered
+//Attempt to read 8bit units to an OString until a zero terminator is
+//encountered, returned rtl::OString's length is number of units *definitely*
+//successfully read, check SvStream::good() to see if null terminator was
+//sucessfully read
 TOOLS_DLLPUBLIC rtl::OString read_zeroTerminated_uInt8s_AsOString(SvStream& rStr);
 
 //Attempt to read 8bit units assuming source encoding eEnc to an OUString until
-//a zero terminator is encountered
+//a zero terminator is encountered. Check SvStream::good() to see if null
+//terminator was sucessfully read
 TOOLS_DLLPUBLIC rtl::OUString read_zeroTerminated_uInt8s_AsOUString(SvStream& rStr, rtl_TextEncoding eEnc);
 
 // --------------
commit 473ed3e849c58aec154e6d60bb5ae6cdb4f13b25
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 15 00:16:16 2011 +0000

    terminted -> terminated

diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 8388cf6..e57d42c 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -236,15 +236,15 @@ public:
 
 // *** byte string import operations *** --------------------------------------
 
-    /** Reads and returns a zero terminted byte string and decreases a stream counter. */
+    /** Reads and returns a zero terminated byte string and decreases a stream counter. */
     static rtl::OString read_zeroTerminated_uInt8s_AsOString(SvStream& rStrm, sal_Int32& rnBytesLeft);
-    /** Reads and returns a zero terminted byte string and decreases a stream counter. */
+    /** Reads and returns a zero terminated byte string and decreases a stream counter. */
     inline static rtl::OUString read_zeroTerminated_uInt8s_AsOUString(SvStream& rStrm, sal_Int32& rnBytesLeft, rtl_TextEncoding eTextEnc)
     {
         return rtl::OStringToOUString(read_zeroTerminated_uInt8s_AsOString(rStrm, rnBytesLeft), eTextEnc);
     }
 
-    /** Appends a zero terminted byte string. */
+    /** Appends a zero terminated byte string. */
     static void         AppendCString( SvStream& rStrm, String& rString, rtl_TextEncoding eTextEnc );
 
 // *** HTML table names <-> named range names *** -----------------------------
commit 0a2565b8def7afd2c5dc631e7f87e1613e11a40a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 15 00:15:02 2011 +0000

    rename and refactor ScfTools::ReadCString

diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index a1ca318..21d3e12 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -276,14 +276,9 @@ ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const Strin
 
 // *** byte string import operations *** --------------------------------------
 
-ByteString ScfTools::ReadCString( SvStream& rStrm )
+rtl::OString ScfTools::read_zeroTerminated_uInt8s_AsOString(SvStream& rStrm, sal_Int32& rnBytesLeft)
 {
-    return read_zeroTerminated_uInt8s_AsOString(rStrm);
-}
-
-ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
-{
-    rtl::OString aRet(read_zeroTerminated_uInt8s_AsOString(rStrm));
+    rtl::OString aRet(::read_zeroTerminated_uInt8s_AsOString(rStrm));
     rnBytesLeft -= aRet.getLength(); //we read this number of bytes anyway
     if (rStrm.good()) //if the stream is happy we read the null terminator as well
         --rnBytesLeft;
@@ -292,7 +287,7 @@ ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
 
 void ScfTools::AppendCString( SvStream& rStrm, String& rString, rtl_TextEncoding eTextEnc )
 {
-    rString += read_zeroTerminated_uInt8s_AsOUString(rStrm, eTextEnc);
+    rString += ::read_zeroTerminated_uInt8s_AsOUString(rStrm, eTextEnc);
 }
 
 // *** HTML table names <-> named range names *** -----------------------------
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 39c49dc..8388cf6 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -236,17 +236,13 @@ public:
 
 // *** byte string import operations *** --------------------------------------
 
-    /** Reads and returns a zero terminted byte string. */
-    static ByteString   ReadCString( SvStream& rStrm );
-    /** Reads and returns a zero terminted byte string. */
-    inline static String ReadCString( SvStream& rStrm, rtl_TextEncoding eTextEnc )
-                            { return String( ReadCString( rStrm ), eTextEnc ); }
-
     /** Reads and returns a zero terminted byte string and decreases a stream counter. */
-    static ByteString   ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft );
+    static rtl::OString read_zeroTerminated_uInt8s_AsOString(SvStream& rStrm, sal_Int32& rnBytesLeft);
     /** Reads and returns a zero terminted byte string and decreases a stream counter. */
-    inline static String ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft, rtl_TextEncoding eTextEnc )
-                            { return String( ReadCString( rStrm, rnBytesLeft ), eTextEnc ); }
+    inline static rtl::OUString read_zeroTerminated_uInt8s_AsOUString(SvStream& rStrm, sal_Int32& rnBytesLeft, rtl_TextEncoding eTextEnc)
+    {
+        return rtl::OStringToOUString(read_zeroTerminated_uInt8s_AsOString(rStrm, rnBytesLeft), eTextEnc);
+    }
 
     /** Appends a zero terminted byte string. */
     static void         AppendCString( SvStream& rStrm, String& rString, rtl_TextEncoding eTextEnc );
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 8f8e479..5bd02b1 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -542,8 +542,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
                 break;
             case FT_ConstString:
             {
-                String  aTmp( ScfTools::ReadCString( aIn, nBytesLeft, eSrcChar ) );
-
+                String  aTmp(ScfTools::read_zeroTerminated_uInt8s_AsOUString(aIn, nBytesLeft, eSrcChar));
                 aStack << aPool.Store( aTmp );
             }
                 break;
@@ -562,7 +561,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
                 break;
             case FT_Nrref:
             {
-                String      aTmp( ScfTools::ReadCString( aIn, nBytesLeft, eSrcChar ) );
+                String  aTmp(ScfTools::read_zeroTerminated_uInt8s_AsOUString(aIn, nBytesLeft, eSrcChar));
                 if( rRangeNameBufferWK3.FindRel( aTmp, nRngIndex ) )
                     aStack << aPool.Store( nRngIndex );
                 else
@@ -575,7 +574,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
                 break;
             case FT_Absnref:
             {
-                String      aTmp( ScfTools::ReadCString( aIn, nBytesLeft, eSrcChar ) );
+                String aTmp(ScfTools::read_zeroTerminated_uInt8s_AsOUString(aIn, nBytesLeft, eSrcChar));
                 if( rRangeNameBufferWK3.FindAbs( aTmp, nRngIndex ) )
                     aStack << aPool.Store( nRngIndex );
                 else
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 472d041..30b7d60 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -249,7 +249,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
             }
             if( nFmla[ i ] == 0x06 )
             {
-                String aTmp( ScfTools::ReadCString( maIn ), maIn.GetStreamCharSet() );
+                String aTmp(::read_zeroTerminated_uInt8s_AsOUString(maIn, maIn.GetStreamCharSet()));
                 sStringArray[ nStringCount ] = aTmp;
                 nStringCount++;
         SAFEDEC_OR_RET(nRef, aTmp.Len() + 1, ConvErrCount);
commit cf880b3f1f5e9a08ef6be30791dbf28d2d74cfcf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 14 23:52:25 2011 +0000

    refactor ScfTools::ReadCString
    
    fix potential bug on short read which has bugged me for a while
    where bytes read is always reduced without a check that byte was
    read

diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index b346295..a1ca318 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -278,35 +278,16 @@ ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const Strin
 
 ByteString ScfTools::ReadCString( SvStream& rStrm )
 {
-    rtl::OStringBuffer aRet;
-
-    while (1)
-    {
-        sal_Char cChar(0);
-        rStrm >> cChar;
-        if (!cChar)
-            break;
-        aRet.append(cChar);
-    }
-
-    return aRet.makeStringAndClear();
+    return read_zeroTerminated_uInt8s_AsOString(rStrm);
 }
 
 ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
 {
-    rtl::OStringBuffer aRet;
-
-    while (1)
-    {
-        sal_Char cChar(0);
-        rStrm >> cChar;
-        rnBytesLeft--;
-        if (!cChar)
-            break;
-        aRet.append(cChar);
-    }
-
-    return aRet.makeStringAndClear();
+    rtl::OString aRet(read_zeroTerminated_uInt8s_AsOString(rStrm));
+    rnBytesLeft -= aRet.getLength(); //we read this number of bytes anyway
+    if (rStrm.good()) //if the stream is happy we read the null terminator as well
+        --rnBytesLeft;
+    return aRet;
 }
 
 void ScfTools::AppendCString( SvStream& rStrm, String& rString, rtl_TextEncoding eTextEnc )
commit 66c3655a07e109d88183002192410bcc9866c0f2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 14 22:52:07 2011 +0000

    convert ReadCString from ByteString to OString
    
    Nobody ever checked the return value anyway, so just return the string
    and use the stream state bits if necessary to find failures.
    
    Doesn't need to be a member, make a standalone function
    
    Rename it to read_zeroTerminated_uInt8s_AsO[U]String, stupid perhaps,
    but *shrug*, unambiguous.
    
    Drop misleading overloaded String variants use:
    read_zeroTerminated_uInt8s_AsOString or
    read_zeroTerminated_uInt8s_AsOUString
    
    added a unit test, valgrinded it, found and fixed invalid read
    in original implementation.

diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 52f848e..b346295 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -311,9 +311,7 @@ ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
 
 void ScfTools::AppendCString( SvStream& rStrm, String& rString, rtl_TextEncoding eTextEnc )
 {
-    ByteString aByteString;
-    rStrm.ReadCString(aByteString);
-    rString += String( aByteString, eTextEnc );
+    rString += read_zeroTerminated_uInt8s_AsOUString(rStrm, eTextEnc);
 }
 
 // *** HTML table names <-> named range names *** -----------------------------
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index f203fbd..fff9d17 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -73,8 +73,7 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
     {
     case SOT_FORMATSTR_ID_INET_IMAGE:
         {
-            String sINetImg;
-            rIStm.ReadCString( sINetImg, RTL_TEXTENCODING_UTF8 );
+            String sINetImg = read_zeroTerminated_uInt8s_AsOUString(rIStm, RTL_TEXTENCODING_UTF8);
             xub_StrLen nStart = 0;
             aImageURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
             aTargetURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
@@ -120,11 +119,11 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
             // skip over iExtraHTML_Offset
             rIStm.SeekRel( sizeof( int ) );
 
-            rIStm.ReadCString( aImageURL, eSysCSet );
+            aImageURL = read_zeroTerminated_uInt8s_AsOUString(rIStm, eSysCSet);
             if( nAltOffset )
             {
                 rIStm.Seek( nFilePos + nAltOffset );
-                rIStm.ReadCString( aAlternateText, eSysCSet );
+                aAlternateText = read_zeroTerminated_uInt8s_AsOUString(rIStm, eSysCSet);
             }
             else if( aAlternateText.Len() )
                 aAlternateText.Erase();
@@ -132,7 +131,7 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
             if( nAnchorOffset )
             {
                 rIStm.Seek( nFilePos + nAnchorOffset );
-                rIStm.ReadCString( aTargetURL, eSysCSet );
+                aTargetURL = read_zeroTerminated_uInt8s_AsOUString(rIStm, eSysCSet);
             }
             else if( aTargetURL.Len() )
                 aTargetURL.Erase();
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index e5fdd55..f9bb431 100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -1993,9 +1993,9 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
         }   // report useful error!!
 
         rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
-        xStrm->ReadCString( aApp, eEncoding );
-        xStrm->ReadCString( aTopic, eEncoding );
-        xStrm->ReadCString( aItem, eEncoding );
+        aApp = read_zeroTerminated_uInt8s_AsOUString(*xStrm, eEncoding);
+        aTopic = read_zeroTerminated_uInt8s_AsOUString(*xStrm, eEncoding);
+        aItem = read_zeroTerminated_uInt8s_AsOUString(*xStrm, eEncoding);
     }
 
     String aCmd;
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index bf884a1..5dca30f 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -385,12 +385,6 @@ public:
     // next Tell() <= nSize
     sal_Bool        SetStreamSize( sal_Size nSize );
 
-                /// Read in the stream to a zero character and put all
-                /// read chracters in the Bytestring. The String interface
-                /// convert the BytString with the given encoding to a String
-    sal_Bool        ReadCString( ByteString& rStr );
-    sal_Bool        ReadCString( String& rStr, rtl_TextEncoding eToEncode );
-
     sal_Bool        ReadLine( ByteString& rStr );
     sal_Bool        ReadLine( rtl::OString& rStr );
     sal_Bool        WriteLine( const ByteString& rStr );
@@ -559,6 +553,13 @@ TOOLS_DLLPUBLIC rtl::OString read_uInt8s_AsOString(SvStream& rStr, sal_Size nLen
 //rtl::OUString's length is number of units successfully read
 TOOLS_DLLPUBLIC rtl::OUString read_LEuInt16s_AsOUString(SvStream& rStr, sal_Size nLen);
 
+//Attempt to read 8bit units to an OString until a zero terminator is encountered
+TOOLS_DLLPUBLIC rtl::OString read_zeroTerminated_uInt8s_AsOString(SvStream& rStr);
+
+//Attempt to read 8bit units assuming source encoding eEnc to an OUString until
+//a zero terminator is encountered
+TOOLS_DLLPUBLIC rtl::OUString read_zeroTerminated_uInt8s_AsOUString(SvStream& rStr, rtl_TextEncoding eEnc);
+
 // --------------
 // - FileStream -
 // --------------
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx
index dc80c7d..77c2b9e 100644
--- a/tools/qa/cppunit/test_stream.cxx
+++ b/tools/qa/cppunit/test_stream.cxx
@@ -46,10 +46,12 @@ namespace
     public:
         void test_stdstream();
         void test_fastostring();
+        void test_read_cstring();
 
         CPPUNIT_TEST_SUITE(Test);
         CPPUNIT_TEST(test_stdstream);
         CPPUNIT_TEST(test_fastostring);
+        CPPUNIT_TEST(test_read_cstring);
         CPPUNIT_TEST_SUITE_END();
     };
 
@@ -146,6 +148,25 @@ namespace
         CPPUNIT_ASSERT(aFour.equalsL(RTL_CONSTASCII_STRINGPARAM(foo)));
     }
 
+    void Test::test_read_cstring()
+    {
+        char foo[] = "foobar";
+        SvMemoryStream aMemStream(RTL_CONSTASCII_STRINGPARAM(foo), STREAM_READ);
+
+        rtl::OString aOne = read_zeroTerminated_uInt8s_AsOString(aMemStream);
+        CPPUNIT_ASSERT(aOne.equalsL(RTL_CONSTASCII_STRINGPARAM("foobar")));
+        CPPUNIT_ASSERT(!aMemStream.good());
+        CPPUNIT_ASSERT(!aMemStream.bad());
+        CPPUNIT_ASSERT(aMemStream.eof());
+
+        aMemStream.Seek(0);
+        foo[3] = 0;
+        rtl::OString aTwo = read_zeroTerminated_uInt8s_AsOString(aMemStream);
+        CPPUNIT_ASSERT(aTwo.equalsL(RTL_CONSTASCII_STRINGPARAM("foo")));
+        CPPUNIT_ASSERT(aMemStream.good());
+    }
+
+
     CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 }
 
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 33eef85..19009f9 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -806,30 +806,23 @@ sal_Bool SvStream::ReadUniOrByteStringLine( String& rStr, rtl_TextEncoding eSrcC
         return ReadByteStringLine( rStr, eSrcCharSet );
 }
 
-/*************************************************************************
-|*
-|*    Stream::ReadCString
-|*
-*************************************************************************/
-
-sal_Bool SvStream::ReadCString( ByteString& rStr )
+rtl::OString read_zeroTerminated_uInt8s_AsOString(SvStream& rStream)
 {
-    if( rStr.Len() )
-        rStr.Erase();
+    rtl::OStringBuffer aOutput;
 
     sal_Char buf[ 256 + 1 ];
     sal_Bool bEnd = sal_False;
-    sal_Size nFilePos = Tell();
+    sal_Size nFilePos = rStream.Tell();
 
-    while( !bEnd && !GetError() )
+    while( !bEnd && !rStream.GetError() )
     {
-        sal_uInt16 nLen = (sal_uInt16)Read( buf, sizeof(buf)-1 );
-        sal_uInt16 nReallyRead = nLen;
-        if( !nLen )
+        sal_Size nLen = rStream.Read(buf, sizeof(buf)-1);
+        if (!nLen)
             break;
 
+        sal_Size nReallyRead = nLen;
         const sal_Char* pPtr = buf;
-        while( *pPtr && nLen )
+        while (nLen && *pPtr)
             ++pPtr, --nLen;
 
         bEnd =  ( nReallyRead < sizeof(buf)-1 )         // read less than attempted to read
@@ -837,25 +830,21 @@ sal_Bool SvStream::ReadCString( ByteString& rStr )
                     &&  ( 0 == *pPtr )                  //    AND found a string terminator
                     );
 
-        rStr.Append( buf, ::sal::static_int_cast< xub_StrLen >( pPtr - buf ) );
+        aOutput.append(buf, pPtr - buf);
     }
 
-    nFilePos += rStr.Len();
-    if( Tell() > nFilePos )
-        nFilePos++;
-    Seek( nFilePos );  // seeken wg. obigem BlockRead!
-    return bEnd;
+    nFilePos += aOutput.getLength();
+    if (rStream.Tell() > nFilePos)
+        rStream.Seek(nFilePos+1);  // seeken wg. obigem BlockRead!
+    return aOutput.makeStringAndClear();
 }
 
-sal_Bool SvStream::ReadCString( String& rStr, rtl_TextEncoding eToEncode )
+rtl::OUString read_zeroTerminated_uInt8s_AsOUString(SvStream& rStream, rtl_TextEncoding eEnc)
 {
-    ByteString sStr;
-    sal_Bool bRet = ReadCString( sStr );
-    rStr = String( sStr, eToEncode );
-    return bRet;
+    return rtl::OStringToOUString(
+        read_zeroTerminated_uInt8s_AsOString(rStream), eEnc);
 }
 
-
 /*************************************************************************
 |*
 |*    Stream::WriteUnicodeText()
commit ace8398c5782caf6c5d9066b8e67afa652448954
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 14 21:47:30 2011 +0000

    drop unused ReadCString with hidden StreamCharSet monstrosity

diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 0ad9585..bf884a1 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -390,7 +390,6 @@ public:
                 /// convert the BytString with the given encoding to a String
     sal_Bool        ReadCString( ByteString& rStr );
     sal_Bool        ReadCString( String& rStr, rtl_TextEncoding eToEncode );
-    sal_Bool        ReadCString( String& rStr ) { return ReadCString( rStr, GetStreamCharSet()); }
 
     sal_Bool        ReadLine( ByteString& rStr );
     sal_Bool        ReadLine( rtl::OString& rStr );


More information about the Libreoffice-commits mailing list