summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-08-30 15:06:34 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-08-30 18:49:45 +0200
commit416a543824caa01a07ab96f1764769d4f234f213 (patch)
treee3d56366e24ffc765e015ff22082fd4ac22b991e /sd
parent81fac013cb365d711ad78a566ee1b5b13480b013 (diff)
Remove redundant asserts after new
Also remove SlideSorter::CreateController which only calls new; fix a memory leak in osl_Security's MyTestPlugInImpl::initialize Change-Id: I70b6e888984f8543adbf879162e752556d2b3f0e Reviewed-on: https://gerrit.libreoffice.org/59805 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/SlideSorter.hxx6
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorter.cxx14
2 files changed, 1 insertions, 19 deletions
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index 9ae38c845a14..8b83e8cf9f3c 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -198,12 +198,6 @@ private:
*/
model::SlideSorterModel* CreateModel();
- /** Create the controller for the view shell. When called from the default
- implementation of CreateModelViewController() then both the view and
- the controller do exist. Test their pointers when in doubt.
- */
- controller::SlideSorterController* CreateController();
-
bool mbIsValid;
std::unique_ptr<controller::SlideSorterController> mpSlideSorterController;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index bcc71fbb3667..56daffae9add 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -302,12 +302,7 @@ void SlideSorter::CreateModelViewController()
"Can not create model for slide browser");
mpSlideSorterView.reset(new view::SlideSorterView (*this));
- DBG_ASSERT (mpSlideSorterView.get()!=nullptr,
- "Can not create view for slide browser");
-
- mpSlideSorterController.reset(CreateController());
- DBG_ASSERT (mpSlideSorterController.get()!=nullptr,
- "Can not create controller for slide browser");
+ mpSlideSorterController.reset(new controller::SlideSorterController(*this));
// Now that model, view, and controller are constructed, do the
// initialization that relies on all three being in place.
@@ -329,13 +324,6 @@ model::SlideSorterModel* SlideSorter::CreateModel()
return nullptr;
}
-controller::SlideSorterController* SlideSorter::CreateController()
-{
- controller::SlideSorterController* pController
- = new controller::SlideSorterController (*this);
- return pController;
-}
-
void SlideSorter::ArrangeGUIElements (
const Point& rOffset,
const Size& rSize)