summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-03-06 14:59:31 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-03-06 20:03:40 +0100
commit41ad6531c75a53262933aecb0685f5c876de7251 (patch)
treeb6c4af2879169665732bf70e872c58e51584f024
parent8b4fcb9c048d8189693a866c89bc257021352b86 (diff)
Vertical content alignment of vertical text frames
Change-Id: If365684f8fec5c560e948e3428681462e227dc00
-rw-r--r--sw/source/core/layout/fly.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 38db766f8118..48ab36b5badd 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1711,11 +1711,21 @@ void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs )
{
if( nAdjust == SDRTEXTVERTADJUST_CENTER )
{
- aNewContentPos.setY(aNewContentPos.getY() + nDiff/2);
+ if( bVertL2R )
+ aNewContentPos.setX(aNewContentPos.getX() + nDiff/2);
+ else if( bVert )
+ aNewContentPos.setX(aNewContentPos.getX() - nDiff/2);
+ else
+ aNewContentPos.setY(aNewContentPos.getY() + nDiff/2);
}
else if( nAdjust == SDRTEXTVERTADJUST_BOTTOM )
{
- aNewContentPos.setY(aNewContentPos.getY() + nDiff);
+ if( bVertL2R )
+ aNewContentPos.setX(aNewContentPos.getX() + nDiff);
+ else if( bVert )
+ aNewContentPos.setX(aNewContentPos.getX() - nDiff);
+ else
+ aNewContentPos.setY(aNewContentPos.getY() + nDiff);
}
}
}