From d1f3219e773f854c33b39a1fa1622def3282d8d6 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sat, 18 Mar 2017 20:59:20 +0100 Subject: tdf#104722: Align text correctly also during editing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Icd21aa5be70adf6637bc20f7f511ff26d2955fc2 Reviewed-on: https://gerrit.libreoffice.org/35415 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- svx/source/svdraw/svdoashp.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 71253ac647e1..0f90e4dad7dc 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -49,6 +49,7 @@ #include "svx/svdstr.hrc" #include #include "editeng/editstat.hxx" +#include #include #include #include @@ -2699,7 +2700,14 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe // else the alignment is wanted. if(SDRTEXTHORZADJUST_BLOCK == eHAdj) { - eHAdj = SDRTEXTHORZADJUST_CENTER; + SvxAdjust eAdjust = static_cast(GetObjectItemSet().Get(EE_PARA_JUST)).GetAdjust(); + switch (eAdjust) + { + case SvxAdjust::Left: eHAdj = SDRTEXTHORZADJUST_LEFT; break; + case SvxAdjust::Right: eHAdj = SDRTEXTHORZADJUST_RIGHT; break; + case SvxAdjust::Center: eHAdj = SDRTEXTHORZADJUST_CENTER; break; + default: break; + } } } -- cgit