summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2020-03-22 22:59:05 +0100
committerLászló Németh <nemeth@numbertext.org>2020-06-19 13:29:57 +0200
commit833dd75c6956f5a0d395468575aa416a6853a1f9 (patch)
tree47e45d4a6e5ae5611dc1f4f2990ca6e8137150c7 /sw
parent0a618246fc83f6ba7bd48de6164de7efc123f06f (diff)
tdf#108505 DOCX: fix legacy dropdown fields direct font setting
if it is at the beginning of the paragraph. See also commit 22ad4d69d771708f28a2d9e137cfd43ac846cf3a (tdf#121045 DOCX import: fix checkbox size in table). Change-Id: Ic4d4fc56cf031cc941c3f81930c6eba497090cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91540 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108505.docxbin0 -> 16732 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108505.docx b/sw/qa/extras/ooxmlexport/data/tdf108505.docx
new file mode 100644
index 000000000000..50ebc3770895
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108505.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 99e1d29c93d8..781dfa872081 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1136,6 +1136,18 @@ DECLARE_OOXMLEXPORT_TEST(testLineWidthRounding, "tdf126363_LineWidthRounding.doc
assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln", "w", "57150");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf108505, "tdf108505.docx")
+{
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
+ uno::Reference<text::XTextRange> xText
+ = getRun(xParagraph, 1, "Wrong font when alone on the line");
+
+ // Without the fix in place this would have become Times New Roman
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Trebuchet MS"),
+ getProperty<OUString>(xText, "CharFontName"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */