diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-01-28 21:50:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-01-29 09:18:05 +0100 |
commit | e45fbf479944b9ec940bdddfa8ee7d523244a9ba (patch) | |
tree | 750e823de5901ee91275f0c7040957db450b6401 /sw | |
parent | e9e1813a6ebe6e3015e04347b15a18aebc4e0fa7 (diff) |
tdf#122430 RTF import: fix lost font size on footnote start
This become more visible since commit
49614a9ea971ff7f370f863ce8a2735aab973cee (tdf#119599 RTF import: fix
missing deduplication of font size, 2018-09-24) as now incorrect font
size from style affects the rendering result.
Change-Id: I5b339337f021e2fc359f6fc5f5aa2ed0bcf844b9
Reviewed-on: https://gerrit.libreoffice.org/67034
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf122430.rtf | 31 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 38 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf122430.rtf b/sw/qa/extras/rtfimport/data/tdf122430.rtf new file mode 100644 index 000000000000..fc1a80f532c9 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf122430.rtf @@ -0,0 +1,31 @@ +{\rtf1\ansi\deff0\adeflang1025 +{\fonttbl +{\f0\froman\fprq2\fcharset0 Times New Roman;} +{\f1\froman\fprq2\fcharset2 Symbol;} +{\f2\fswiss\fprq2\fcharset0 Arial;} +{\f3\froman\fprq2\fcharset0 Arial;} +{\f4\froman\fprq2\fcharset0 Cambria;} +{\f5\froman\fprq2\fcharset0 Calibri;} +{\f6\fnil\fprq2\fcharset0 Microsoft YaHei;} +{\f7\fnil\fprq2\fcharset0 Cambria;} +{\f8\fnil\fprq2\fcharset0 Times New Roman;} +{\f9\fnil\fprq2\fcharset0 Lucida Sans;} +{\f10\fswiss\fprq0\fcharset128 Lucida Sans;} +} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet +{\s0\snext0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af7\langfe1081\dbch\af7\afs24\alang1081\loch\f0\fs24\lang1040 Normal;} +{\s43\snext43\ql\nowidctlpar\hyphpar0\faauto\li0\ri0\lin0\rin0\fi0\sb240\sa120\keepn\ltrpar\cf1\b\kerning1\dbch\af7\langfe1040\dbch\af9\afs24\alang1081\loch\f3\fs36\lang1040 Titolo 1;} +{\s61\sbasedon0\snext61\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af7\langfe1081\dbch\af7\afs24\loch\f0\fs24\lang1040 Footnote;} +} +\pard\plain \s43\ql\nowidctlpar\hyphpar0\faauto\li0\ri0\lin0\rin0\fi0\sb240\sa120\keepn\ltrpar\cf1\b\kerning1\dbch\af7\langfe1040\dbch\af9\afs24\alang1081\loch\f3\fs36\lang1040\sb240\sa120 +{ +{\super 1 +{\*\footnote 1\pard\plain \s61\fs24 +{\cf1\kerning1\dbch\af7\langfe1040\rtlch \ltrch\rtlch \ltrch\loch\fs20\lang1040 +\tab A} +} +} +} +A +\par} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 0d29eea41d49..6b50be5fe8d9 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -355,6 +355,13 @@ DECLARE_RTFIMPORT_TEST(testTdf112211_2, "tdf112211-2.rtf") CPPUNIT_ASSERT_LESS(300, nWidth); } +DECLARE_RTFIMPORT_TEST(testTdf122430, "tdf122430.rtf") +{ + // Without the accompanying fix in place, this test would have failed with + // 'Expected: 18, Actual : 12', i.e. the font was smaller than expected. + CPPUNIT_ASSERT_EQUAL(18.0f, getProperty<float>(getRun(getParagraph(1), 2), "CharHeight")); +} + DECLARE_RTFIMPORT_TEST(testFdo49892, "fdo49892.rtf") { uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); |