Update ooo320-m1
[ooovba.git] / applied_patches / 0524-sw-nested-positionned-tables-ww8-import-fix.diff
blob3dcfc5e72c5ebf214b6e495b662b48a2403184da
1 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
2 index 6c74798..339125c 100644
3 --- sw/source/filter/ww8/ww8par.cxx
4 +++ sw/source/filter/ww8/ww8par.cxx
5 @@ -2254,6 +2264,8 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
6 nCellLevel = 0 != pPlcxMan->HasParaSprm(0x244B);
9 + mark:
11 WW8_TablePos *pTabPos=0;
12 WW8_TablePos aTabPos;
13 if (nCellLevel && !bVer67)
14 @@ -2267,7 +2279,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
15 if (const BYTE *pLevel = pPlcxMan->HasParaSprm(0x6649))
16 nCellLevel = *pLevel;
18 - bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1);
19 + bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, (nInTable<nCellLevel?nInTable:nCellLevel-1));
21 //Bad Table, remain unchanged in level, e.g. #i19667#
22 if (!bHasRowEnd)
23 @@ -2345,12 +2357,16 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
24 // in Tabellen
25 while (nInTable < nCellLevel)
27 - if (StartTable(nStartCp))
28 + if (StartTable(nStartCp)) {
29 ++nInTable;
30 + }
31 else
32 break;
34 maApos.push_back(false);
35 + if (nInTable<nCellLevel)
36 + goto mark;
39 // nach StartTable ist ein ReSync noetig ( eigentlich nur, falls die
40 // Tabelle ueber eine FKP-Grenze geht