diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-01-20 21:21:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-01-21 08:41:42 +0100 |
commit | b92293b3943423324064a8513c2e114d18817179 (patch) | |
tree | 21132cbf0d10e2da7ecf1c02075a6502dcc82cca /sw | |
parent | 7e6f8085dcafa811a72ad47dbaeca9090d9f22e7 (diff) |
tdf#103983 VML import: handle <v:textbox style="mso-fit-shape-to-text:t">
We used to always always set TextAutoGrowHeight to true, only do that
when the matching VML attribute is detected, default to false.
This helps the exporter, so it writes the correct markup on save of the
bugdoc.
Also adapt testGroupshapeChildRotation, which in practice tested the
automatic height of the shape. The point of "auto" is that it changes as
needed, hardcoding that value in a test is not a great idea. Rather test
that the height is no longer automatic (there is no explicit markup in
the file, and the default is false).
Change-Id: Ie39408b7da53f4923a2ade503e520c704a86bcf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87104
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 956f75414488..a9edd2b66eb1 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -569,8 +569,9 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, "groupshape-child-rotation #if HAVE_MORE_FONTS xShape.set(xGroupShape->getByIndex(4), uno::UNO_QUERY); - // This was 887, i.e. border distances were included in the height. - CPPUNIT_ASSERT_EQUAL(sal_Int32(661), xShape->getSize().Height); + // This was true, a VML textbox without <v:textbox style="mso-fit-shape-to-text:t"> had + // auto-grow on. + CPPUNIT_ASSERT(!getProperty<bool>(xShape, "TextAutoGrowHeight")); // Paragraph Style Normal should provide the font name - which slightly affects the shape's height (was 686) uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Font", OUString("Times New Roman"), getProperty<OUString>(getRun(xText, 1), "CharFontName")); |