From 26bd8f5a1d39801f69232c22673cb0da7c76d3d5 Mon Sep 17 00:00:00 2001 From: "Attila Bakos (NISZ)" Date: Thu, 10 Dec 2020 10:36:12 +0100 Subject: tdf#137803 sw: fix AutoSize and Wrap of textboxes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When autosize (AutoGrowHeight) turned on the textbox fell apart. After changing the text of the textbox the positions still were different for the shape and the textframe. Now this fix solves, if the text changes, the positions (with the size what worked only before) synchronized so the textboxes are kept together. Also Wrap text inside the shape now works like the editeng text did, except in the case of empty text boxes. Note: this fixes only editing (without positioning the textboxes by the mouse before or after the setting), but not import/export, yet. The ooxmlimport test has been restored to its original state, because the fix for the tdf#135198 is fixed by this commit. To start the unit test just give the following command: $ (cd sw && make UITest_writer_tests7 UITEST_TEST_NAME="tdf137803.tdf137803.test_tdf137803" SAL_USE_VCLPLUGIN=gen) Change-Id: Ie13a7a1e81e4099cd8540edd7e008118e58134bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107515 Tested-by: László Németh Reviewed-by: László Németh --- sw/inc/textboxhelper.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw/inc') diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 0c20711b109c..51261a8f77a3 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -72,6 +72,8 @@ public: /// Get a property of the underlying TextFrame. static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue); + /// Get a property of the underlying TextFrame. + static css::uno::Any getProperty(SwFrameFormat const* pShape, OUString sPropName); /// There are two types of enum of anchor type, so this function maps this. static css::text::TextContentAnchorType mapAnchorType(const RndStdIds& rAnchorID); -- cgit