include/svx/gallery1.hxx | 24 ++++++++++++------------ svx/source/gallery2/gallery1.cxx | 38 +++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 31 deletions(-)
New commits: commit 509b6d19d4b4310bad80d2a91ddd1429ccabc51f Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Mar 3 08:07:40 2025 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Mar 3 10:52:05 2025 +0100 svx: prefix members of GalleryThemeEntry See tdf#94879 for motivation. Change-Id: I6a551ab7cb6d6a0595d93703d6a99e5d9e6b2abc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182416 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 5519aa8cd32e..99eee5da951c 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -41,11 +41,11 @@ class SVXCORE_DLLPUBLIC GalleryThemeEntry private: std::unique_ptr<GalleryFileStorageEntry> mpGalleryStorageEngineEntry; - OUString aName; - sal_uInt32 nId; - bool bReadOnly; - bool bModified; - bool bThemeNameFromResource; + OUString maName; + sal_uInt32 mnId; + bool mbReadOnly; + bool mbModified; + bool mbThemeNameFromResource; public: GalleryThemeEntry( bool bCreateUniqueURL, @@ -61,20 +61,20 @@ public: std::unique_ptr<GalleryFileStorage> createGalleryStorageEngine(GalleryObjectCollection& mrGalleryObjectCollection); - const OUString& GetThemeName() const { return aName; } + const OUString& GetThemeName() const { return maName; } - bool IsReadOnly() const { return bReadOnly; } + bool IsReadOnly() const { return mbReadOnly; } bool IsDefault() const; - bool IsHidden() const { return aName.match("private://gallery/hidden/"); } + bool IsHidden() const { return maName.match("private://gallery/hidden/"); } - bool IsModified() const { return bModified; } - void SetModified( bool bSet ) { bModified = ( bSet && !IsReadOnly() ); } + bool IsModified() const { return mbModified; } + void SetModified( bool bSet ) { mbModified = ( bSet && !IsReadOnly() ); } void SetName( const OUString& rNewName ); - bool IsNameFromResource() const { return bThemeNameFromResource; } + bool IsNameFromResource() const { return mbThemeNameFromResource; } - sal_uInt32 GetId() const { return nId; } + sal_uInt32 GetId() const { return mnId; } void SetId( sal_uInt32 nNewId, bool bResetThemeName ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index dac08e0bb73a..eda4665310aa 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -112,9 +112,9 @@ GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL, const INetURLObject& rBaseURL, const OUString& rName, bool _bReadOnly, bool _bNewFile, sal_uInt32 _nId, bool _bThemeNameFromResource ) : - nId ( _nId ), - bReadOnly ( _bReadOnly ), - bThemeNameFromResource ( _bThemeNameFromResource ) + mnId ( _nId ), + mbReadOnly ( _bReadOnly ), + mbThemeNameFromResource ( _bThemeNameFromResource ) { INetURLObject aURL( rBaseURL ); DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); @@ -129,38 +129,38 @@ GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL, SetModified( _bNewFile ); - aName = mpGalleryStorageEngineEntry->ReadStrFromIni( u"name" ); + maName = mpGalleryStorageEngineEntry->ReadStrFromIni( u"name" ); // This is awful - we shouldn't use these resources if we // possibly can avoid them - if( aName.isEmpty() && nId && bThemeNameFromResource ) + if( maName.isEmpty() && mnId && mbThemeNameFromResource ) { //some of these are supposed to *not* be localized //so catch them before looking up the resource for (size_t i = 0; i < SAL_N_ELEMENTS(aUnlocalized); ++i) { - if (aUnlocalized[i].first == nId) + if (aUnlocalized[i].first == mnId) { - aName = aUnlocalized[i].second; + maName = aUnlocalized[i].second; break; } } //look up the rest of the ids in string resources - if (aName.isEmpty()) + if (maName.isEmpty()) { for (size_t i = 0; i < SAL_N_ELEMENTS(aLocalized); ++i) { - if (aLocalized[i].first == nId) + if (aLocalized[i].first == mnId) { - aName = SvxResId(aLocalized[i].second); + maName = SvxResId(aLocalized[i].second); break; } } } } - if( aName.isEmpty() ) - aName = rName; + if( maName.isEmpty() ) + maName = rName; } GalleryThemeEntry::~GalleryThemeEntry() @@ -178,7 +178,7 @@ GalleryTheme* GalleryThemeEntry::createGalleryTheme(Gallery* pGallery) std::unique_ptr<GalleryFileStorage> GalleryThemeEntry::createGalleryStorageEngine(GalleryObjectCollection& mrGalleryObjectCollection) { - return mpGalleryStorageEngineEntry->createGalleryStorageEngine(mrGalleryObjectCollection, bReadOnly); + return mpGalleryStorageEngineEntry->createGalleryStorageEngine(mrGalleryObjectCollection, mbReadOnly); } void GalleryTheme::InsertAllThemes(weld::ComboBox& rListBox) @@ -192,19 +192,19 @@ void GalleryTheme::InsertAllThemes(weld::ComboBox& rListBox) void GalleryThemeEntry::SetName( const OUString& rNewName ) { - if( aName != rNewName ) + if( maName != rNewName ) { - aName = rNewName; + maName = rNewName; SetModified( true ); - bThemeNameFromResource = false; + mbThemeNameFromResource = false; } } void GalleryThemeEntry::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { - nId = nNewId; + mnId = nNewId; SetModified( true ); - bThemeNameFromResource = ( nId && bResetThemeName ); + mbThemeNameFromResource = ( mnId && bResetThemeName ); } void GalleryThemeEntry::removeTheme() @@ -721,7 +721,7 @@ void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ) bool GalleryThemeEntry::IsDefault() const { - return nId > 0 && nId != GALLERY_THEME_MYTHEME; + return mnId > 0 && mnId != GALLERY_THEME_MYTHEME; } GalleryStorageLocations& GalleryThemeEntry::getGalleryStorageLocations() const