summaryrefslogtreecommitdiff
path: root/oox/source/vml
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-05-21 16:46:32 +0200
committerDaniel Rentz <dr@openoffice.org>2010-05-21 16:46:32 +0200
commitf7961a7f856f7ff6d1db953756afaa1bad413943 (patch)
tree9ae91660cb08c7dd223d11b0a62a956dccafd3e1 /oox/source/vml
parent9ab3e6e31798adb32145948f64c4c41363be6ec8 (diff)
dr76: #i103453# import visual area for embedded documents
Diffstat (limited to 'oox/source/vml')
-rw-r--r--oox/source/vml/vmldrawing.cxx5
-rw-r--r--oox/source/vml/vmldrawingfragment.cxx1
-rw-r--r--oox/source/vml/vmlshape.cxx25
-rw-r--r--oox/source/vml/vmlshapecontainer.cxx2
4 files changed, 23 insertions, 10 deletions
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 9c1bb761532a..21e313288dfa 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -39,6 +39,7 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::awt::Rectangle;
using ::com::sun::star::awt::XControlModel;
using ::com::sun::star::drawing::XDrawPage;
+using ::com::sun::star::drawing::XShape;
using ::com::sun::star::drawing::XShapes;
using ::oox::core::XmlFilterBase;
@@ -158,6 +159,10 @@ void Drawing::convertControlClientData( const Reference< XControlModel >& /*rxCt
{
}
+void Drawing::notifyShapeInserted( const Reference< XShape >& /*rxShape*/, const Rectangle& /*rShapeRect*/ )
+{
+}
+
::oox::ole::AxControlHelper* Drawing::createControlHelper() const
{
return new ::oox::ole::AxEmbeddedControlHelper( mrFilter, mxDrawPage );
diff --git a/oox/source/vml/vmldrawingfragment.cxx b/oox/source/vml/vmldrawingfragment.cxx
index aae5b5c40556..333df72bbaf7 100644
--- a/oox/source/vml/vmldrawingfragment.cxx
+++ b/oox/source/vml/vmldrawingfragment.cxx
@@ -50,6 +50,7 @@ DrawingFragment::DrawingFragment( XmlFilterBase& rFilter, const OUString& rFragm
Reference< XInputStream > DrawingFragment::openFragmentStream() const
{
+ // #i104719# create an input stream that preprocesses the VML data
return new InputStream( FragmentHandler2::openFragmentStream() );
}
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 014f1edf4c45..6a9bd1cbc94b 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -165,7 +165,7 @@ void ShapeTypeModel::assignUsed( const ShapeTypeModel& rSource )
// ----------------------------------------------------------------------------
-ShapeType::ShapeType( const Drawing& rDrawing ) :
+ShapeType::ShapeType( Drawing& rDrawing ) :
mrDrawing( rDrawing )
{
}
@@ -237,7 +237,7 @@ ShapeClientData& ShapeModel::createClientData()
// ----------------------------------------------------------------------------
-ShapeBase::ShapeBase( const Drawing& rDrawing ) :
+ShapeBase::ShapeBase( Drawing& rDrawing ) :
ShapeType( rDrawing )
{
}
@@ -270,7 +270,14 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
Rectangle aShapeRect = calcShapeRectangle( pParentAnchor );
// convert the shape, if the calculated rectangle is not empty
if( ((aShapeRect.Width > 0) || (aShapeRect.Height > 0)) && rxShapes.is() )
+ {
xShape = implConvertAndInsert( rxShapes, aShapeRect );
+ /* Notify the drawing that a new shape has been inserted (but not
+ for children of group shapes). For convenience, pass the
+ rectangle that contains position and size of the shape. */
+ if( !pParentAnchor && xShape.is() )
+ mrDrawing.notifyShapeInserted( xShape, aShapeRect );
+ }
}
return xShape;
}
@@ -316,7 +323,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
// ============================================================================
-SimpleShape::SimpleShape( const Drawing& rDrawing, const OUString& rService ) :
+SimpleShape::SimpleShape( Drawing& rDrawing, const OUString& rService ) :
ShapeBase( rDrawing ),
maService( rService )
{
@@ -331,21 +338,21 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
// ============================================================================
-RectangleShape::RectangleShape( const Drawing& rDrawing ) :
+RectangleShape::RectangleShape( Drawing& rDrawing ) :
SimpleShape( rDrawing, CREATE_OUSTRING( "com.sun.star.drawing.RectangleShape" ) )
{
}
// ============================================================================
-EllipseShape::EllipseShape( const Drawing& rDrawing ) :
+EllipseShape::EllipseShape( Drawing& rDrawing ) :
SimpleShape( rDrawing, CREATE_OUSTRING( "com.sun.star.drawing.EllipseShape" ) )
{
}
// ============================================================================
-PolyLineShape::PolyLineShape( const Drawing& rDrawing ) :
+PolyLineShape::PolyLineShape( Drawing& rDrawing ) :
SimpleShape( rDrawing, CREATE_OUSTRING( "com.sun.star.drawing.PolyLineShape" ) )
{
}
@@ -370,7 +377,7 @@ Reference< XShape > PolyLineShape::implConvertAndInsert( const Reference< XShape
// ============================================================================
-CustomShape::CustomShape( const Drawing& rDrawing ) :
+CustomShape::CustomShape( Drawing& rDrawing ) :
SimpleShape( rDrawing, CREATE_OUSTRING( "com.sun.star.drawing.CustomShape" ) )
{
}
@@ -395,7 +402,7 @@ Reference< XShape > CustomShape::implConvertAndInsert( const Reference< XShapes
// ============================================================================
-ComplexShape::ComplexShape( const Drawing& rDrawing ) :
+ComplexShape::ComplexShape( Drawing& rDrawing ) :
CustomShape( rDrawing )
{
}
@@ -485,7 +492,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
// ============================================================================
-GroupShape::GroupShape( const Drawing& rDrawing ) :
+GroupShape::GroupShape( Drawing& rDrawing ) :
ShapeBase( rDrawing ),
mxChildren( new ShapeContainer( rDrawing ) )
{
diff --git a/oox/source/vml/vmlshapecontainer.cxx b/oox/source/vml/vmlshapecontainer.cxx
index 6b1711f3c0f9..1968cd567acd 100644
--- a/oox/source/vml/vmlshapecontainer.cxx
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -61,7 +61,7 @@ void lclMapShapesById( RefMap< OUString, ShapeType >& orMap, const RefVector< Sh
// ============================================================================
-ShapeContainer::ShapeContainer( const Drawing& rDrawing ) :
+ShapeContainer::ShapeContainer( Drawing& rDrawing ) :
mrDrawing( rDrawing )
{
}