Kaydet (Commit) b7fff04a authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 5ba54aac
...@@ -3497,7 +3497,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3497,7 +3497,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
} }
sal_Unicode cInsert = '\x0'; sal_Unicode cInsert = '\x0';
bool bRet = false; bool bParaMark = false;
if ( 0xc != nWCharVal ) if ( 0xc != nWCharVal )
bFirstParaOfPage = false; bFirstParaOfPage = false;
...@@ -3516,7 +3516,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3516,7 +3516,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
case 0xe: case 0xe:
// if there is only one column word treats a column break like a pagebreak. // if there is only one column word treats a column break like a pagebreak.
if (maSectionManager.CurrentSectionColCount() < 2) if (maSectionManager.CurrentSectionColCount() < 2)
bRet = HandlePageBreakChar(); bParaMark = HandlePageBreakChar();
else if (!nInTable) else if (!nInTable)
{ {
// Always insert a txtnode for a column break, e.g. ## // Always insert a txtnode for a column break, e.g. ##
...@@ -3528,7 +3528,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3528,7 +3528,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
break; break;
case 0x7: case 0x7:
bNewParaEnd = true; bNewParaEnd = true;
TabCellEnd(); // Table cell end (query flags!) if (pPlcxMan->GetPapPLCF()->Where() == nCpOfs+nPosCp+1)
TabCellEnd(); // Table cell/row end
else
bParaMark = true;
break; break;
case 0xf: case 0xf:
if( !bSpec ) // "Satellite" if( !bSpec ) // "Satellite"
...@@ -3555,7 +3558,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3555,7 +3558,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
cInsert = '\xa'; // Hard NewLine cInsert = '\xa'; // Hard NewLine
break; break;
case 0xc: case 0xc:
bRet = HandlePageBreakChar(); bParaMark = HandlePageBreakChar();
break; break;
case 0x1e: // Non-breaking hyphen case 0x1e: // Non-breaking hyphen
rDoc.getIDocumentContentOperations().InsertString( *pPaM, OUString(CHAR_HARDHYPHEN) ); rDoc.getIDocumentContentOperations().InsertString( *pPaM, OUString(CHAR_HARDHYPHEN) );
...@@ -3625,7 +3628,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3625,7 +3628,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
Read_GrafLayer( nPosCp ); Read_GrafLayer( nPosCp );
break; break;
case 0xd: case 0xd:
bNewParaEnd = bRet = true; bNewParaEnd = bParaMark = true;
if (nInTable > 1) if (nInTable > 1)
{ {
/* /*
...@@ -3647,13 +3650,13 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3647,13 +3650,13 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
if (nData & 0x2) // Might be how it works if (nData & 0x2) // Might be how it works
{ {
TabCellEnd(); TabCellEnd();
bRet = false; bParaMark = false;
} }
} }
else if (bWasTabCellEnd) else if (bWasTabCellEnd)
{ {
TabCellEnd(); TabCellEnd();
bRet = false; bParaMark = false;
} }
} }
...@@ -3679,7 +3682,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) ...@@ -3679,7 +3682,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
} }
if (!maApos.back()) // a para end in apo doesn't count if (!maApos.back()) // a para end in apo doesn't count
bWasParaEnd = bNewParaEnd; bWasParaEnd = bNewParaEnd;
return bRet; return bParaMark;
} }
void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes, void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment