summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2020-07-07 10:50:24 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-13 10:48:53 +0200
commitf6fc6ab2a2792c22a3e74cce83ac7d19c820c9b4 (patch)
treea43f4339fc923275d5ffabc8cf4506d800527810 /chart2
parentc777cb492d12fb7038254f116102716b9cb84fa3 (diff)
tdf#122014 Chart OOXML import: set chart title alignment to center
Regression from commit: d4190685ac208677bc77f66976287dda0360c42d (tdf#114836, only set changed SfxItemSet properties) Change-Id: If33fa39019bbd36632d15eb3cc0606727e58b111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98241 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 23953def50d7..b2e19781c8ef 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -2407,7 +2408,7 @@ uno::Reference< drawing::XShape >
aValueMap.insert( { "TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_CENTER) } ); //drawing::TextVerticalAdjust
aValueMap.insert( { "TextAutoGrowHeight", uno::Any(true) } ); // sal_Bool
aValueMap.insert( { "TextAutoGrowWidth", uno::Any(true) } ); // sal_Bool
- aValueMap.insert({ "TextMaximumFrameWidth", uno::Any(nTextMaxWidth) }); // sal_Int32
+ aValueMap.insert( { "TextMaximumFrameWidth", uno::Any(nTextMaxWidth) } ); // sal_Int32
//set name/classified ObjectID (CID)
if( !aName.isEmpty() )
@@ -2506,6 +2507,8 @@ uno::Reference< drawing::XShape >
aM.rotate( -basegfx::deg2rad(nRotation) );//#i78696#->#i80521#
aM.translate( nXPos, nYPos );
xShapeProp->setPropertyValue( "Transformation", uno::Any( B2DHomMatrixToHomogenMatrix3(aM) ) );
+
+ xShapeProp->setPropertyValue( "ParaAdjust", uno::Any( style::ParagraphAdjust_CENTER ) );
}
catch( const uno::Exception& )
{