diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-25 14:40:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-26 06:44:38 +0000 |
commit | 6ea81e0c78da567f208ff161496ade26a375e6e8 (patch) | |
tree | 71ab93c30e71391c15b9e82a0128a40352308969 /svtools | |
parent | 204d147b8a887d17e6457f795e8b8f4d632213ae (diff) |
loplugin: unnecessarysuperclass merge HashedEntryList into NameTranslationList
Change-Id: Idba2112b81e06ada7567dd5476a4e9d84f38ff56
Reviewed-on: https://gerrit.libreoffice.org/15897
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 66aeece8762b..5d516b6228d5 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -277,14 +277,10 @@ inline bool HashedEntry::operator <( const HashedEntry& rRef ) const return mnHashCode < rRef.mnHashCode; } -// class HashedEntryList ---------------------------------------------- -// provides a list of _unique_ Entries -class HashedEntryList : public boost::ptr_set<HashedEntry> {}; - // class NameTranslationEntry ----------------------------------------- class NameTranslationEntry : public HashedEntry -{// a fast compareble String and another String, which is used to get a substitution for a given String +{// a fast comparable String and another String, which is used to get a substitution for a given String protected: OUString maTranslatedName; public: @@ -305,8 +301,8 @@ inline const OUString& NameTranslationEntry::GetTranslation() const } // class NameTranslationList ----------------------------------------- - -class NameTranslationList : protected HashedEntryList +// provides a list of _unique_ Entries +class NameTranslationList : protected boost::ptr_set<HashedEntry> { // contains a list of substitutes of strings for a given folder (as URL) // explanation of the circumstances see in remarks for Init(); protected: @@ -314,17 +310,17 @@ protected: HashedEntry maHashedURL; // for future purposes when dealing with a set of cached // NameTranslationLists private: - const OUString maTransFileName; - void Init(); // reads the translation file and fills the (internal) list + const OUString maTransFileName; + void Init(); // reads the translation file and fills the (internal) list public: - NameTranslationList( const INetURLObject& rBaseURL ); + NameTranslationList( const INetURLObject& rBaseURL ); // rBaseURL: path to folder for which the translation of the entries // should be done - using HashedEntryList::operator==; - using HashedEntryList::operator!=; - inline bool operator !=( const HashedEntry& rRef ) const; + using boost::ptr_set<HashedEntry>::operator==; + using boost::ptr_set<HashedEntry>::operator!=; + inline bool operator !=( const HashedEntry& rRef ) const; const OUString* Translate( const OUString& rName ) const; // returns NULL, if rName can't be found |