summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/shapecontext.cxx19
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx1
2 files changed, 17 insertions, 3 deletions
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index 7d6971f294b8..7966482fe756 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -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;
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 722317999e53..cc93d5b4aa05 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -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")