summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-03-15 11:32:00 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-03-17 23:15:49 +0100
commit735d9e5828157a09e0b04b2dc5797a78208b57a2 (patch)
tree2a472d1f6f2820748afea15bc734cf6e4e182bb7
parent86c4672f4600daf19238ef25377406f445d9453a (diff)
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. Added some incudes/predefines for linux builds. Change-Id: Iba76037a3c54af50bb05e6bd63d7ad04624665a7
-rw-r--r--include/svx/EnhancedCustomShape2d.hxx1
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.hxx1
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.hxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeHandle.cxx1
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx2
5 files changed, 6 insertions, 1 deletions
diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx
index 8eb5021b3bad..5f8567a19c38 100644
--- a/include/svx/EnhancedCustomShape2d.hxx
+++ b/include/svx/EnhancedCustomShape2d.hxx
@@ -42,6 +42,7 @@
class Color;
class SdrObject;
class SdrPathObj;
+class SdrObjCustomShape;
enum class HandleFlags
{
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx
index 1c8290846b12..ba7c8dd3a9cd 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -28,6 +28,7 @@
#include <tools/gen.hxx>
class SdrObject;
+class SdrObjCustomShape;
class EnhancedCustomShape3d final
{
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
index 9fd954cd7034..335701be4125 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
@@ -23,6 +23,8 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
class SdrObject;
+class SdrObjCustomShape;
+
class EnhancedCustomShapeFontWork
{
static css::uno::Reference < css::i18n::XBreakIterator > mxBreakIterator;
diff --git a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
index d4975c41f4db..ee7143459b9c 100644
--- a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
@@ -20,6 +20,7 @@
#include "EnhancedCustomShapeHandle.hxx"
#include <svx/EnhancedCustomShape2d.hxx>
#include <svx/unoapi.hxx>
+#include <svx/svdoashp.hxx>
EnhancedCustomShapeHandle::EnhancedCustomShapeHandle( css::uno::Reference< css::drawing::XShape > const & xCustomShape, sal_uInt32 nIndex ) :
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index c3033bf71337..3c7598115363 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -26,7 +26,7 @@
#include <basegfx/polygon/b2dpolygonclipper.hxx>
#include <sdr/primitive2d/sdrpathprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
+#include <basegfx/polygon/b2dpolygontools.hxx>
namespace sdr
{