diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-28 09:20:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-28 09:20:33 +0100 |
commit | eff6245f9848bf32414ab2496c37bdc5ac774747 (patch) | |
tree | 3cbab3e7e608355342c081cd847865b2bd84a2fe /sc | |
parent | callcatcher: another round (diff) | |
download | core-eff6245f9848bf32414ab2496c37bdc5ac774747.tar.gz core-eff6245f9848bf32414ab2496c37bdc5ac774747.zip |
ByteString->rtl::OStringBuffer
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index 23b6f927f407..cf48cdd243c4 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -29,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" #include "ftools.hxx" +#include <rtl/strbuf.hxx> #include <tools/color.hxx> #include <unotools/charclass.hxx> #include <svl/itempool.hxx> @@ -278,33 +279,35 @@ ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const Strin ByteString ScfTools::ReadCString( SvStream& rStrm ) { - ByteString aRet; - sal_Char cChar; + rtl::OStringBuffer aRet; - rStrm >> cChar; - while( cChar ) + while (1) { - aRet += cChar; + sal_Char cChar(0); rStrm >> cChar; + if (!cChar) + break; + aRet.append(cChar); } - return aRet; + + return aRet.makeStringAndClear(); } ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft ) { - ByteString aRet; - sal_Char cChar; + rtl::OStringBuffer aRet; - rStrm >> cChar; - rnBytesLeft--; - while( cChar ) + while (1) { - aRet += cChar; + sal_Char cChar(0); rStrm >> cChar; rnBytesLeft--; + if (!cChar) + break; + aRet.append(cChar); } - return aRet; + return aRet.makeStringAndClear(); } void ScfTools::AppendCString( SvStream& rStrm, ByteString& rString ) |