oox: initial smartart text is imported into Writer
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "oox/vml/vmldrawingfragment.hxx"
|
||||
#include "oox/vml/vmlshape.hxx"
|
||||
#include "oox/vml/vmlshapecontainer.hxx"
|
||||
#include "oox/drawingml/diagram/diagram.hxx"
|
||||
|
||||
namespace oox { namespace shape {
|
||||
|
||||
@@ -119,6 +120,19 @@ ShapeContextHandler::getDrawingShapeContext()
|
||||
return mxDrawingFragmentHandler;
|
||||
}
|
||||
|
||||
uno::Reference<xml::sax::XFastContextHandler>
|
||||
ShapeContextHandler::getDiagramShapeContext()
|
||||
{
|
||||
if (!mxDiagramShapeContext.is())
|
||||
{
|
||||
FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
|
||||
mpShape.reset(new Shape());
|
||||
mxDiagramShapeContext.set(new DiagramGraphicDataContext(*rFragmentHandler, mpShape));
|
||||
}
|
||||
|
||||
return mxDiagramShapeContext;
|
||||
}
|
||||
|
||||
uno::Reference<xml::sax::XFastContextHandler>
|
||||
ShapeContextHandler::getContextHandler()
|
||||
{
|
||||
@@ -130,6 +144,9 @@ ShapeContextHandler::getContextHandler()
|
||||
case NMSP_vml:
|
||||
xResult.set(getDrawingShapeContext());
|
||||
break;
|
||||
case NMSP_dmlDiagram:
|
||||
xResult.set(getDiagramShapeContext());
|
||||
break;
|
||||
default:
|
||||
xResult.set(getGraphicShapeContext(mnStartToken));
|
||||
break;
|
||||
@@ -154,6 +171,9 @@ void SAL_CALL ShapeContextHandler::startFastElement
|
||||
|
||||
mpThemePtr.reset(new Theme());
|
||||
|
||||
if (Element == DGM_TOKEN(relIds))
|
||||
createFastChildContext(Element, Attribs);
|
||||
|
||||
uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
|
||||
|
||||
if (xContextHandler.is())
|
||||
@@ -247,6 +267,12 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException)
|
||||
if( const ::oox::vml::ShapeBase* pShape = mpDrawing->getShapes().takeLastShape() )
|
||||
xResult = pShape->convertAndInsert( xShapes );
|
||||
}
|
||||
else if (getContextHandler() == getDiagramShapeContext())
|
||||
{
|
||||
basegfx::B2DHomMatrix aMatrix;
|
||||
mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, aMatrix );
|
||||
xResult = mpShape->getXShape();
|
||||
}
|
||||
else if (mpShape.get() != NULL)
|
||||
{
|
||||
basegfx::B2DHomMatrix aTransformation;
|
||||
|
@@ -159,6 +159,7 @@ private:
|
||||
GraphicShapeContextPtr;
|
||||
css::uno::Reference<XFastContextHandler> mxDrawingFragmentHandler;
|
||||
css::uno::Reference<XFastContextHandler> mxGraphicShapeContext;
|
||||
css::uno::Reference<XFastContextHandler> mxDiagramShapeContext;
|
||||
|
||||
core::XmlFilterRef mxFilterBase;
|
||||
drawingml::ThemePtr mpThemePtr;
|
||||
@@ -168,6 +169,7 @@ private:
|
||||
|
||||
css::uno::Reference<XFastContextHandler> getGraphicShapeContext(::sal_Int32 Element);
|
||||
css::uno::Reference<XFastContextHandler> getDrawingShapeContext();
|
||||
css::uno::Reference<XFastContextHandler> getDiagramShapeContext();
|
||||
css::uno::Reference<XFastContextHandler> getContextHandler();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user