diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-03-18 20:59:20 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-03-18 21:54:30 +0000 |
commit | d1f3219e773f854c33b39a1fa1622def3282d8d6 (patch) | |
tree | b121c7af3f038d5bf20e9aee108275e55269a20e /svx | |
parent | 4154b710ae4f4e0ee221042e3905469f3014f50b (diff) |
tdf#104722: Align text correctly also during editing
Change-Id: Icd21aa5be70adf6637bc20f7f511ff26d2955fc2
Reviewed-on: https://gerrit.libreoffice.org/35415
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
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 <editeng/eeitem.hxx> #include "editeng/editstat.hxx" +#include <editeng/adjustitem.hxx> #include <svx/svdoutl.hxx> #include <editeng/outlobj.hxx> #include <svx/sdtfchim.hxx> @@ -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<const SvxAdjustItem&>(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; + } } } |