[Libreoffice-commits] core.git: hwpfilter/source i18npool/inc include/i18nutil jvmfwk/plugins l10ntools/inc lingucomponent/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Nov 1 12:31:24 UTC 2017


 hwpfilter/source/hfont.h                                 |    3 +--
 i18npool/inc/collator_unicode.hxx                        |    5 ++---
 i18npool/inc/indexentrysupplier.hxx                      |    3 +--
 i18npool/inc/transliteration_caseignore.hxx              |    6 +++---
 include/i18nutil/oneToOneMapping.hxx                     |    4 ++--
 jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx         |    6 ++----
 l10ntools/inc/xmlparse.hxx                               |    4 ++--
 lingucomponent/source/languageguessing/guess.hxx         |    4 ++--
 lingucomponent/source/languageguessing/simpleguesser.hxx |    4 ++--
 9 files changed, 17 insertions(+), 22 deletions(-)

New commits:
commit dd8060ddc418942d51bb07313546fe849aac9d39
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Nov 1 10:39:38 2017 +0200

    loplugin:finalclasses in h*,i*,j*
    
    Change-Id: I3b5f319a88dbe6a9c2ffbfdf991345beda9a2fcd
    Reviewed-on: https://gerrit.libreoffice.org/44154
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/hwpfilter/source/hfont.h b/hwpfilter/source/hfont.h
index 074346f8f892..f70d2de82c73 100644
--- a/hwpfilter/source/hfont.h
+++ b/hwpfilter/source/hfont.h
@@ -32,9 +32,8 @@ class HWPFile;
  * The HWPFont class has the font list for the document when it's saved.
  * @short Font information
  */
