summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-28 09:11:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-28 09:12:27 +0200
commit09cb92096919e5a7bf4cf5fe66689e312ebc7f9c (patch)
tree91af4abe382007a45f6e18c88eba11fc0fe5795f /sd
parentloplugin:expandablemethods in sd (diff)
downloadcore-09cb92096919e5a7bf4cf5fe66689e312ebc7f9c.tar.gz
core-09cb92096919e5a7bf4cf5fe66689e312ebc7f9c.zip
convert std::unique_ptr<VclAbstractDialog> to VclPtr
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/dialogs-test.cxx2
-rw-r--r--sd/source/ui/docshell/docshel3.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx10
-rw-r--r--sd/source/ui/view/drviews2.cxx13
-rw-r--r--sd/source/ui/view/drviews3.cxx5
-rw-r--r--sd/source/ui/view/outlnvs2.cxx11
6 files changed, 19 insertions, 24 deletions
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 679c999f001b..4acc570ca599 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -623,7 +623,7 @@ void SdDialogsTest::openAnyDialog()
// example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
// example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
// example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID(5));
+ ScopedVclPtr<VclAbstractDialog> pDlg(createDialogByID(5));
if (pDlg)
{
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 5aa32ba9f24e..35f8a38ebe0d 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -283,7 +283,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if (pFact && mpViewShell)
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 26336fb033a9..a42d222b1417 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -259,14 +259,12 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- mrSlideSorter.GetContentWindow(),
- pDocument) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ mrSlideSorter.GetContentWindow(),
+ pDocument));
pDlg->Execute();
- pDlg.reset();
}
rRequest.Done ();
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 2d08d7320208..66a94d53a195 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2365,7 +2365,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
if( pDlg )
{
pDlg->Execute();
@@ -2879,14 +2879,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- GetActiveWindow(),
- GetDoc()) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ GetActiveWindow(),
+ GetDoc()));
+
pDlg->Execute();
- pDlg.reset();
}
Cancel();
rReq.Ignore ();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 7f71b4747865..54b649a1ab30 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -315,11 +315,10 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
pPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage());
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : nullptr);
- if( pDlg )
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ));
pDlg->Execute();
- pDlg.reset();
Invalidate();
}
rReq.Done ();
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index c8135930073f..ea7dcb951a4e 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -311,14 +311,13 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- GetActiveWindow(),
- GetDoc()) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ GetActiveWindow(),
+ GetDoc()));
+
pDlg->Execute();
- pDlg.reset();
}
Cancel();
rReq.Ignore ();