[Libreoffice-commits] core.git: cui/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 28 09:13:19 UTC 2020
cui/source/dialogs/hltpbase.cxx | 2 +-
cui/source/factory/dlgfact.cxx | 32 ++++++++++++++++----------------
cui/source/factory/dlgfact.hxx | 18 +++++++++---------
3 files changed, 26 insertions(+), 26 deletions(-)
New commits:
commit a02d059d3ef03246c226fa9fc499920f7bd4ffc8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 28 08:47:25 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 28 11:12:46 2020 +0200
loplugin:makeshared in cui
Change-Id: I018df0fc3ee6e07d48d9f30544e7aa8492a6ade0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92997
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 6182adfd951f..b3c7b076f1ca 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -181,7 +181,7 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd()
weld::Dialog* pDialog = mpDialog->getDialog();
- mxMarkWnd = std::make_unique<SvxHlinkDlgMarkWnd>(pDialog, this);
+ mxMarkWnd = std::make_shared<SvxHlinkDlgMarkWnd>(pDialog, this);
// Size of dialog-window in screen pixels
Point aDlgPos(pDialog->get_position());
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index e7282b3c197a..b4d16c5a92d5 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1045,14 +1045,14 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi
// TabDialog outside the drawing layer
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<OfaAutoCorrDlg>(pParent, pAttrSet));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<OfaAutoCorrDlg>(pParent, pAttrSet));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialog(weld::Window* pParent,
const SfxItemSet* pAttrSet,
const Reference< frame::XFrame >& xViewFrame )
{
- std::unique_ptr<SvxConfigDialog> xDlg1(new SvxConfigDialog(pParent, pAttrSet));
+ auto xDlg1 = std::make_shared<SvxConfigDialog>(pParent, pAttrSet);
xDlg1->SetFrame(xViewFrame);
return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(xDlg1));
}
@@ -1062,7 +1062,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(wel
const SfxItemSet* pAttrSet,
SdrView* pView)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxTextTabDialog>(pParent, pAttrSet, pView));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxTextTabDialog>(pParent, pAttrSet, pView));
}
// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
@@ -1070,7 +1070,7 @@ VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog
const SdrView* pView,
SvxAnchorIds nAnchorTypes)
{
- return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_unique<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
+ return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_shared<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
}
VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(weld::Window* pParent,
@@ -1088,7 +1088,7 @@ VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialo
css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
const OUString &rWord, LanguageType nLanguage)
{
- return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_unique<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
+ return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_shared<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
}
VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Window* pParent,
@@ -1114,7 +1114,7 @@ VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog(
SfxBindings* pBindings,
svx::SpellDialogChildWindow* pSpellChildWindow)
{
- return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_unique<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings));
+ return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_shared<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings));
}
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog(weld::Widget* pParent,
@@ -1166,7 +1166,7 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateGalleryThemeProperti
ExchangeData* pData,
SfxItemSet* pItemSet)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<GalleryThemeProperties>(
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<GalleryThemeProperties>(
pParent, pData, pItemSet));
}
@@ -1183,7 +1183,7 @@ VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Widget*
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(weld::Window* pParent,
const SfxItemSet& rSet)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxSearchFormatDialog>(
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxSearchFormatDialog>(
pParent, rSet));
}
@@ -1208,7 +1208,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgrou
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxBorderBackgroundDlg>(
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxBorderBackgroundDlg>(
pParent,
rCoreSet,
/*bEnableSelector*/true,
@@ -1220,7 +1220,7 @@ VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTrans
const SdrView* pView,
SvxAnchorIds nAnchorTypes)
{
- return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(new SvxTransformTabDialog(pParent, pAttr,pView, nAnchorTypes));
+ return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(std::make_shared<SvxTransformTabDialog>(pParent, pAttr,pView, nAnchorTypes));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog(weld::Window* pParent,
@@ -1228,7 +1228,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDi
const SdrView* pSdrView,
bool bSizeTabPage)
{
- auto pDlg = std::make_unique<SvxTransformTabDialog>(pParent, pAttr, pSdrView,
+ auto pDlg = std::make_shared<SvxTransformTabDialog>(pParent, pAttr, pSdrView,
bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" );
pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" );
@@ -1285,7 +1285,7 @@ VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSele
VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent)
{
- return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(std::make_unique<SvxHpLinkDlg>(pBindings, pChild, pParent));
+ return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(std::make_shared<SvxHpLinkDlg>(pBindings, pChild, pParent));
}
VclPtr<AbstractFmSearchDialog> AbstractDialogFactory_Impl::CreateFmSearchDialog(weld::Window* pParent,
@@ -1340,7 +1340,7 @@ VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDia
SdrModel* pModel,
bool bShadow)
{
- return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(std::make_unique<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow));
+ return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(std::make_shared<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
@@ -1348,7 +1348,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
const SdrObject* pObj ,
bool bHasObj)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj));
}
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
@@ -1607,7 +1607,7 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog(wel
VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
{
- return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_unique<SvPasteObjectDialog>(pParent));
+ return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_shared<SvPasteObjectDialog>(pParent));
}
VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
@@ -1620,7 +1620,7 @@ VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(wel
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxFormatCellsDialog>(pParent, pAttr, rModel));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, pAttr, rModel));
}
VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 5ddcce87f0db..38de7db093fc 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -143,7 +143,7 @@ class CuiAbstractTabController_Impl : public SfxAbstractTabDialog
{
std::shared_ptr<SfxTabDialogController> m_xDlg;
public:
- explicit CuiAbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
+ explicit CuiAbstractTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
: m_xDlg(std::move(p))
{
}
@@ -219,7 +219,7 @@ class AbstractThesaurusDialog_Impl : public AbstractThesaurusDialog
{
std::shared_ptr<SvxThesaurusDialog> m_xDlg;
public:
- explicit AbstractThesaurusDialog_Impl(std::unique_ptr<SvxThesaurusDialog> p)
+ explicit AbstractThesaurusDialog_Impl(std::shared_ptr<SvxThesaurusDialog> p)
: m_xDlg(std::move(p))
{
}
@@ -272,7 +272,7 @@ class AbstractSpellDialog_Impl : public AbstractSpellDialog
{
std::shared_ptr<svx::SpellDialog> m_xDlg;
public:
- explicit AbstractSpellDialog_Impl(std::unique_ptr<svx::SpellDialog> p)
+ explicit AbstractSpellDialog_Impl(std::shared_ptr<svx::SpellDialog> p)
: m_xDlg(std::move(p))
{
}
@@ -377,8 +377,8 @@ class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog
{
std::shared_ptr<SvxTransformTabDialog> m_xDlg;
public:
- explicit AbstractSvxTransformTabDialog_Impl(SvxTransformTabDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxTransformTabDialog_Impl(std::shared_ptr<SvxTransformTabDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -395,7 +395,7 @@ class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
{
std::shared_ptr<SvxCaptionTabDialog> m_xDlg;
public:
- explicit AbstractSvxCaptionDialog_Impl(std::unique_ptr<SvxCaptionTabDialog> p)
+ explicit AbstractSvxCaptionDialog_Impl(std::shared_ptr<SvxCaptionTabDialog> p)
: m_xDlg(std::move(p))
{
}
@@ -529,7 +529,7 @@ class AbstractSvxHpLinkDlg_Impl : public AbstractSvxHpLinkDlg
protected:
std::shared_ptr<SvxHpLinkDlg> m_xDlg;
public:
- explicit AbstractSvxHpLinkDlg_Impl(std::unique_ptr<SvxHpLinkDlg> p)
+ explicit AbstractSvxHpLinkDlg_Impl(std::shared_ptr<SvxHpLinkDlg> p)
: m_xDlg(std::move(p))
{
}
@@ -571,7 +571,7 @@ class AbstractSvxAreaTabDialog_Impl : public AbstractSvxAreaTabDialog
{
std::shared_ptr<SvxAreaTabDialog> m_xDlg;
public:
- explicit AbstractSvxAreaTabDialog_Impl(std::unique_ptr<SvxAreaTabDialog> p)
+ explicit AbstractSvxAreaTabDialog_Impl(std::shared_ptr<SvxAreaTabDialog> p)
: m_xDlg(std::move(p))
{
}
@@ -602,7 +602,7 @@ class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog
{
std::shared_ptr<SvPasteObjectDialog> m_xDlg;
public:
- explicit AbstractPasteDialog_Impl(std::unique_ptr<SvPasteObjectDialog> p)
+ explicit AbstractPasteDialog_Impl(std::shared_ptr<SvPasteObjectDialog> p)
: m_xDlg(std::move(p))
{
}
More information about the Libreoffice-commits
mailing list