diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-25 18:50:04 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-25 18:50:04 +0100 |
commit | 1a6bf8c433b128606af043a01a1366eab00b3d68 (patch) | |
tree | 446ad553d122fad153e3a28a52770dd7bd671e82 /sw/source/filter/rtf/swparrtf.cxx | |
parent | 2b20a3ef7a0b2ff030945d679b897c2062d7e0ff (diff) | |
parent | c16ba8a04fd4599e439e7e039705e41691c43acb (diff) |
Merge remote branch 'origin/libreoffice-3-3'
Conflicts:
sw/inc/SwNumberTree.hxx
sw/inc/calbck.hxx
sw/inc/tox.hxx
sw/inc/viscrs.hxx
sw/source/core/doc/docnum.cxx
sw/source/core/docnode/finalthreadmanager.cxx
sw/source/core/docnode/ndnum.cxx
sw/source/core/docnode/ndtbl.cxx
sw/source/core/draw/dcontact.cxx
sw/source/core/edit/edlingu.cxx
sw/source/core/edit/ednumber.cxx
sw/source/core/except/errhdl.cxx
sw/source/core/fields/chpfld.cxx
sw/source/core/fields/fldbas.cxx
sw/source/core/frmedt/fetab.cxx
sw/source/core/layout/flycnt.cxx
sw/source/core/layout/makefile.mk
sw/source/core/layout/pagechg.cxx
sw/source/core/layout/tabfrm.cxx
sw/source/core/ole/ndole.cxx
sw/source/core/text/makefile.mk
sw/source/core/txtnode/txtedt.cxx
sw/source/filter/basflt/fltini.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/ww1/fltshell.cxx
sw/source/filter/ww1/w1sprm.cxx
sw/source/filter/ww8/wrtw8nds.cxx
sw/source/filter/ww8/wrtw8num.cxx
sw/source/filter/ww8/ww8par3.cxx
sw/source/filter/ww8/ww8par5.cxx
sw/source/filter/ww8/ww8par6.cxx
sw/source/filter/xml/xmltble.cxx
sw/source/filter/xml/xmltbli.cxx
sw/source/ui/dbui/dbinsdlg.cxx
sw/source/ui/dbui/mmoutputpage.cxx
sw/source/ui/dialog/swdlgfact.cxx
sw/source/ui/docvw/edtwin.cxx
sw/source/ui/docvw/srcedtw.cxx
Diffstat (limited to 'sw/source/filter/rtf/swparrtf.cxx')
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index b7c0dd671870..d7c1c7a6ca6c 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -137,7 +137,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S { if( !pStrm ) { - ASSERT( FALSE, "RTF-Read ohne Stream" ); + OSL_ENSURE( FALSE, "RTF-Read ohne Stream" ); return ERR_SWG_READ_ERROR; } @@ -380,12 +380,12 @@ void SwRTFParser::Continue( int nToken ) pPam->GetPoint()->nContent.Assign( pTxtNode, nStt ); } -#ifdef DBG_UTIL -// !!! sollte nicht moeglich sein, oder ?? -ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(), - "Pam.Bound1 steht noch im Node" ); -ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(), - "Pam.Bound2 steht noch im Node" ); +#if OSL_DEBUG_LEVEL > 1 + // !!! sollte nicht moeglich sein, oder ?? + OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(), + "Pam.Bound1 steht noch im Node" ); + OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(), + "Pam.Bound2 steht noch im Node" ); if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() ) { @@ -796,7 +796,7 @@ void rtfSections::MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest) void rtfSections::SetHdFt(rtfSection &rSection) { - ASSERT(rSection.mpPage, "makes no sense to call without a main page"); + OSL_ENSURE(rSection.mpPage, "makes no sense to call without a main page"); if (rSection.mpPage && rSection.maPageInfo.mpPageHdFt) { if (rSection.maPageInfo.mbPageHdFtUsed) @@ -839,7 +839,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) rSection.mpSection = mrReader.pDoc->InsertSwSection( rMyPaM, aSectionData, 0, &aSet ); - ASSERT(rSection.mpSection, "section not inserted!"); + OSL_ENSURE(rSection.mpSection, "section not inserted!"); if (!rSection.mpSection) return 0; @@ -852,7 +852,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) break; } - ASSERT(pPage, "no page outside this section!"); + OSL_ENSURE(pPage, "no page outside this section!"); if (!pPage) pPage = &mrReader.pDoc->_GetPageDesc(0); @@ -868,7 +868,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) long nRight = rLR.GetRight(); SwSectionFmt *pFmt = rSection.mpSection->GetFmt(); - ASSERT(pFmt, "impossible"); + OSL_ENSURE(pFmt, "impossible"); if (!pFmt) return 0; SetCols(*pFmt, rSection, (USHORT)(nWidth - nLeft - nRight) ); @@ -926,7 +926,7 @@ void rtfSections::InsertSegments(bool bNewDoc) , 0, false); aIter->mpTitlePage = &mrReader.pDoc->_GetPageDesc(nPos); } - ASSERT(aIter->mpTitlePage, "no page!"); + OSL_ENSURE(aIter->mpTitlePage, "no page!"); if (!aIter->mpTitlePage) continue; @@ -948,7 +948,7 @@ void rtfSections::InsertSegments(bool bNewDoc) aIter->mpTitlePage, false); aIter->mpPage = &mrReader.pDoc->_GetPageDesc(nPos); } - ASSERT(aIter->mpPage, "no page!"); + OSL_ENSURE(aIter->mpPage, "no page!"); if (!aIter->mpPage) continue; @@ -978,7 +978,7 @@ void rtfSections::InsertSegments(bool bNewDoc) SwTable& rTable = aIter->maStart.GetNode().GetTableNode()->GetTable(); SwFrmFmt* pApply = rTable.GetFrmFmt(); - ASSERT(pApply, "impossible"); + OSL_ENSURE(pApply, "impossible"); if (pApply) pApply->SetFmtAttr(aPgDesc); } @@ -1074,7 +1074,7 @@ void InsertedTablesManager::DelAndMakeTblFrms() // exitiert schon ein Layout, dann muss an dieser Tabelle die BoxFrames // neu erzeugt SwTableNode *pTable = aIter->first->GetTableNode(); - ASSERT(pTable, "Why no expected table"); + OSL_ENSURE(pTable, "Why no expected table"); if (pTable) { SwFrmFmt * pFrmFmt = pTable->GetTable().GetFrmFmt(); @@ -1386,7 +1386,7 @@ void SwRTFParser::ReadShapeObject() break; case RTF_SN: nToken = GetNextToken(); - ASSERT(nToken==RTF_TEXTTOKEN, "expected name"); + OSL_ENSURE(nToken==RTF_TEXTTOKEN, "expected name"); sn=aToken; break; case RTF_SV: @@ -2111,7 +2111,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos ) SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx ); if( !pNode ) { - ASSERT( FALSE, "keinen vorherigen ContentNode gefunden" ); + OSL_ENSURE( FALSE, "keinen vorherigen ContentNode gefunden" ); } rpNodePos = new SwNodeIdx( aIdx ); @@ -2125,12 +2125,12 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) SwPaM aPam( *pPam->GetPoint() ); -#ifdef DBG_UTIL - ASSERT( nSNd <= nENd, "Start groesser als Ende" ); +#if OSL_DEBUG_LEVEL > 1 + OSL_ENSURE( nSNd <= nENd, "Start groesser als Ende" ); SwNode* pDebugNd = pDoc->GetNodes()[ nSNd ]; - ASSERT( pDebugNd->IsCntntNode(), "Start kein ContentNode" ); + OSL_ENSURE( pDebugNd->IsCntntNode(), "Start kein ContentNode" ); pDebugNd = pDoc->GetNodes()[ nENd ]; - ASSERT( pDebugNd->IsCntntNode(), "Ende kein ContentNode" ); + OSL_ENSURE( pDebugNd->IsCntntNode(), "Ende kein ContentNode" ); #endif SwCntntNode* pCNd = pDoc->GetNodes()[ nSNd ]->GetCntntNode(); @@ -2684,7 +2684,7 @@ void SwRTFParser::ReadDocControls( int nToken ) pColl = pDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ); } - ASSERT(pColl, "impossible to have no standard style"); + OSL_ENSURE(pColl, "impossible to have no standard style"); if (pColl) { @@ -2833,7 +2833,7 @@ void SwRTFParser::ReadSectControls( int nToken ) return; } - ASSERT(!maSegments.empty(), "suspicious to have a section with no " + OSL_ENSURE(!maSegments.empty(), "suspicious to have a section with no " "page info, though probably legal"); if (maSegments.empty()) { @@ -3104,7 +3104,7 @@ void SwRTFParser::ReadSectControls( int nToken ) case RTF_MARGT: case RTF_MARGB: case RTF_FACINGP: - ASSERT(!this, "why are these tokens found in this section?"); + OSL_ENSURE(!this, "why are these tokens found in this section?"); ReadDocControls( nToken ); break; default: @@ -3232,7 +3232,7 @@ void SwRTFParser::ReadPageDescTbl() case '}': if (1 == --nNumOpenBrakets) { - ASSERT(pPgFmt && pPg, "Serious problem here"); + OSL_ENSURE(pPgFmt && pPg, "Serious problem here"); if (pPgFmt && pPg) { // PageDesc ist fertig, setze am Doc @@ -3268,7 +3268,7 @@ void SwRTFParser::ReadPageDescTbl() if (nPos != pDoc->MakePageDesc( String::CreateFromInt32(nTokenValue))) { - ASSERT( FALSE, "PageDesc an falscher Position" ); + OSL_ENSURE( FALSE, "PageDesc an falscher Position" ); } } pPg = &pDoc->_GetPageDesc(nPos); @@ -3431,7 +3431,7 @@ void SwRTFParser::ReadPageDescTbl() case RTF_TEXTTOKEN: if (!DelCharAtEnd(aToken, ';' ).Len()) break; - ASSERT(pPg, "Unexpected missing pPg"); + OSL_ENSURE(pPg, "Unexpected missing pPg"); if (pPg) { pPg->SetName(aToken); @@ -3507,7 +3507,7 @@ void SwRTFParser::ReadPrtData() static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld) { - ASSERT(pHdFtFmt, "Impossible, no header"); + OSL_ENSURE(pHdFtFmt, "Impossible, no header"); const SwFrmFmt* pExisting = bReuseOld ? pHdFtFmt->GetHeader().GetHeaderFmt() : 0; if (!pExisting) @@ -3521,7 +3521,7 @@ static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld) static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld) { - ASSERT(pHdFtFmt, "Impossible, no footer"); + OSL_ENSURE(pHdFtFmt, "Impossible, no footer"); const SwFrmFmt* pExisting = bReuseOld ? pHdFtFmt->GetFooter().GetFooterFmt() : 0; if (!pExisting) @@ -3536,7 +3536,7 @@ static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld) void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) { - ASSERT( RTF_FOOTNOTE == nToken || + OSL_ENSURE( RTF_FOOTNOTE == nToken || RTF_FLY_INPARA == nToken || pPageDesc, "PageDesc fehlt" ); @@ -3587,7 +3587,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) pTxtAttr = pTxtNd->InsertItem( aFtnNote, nPos, nPos, bDelFirstChar ? nsSetAttrMode::SETATTR_NOTXTATRCHR : 0 ); - ASSERT( pTxtAttr, "konnte die Fussnote nicht einfuegen/finden" ); + OSL_ENSURE( pTxtAttr, "konnte die Fussnote nicht einfuegen/finden" ); if( pTxtAttr ) pSttIdx = ((SwTxtFtn*)pTxtAttr)->GetStartNode(); @@ -3614,7 +3614,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) pTxtAttr = pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt( nPos, RES_TXTATR_FLYCNT ); - ASSERT( pTxtAttr, "konnte den Fly nicht einfuegen/finden" ); + OSL_ENSURE( pTxtAttr, "konnte den Fly nicht einfuegen/finden" ); pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx(); bSetFlyInDoc = FALSE; @@ -3853,7 +3853,7 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos, String aNm( rName ); if( !aNm.Len() ) { - ASSERT(!this, "not a bug, but I (cmc) want to see an example of this"); + OSL_ENSURE(!this, "not a bug, but I (cmc) want to see an example of this"); if( !nPos ) { pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false ); @@ -3901,7 +3901,7 @@ SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, USHORT nPos, String aNm( rName ); if( !aNm.Len() ) { - ASSERT(!this, "not a bug, but I (cmc) want to see an example of this"); + OSL_ENSURE(!this, "not a bug, but I (cmc) want to see an example of this"); aNm.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NoName(" )); aNm += String::CreateFromInt32( nPos ); aNm += ')'; |