[Libreoffice-commits] .: lotuswordpro/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Apr 12 08:57:32 PDT 2011
lotuswordpro/source/filter/bencont.cxx | 2 +-
lotuswordpro/source/filter/lwpobjstrm.cxx | 5 +----
lotuswordpro/source/filter/xfilter/xftabstyle.cxx | 1 -
3 files changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 4e88a9a6a5174128547feaf18ac57e2d7c94eb43
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 12 16:57:13 2011 +0100
asserts aren't helpful to me here
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 859d655..06c7f18 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -509,7 +509,7 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
nLen += GetSvStreamSize(pS) ;
}
- assert(nLen > 0);
+ OSL_ENSURE(nLen > 0, "expected a non-0 length");
char * pBuf = new char[nLen];
assert(pBuf != NULL);
char * pPointer = pBuf;
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 9d8f3d2..c7eaf6a 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -269,14 +269,11 @@ sal_uInt8 LwpObjectStream::QuickReaduInt8()
*/
void LwpObjectStream::SkipExtra()
{
- sal_uInt16 extra;
+ sal_uInt16 extra(0);
QuickRead(&extra, sizeof(extra));
while (extra != 0)
- {
- assert(false);
QuickRead(&extra, sizeof(extra));
- }
}
/**
* @descr check if extra bytes
diff --git a/lotuswordpro/source/filter/xfilter/xftabstyle.cxx b/lotuswordpro/source/filter/xfilter/xftabstyle.cxx
index 14b1e4e..68961bc 100644
--- a/lotuswordpro/source/filter/xfilter/xftabstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftabstyle.cxx
@@ -67,7 +67,6 @@ XFTabStyle::XFTabStyle()
void XFTabStyle::ToXml(IXFStream *pStrm)
{
- assert(m_fLength>0);
IXFAttrList *pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
More information about the Libreoffice-commits
mailing list