summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-10 20:02:18 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-11 09:37:28 +0200
commitb14a6c9e8d259233ffa666c08e314598932cb3c3 (patch)
treec662f12b022a6c0d0bafd813271232fec6a45876 /svx/source
parentbae7ca08693c171dc1dea75e92c35826041e2603 (diff)
ImplFillExchangeData always derefs its first arg
Change-Id: If5afecc8c0e821a6abe98ededad2e0ea8b98ccbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173145 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/gallery2/galbrws1.cxx10
-rw-r--r--svx/source/inc/galbrws1.hxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index c7c5c59f6727..960b9d81d862 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -223,14 +223,14 @@ void GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
mxThemes->append(u""_ustr, pEntry->GetThemeName(), *pImage);
}
-void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData )
+void GalleryBrowser1::ImplFillExchangeData(const GalleryTheme& rThm, ExchangeData& rData)
{
- rData.pTheme = const_cast<GalleryTheme*>(pThm);
- rData.aEditedTitle = pThm->GetName();
+ rData.pTheme = const_cast<GalleryTheme*>(&rThm);
+ rData.aEditedTitle = rThm.GetName();
try
{
- DateTime aDateTime(pThm->getModificationDate());
+ DateTime aDateTime(rThm.getModificationDate());
rData.aThemeChangeDate = aDateTime;
rData.aThemeChangeTime = aDateTime;
@@ -289,7 +289,7 @@ void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view rThemeName
mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() ));
GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListener );
- ImplFillExchangeData( pTheme, *mpExchangeData );
+ ImplFillExchangeData(*pTheme, *mpExchangeData);
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<VclAbstractDialog> xThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog(mxThemes.get(), mpExchangeData.get(), mpThemePropsDlgItemSet.get());
diff --git a/svx/source/inc/galbrws1.hxx b/svx/source/inc/galbrws1.hxx
index 2796bbcc2e72..4ec48c5154ff 100644
--- a/svx/source/inc/galbrws1.hxx
+++ b/svx/source/inc/galbrws1.hxx
@@ -138,7 +138,7 @@ private:
SfxListener maLocalListener;
void ImplInsertThemeEntry(const GalleryThemeEntry* pEntry);
- static void ImplFillExchangeData(const GalleryTheme* pThm, ExchangeData& rData);
+ static void ImplFillExchangeData(const GalleryTheme& rThm, ExchangeData& rData);
void ImplGetExecuteVector(std::vector<OUString>& o_aExec);
void ImplExecute(std::u16string_view rIdent);
void ImplGalleryThemeProperties(std::u16string_view rThemeName, bool bCreateNew);