[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 16 20:03:03 UTC 2020


 sw/qa/extras/ww8export/data/tdf116194.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx     |    5 +++++
 sw/source/filter/ww8/ww8scan.cxx          |    2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 52f004e27fbdef114a6fa1b467a7919ab1762dab
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Jul 16 16:02:53 2020 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Thu Jul 16 22:02:30 2020 +0200

    tdf#77962 ww8import: 0x4xxx sprms are always 2 byte
    
    SPRA(bytes) | SGC (property type) | A | ISPMD
    XXX           X               XX    X   X XXXX XXXX
    
    Focusing on the SPRA meaning:
    0 is Operand is a ToggleOperand (which is 1 byte in size).
    1 is Operand is 1 byte.
    2 is Operand is 2 bytes.
    3 is Operand is 4 bytes.
    4 is Operand is 2 bytes.
    5 is Operand is 2 bytes.
    6 is Operand is of variable length.
    7 is Operand is 3 bytes.
    
    Thus every 0x4xxx and 0x5xxx are 2 bytes
    
    sprmCIcoBi = SPRM_CHR(0x60, 1, spra::operand_2b_2); // 0x4A60
    and thus it must be defined everywhere as 2 bytes.
    
    Wrongly "fixed" from 0 to 1 by
    commit bf24cca78e3c95d7a07e2073802c1540faec6920
    Author: Caolán McNamara on Wed Dec 4 08:56:32 2002 +0000
        #105926# some bidi properties with incorrect cached len
    
    Change-Id: Ic30df735ed325a508ef3c7220d9b06878af248a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98911
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit 56b04e40ab72b6333ce278ba2980650f5272025f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98845

diff --git a/sw/qa/extras/ww8export/data/tdf116194.doc b/sw/qa/extras/ww8export/data/tdf116194.doc
new file mode 100644
index 000000000000..ca1edf68d501
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf116194.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 49a887781859..c88c23dbc581 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -317,6 +317,11 @@ DECLARE_WW8EXPORT_TEST(testTdf133453_realFontSize, "tdf133453_realFontSize.doc")
     CPPUNIT_ASSERT_EQUAL( -95.f, getProperty<float>(getRun(getParagraph(1), 2, "2"), "CharEscapement") );
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf116194, "tdf116194.doc")
+{
+    CPPUNIT_ASSERT_EQUAL( Color(192,0,0), Color(getProperty<sal_uInt32>(getRun(getParagraph(1), 1), "CharColor")) );
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.docx")
 {
     uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Numbering - First level"),
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 30294ca3ab9f..14780313c4ca 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -603,7 +603,7 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
         {0x085D, { 1, L_FIX} }, // "sprmCFItalicBi" ;;;
         {0x4A5E, { 2, L_FIX} },
         {0x485F, { 2, L_FIX} }, // "sprmCLidBi" ;;;
-        {0x4A60, { 1, L_FIX} }, // "sprmCIcoBi" ;;;
+        {0x4A60, { 2, L_FIX} }, // "sprmCIcoBi" ;;;
         {0x4A61, { 2, L_FIX} }, // "sprmCHpsBi" ;;;
         {0xCA62, { 0, L_VAR} }, // "sprmCDispFieldRMark" chp.fDispFieldRMark,
                             // chp.ibstDispFieldRMark, chp.dttmDispFieldRMark ;


More information about the Libreoffice-commits mailing list