svtools/source/contnr/fileview.cxx | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
New commits: commit 6ea81e0c78da567f208ff161496ade26a375e6e8 Author: Noel Grandin <n...@peralex.com> Date: Mon May 25 14:40:31 2015 +0200 loplugin: unnecessarysuperclass merge HashedEntryList into NameTranslationList Change-Id: Idba2112b81e06ada7567dd5476a4e9d84f38ff56 Reviewed-on: https://gerrit.libreoffice.org/15897 Reviewed-by: Noel Grandin <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 66aeece..5d516b6 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits