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

Miklos Vajna vmiklos at collabora.co.uk
Tue Nov 12 01:46:01 PST 2013


 sw/qa/extras/ooxmlexport/data/fdo71302.docx     |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx        |    8 ++++++++
 writerfilter/source/dmapper/StyleSheetTable.cxx |    1 -
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 0215131e36fdabf0e2b02c2f8032d393f31195c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Nov 12 10:34:52 2013 +0100

    fdo#71302 writerfilter: remove "Strong" -> "Strong Emphasis" style rename
    
    Such renames only make sense if the exporter does the opposite of them,
    but in this case the stiName array in the exporter explicitly looks for
    the "Strong" character styles. So at the end it's better to not rename
    it at all.
    
    Change-Id: I69b699c76d287b1fe3b81ea3fe66b77992c6e2f1

diff --git a/sw/qa/extras/ooxmlexport/data/fdo71302.docx b/sw/qa/extras/ooxmlexport/data/fdo71302.docx
new file mode 100644
index 0000000..1f62e87
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo71302.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 94b48a0..e3f60a9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1387,6 +1387,14 @@ DECLARE_OOXML_TEST(testQuicktables, "quicktables.docx")
     assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='MediumShading2-Accent5']/w:tblStylePr[@w:type='firstRow']/w:tcPr/w:tcBorders/w:top", "color", "auto");
 }
 
+DECLARE_OOXML_TEST(testFdo71302, "fdo71302.docx")
+{
+    xmlDocPtr pXmlStyles = parseExport("word/styles.xml");
+
+    // This got renamed to "Strong Emphasis" without a good reason.
+    assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Strong']", 1);
+}
+
 DECLARE_OOXML_TEST(testSmartart, "smartart.docx")
 {
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 941ab3e..2a672f7 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1440,7 +1440,6 @@ static const sal_Char* const aStyleNamePairs[] =
     "Block Text",                "",
     "Hyperlink",                 "Internet link",
     "Followed Hyperlink",        "Visited Internet Link",
-    "Strong",                    "Strong Emphasis",
     "Emphasis",                  "Emphasis",
     "Document Map",              "",
     "Plain Text",                "",


More information about the Libreoffice-commits mailing list