[Libreoffice-commits] core.git: sw/qa sw/source
Tünde Tóth (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 11 10:06:58 UTC 2019
sw/qa/extras/ooxmlexport/data/tdf127579.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 10 ++++++++++
sw/source/filter/ww8/ww8atr.cxx | 6 +++++-
3 files changed, 15 insertions(+), 1 deletion(-)
New commits:
commit 1d81d52b5da45f26e9d3adeb3b279eb9a488b94f
Author: Tünde Tóth <tundeth at gmail.com>
AuthorDate: Tue Oct 15 16:32:43 2019 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Mon Nov 11 11:06:08 2019 +0100
tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks
using "InternetLink" in hyperlink/r/rPr/rStyle instead of the actual
character style, and keep actual character formatting in
hyperlink/r/rPr/rFonts, like MSO does.
Change-Id: I13a5e1758ec5b96e647ca77736396ee2f8b22814
Reviewed-on: https://gerrit.libreoffice.org/80868
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127579.odt b/sw/qa/extras/ooxmlexport/data/tdf127579.odt
new file mode 100644
index 000000000000..d9277b0732d0
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf127579.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 49184bd1ade4..d9ee746f74b6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -872,6 +872,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx")
CPPUNIT_ASSERT(visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf127579, "tdf127579.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", "InternetLink");
+}
+
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 17780b0e0efb..b72a0246bf21 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -221,8 +221,12 @@ void MSWordExportBase::ExportPoolItemsToCHP( ww8::PoolItems &rItems, sal_uInt16
//properties that it rises to the top and is exported first."
//In bug 119649, it is in such situation, so we need to ignore the link style when doing ms word filter exports and
//add the second judgement for #i24291# definition.
- if ( nWhich == RES_TXTATR_INETFMT && ( rItems.begin()->second->Which() == RES_TXTATR_CHARFMT ) )
+ if (nWhich == RES_TXTATR_CHARFMT && SearchPoolItems(rItems, RES_TXTATR_INETFMT))
+ {
+ const SwCharFormat* pFormat = static_cast<const SwFormatCharFormat&>(*pItem).GetCharFormat();
+ OutputFormat(*pFormat, false, true);
continue;
+ }
// tdf#38778 Fix output of the font in DOC run for fields
if (pFont &&
More information about the Libreoffice-commits
mailing list