From 86c4672f4600daf19238ef25377406f445d9453a Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Mar 2018 11:32:00 +0100 Subject: OperationSmiley: Secured quite some places using CustomShape Changed quite some places of SdrObjCustomShape usage to use references instead of pointers, thus forcing to more secure handling. Changed some test and change methods, even found a memory leak by doing so. Change-Id: Iba76037a3c54af50bb05e6bd63d7ad04624665a7 --- include/oox/export/drawingml.hxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/oox/export') diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index aa99c95c82e3..597874778bde 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -235,9 +235,15 @@ public: void WritePresetShape( const char* pShape , std::vector< std::pair> & rAvList ); void WritePresetShape( const char* pShape ); void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const css::beans::PropertyValue& rProp ); - bool WriteCustomGeometry( const css::uno::Reference& rXShape, const SdrObjCustomShape* pShape ); - void WriteCustomGeometryPoint(const css::drawing::EnhancedCustomShapeParameterPair& rParamPair, const SdrObjCustomShape* pShape); - static sal_Int32 GetCustomGeometryPointValue(const css::drawing::EnhancedCustomShapeParameter& rParam, const SdrObjCustomShape* pShape); + bool WriteCustomGeometry( + const css::uno::Reference& rXShape, + const SdrObjCustomShape& rSdrObjCustomShape); + void WriteCustomGeometryPoint( + const css::drawing::EnhancedCustomShapeParameterPair& rParamPair, + const SdrObjCustomShape& rSdrObjCustomShape); + static sal_Int32 GetCustomGeometryPointValue( + const css::drawing::EnhancedCustomShapeParameter& rParam, + const SdrObjCustomShape& rSdrObjCustomShape); void WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon ); void WriteFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); -- cgit