diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2020-12-04 13:42:09 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-12-16 20:08:36 +0100 |
commit | d00e7c651e80b9fd3d00262900e0938e2c392809 (patch) | |
tree | fa6d983150cfa330a6ae155dae2bc3ba24005050 /sw/inc | |
parent | 261b48affaf6d963de312c27f2cac1a95625c6a2 (diff) |
tdf#137819 sw: fix textboxes anchoring "As Char"
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 <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/textboxhelper.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
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 <com/sun/star/uno/Any.h> #include <com/sun/star/uno/Type.h> +#include <com/sun/star/text/TextContentAnchorType.hpp> +#include <svx/swframetypes.hxx> #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); |