-class DLLEXPORT HWPFont
+class DLLEXPORT HWPFont final
 {
-    protected:
 /**
  * System font count for each language
  * NLanguage is 7 in common case.
diff --git a/i18npool/inc/collator_unicode.hxx b/i18npool/inc/collator_unicode.hxx
index 1ec407517a56..69d317797870 100644
--- a/i18npool/inc/collator_unicode.hxx
+++ b/i18npool/inc/collator_unicode.hxx
@@ -32,7 +32,7 @@
 
 namespace i18npool {
 
-class Collator_Unicode : public cppu::WeakImplHelper < css::i18n::XCollator, css::lang::XServiceInfo >
+class Collator_Unicode final : public cppu::WeakImplHelper < css::i18n::XCollator, css::lang::XServiceInfo >
 {
 public:
     // Constructors
@@ -61,9 +61,8 @@ public:
     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
 
-protected:
-    const sal_Char *implementationName;
 private:
+    const sal_Char *implementationName;
     RuleBasedCollator *uca_base, *collator;
 #ifndef DISABLE_DYNLOADING
     oslModule hModule;
diff --git a/i18npool/inc/indexentrysupplier.hxx b/i18npool/inc/indexentrysupplier.hxx
index 4d8e33b76358..2194e4fd1c2a 100644
--- a/i18npool/inc/indexentrysupplier.hxx
+++ b/i18npool/inc/indexentrysupplier.hxx
@@ -29,7 +29,7 @@ namespace i18npool {
 
 //  class IndexEntrySupplier
 
-class IndexEntrySupplier : public cppu::WeakImplHelper
+class IndexEntrySupplier final : public cppu::WeakImplHelper
 <
     css::i18n::XExtendedIndexEntrySupplier,
     css::lang::XServiceInfo
@@ -82,7 +82,6 @@ private:
     css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > const & SAL_CALL getLocaleSpecificIndexEntrySupplier(
         const css::lang::Locale& rLocale, const OUString& rSortAlgorithm);
 
-protected:
     css::lang::Locale aLocale;
     OUString          aSortAlgorithm;
 };
diff --git a/i18npool/inc/transliteration_caseignore.hxx b/i18npool/inc/transliteration_caseignore.hxx
index 4c028f40b528..cd49d57c65ab 100644
--- a/i18npool/inc/transliteration_caseignore.hxx
+++ b/i18npool/inc/transliteration_caseignore.hxx
@@ -23,7 +23,7 @@
 
 namespace i18npool {
 
-class Transliteration_caseignore: public Transliteration_body
+class Transliteration_caseignore final : public Transliteration_body
 {
 public:
     Transliteration_caseignore();
@@ -48,13 +48,13 @@ public:
         const OUString& s1,
         const OUString& s2) override;
 
-protected:
-    TransliterationFlags moduleLoaded;
 private:
     /// @throws css::uno::RuntimeException
     sal_Int32 SAL_CALL compare(
         const OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1,
         const OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2);
+
+    TransliterationFlags moduleLoaded;
 };
 
 }
diff --git a/include/i18nutil/oneToOneMapping.hxx b/include/i18nutil/oneToOneMapping.hxx
index ca82196c343b..e88fc42f348e 100644
--- a/include/i18nutil/oneToOneMapping.hxx
+++ b/include/i18nutil/oneToOneMapping.hxx
@@ -60,7 +60,7 @@ protected:
     size_t                  mnSize;
 };
 
-class I18NUTIL_DLLPUBLIC oneToOneMappingWithFlag : public oneToOneMapping
+class I18NUTIL_DLLPUBLIC oneToOneMappingWithFlag final : public oneToOneMapping
 {
 private:
     oneToOneMappingWithFlag(const oneToOneMappingWithFlag&) = delete;
@@ -77,7 +77,7 @@ public:
 
     // index search
     virtual sal_Unicode find( const sal_Unicode nKey ) const override;
-protected:
+private:
     UnicodePairWithFlag  *mpTableWF;
     UnicodePairFlag       mnFlag;
     UnicodePairWithFlag **mpIndex[256];
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
index 9f3283795e44..5e86612897f9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
@@ -49,10 +49,8 @@ namespace jfw_plugin {
    To test if the version is ok, that is this object can be compared to others,
    use the bool conversion operator.
  */
-class SunVersion
+class SunVersion final
 {
-protected:
-
     enum PreRelease
     {
         Rel_NONE,
@@ -103,7 +101,7 @@ public:
      */
     OUString usVersion;
 
-protected:
+private:
     bool init(const char * szVer);
 
     bool m_bValid;
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 177af07dfc7a..8f485e9707eb 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -145,7 +145,7 @@ typedef std::unordered_map<OString, sal_Bool> TagMap;
 
 /** Holds information of a XML file, is root node of tree
  */
-class XMLFile : public XMLParentNode
+class XMLFile final : public XMLParentNode
 {
 public:
     XMLFile(
@@ -173,7 +173,7 @@ public:
     void SetName( const OString &rFilename ) { m_sFileName = rFilename; }
     const std::vector<OString>& getOrder() const { return m_vOrder; }
 
-protected:
+private:
 
     void InsertL10NElement( XMLElement* pElement);
 
diff --git a/lingucomponent/source/languageguessing/guess.hxx b/lingucomponent/source/languageguessing/guess.hxx
index 7af5f38c70a7..eeb7aa192671 100644
--- a/lingucomponent/source/languageguessing/guess.hxx
+++ b/lingucomponent/source/languageguessing/guess.hxx
@@ -33,7 +33,7 @@ using namespace std;
 /**
 @author Jocelyn Merand
  */
-class Guess{
+class Guess final {
     public:
 
         /**
@@ -51,7 +51,7 @@ class Guess{
         const string& GetLanguage() { return language_str;}
         const string& GetCountry() { return country_str;}
 
-    protected:
+    private:
         string language_str;
         string country_str;
         string encoding_str;
diff --git a/lingucomponent/source/languageguessing/simpleguesser.hxx b/lingucomponent/source/languageguessing/simpleguesser.hxx
index 39a83ec71522..5ce3e2930740 100644
--- a/lingucomponent/source/languageguessing/simpleguesser.hxx
+++ b/lingucomponent/source/languageguessing/simpleguesser.hxx
@@ -32,7 +32,7 @@ using namespace std;
 /**
 @author Jocelyn Merand
 */
-class SimpleGuesser{
+class SimpleGuesser final {
 public:
     /**inits the object with conf file "./conf.txt"*/
     SimpleGuesser();
@@ -98,7 +98,7 @@ public:
     */
     void SetDBPath(const char* thePathOfConfFile, const char* prefix);
 
-protected:
+private:
 
     //Where typical fingerprints (n-gram tables) are stored
     void* h;


More information about the Libreoffice-commits mailing list