[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Mon Oct 12 13:41:24 PDT 2015


 sw/source/filter/ww8/ww8par.cxx |   23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 959ac511dbebeb3983da92052ced837b39b74ed9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 12 20:56:51 2015 +0100

    fix tdf#94818 while retaining the tdf#90504 fix
    
    Change-Id: Ia1c904b16d040714c8d5a0b4946bc42e6b8ac3bb

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9dd445e..6035787 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3531,11 +3531,24 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
             }
             break;
         case 0x7:
-            bNewParaEnd = true;
-            if (m_pPlcxMan->GetPapPLCF()->Where() == nCpOfs+nPosCp+1)
-                TabCellEnd();       // Table cell/row end
-            else
-                bParaMark = true;
+            {
+                bNewParaEnd = true;
+                WW8PLCFxDesc* pPap = m_pPlcxMan->GetPap();
+                //The last paragraph of each cell is terminated by a special
+                //paragraph mark called a cell mark. Following the cell mark
+                //that ends the last cell of a table row, the table row is
+                //terminated by a special paragraph mark called a row mark
+                //
+                //So the 0x7 should be right at the end of the previous
+                //range to be a real cell-end.
+                if (pPap->nOrigStartPos == nCpOfs+nPosCp+1 ||
+                    pPap->nOrigStartPos == WW8_CP_MAX)
+                {
+                    TabCellEnd();       // Table cell/row end
+                }
+                else
+                    bParaMark = true;
+            }
             break;
         case 0xf:
             if( !m_bSpec )        // "Satellite"


More information about the Libreoffice-commits mailing list