svx/source/gallery2/galbrws1.cxx | 10 +++++----- svx/source/inc/galbrws1.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit b14a6c9e8d259233ffa666c08e314598932cb3c3 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Sep 10 20:02:18 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Sep 11 09:37:28 2024 +0200 ImplFillExchangeData always derefs its first arg Change-Id: If5afecc8c0e821a6abe98ededad2e0ea8b98ccbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173145 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> 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);