Kaydet (Commit) 59373b75 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Related bnc#819614: The diagram is a group.

It is not really desired to import diagrams broken into individual objects;
makes trouble with the hieararchy, and also the user wants to see it as a
group - can be ungrouped for modifications easily.

Change-Id: I0533a69af9e377804bf0e06b2ce873fd0c9bde02
üst fc54915c
......@@ -101,7 +101,6 @@ public:
void setChildPosition( com::sun::star::awt::Point nPosition ){ maChPosition = nPosition; }
void setChildSize( com::sun::star::awt::Size aSize ){ maChSize = aSize; }
void moveAllToPosition( const com::sun::star::awt::Point &rPoint );
void setPosition( com::sun::star::awt::Point nPosition ){ maPosition = nPosition; }
const com::sun::star::awt::Point& getPosition() const { return maPosition; }
......
......@@ -665,13 +665,6 @@ TextBodyPtr Shape::getTextBody()
return mpTextBody;
}
void Shape::moveAllToPosition( const awt::Point &rPoint )
{
setPosition( awt::Point( rPoint.X + maPosition.X, rPoint.Y + maPosition.Y ) );
for( ::std::vector<ShapePtr>::const_iterator aIt = maChildren.begin(), aEnd = maChildren.end();aIt != aEnd; ++aIt )
(*aIt)->moveAllToPosition( rPoint );
}
void Shape::setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle )
{
SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "set master text list style to shape id: " << msId);
......
......@@ -48,7 +48,7 @@ ExtDrawingFragmentHandler::onCreateContext( ::sal_Int32 aElement,
case DSP_TOKEN( spTree ):
mpShapePtr = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
return new PPTShapeGroupContext(
*this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
*this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr,
mpShapePtr );
default:
break;
......@@ -60,7 +60,7 @@ void SAL_CALL ExtDrawingFragmentHandler::endDocument() throw (::com::sun::star::
{
if( mpShapePtr )
{
mpShapePtr->moveAllToPosition( mpOrgShapePtr->getPosition() );
mpShapePtr->setPosition( mpOrgShapePtr->getPosition() );
mpShapePtr->setName( mpOrgShapePtr->getName() );
}
}
......
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