summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authornd101 <Fong@nd.com.cn>2020-06-23 22:20:24 +0800
committerXisco Fauli <xiscofauli@libreoffice.org>2020-07-13 11:36:02 +0200
commit4a4fc98e5908db1e027c8438fbbcabefe6b0de8a (patch)
treef5f1d7a66e7c1806bb6458662faa5cd0c029ce46 /oox
parent02c4b116cc927688fde8401413b126df72fc9b43 (diff)
tdf#134221 Fix SMARTART caption text location
Caption text shall be placed off center. Apply the transform2d. Change-Id: Iefdf207c8aadefecbe2e3154879d03ca10456d7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96956 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/transform2dcontext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx
index 2a324b15c23d..234cf5920269 100644
--- a/oox/source/drawingml/transform2dcontext.cxx
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -53,7 +53,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken,
{
// Workaround: only for rectangles
const sal_Int32 nType = mrShape.getCustomShapeProperties()->getShapePresetType();
- if( nType == XML_rect || nType == XML_roundRect )
+ if( nType == XML_rect || nType == XML_roundRect || nType == XML_ellipse )
{
switch( aElementToken )
{
@@ -62,7 +62,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken,
const OUString sXValue = rAttribs.getString( XML_x ).get();
const OUString sYValue = rAttribs.getString( XML_y ).get();
- if( !sXValue.isEmpty() )
+ if( !sXValue.isEmpty() && nType != XML_ellipse )
mrShape.getTextBody()->getTextProperties().moTextOffLeft = GetCoordinate( sXValue.toInt32() - mrShape.getPosition().X );
if( !sYValue.isEmpty() )
mrShape.getTextBody()->getTextProperties().moTextOffUpper = GetCoordinate( sYValue.toInt32() - mrShape.getPosition().Y );