From e73b99b8dda36545116ac5b5f00c210642c2e3a6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Jan 2020 15:29:03 +0200 Subject: loplugin:finalclasses in i18npool..linguistic Change-Id: Ib903fb2fdb4c4c25f73053065b828dade8b63785 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86687 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18npool/inc/breakiterator_cjk.hxx | 2 +- i18npool/inc/breakiterator_th.hxx | 2 +- i18npool/inc/calendar_gregorian.hxx | 10 +++++----- i18npool/inc/calendar_hijri.hxx | 4 ++-- i18npool/inc/calendar_jewish.hxx | 4 ++-- i18npool/inc/cclass_unicode.hxx | 2 +- i18npool/inc/chaptercollator.hxx | 2 +- i18npool/inc/characterclassificationImpl.hxx | 2 +- i18npool/inc/chartonum.hxx | 2 +- i18npool/inc/defaultnumberingprovider.hxx | 2 +- i18npool/inc/indexentrysupplier_asian.hxx | 2 +- i18npool/inc/indexentrysupplier_default.hxx | 2 +- i18npool/inc/indexentrysupplier_ja_phonetic.hxx | 2 +- i18npool/inc/inputsequencechecker_hi.hxx | 2 +- i18npool/inc/inputsequencechecker_th.hxx | 2 +- i18npool/inc/localedata.hxx | 2 +- i18npool/inc/nativenumbersupplier.hxx | 2 +- i18npool/inc/numberformatcode.hxx | 2 +- i18npool/inc/numtochar.hxx | 2 +- i18npool/inc/numtotext_cjk.hxx | 2 +- i18npool/inc/ordinalsuffix.hxx | 2 +- i18npool/inc/textToPronounce_zh.hxx | 2 +- i18npool/inc/textconversion.hxx | 4 ++-- i18npool/inc/textconversionImpl.hxx | 2 +- i18npool/inc/texttonum.hxx | 2 +- i18npool/inc/transliterationImpl.hxx | 2 +- i18npool/inc/transliteration_Ignore.hxx | 8 ++++---- i18npool/inc/transliteration_OneToOne.hxx | 10 +++++----- i18npool/inc/transliteration_body.hxx | 12 ++++++------ i18npool/inc/unoscripttypedetector.hxx | 2 +- 30 files changed, 49 insertions(+), 49 deletions(-) (limited to 'i18npool') diff --git a/i18npool/inc/breakiterator_cjk.hxx b/i18npool/inc/breakiterator_cjk.hxx index a088bd3d94c7..5b8e2693f69c 100644 --- a/i18npool/inc/breakiterator_cjk.hxx +++ b/i18npool/inc/breakiterator_cjk.hxx @@ -49,7 +49,7 @@ protected: }; #define BREAKITERATOR_CJK( lang ) \ -class BreakIterator_##lang : public BreakIterator_CJK {\ +class BreakIterator_##lang final : public BreakIterator_CJK {\ public:\ BreakIterator_##lang (); \ }; diff --git a/i18npool/inc/breakiterator_th.hxx b/i18npool/inc/breakiterator_th.hxx index 347eb68b1138..c694e79e2575 100644 --- a/i18npool/inc/breakiterator_th.hxx +++ b/i18npool/inc/breakiterator_th.hxx @@ -25,7 +25,7 @@ namespace i18npool { -class BreakIterator_th : public BreakIterator_Unicode +class BreakIterator_th final : public BreakIterator_Unicode { public: BreakIterator_th(); diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx index d579ee735f00..10bde05b2027 100644 --- a/i18npool/inc/calendar_gregorian.hxx +++ b/i18npool/inc/calendar_gregorian.hxx @@ -146,7 +146,7 @@ private: -class Calendar_hanja : public Calendar_gregorian +class Calendar_hanja final : public Calendar_gregorian { public: // Constructors @@ -157,7 +157,7 @@ public: -class Calendar_gengou : public Calendar_gregorian +class Calendar_gengou final : public Calendar_gregorian { public: // Constructors @@ -166,7 +166,7 @@ public: -class Calendar_ROC : public Calendar_gregorian +class Calendar_ROC final : public Calendar_gregorian { public: // Constructors @@ -175,7 +175,7 @@ public: -class Calendar_dangi : public Calendar_gregorian +class Calendar_dangi final : public Calendar_gregorian { public: // Constructors @@ -184,7 +184,7 @@ public: -class Calendar_buddhist : public Calendar_gregorian +class Calendar_buddhist final : public Calendar_gregorian { public: // Constructors diff --git a/i18npool/inc/calendar_hijri.hxx b/i18npool/inc/calendar_hijri.hxx index 3889a9bb3e28..f8511842d6a7 100644 --- a/i18npool/inc/calendar_hijri.hxx +++ b/i18npool/inc/calendar_hijri.hxx @@ -26,14 +26,14 @@ namespace i18npool { -class Calendar_hijri : public Calendar_gregorian +class Calendar_hijri final : public Calendar_gregorian { public: // Constructors Calendar_hijri(); -protected: +private: void mapToGregorian() override; void mapFromGregorian() override; diff --git a/i18npool/inc/calendar_jewish.hxx b/i18npool/inc/calendar_jewish.hxx index f500fa6f05e2..8a1e9f9057ba 100644 --- a/i18npool/inc/calendar_jewish.hxx +++ b/i18npool/inc/calendar_jewish.hxx @@ -26,7 +26,7 @@ namespace i18npool { -class Calendar_jewish : public Calendar_gregorian +class Calendar_jewish final : public Calendar_gregorian { public: // Constructors @@ -35,7 +35,7 @@ public: // Methods in XExtendedCalendar virtual OUString SAL_CALL getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) override; -protected: +private: void mapToGregorian() override; void mapFromGregorian() override; }; diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx index 3a702ca9d909..643f8b0b4bdb 100644 --- a/i18npool/inc/cclass_unicode.hxx +++ b/i18npool/inc/cclass_unicode.hxx @@ -63,7 +63,7 @@ namespace o3tl { namespace i18npool { -class cclass_Unicode : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo > +class cclass_Unicode final : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo > { public: cclass_Unicode(const css::uno::Reference < css::uno::XComponentContext >& rxContext ); diff --git a/i18npool/inc/chaptercollator.hxx b/i18npool/inc/chaptercollator.hxx index 9197c82df8f5..deb897a69b7e 100644 --- a/i18npool/inc/chaptercollator.hxx +++ b/i18npool/inc/chaptercollator.hxx @@ -28,7 +28,7 @@ namespace i18npool { // ---------------------------------------------------- // class ChapterCollator // ---------------------------------------------------- -class ChapterCollator : public CollatorImpl +class ChapterCollator final : public CollatorImpl { public: // Constructors diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx index ec71ad75c7ca..34723ef74123 100644 --- a/i18npool/inc/characterclassificationImpl.hxx +++ b/i18npool/inc/characterclassificationImpl.hxx @@ -29,7 +29,7 @@ namespace com::sun::star::uno { class XComponentContext; } namespace i18npool { -class CharacterClassificationImpl : public cppu::WeakImplHelper +class CharacterClassificationImpl final : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo diff --git a/i18npool/inc/chartonum.hxx b/i18npool/inc/chartonum.hxx index 5a3be17064ba..d908334b8a0f 100644 --- a/i18npool/inc/chartonum.hxx +++ b/i18npool/inc/chartonum.hxx @@ -25,7 +25,7 @@ namespace i18npool { #define TRANSLITERATION_CHARTONUM( name ) \ -class CharToNum##name : public transliteration_Numeric \ +class CharToNum##name final : public transliteration_Numeric \ { \ public: \ CharToNum##name (); \ diff --git a/i18npool/inc/defaultnumberingprovider.hxx b/i18npool/inc/defaultnumberingprovider.hxx index eb309b83c358..6dc0751f0520 100644 --- a/i18npool/inc/defaultnumberingprovider.hxx +++ b/i18npool/inc/defaultnumberingprovider.hxx @@ -37,7 +37,7 @@ namespace i18npool { namespace i18npool { -class DefaultNumberingProvider : public cppu::WeakImplHelper +class DefaultNumberingProvider final : public cppu::WeakImplHelper < css::text::XDefaultNumberingProvider, css::text::XNumberingFormatter, diff --git a/i18npool/inc/indexentrysupplier_asian.hxx b/i18npool/inc/indexentrysupplier_asian.hxx index 357a340caaf1..a993d7f16ac6 100644 --- a/i18npool/inc/indexentrysupplier_asian.hxx +++ b/i18npool/inc/indexentrysupplier_asian.hxx @@ -28,7 +28,7 @@ namespace i18npool { -class IndexEntrySupplier_asian : public IndexEntrySupplier_Common { +class IndexEntrySupplier_asian final : public IndexEntrySupplier_Common { public: IndexEntrySupplier_asian( const css::uno::Reference < css::uno::XComponentContext >& rxContext ); virtual ~IndexEntrySupplier_asian() override; diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx index 5f93e8e20698..29fe3cdbf214 100644 --- a/i18npool/inc/indexentrysupplier_default.hxx +++ b/i18npool/inc/indexentrysupplier_default.hxx @@ -29,7 +29,7 @@ class Index; -class IndexEntrySupplier_Unicode : public IndexEntrySupplier_Common { +class IndexEntrySupplier_Unicode final : public IndexEntrySupplier_Common { public: IndexEntrySupplier_Unicode( const css::uno::Reference < css::uno::XComponentContext >& rxContext ); virtual ~IndexEntrySupplier_Unicode() override; diff --git a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx index 8b65843d0225..cced5597c22d 100644 --- a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx +++ b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx @@ -43,7 +43,7 @@ public: }; #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \ -class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\ +class IndexEntrySupplier_##algorithm final : public IndexEntrySupplier_ja_phonetic {\ public:\ IndexEntrySupplier_##algorithm (const css::uno::Reference < css::uno::XComponentContext >& rxContext) : IndexEntrySupplier_ja_phonetic (rxContext) {\ implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\ diff --git a/i18npool/inc/inputsequencechecker_hi.hxx b/i18npool/inc/inputsequencechecker_hi.hxx index b7253e49ddda..88cfc9801126 100644 --- a/i18npool/inc/inputsequencechecker_hi.hxx +++ b/i18npool/inc/inputsequencechecker_hi.hxx @@ -25,7 +25,7 @@ namespace i18npool { -class InputSequenceChecker_hi : public InputSequenceCheckerImpl +class InputSequenceChecker_hi final : public InputSequenceCheckerImpl { public: InputSequenceChecker_hi(); diff --git a/i18npool/inc/inputsequencechecker_th.hxx b/i18npool/inc/inputsequencechecker_th.hxx index aff2c248ca78..582bbd9ade94 100644 --- a/i18npool/inc/inputsequencechecker_th.hxx +++ b/i18npool/inc/inputsequencechecker_th.hxx @@ -25,7 +25,7 @@ namespace i18npool { -class InputSequenceChecker_th : public InputSequenceCheckerImpl +class InputSequenceChecker_th final : public InputSequenceCheckerImpl { public: InputSequenceChecker_th(); diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx index d8612a362bf0..19933376776f 100644 --- a/i18npool/inc/localedata.hxx +++ b/i18npool/inc/localedata.hxx @@ -48,7 +48,7 @@ struct LocaleDataLookupTableItem; namespace i18npool { -class LocaleDataImpl : public cppu::WeakImplHelper +class LocaleDataImpl final : public cppu::WeakImplHelper < css::i18n::XLocaleData5, css::lang::XServiceInfo diff --git a/i18npool/inc/nativenumbersupplier.hxx b/i18npool/inc/nativenumbersupplier.hxx index 9bd37854bd70..c452cb4306df 100644 --- a/i18npool/inc/nativenumbersupplier.hxx +++ b/i18npool/inc/nativenumbersupplier.hxx @@ -31,7 +31,7 @@ namespace i18npool { // ---------------------------------------------------- // class NativeNumberSupplierService // ---------------------------------------------------- -class NativeNumberSupplierService : public cppu::WeakImplHelper +class NativeNumberSupplierService final : public cppu::WeakImplHelper < css::i18n::XNativeNumberSupplier2, css::lang::XServiceInfo diff --git a/i18npool/inc/numberformatcode.hxx b/i18npool/inc/numberformatcode.hxx index 8a0c306d5529..47055edb8967 100644 --- a/i18npool/inc/numberformatcode.hxx +++ b/i18npool/inc/numberformatcode.hxx @@ -33,7 +33,7 @@ namespace com::sun::star::i18n { class XLocaleData5; } namespace com::sun::star::i18n { struct FormatElement; } namespace com::sun::star::uno { class XComponentContext; } -class NumberFormatCodeMapper : public cppu::WeakImplHelper +class NumberFormatCodeMapper final : public cppu::WeakImplHelper < css::i18n::XNumberFormatCode, css::lang::XServiceInfo diff --git a/i18npool/inc/numtochar.hxx b/i18npool/inc/numtochar.hxx index 104b172478b1..686d72d5c077 100644 --- a/i18npool/inc/numtochar.hxx +++ b/i18npool/inc/numtochar.hxx @@ -25,7 +25,7 @@ namespace i18npool { #define TRANSLITERATION_NUMTOCHAR( name ) \ -class NumToChar##name : public transliteration_Numeric \ +class NumToChar##name final : public transliteration_Numeric \ { \ public: \ NumToChar##name (); \ diff --git a/i18npool/inc/numtotext_cjk.hxx b/i18npool/inc/numtotext_cjk.hxx index e750d12275aa..56f7b5f0235e 100644 --- a/i18npool/inc/numtotext_cjk.hxx +++ b/i18npool/inc/numtotext_cjk.hxx @@ -25,7 +25,7 @@ namespace i18npool { #define TRANSLITERATION_NUMTOTEXT_CJK( name ) \ -class NumToText##name : public transliteration_Numeric \ +class NumToText##name final : public transliteration_Numeric \ { \ public: \ NumToText##name (); \ diff --git a/i18npool/inc/ordinalsuffix.hxx b/i18npool/inc/ordinalsuffix.hxx index ef7e4a49f932..65c41f51ed55 100644 --- a/i18npool/inc/ordinalsuffix.hxx +++ b/i18npool/inc/ordinalsuffix.hxx @@ -28,7 +28,7 @@ namespace com::sun::star::lang { struct Locale; } namespace i18npool { -class OrdinalSuffixService : public cppu::WeakImplHelper +class OrdinalSuffixService final : public cppu::WeakImplHelper < css::i18n::XOrdinalSuffix, css::lang::XServiceInfo diff --git a/i18npool/inc/textToPronounce_zh.hxx b/i18npool/inc/textToPronounce_zh.hxx index df948148c315..3bafc4e70ce7 100644 --- a/i18npool/inc/textToPronounce_zh.hxx +++ b/i18npool/inc/textToPronounce_zh.hxx @@ -57,7 +57,7 @@ public: }; #define TRANSLITERATION_TextToPronounce_zh( name ) \ -class name : public TextToPronounce_zh \ +class name final : public TextToPronounce_zh \ { \ public: \ name (); \ diff --git a/i18npool/inc/textconversion.hxx b/i18npool/inc/textconversion.hxx index 76ec8abf06e7..efd9b587a760 100644 --- a/i18npool/inc/textconversion.hxx +++ b/i18npool/inc/textconversion.hxx @@ -83,7 +83,7 @@ typedef struct { -class TextConversion_ko : public TextConversionService +class TextConversion_ko final : public TextConversionService { public: TextConversion_ko( const css::uno::Reference < css::uno::XComponentContext >& rxContext ); @@ -125,7 +125,7 @@ typedef struct { sal_Int16 count; } STC_WordIndex; -class TextConversion_zh : public TextConversionService +class TextConversion_zh final : public TextConversionService { public: TextConversion_zh( const css::uno::Reference < css::uno::XComponentContext >& rxContext ); diff --git a/i18npool/inc/textconversionImpl.hxx b/i18npool/inc/textconversionImpl.hxx index fd9ab9cf2177..4a104f59719a 100644 --- a/i18npool/inc/textconversionImpl.hxx +++ b/i18npool/inc/textconversionImpl.hxx @@ -29,7 +29,7 @@ namespace i18npool { -class TextConversionImpl : public cppu::WeakImplHelper +class TextConversionImpl final : public cppu::WeakImplHelper < css::i18n::XExtendedTextConversion, css::lang::XServiceInfo diff --git a/i18npool/inc/texttonum.hxx b/i18npool/inc/texttonum.hxx index 7f10cca9f4db..de8fa829530d 100644 --- a/i18npool/inc/texttonum.hxx +++ b/i18npool/inc/texttonum.hxx @@ -25,7 +25,7 @@ namespace i18npool { #define TRANSLITERATION_TEXTTONUM( name ) \ -class TextToNum##name : public transliteration_Numeric \ +class TextToNum##name final : public transliteration_Numeric \ { \ public: \ TextToNum##name (); \ diff --git a/i18npool/inc/transliterationImpl.hxx b/i18npool/inc/transliterationImpl.hxx index 21ca033ab4b5..822ab835aec5 100644 --- a/i18npool/inc/transliterationImpl.hxx +++ b/i18npool/inc/transliterationImpl.hxx @@ -29,7 +29,7 @@ namespace com::sun::star::uno { class XComponentContext; } namespace i18npool { -class TransliterationImpl : public cppu::WeakImplHelper +class TransliterationImpl final : public cppu::WeakImplHelper < css::i18n::XExtendedTransliteration, css::lang::XServiceInfo diff --git a/i18npool/inc/transliteration_Ignore.hxx b/i18npool/inc/transliteration_Ignore.hxx index f8b9a554f4b2..838c48d53803 100644 --- a/i18npool/inc/transliteration_Ignore.hxx +++ b/i18npool/inc/transliteration_Ignore.hxx @@ -71,7 +71,7 @@ protected: }; #define TRANSLITERATION_IGNORE( name ) \ -class ignore##name : public transliteration_Ignore {\ +class ignore##name final : public transliteration_Ignore {\ public:\ ignore##name ();\ }; @@ -89,7 +89,7 @@ TRANSLITERATION_IGNORE(TraditionalKanji_ja_JP) TRANSLITERATION_IGNORE(ZiZu_ja_JP) TRANSLITERATION_IGNORE(Kashida_CTL) -class ignoreDiacritics_CTL : public transliteration_Ignore +class ignoreDiacritics_CTL final : public transliteration_Ignore { icu::Transliterator* m_transliterator; @@ -106,7 +106,7 @@ public: #undef TRANSLITERATION_IGNORE #define TRANSLITERATION_IGNORE( name ) \ -class ignore##name : public transliteration_Ignore {\ +class ignore##name final : public transliteration_Ignore {\ public:\ ignore##name () {\ func = nullptr;\ @@ -127,7 +127,7 @@ TRANSLITERATION_IGNORE(ProlongedSoundMark_ja_JP) #undef TRANSLITERATION_IGNORE #define TRANSLITERATION_IGNORE( name ) \ -class ignore##name : public transliteration_Ignore {\ +class ignore##name final : public transliteration_Ignore {\ public:\ ignore##name () {\ func = nullptr;\ diff --git a/i18npool/inc/transliteration_OneToOne.hxx b/i18npool/inc/transliteration_OneToOne.hxx index fc45755c9f13..45a3f61a9a37 100644 --- a/i18npool/inc/transliteration_OneToOne.hxx +++ b/i18npool/inc/transliteration_OneToOne.hxx @@ -55,7 +55,7 @@ protected: }; #define TRANSLITERATION_ONETOONE( name ) \ -class name : public transliteration_OneToOne \ +class name final : public transliteration_OneToOne \ { \ public: \ name (); \ @@ -71,21 +71,21 @@ TRANSLITERATION_ONETOONE( fullwidthToHalfwidth ) TRANSLITERATION_ONETOONE( fullwidthKatakanaToHalfwidthKatakana ) TRANSLITERATION_ONETOONE( fullwidthToHalfwidthLikeASC ) -class halfwidthToFullwidth : public transliteration_OneToOne +class halfwidthToFullwidth final : public transliteration_OneToOne { public: halfwidthToFullwidth(); OUString transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; -class halfwidthKatakanaToFullwidthKatakana : public transliteration_OneToOne +class halfwidthKatakanaToFullwidthKatakana final : public transliteration_OneToOne { public: halfwidthKatakanaToFullwidthKatakana(); OUString transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; -class halfwidthToFullwidthLikeJIS : public transliteration_OneToOne +class halfwidthToFullwidthLikeJIS final : public transliteration_OneToOne { public: halfwidthToFullwidthLikeJIS(); @@ -96,7 +96,7 @@ public: #undef TRANSLITERATION_ONETOONE #define TRANSLITERATION_ONETOONE( name ) \ -class name : public transliteration_OneToOne \ +class name final : public transliteration_OneToOne \ { \ public: \ name (); \ diff --git a/i18npool/inc/transliteration_body.hxx b/i18npool/inc/transliteration_body.hxx index 5476cc841454..aea4cd79531e 100644 --- a/i18npool/inc/transliteration_body.hxx +++ b/i18npool/inc/transliteration_body.hxx @@ -55,32 +55,32 @@ protected: MappingType nMappingType; }; -class Transliteration_u2l : public Transliteration_body +class Transliteration_u2l final : public Transliteration_body { public: Transliteration_u2l(); }; -class Transliteration_l2u : public Transliteration_body +class Transliteration_l2u final : public Transliteration_body { public: Transliteration_l2u(); }; -class Transliteration_casemapping : public Transliteration_body +class Transliteration_casemapping final : public Transliteration_body { public: Transliteration_casemapping(); void setMappingType(const MappingType rMappingType, const css::lang::Locale& rLocale ); }; -class Transliteration_togglecase : public Transliteration_body +class Transliteration_togglecase final : public Transliteration_body { public: Transliteration_togglecase(); }; -class Transliteration_titlecase : public Transliteration_body +class Transliteration_titlecase final : public Transliteration_body { public: Transliteration_titlecase(); @@ -89,7 +89,7 @@ public: css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; -class Transliteration_sentencecase : public Transliteration_body +class Transliteration_sentencecase final : public Transliteration_body { public: Transliteration_sentencecase(); diff --git a/i18npool/inc/unoscripttypedetector.hxx b/i18npool/inc/unoscripttypedetector.hxx index bf4ae87f6f14..2e1d3f2ff88e 100644 --- a/i18npool/inc/unoscripttypedetector.hxx +++ b/i18npool/inc/unoscripttypedetector.hxx @@ -26,7 +26,7 @@ -class UnoScriptTypeDetector : public cppu::WeakImplHelper +class UnoScriptTypeDetector final : public cppu::WeakImplHelper < css::i18n::XScriptTypeDetector, css::lang::XServiceInfo -- cgit