[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - oox/source sd/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 20 08:14:10 UTC 2018
oox/source/drawingml/shape.cxx | 7 ++++++-
sd/qa/unit/export-tests-ooxml2.cxx | 8 ++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
New commits:
commit 409fd186af22bd9c1819cc0f05bfca3bdf427a42
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Aug 1 15:58:20 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Aug 20 10:13:48 2018 +0200
tdf#116350 Export preset text geometry (text effects)
Change-Id: Ifb921b56387ca183b5a57126f6e88e2f9a4ecb3d
Reviewed-on: https://gerrit.libreoffice.org/58430
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/58839
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2a28ea06d0ec..f13fa4a2f56f 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -436,6 +436,7 @@ static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust )
static inline void lcl_createPresetShape( uno::Reference<drawing::XShape>& xShape,
const OUString& rClass,
+ const OUString& rPresetType,
const CustomShapePropertiesPtr pCustomShapePropertiesPtr,
const TextBodyPtr pTextBody,
const GraphicHelper& rGraphicHelper )
@@ -540,6 +541,7 @@ static inline void lcl_createPresetShape( uno::Reference<drawing::XShape>& xShap
const OUString sPath( "Path" );
const OUString sTextPath( "TextPath" );
const OUString sAdjustmentValues( "AdjustmentValues" );
+ const OUString sPresetTextWarp( "PresetTextWarp" );
lcl_resetPropertyValue( aGeomPropVec, sCoordinateSize );
lcl_resetPropertyValue( aGeomPropVec, sEquations );
@@ -556,6 +558,9 @@ static inline void lcl_createPresetShape( uno::Reference<drawing::XShape>& xShap
lcl_setPropertyValue( aGeomPropVec, sTextPath,
comphelper::makePropertyValue( sTextPath, aPropertyValues ) );
+ lcl_setPropertyValue( aGeomPropVec, sPresetTextWarp,
+ comphelper::makePropertyValue( sPresetTextWarp, rPresetType ) );
+
if ( rClass == "fontwork-arch-up-curve" || rClass == "fontwork-circle-curve"
|| rClass == "fontwork-arch-down-curve" || rClass == "fontwork-open-circle-curve" )
lcl_setPropertyValue( aGeomPropVec, sAdjustmentValues,
@@ -1309,7 +1314,7 @@ Reference< XShape > const & Shape::createAndInsert(
const OUString sPresetType = mpTextBody->getTextProperties().msPrst;
sClass = PresetGeometryTypeNames::GetFontworkType( sPresetType );
- lcl_createPresetShape( mxShape, sClass, mpCustomShapePropertiesPtr, mpTextBody, rGraphicHelper );
+ lcl_createPresetShape( mxShape, sClass, sPresetType, mpCustomShapePropertiesPtr, mpTextBody, rGraphicHelper );
}
}
}
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 0607da45b22d..c72ebc2f3158 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1736,6 +1736,14 @@ void SdOOXMLExportTest2::testTdf116350TextEffects()
fAdjust = getAdjustmentValue( xShape1 );
CPPUNIT_ASSERT_EQUAL( 213.25, fAdjust );
+ // Export
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile );
+
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocContent, "//p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp", "prst", "textArchUp");
+ assertXPath(pXmlDocContent, "//p:sp[14]/p:txBody/a:bodyPr/a:prstTxWarp", "prst", "textCircle");
+
xDocShRef->DoClose();
}
More information about the Libreoffice-commits
mailing list