summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/unopage.hxx3
-rw-r--r--svx/source/unodraw/unopage.cxx6
-rw-r--r--sw/inc/unodraw.hxx2
3 files changed, 4 insertions, 7 deletions
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index eefc11c61b2b..1ca099d797eb 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -40,6 +40,7 @@
#include <comphelper/servicehelper.hxx>
#include <svx/unoprov.hxx>
+#include <memory>
class SdrPage;
class SdrModel;
@@ -70,7 +71,7 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
SdrPage* mpPage; // TTTT should be reference
SdrModel* mpModel; // TTTT probably not needed -> use from SdrPage
- SdrView* mpView;
+ std::unique_ptr<SdrView> mpView;
void SelectObjectsInView( const css::uno::Reference< css::drawing::XShapes >& aShapes, SdrPageView* pPageView ) throw ();
void SelectObjectInView( const css::uno::Reference< css::drawing::XShape >& xShape, SdrPageView* pPageView ) throw();
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 8f252456b107..15a3b01c5635 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -94,11 +94,7 @@ void SvxDrawPage::disposing() throw()
mpModel = nullptr;
}
- if( mpView )
- {
- delete mpView;
- mpView = nullptr;
- }
+ mpView.reset();
mpPage = nullptr;
}
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index aea0b64ce67c..3612db0b7755 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -47,7 +47,7 @@ public:
const SdrMarkList& PreGroup(const css::uno::Reference< css::drawing::XShapes >& rShapes);
void PreUnGroup(const css::uno::Reference< css::drawing::XShapeGroup >& rShapeGroup);
- SdrView* GetDrawView() {return mpView;}
+ SdrView* GetDrawView() {return mpView.get();}
SdrPageView* GetPageView();
void RemovePageView();
static css::uno::Reference< css::uno::XInterface > GetInterface( SdrObject* pObj );