summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorsj <sj@openoffice.org>2010-06-05 06:23:50 +0200
committersj <sj@openoffice.org>2010-06-05 06:23:50 +0200
commit245dec812502aba5e2b29a9e1e16cb618f2e6cff (patch)
treef03c3987bd3223e89308e38e8be572144d94d83b /oox
parent7463d92b208ad23a175aba3a361fd4d4798e7bed (diff)
fixed merge problems
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/customshapegeometry.hxx4
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx1
-rw-r--r--oox/inc/oox/drawingml/shape.hxx2
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx5
-rw-r--r--oox/source/drawingml/shape.cxx31
-rw-r--r--oox/source/drawingml/shapepropertiescontext.cxx2
6 files changed, 9 insertions, 36 deletions
diff --git a/oox/inc/oox/drawingml/customshapegeometry.hxx b/oox/inc/oox/drawingml/customshapegeometry.hxx
index 75a788acb609..4fec38cf09eb 100644
--- a/oox/inc/oox/drawingml/customshapegeometry.hxx
+++ b/oox/inc/oox/drawingml/customshapegeometry.hxx
@@ -41,11 +41,11 @@ namespace oox { namespace drawingml {
class CustomShapeGeometryContext : public ::oox::core::ContextHandler
{
public:
- CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, Shape& rShape );
+ CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
private:
- Shape& mrShape;
+ CustomShapeProperties& mrCustomShapeProperties;
};
// ---------------------------------------------------------------------
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index 2994c6d76e2b..171437095f03 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -30,6 +30,7 @@
#include "oox/helper/propertymap.hxx"
#include "oox/drawingml/color.hxx"
+#include "oox/core/xmlfilterbase.hxx"
#include <com/sun/star/graphic/XGraphic.hpp>
#include <boost/shared_ptr.hpp>
#include "oox/helper/helper.hxx"
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index c951369dbf78..c052e084e506 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -30,7 +30,7 @@
#include "oox/helper/propertymap.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
-//#include "oox/drawingml/customshapeproperties.hxx"
+#include "oox/drawingml/customshapeproperties.hxx"
#include "oox/drawingml/textliststyle.hxx"
#include <com/sun/star/frame/XModel.hpp>
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 3172c2c29770..62e42701b273 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
using rtl::OUString;
+using namespace ::oox::core;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -88,8 +89,8 @@ void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCus
// not sure if this needs to be implemented
}
-void CustomShapeProperties::pushToPropSet(
- const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
+void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */,
+ const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
{
if ( maShapePresetType.getLength() )
{
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 1a32d6a206a0..ee10393165ec 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -299,35 +299,6 @@ Reference< XShape > Shape::createAndInsert(
aTransformation.translate( aPosition.X / 360.0, aPosition.Y / 360.0 );
}
- if ( mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getPolygon().count() )
- {
- ::basegfx::B2DPolyPolygon& rPolyPoly = mpCustomShapePropertiesPtr->getPolygon();
-
- if( rPolyPoly.count() > 0 ) {
- if( rPolyPoly.areControlPointsUsed() ) {
- // TODO Beziers
- } else {
- uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( rPolyPoly.count() );
-
- for (sal_uInt32 j = 0; j < rPolyPoly.count(); j++ ) {
- ::basegfx::B2DPolygon aPoly = rPolyPoly.getB2DPolygon( j );
-
- // now creating the corresponding PolyPolygon
- sal_Int32 i, nNumPoints = aPoly.count();
- uno::Sequence< awt::Point > aPointSequence( nNumPoints );
- awt::Point* pPoints = aPointSequence.getArray();
- for( i = 0; i < nNumPoints; ++i )
- {
- const ::basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) );
- pPoints[ i ] = awt::Point( static_cast< sal_Int32 >( aPoint.getX() ), static_cast< sal_Int32 >( aPoint.getY() ) );
- }
- aPolyPolySequence.getArray()[ j ] = aPointSequence;
- }
- maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
- }
- }
- }
-
// special for lineshape
if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) )
{
@@ -491,7 +462,7 @@ Reference< XShape > Shape::createAndInsert(
aPropSet.setProperties( aShapeProperties );
if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) )
- mpCustomShapePropertiesPtr->pushToPropSet( xSet, mxShape );
+ mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape );
// in some cases, we don't have any text body.
if( getTextBody() )
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx
index 7724ba9b44b2..dd1814ac23cf 100644
--- a/oox/source/drawingml/shapepropertiescontext.cxx
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -74,7 +74,7 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext(
// GeometryGroup
case NMSP_DRAWINGML|XML_custGeom: // custom geometry "CT_CustomGeometry2D"
- xRet.set( new CustomShapeGeometryContext( *this, xAttribs, mrShape ) );
+ xRet.set( new CustomShapeGeometryContext( *this, xAttribs, *(mrShape.getCustomShapeProperties()) ) );
break;