Kaydet (Commit) a3604b24 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

use AbstractShapeFactory in more places

Change-Id: I1c34f6e56579c4a43e4ba28a81799c3f67d679cb
üst dde6b804
......@@ -170,11 +170,10 @@ void VDiagram::createShapes_2d()
//add back wall
{
m_xWall2D = uno::Reference< drawing::XShape >(
m_xShapeFactory->createInstance(
"com.sun.star.drawing.RectangleShape" ), uno::UNO_QUERY );
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
m_xWall2D = pShapeFactory->createRectangle(
xGroupForWall );
xGroupForWall->add(m_xWall2D);
uno::Reference< beans::XPropertySet > xProp( m_xWall2D, uno::UNO_QUERY );
if( xProp.is())
{
......@@ -477,10 +476,7 @@ void VDiagram::createShapes_3d()
//create shape
m_xOuterGroupShape = uno::Reference< drawing::XShape >(
m_xShapeFactory->createInstance(
"com.sun.star.drawing.Shape3DSceneObject" ), uno::UNO_QUERY );
AbstractShapeFactory::setShapeName( m_xOuterGroupShape, "PlotAreaExcludingAxes" );
m_xTarget->add(m_xOuterGroupShape);
m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" ), uno::UNO_QUERY);
uno::Reference< drawing::XShapes > xOuterGroup_Shapes =
uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY );
......
......@@ -204,6 +204,11 @@ public:
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues ) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
createRectangle(
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShapes >& xTarget ) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
getOrCreateChartRootShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage>& xPage ) = 0;
......
......@@ -160,6 +160,11 @@ public:
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
createRectangle(
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShapes >& xTarget );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
getOrCreateChartRootShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage>& xPage );
......
......@@ -175,6 +175,10 @@ public:
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
createRectangle(
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShapes >& xTarget );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
getOrCreateChartRootShape( const ::com::sun::star::uno::Reference<
......
......@@ -30,15 +30,10 @@ uno::Reference< drawing::XShapes > DataPointSymbolSupplier::create2DSymbolList(
, const uno::Reference< drawing::XShapes >& xTarget
, const drawing::Direction3D& rSize )
{
uno::Reference< drawing::XShape > xGroup(
xShapeFactory->createInstance(
"com.sun.star.drawing.GroupShape" ), uno::UNO_QUERY );
if(xTarget.is())
xTarget->add(xGroup);
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory);
uno::Reference< drawing::XShapes > xGroupShapes =
uno::Reference<drawing::XShapes>( xGroup, uno::UNO_QUERY );
pShapeFactory->createGroup2D( xTarget );
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory);
drawing::Position3D aPos(0,0,0);
for(sal_Int32 nS=0;nS<AbstractShapeFactory::getSymbolCount();nS++)
{
......
......@@ -251,6 +251,14 @@ uno::Reference< drawing::XShape > DummyShapeFactory::createRectangle(
return new DummyXShape();
}
uno::Reference< drawing::XShape >
DummyShapeFactory::createRectangle(
const uno::Reference<
drawing::XShapes >& )
{
return new DummyXShape();
}
uno::Reference< drawing::XShape >
DummyShapeFactory::createText( const uno::Reference< drawing::XShapes >&
, const OUString&
......
......@@ -2060,6 +2060,18 @@ uno::Reference< drawing::XShape > ShapeFactory::createRectangle(
return xShape;
}
uno::Reference< drawing::XShape >
ShapeFactory::createRectangle(
const uno::Reference<
drawing::XShapes >& xTarget )
{
uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance(
"com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY );
xTarget->add( xShape );
return xShape;
}
uno::Reference< drawing::XShape >
ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget
, const OUString& rText
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment