summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-01 20:01:26 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-02 15:51:06 +0200
commit968428500501e247529ab998af0f8a1921782b0b (patch)
tree4e94e9418d20eed92e725c413242df8c87f7f54b /cui
parent884a2cd39a7c0433a5bbbf4e83e2a9b16cdad71c (diff)
pAttr is always dereferenced, use a reference instead of a pointer
Change-Id: I76ebce9085b9e47a6c571ddbcafa44d0d3a0f97f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/qa/unit/cui-dialogs-test.cxx3
-rw-r--r--cui/source/dialogs/sdrcelldlg.cxx6
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--cui/source/inc/sdrcelldlg.hxx2
5 files changed, 8 insertions, 9 deletions
diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx
index cf8c302fc209..ac6344fad0ca 100644
--- a/cui/qa/unit/cui-dialogs-test.cxx
+++ b/cui/qa/unit/cui-dialogs-test.cxx
@@ -69,8 +69,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest::createDialogByID(sal_uInt32 nID)
{
case 0: // "cui/ui/formatcellsdialog.ui"
{
- pReturnDialog
- = mpFact->CreateSvxFormatCellsDialog(nullptr, mxAttr.get(), *mxModel, true);
+ pReturnDialog = mpFact->CreateSvxFormatCellsDialog(nullptr, *mxAttr, *mxModel, true);
break;
}
diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx
index c5c4d22e162c..6b10e5c688e3 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -28,9 +28,9 @@
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
-SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle)
- : SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", "FormatCellsDialog", pAttr, bStyle)
- , mrOutAttrs(*pAttr)
+SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle)
+ : SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", "FormatCellsDialog", &rAttr, bStyle)
+ , mrOutAttrs(rAttr)
, mpColorTab(rModel.GetColorList())
, mnColorTabState ( ChangeType::NONE )
, mpGradientList(rModel.GetGradientList())
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 265a9058317a..303467ba51d1 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1440,9 +1440,9 @@ VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(wel
return VclPtr<AbstractLinksDialog_Impl>::Create(std::move(xLinkDlg));
}
-VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle)
+VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, pAttr, rModel, bStyle));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, rAttr, rModel, bStyle));
}
VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 701082585589..900013184ddd 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -577,7 +577,7 @@ public:
const sal_uInt16 _nInitiallySelectedEvent
) override;
- virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle) override;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle) override;
virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical) override;
diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx
index aac8d982b454..46f34c0dae28 100644
--- a/cui/source/inc/sdrcelldlg.hxx
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -38,7 +38,7 @@ private:
XPatternListRef mpPatternList;
public:
- SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle);
+ SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle);
virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;