sw/source/filter/ww8/ww8par.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit b7fff04ad728369a09a5e1a5cfbe494cf388317b Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 7 14:57:39 2015 +0100 Resolves: tdf#90504 0x7 chars in .doc are not always cell/row ends fdo65094-2.doc shows that a 0x7 isn't always a row/cell end only a 0x7 that is right at the end of the paragraph range is a real row/cell end this I believe will remove the last crashtester .doc crash Change-Id: I196c33bf253378b02f7b3413fb65c3bef9418a15 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 7f92c2f..282f4b5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3497,7 +3497,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) } sal_Unicode cInsert = '\x0'; - bool bRet = false; + bool bParaMark = false; if ( 0xc != nWCharVal ) bFirstParaOfPage = false; @@ -3516,7 +3516,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) case 0xe: // if there is only one column word treats a column break like a pagebreak. if (maSectionManager.CurrentSectionColCount() < 2) - bRet = HandlePageBreakChar(); + bParaMark = HandlePageBreakChar(); else if (!nInTable) { // Always insert a txtnode for a column break, e.g. ## @@ -3528,7 +3528,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) break; case 0x7: bNewParaEnd = true; - TabCellEnd(); // Table cell end (query flags!) + if (pPlcxMan->GetPapPLCF()->Where() == nCpOfs+nPosCp+1) + TabCellEnd(); // Table cell/row end + else + bParaMark = true; break; case 0xf: if( !bSpec ) // "Satellite" @@ -3555,7 +3558,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) cInsert = '\xa'; // Hard NewLine break; case 0xc: - bRet = HandlePageBreakChar(); + bParaMark = HandlePageBreakChar(); break; case 0x1e: // Non-breaking hyphen rDoc.getIDocumentContentOperations().InsertString( *pPaM, OUString(CHAR_HARDHYPHEN) ); @@ -3625,7 +3628,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) Read_GrafLayer( nPosCp ); break; case 0xd: - bNewParaEnd = bRet = true; + bNewParaEnd = bParaMark = true; if (nInTable > 1) { /* @@ -3647,13 +3650,13 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) if (nData & 0x2) // Might be how it works { TabCellEnd(); - bRet = false; + bParaMark = false; } } else if (bWasTabCellEnd) { TabCellEnd(); - bRet = false; + bParaMark = false; } } @@ -3679,7 +3682,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) } if (!maApos.back()) // a para end in apo doesn't count bWasParaEnd = bNewParaEnd; - return bRet; + return bParaMark; } void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits