summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/e3dsceneupdater.hxx3
-rw-r--r--svx/source/engine3d/e3dsceneupdater.cxx7
2 files changed, 4 insertions, 6 deletions
diff --git a/include/svx/e3dsceneupdater.hxx b/include/svx/e3dsceneupdater.hxx
index ce51518ee689..ad01d667b4f5 100644
--- a/include/svx/e3dsceneupdater.hxx
+++ b/include/svx/e3dsceneupdater.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SVX_E3DSCENEUPDATER_HXX
#include <svx/svxdllapi.h>
+#include <memory>
class SdrObject;
class E3dScene;
@@ -53,7 +54,7 @@ class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater
// the 3d transformation stack at the time of construction, valid when
// mpScene is not zero
- drawinglayer::geometry::ViewInformation3D* mpViewInformation3D;
+ std::unique_ptr<drawinglayer::geometry::ViewInformation3D> mpViewInformation3D;
public:
// the constructor evaluates and sets the members at construction time
diff --git a/svx/source/engine3d/e3dsceneupdater.cxx b/svx/source/engine3d/e3dsceneupdater.cxx
index a77e7badd5a6..bc696daebafb 100644
--- a/svx/source/engine3d/e3dsceneupdater.cxx
+++ b/svx/source/engine3d/e3dsceneupdater.cxx
@@ -51,7 +51,7 @@ E3DModifySceneSnapRectUpdater::E3DModifySceneSnapRectUpdater(const SdrObject* pO
else
{
// secure current 3D transformation stack
- mpViewInformation3D = new drawinglayer::geometry::ViewInformation3D(rVCScene.getViewInformation3D(aAllContentRange));
+ mpViewInformation3D.reset( new drawinglayer::geometry::ViewInformation3D(rVCScene.getViewInformation3D(aAllContentRange)) );
}
}
}
@@ -83,8 +83,7 @@ E3DModifySceneSnapRectUpdater::~E3DModifySceneSnapRectUpdater()
mpViewInformation3D->getDeviceToView(),
mpViewInformation3D->getViewTime(),
mpViewInformation3D->getExtendedInformationSequence());
- delete mpViewInformation3D;
- mpViewInformation3D = pNew;
+ mpViewInformation3D.reset(pNew);
}
// transform content range to scene-relative coordinates using old 3d transformation stack
@@ -111,8 +110,6 @@ E3DModifySceneSnapRectUpdater::~E3DModifySceneSnapRectUpdater()
}
}
}
-
- delete mpViewInformation3D;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */