diff options
author | Michael Stahl <mst@openoffice.org> | 2012-08-02 15:54:46 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-08-02 15:54:46 +0200 |
commit | 151ed37ea46e718ada412f37e7e540131effa0e5 (patch) | |
tree | 308842cfb1ddfea8820354729c14289b6fcaafb1 /editeng/source | |
parent | b658ec00ee23751ddbbeb46d0f25c4714787130f (diff) |
some tweaks in RTF filter
Signed-off-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 240fccd16abc..0c0f156bbbe2 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -29,6 +29,7 @@ #include <ctype.h> #include <tools/datetime.hxx> +#include <tools/diagnose_ex.h> #include <rtl/tencinfo.h> #include <svl/itemiter.hxx> #include <svl/whiter.hxx> @@ -801,12 +802,14 @@ void SvxRTFParser::ClearFontTbl() { for( sal_uInt32 nCnt = aFontTbl.Count(); nCnt; ) delete aFontTbl.GetObject( --nCnt ); + aFontTbl.Clear(); } void SvxRTFParser::ClearStyleTbl() { for( sal_uInt32 nCnt = aStyleTbl.Count(); nCnt; ) delete aStyleTbl.GetObject( --nCnt ); + aStyleTbl.Clear(); } void SvxRTFParser::ClearAttrStack() @@ -1263,7 +1266,8 @@ bool SvxRTFParser::UncompressableStackEntry(const SvxRTFItemStackType &) const void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) { - DBG_ASSERT( pChildList, "There is no child list" ); + ENSURE_OR_RETURN_VOID(pChildList, "Compress: no ChildList" ); + ENSURE_OR_RETURN_VOID(pChildList->Count(), "Compress: ChildList empty"); sal_uInt16 n; SvxRTFItemStackType* pTmp = (*pChildList)[0]; |