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

Caolán McNamara caolanm at redhat.com
Thu Sep 29 12:05:18 UTC 2016


 sw/qa/extras/ww8import/data/tdf102334.doc |binary
 sw/qa/extras/ww8import/ww8import.cxx      |    6 ++++++
 sw/source/filter/basflt/fltshell.cxx      |    6 ++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 04f571349c1b540900fc5cebfa6a10904e349a75
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 29 12:34:57 2016 +0100

    Resolves: tdf#102334 Some hidden text not imported as hidden correctly
    
    began to be a problem since..
    
    commit 705a8c226aee3e68db492083b7cf8b704335328b
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Tue Sep 23 20:35:50 2014 +0100
    
        WW8PLCFMan::AdjustEnds deeply flawed concept wrt change tracking
    
    but underlying problem is...
    
    commit b3cee382f449aa69213dc21f7b1ba6a5356d2865
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Mon Jun 27 14:52:41 2011 +0100
    
        Related: #i76955# make this 4+ times faster
    
    Change-Id: I1cd42a0f51599efab9352c960a5f496626af7ac0

diff --git a/sw/qa/extras/ww8import/data/tdf102334.doc b/sw/qa/extras/ww8import/data/tdf102334.doc
new file mode 100644
index 0000000..d007257
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf102334.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 640f7b7..de3817a 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -615,6 +615,12 @@ DECLARE_WW8IMPORT_TEST(testTdf59896, "tdf59896.doc")
     CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(1), 1), "CharWeight"));
 }
 
+DECLARE_WW8IMPORT_TEST(testTdf102334, "tdf102334.doc")
+{
+    // This was false, i.e. the first run wasn't hidden, when it should have been
+    CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getRun(getParagraph(7), 1), "CharHidden"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 4f262bd..e95c8fa 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -240,8 +240,10 @@ namespace
     {
         return (pExtendCandidate &&
                 !pExtendCandidate->bConsumedByField &&
-                //potentially more, but lets keep it simple
-                (isPARATR_LIST(rAttr.Which()) || (isCHRATR(rAttr.Which()) && rAttr.Which() != RES_CHRATR_FONT && rAttr.Which() != RES_CHRATR_FONTSIZE)) &&
+                //if we bring character attributes into the fold we need to both
+                //a) consider RES_CHRATR_FONTSIZE and RES_CHRATR_FONT wrt Word's CJK/CTL variants
+                //b) consider crossing table cell boundaries (tdf#102334)
+                isPARATR_LIST(rAttr.Which()) &&
                 *(pExtendCandidate->pAttr) == rAttr);
     }
 }


More information about the Libreoffice-commits mailing list