[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Mon Dec 18 21:25:32 UTC 2017
sw/source/core/text/porfly.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bdcbf601410f29642aa27e2b8fab312f929d569f
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Dec 18 21:38:48 2017 +0100
tdf#114212 sw: fix layout of as-char anchored text-frame of shape
Commit c79467ba954987f1d239c594c1e1b3af3f5515f6 changed the vertical
orientation of the shape, and the effect on shapes with text-frames
(or TextBox) is surprising: the shape itself, as imported from DOCX,
now has the "top" vertical orientation, where it previously had
"from-bottom", which was wrong, because it was different from Word.
However the associated text-frame now is positioned wrongly, stacked
on top of the shape; the problem is in SwFlyCntPortion::SetBase()
where the text-frame is manually positioned depending on the
shape's position; using "top" there does not actually result in
the correct position because it disables the use of the computed
vertical offset; fix the offset so it looks right.
Change-Id: I2ff38577d0cae2e9f796402545503cc6351a9d2b
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index e9cf3900f0d2..b3903a53cf48 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -363,7 +363,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
SwFormatVertOrient aVert(pTextBox->GetVertOrient());
aVert.SetVertOrient(css::text::VertOrientation::NONE);
- sal_Int32 nTop = aTextRectangle.getY() - rFrame.getFrameArea().Top() - nFlyAsc;
+ sal_Int32 const nTop = aTextRectangle.getY() - rFrame.getFrameArea().Top();
aVert.SetPos(nTop);
pTextBox->LockModify();
More information about the Libreoffice-commits
mailing list