diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-04-30 08:22:03 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-04-30 09:45:40 +0200 |
commit | 016b2f2f9194a4a1997d0e7bb51bbd1b10bc27ec (patch) | |
tree | 59f5a322f6774a2a3b9e8d9c8f5f755f46f9352e /sw/source | |
parent | bb55430412a9a0e211482ee853f78ea35989e92a (diff) |
tdf#160833 sw DoNotMirrorRtlDrawObjs: add layout
In case this flag is active (intended for DOCX files), then don't
automatically mirror the position of drawing objects, just because they
are anchored in an RTL text node.
Change-Id: Ie743d94ecb511d7de89e8e1e8303896370ce58c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166883
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/objectpositioning/anchoredobjectposition.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index ab35ae7af738..4af3af542b27 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -852,7 +852,10 @@ SwTwips SwAnchoredObjectPosition::CalcRelPosX( if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE ) { // 'manual' horizontal position - const bool bR2L = rAnchorFrame.IsRightToLeft(); + const IDocumentSettingAccess& rIDSA = mpFrameFormat->getIDocumentSettingAccess(); + // If compat flag is active, then disable automatic mirroring for RTL. + bool bMirrorRtlDrawObjs = !rIDSA.get(DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS); + const bool bR2L = rAnchorFrame.IsRightToLeft() && bMirrorRtlDrawObjs; if( IsAnchoredToChar() && text::RelOrientation::CHAR == eRelOrient ) { if( bR2L ) |