summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-17 16:09:14 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-17 16:35:02 +0100
commit734cf8395d745db73f52fd6d625d7deb77ba6d40 (patch)
tree3e2f81136cae46e5c640f443f3fb8c5bb00ddc8f /sw
parent0f86895fcd1001324974d644a728152b97b22ab0 (diff)
VML import: fix height of textboxes when border distance is non-zero
The VML concept is that the height / width of a textbox is absolute, and border distances only affect the position of the shape text, not the size of it. OTOH, when we set the Text*Distance UNO properties on a textbox, the size may change. Make sure that during VML import setting those properties doesn't change the size. Change-Id: I53b328b66572fc05027be344869bc1a78d855558
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docxbin15796 -> 15891 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx4
2 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx b/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx
index 06aa39d75df9..74dd72a26a31 100644
--- a/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx
+++ b/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 32e54d2066b8..2e9ff53e9b38 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -971,6 +971,10 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, "groupshape-child-rotation
uno::Reference<drawing::XShape> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getPosition().X);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getPosition().Y);
+
+ 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(686), xShape->getSize().Height);
}
DECLARE_OOXMLIMPORT_TEST(testN793262, "n793262.docx")