From d00e7c651e80b9fd3d00262900e0938e2c392809 Mon Sep 17 00:00:00 2001 From: "Attila Bakos (NISZ)" Date: Fri, 4 Dec 2020 13:42:09 +0100 Subject: tdf#137819 sw: fix textboxes anchoring "As Char" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changing anchoring type of a textbox to "As Char", shape position follows the new text frame position. Also SwTextBoxHelper::mapAnchorType() was introduced to map between text frames and shapes, with a small cleanup. Change-Id: Iea0abe6f12a293fb4270970fde53ea903b347fb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107221 Tested-by: László Németh Reviewed-by: László Németh --- sw/inc/textboxhelper.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/inc') diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 6d209d2c7140..0c20711b109c 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -16,6 +16,8 @@ #include #include +#include +#include #include "swdllapi.h" @@ -71,6 +73,9 @@ public: static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue); + /// There are two types of enum of anchor type, so this function maps this. + static css::text::TextContentAnchorType mapAnchorType(const RndStdIds& rAnchorID); + /// Similar to syncProperty(), but used by the internal API (e.g. for UI purposes). static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const& rSet); -- cgit