diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-07 14:57:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-07 21:09:05 +0100 |
commit | b7fff04ad728369a09a5e1a5cfbe494cf388317b (patch) | |
tree | 9c3314d5c0a991f0a7e19a31a96800c256b70b88 /sw | |
parent | 5ba54aacd5318fbf9b9f0589a090f717c53833c7 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 7f92c2f57936..282f4b54b1bc 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, |