summaryrefslogtreecommitdiff
path: root/sw/source/core/text/txtfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/txtfrm.cxx')
-rw-r--r--sw/source/core/text/txtfrm.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index f71fee6ec9d5..66beb06d3928 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -595,7 +595,18 @@ void SwTextFrame::SwitchVerticalToHorizontal( SwRect& rRect ) const
nOfstX = getFrameArea().Left() + getFrameArea().Width() - ( rRect.Left() + rRect.Width() );
}
- const long nOfstY = rRect.Top() - getFrameArea().Top();
+ long nOfstY;
+ if (IsVertLRBT())
+ {
+ // Note that mbIsSwapped only affects the frame area, not rRect, so rRect.Height() is used
+ // here unconditionally.
+ if (mbIsSwapped)
+ nOfstY = getFrameArea().Top() + getFrameArea().Width() - (rRect.Top() + rRect.Height());
+ else
+ nOfstY = getFrameArea().Top() + getFrameArea().Height() - (rRect.Top() + rRect.Height());
+ }
+ else
+ nOfstY = rRect.Top() - getFrameArea().Top();
const long nWidth = rRect.Height();
const long nHeight = rRect.Width();