drawingml import: handle wps:bodyPr inside a groupshape
Change-Id: I1f059ae653ab13a7c867f77b2b1b4265e9e71b4e
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "oox/drawingml/drawingmltypes.hxx"
|
||||
#include "oox/drawingml/customshapegeometry.hxx"
|
||||
#include "oox/drawingml/textbodycontext.hxx"
|
||||
#include "oox/drawingml/textbodypropertiescontext.hxx"
|
||||
#include "hyperlinkcontext.hxx"
|
||||
|
||||
using namespace oox::core;
|
||||
@@ -95,15 +96,27 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
|
||||
case XML_txBody:
|
||||
case XML_txbxContent:
|
||||
{
|
||||
TextBodyPtr xTextBody( new TextBody );
|
||||
mpShapePtr->setTextBody( xTextBody );
|
||||
return new TextBodyContext( *this, *xTextBody );
|
||||
if (!mpShapePtr->getTextBody())
|
||||
mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
|
||||
return new TextBodyContext( *this, *mpShapePtr->getTextBody() );
|
||||
}
|
||||
case XML_txXfrm:
|
||||
{
|
||||
mpShapePtr->getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot );
|
||||
break;
|
||||
}
|
||||
case XML_cNvSpPr:
|
||||
break;
|
||||
case XML_spLocks:
|
||||
break;
|
||||
case XML_bodyPr:
|
||||
if (!mpShapePtr->getTextBody())
|
||||
mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
|
||||
return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr->getTextBody()->getTextProperties() );
|
||||
break;
|
||||
default:
|
||||
SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
|
||||
break;
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@@ -1614,6 +1614,7 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
|
||||
uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "[Year]");
|
||||
CPPUNIT_ASSERT_EQUAL(48.f, getProperty<float>(getRun(xParagraph, 1), "CharHeight"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(getRun(xParagraph, 1), "CharColor"));
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust"));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
|
||||
|
Reference in New Issue
Block a user