include/svx/galtheme.hxx | 2 +- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galtheme.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit bae7ca08693c171dc1dea75e92c35826041e2603 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Sep 10 20:01:03 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Sep 11 09:37:09 2024 +0200 these can be const Change-Id: I2d544ff797cc9c9e7dfabb6c30e916d519941d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index 52333b0f4d19..841ccb86442f 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -143,7 +143,7 @@ public: SAL_DLLPRIVATE bool GetModelStream(sal_uInt32 nPos, SvStream & rModelStream); SAL_DLLPRIVATE bool InsertModelStream(SvStream& rModelStream, sal_uInt32 nInsertPos); - SAL_DLLPRIVATE bool GetURL(sal_uInt32 nPos, INetURLObject& rURL); + SAL_DLLPRIVATE bool GetURL(sal_uInt32 nPos, INetURLObject& rURL) const; bool InsertURL(const INetURLObject& rURL, sal_uInt32 nInsertPos = SAL_MAX_UINT32); SAL_DLLPRIVATE bool InsertFileOrDirURL(const INetURLObject& rFileOrDirURL, sal_uInt32 nInsertPos); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index f1b1ece8a643..c7c5c59f6727 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1666,7 +1666,7 @@ void GalleryThemePopup::ExecutePopup(weld::Widget* pParent, const ::Point &rPos) const SgaObjKind eObjKind = mpTheme->GetObjectKind( mnObjectPos ); INetURLObject aURL; - const_cast< GalleryTheme* >( mpTheme )->GetURL( mnObjectPos, aURL ); + mpTheme->GetURL(mnObjectPos, aURL); const bool bValidURL = ( aURL.GetProtocol() != INetProtocol::NotValid ); mxPopupMenu->set_visible(u"add"_ustr, bValidURL && SgaObjKind::Sound != eObjKind); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 9e23f59b5d5f..d211ca1b1738 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -480,7 +480,7 @@ bool GalleryTheme::InsertModelStream(SvStream& rModelStream, sal_uInt32 nInsertP return bRet; } -bool GalleryTheme::GetURL(sal_uInt32 nPos, INetURLObject& rURL) +bool GalleryTheme::GetURL(sal_uInt32 nPos, INetURLObject& rURL) const { const GalleryObject* pObject = maGalleryObjectCollection.getForPosition( nPos ); bool bRet = false;