Related: #i123653# skip ranges that end before starting point

fix assert on loading ooo123653-1, we don't care about ranges that end before
the starting point we are interested in

Change-Id: I46ddf882ce4099dbcd77c62569c5c51f1ce5aa76
This commit is contained in:
Caolán McNamara 2014-12-16 13:43:01 +00:00
parent 0946e2da2a
commit 7324aa6886

View File

@ -597,7 +597,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
pPlcxMan = new WW8PLCFMan(pSBase, eType, nStartCp, true); pPlcxMan = new WW8PLCFMan(pSBase, eType, nStartCp, true);
WW8_CP nStart = pPlcxMan->Where(); WW8_CP nStart = pPlcxMan->Where();
WW8_CP nNext, nEnd, nStartReplace=0; WW8_CP nNext, nStartReplace=0;
bool bDoingSymbol = false; bool bDoingSymbol = false;
sal_Unicode cReplaceSymbol = cSymbol; sal_Unicode cReplaceSymbol = cSymbol;
@ -616,6 +616,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
WW8_CP nTxtStart = nStart; WW8_CP nTxtStart = nStart;
if (nTxtStart < nStartCp) if (nTxtStart < nStartCp)
nTxtStart = nStartCp; nTxtStart = nStartCp;
// get position of next SPRM // get position of next SPRM
bool bStartAttr = pPlcxMan->Get(&aRes); bool bStartAttr = pPlcxMan->Get(&aRes);
nAktColl = pPlcxMan->GetColl(); nAktColl = pPlcxMan->GetColl();
@ -696,9 +697,9 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
pPlcxMan->advance(); pPlcxMan->advance();
nNext = pPlcxMan->Where(); nNext = pPlcxMan->Where();
if( (nNext != nStart) && !bONLYnPicLocFc ) const WW8_CP nEnd = ( nNext < nEndCp ) ? nNext : nEndCp;
if (!bONLYnPicLocFc && nNext != nStart && nEnd >= nStartCp)
{ {
nEnd = ( nNext < nEndCp ) ? nNext : nEndCp;
SfxItemPool *pEditPool = pS->GetPool(); SfxItemPool *pEditPool = pS->GetPool();
// Here read current properties and convert them into pS // Here read current properties and convert them into pS