summaryrefslogtreecommitdiff
path: root/sd/source/ui/framework/factories/BasicViewFactory.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 12:04:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 13:58:46 +0100
commitd712ebc20dbe91875324ca424c3a06cdb4f83716 (patch)
treec70f7038976bd9a033a7d09295155a8f73333b58 /sd/source/ui/framework/factories/BasicViewFactory.cxx
parenta5e2555632a2105274d130ad115573be36f863b8 (diff)
loplugin:makeshared in sd
Change-Id: I82ddb851759665f40e23f284cf6eed2b88722c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87329 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/framework/factories/BasicViewFactory.cxx')
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 71e13694741f..c4260ce8fc6b 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -88,7 +88,7 @@ BasicViewFactory::BasicViewFactory ()
mpBase(nullptr),
mpFrameView(nullptr),
mpWindow(VclPtr<WorkWindow>::Create(nullptr,WB_STDWORK)),
- mpViewCache(new ViewCache()),
+ mpViewCache(std::make_shared<ViewCache>()),
mxLocalPane(new Pane(Reference<XResourceId>(), mpWindow.get()))
{
}
@@ -321,60 +321,60 @@ std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
const OUString& rsViewURL (rxViewId->getResourceURL());
if (rsViewURL == FrameworkHelper::msImpressViewURL)
{
- pViewShell.reset(
- new DrawViewShell(
+ pViewShell =
+ std::make_shared<DrawViewShell>(
*mpBase,
&rWindow,
PageKind::Standard,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("impress_win");
}
else if (rsViewURL == FrameworkHelper::msDrawViewURL)
{
- pViewShell.reset(
- new GraphicViewShell (
+ pViewShell =
+ std::make_shared<GraphicViewShell>(
*mpBase,
&rWindow,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("draw_win");
}
else if (rsViewURL == FrameworkHelper::msOutlineViewURL)
{
- pViewShell.reset(
- new OutlineViewShell (
+ pViewShell =
+ std::make_shared<OutlineViewShell>(
&rFrame,
*mpBase,
&rWindow,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("outline_win");
}
else if (rsViewURL == FrameworkHelper::msNotesViewURL)
{
- pViewShell.reset(
- new DrawViewShell(
+ pViewShell =
+ std::make_shared<DrawViewShell>(
*mpBase,
&rWindow,
PageKind::Notes,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("notes_win");
}
else if (rsViewURL == FrameworkHelper::msHandoutViewURL)
{
- pViewShell.reset(
- new DrawViewShell(
+ pViewShell =
+ std::make_shared<DrawViewShell>(
*mpBase,
&rWindow,
PageKind::Handout,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("handout_win");
}
else if (rsViewURL == FrameworkHelper::msPresentationViewURL)
{
- pViewShell.reset(
- new PresentationViewShell(
+ pViewShell =
+ std::make_shared<PresentationViewShell>(
*mpBase,
&rWindow,
- pFrameView));
+ pFrameView);
pViewShell->GetContentWindow()->set_id("presentation_win");
}
else if (rsViewURL == FrameworkHelper::msSlideSorterURL)