[Libreoffice-commits] .: 2 commits - filter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jul 25 02:12:47 PDT 2011
filter/source/msfilter/msdffimp.cxx | 4 ++--
filter/source/msfilter/svdfppt.cxx | 24 +++++++++++++-----------
2 files changed, 15 insertions(+), 13 deletions(-)
New commits:
commit dbd8193450e856dc1fe76d6c342170b3c7a636ee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 24 22:51:24 2011 +0100
ByteString->rtl::OStringBuffer
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 2d812f1..04b0947 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -128,6 +128,7 @@
#include <algorithm>
#include <set>
#include <unotools/streamwrap.hxx>
+#include <rtl/strbuf.hxx>
// PPT ColorScheme Slots
#define PPT_COLSCHEME (0x08000000)
@@ -4184,24 +4185,25 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
{
if ( rIn.GetError() == 0 )
{
- ByteString aMsg;
+ rtl::OStringBuffer aMsg;
if ( rIn.Tell() > aTxMasterStyleHd.GetRecEndFilePos() )
{
- aMsg += "\n ";
- aMsg += "reading too many bytes:";
- aMsg += ByteString::CreateFromInt32( rIn.Tell() - aTxMasterStyleHd.GetRecEndFilePos() );
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("\n "));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("reading too many bytes:"));
+ aMsg.append(static_cast<sal_Int32>(rIn.Tell() - aTxMasterStyleHd.GetRecEndFilePos()));
}
if ( rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() )
{
- aMsg += "\n ";
- aMsg += "reading too less bytes:";
- aMsg += ByteString::CreateFromInt32( aTxMasterStyleHd.GetRecEndFilePos() - rIn.Tell() );
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("\n "));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("reading too few bytes:"));
+ aMsg.append(static_cast<sal_Int32>(aTxMasterStyleHd.GetRecEndFilePos() - rIn.Tell()));
}
- if ( aMsg.Len() != 0 )
+ if (aMsg.getLength())
{
- aMsg.Insert( "]:", 0 );
- aMsg.Insert( "PptStyleSheet::operator>>[", 0 );
- OSL_FAIL(aMsg.GetBuffer());
+ aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM("]:"));
+ aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM(
+ "PptStyleSheet::operator>>["));
+ OSL_FAIL(aMsg.getStr());
}
}
if ( rIn.Tell() != aTxMasterStyleHd.GetRecEndFilePos() )
commit bb1b2b1e0ea7014f1dc11fa5e7fcd0301a08ddaa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 24 22:43:28 2011 +0100
use good() instead of GetError()
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index af3ec30..dbc458a 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6958,11 +6958,11 @@ sal_Bool SvxMSDffManager::ReadCommonRecordHeader( SvStream& rSt,
sal_uInt16& rFbt,
sal_uInt32& rLength )
{
- sal_uInt16 nTmp;
+ sal_uInt16 nTmp(0);
rSt >> nTmp >> rFbt >> rLength;
rVer = sal::static_int_cast< sal_uInt8 >(nTmp & 15);
rInst = nTmp >> 4;
- return rSt.GetError() == 0;
+ return rSt.good();
}
sal_Bool SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen,
More information about the Libreoffice-commits
mailing list