diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-10 15:34:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-11 11:59:28 +0100 |
commit | 341af9e2644d30224bfc9a1cca546fac1eb94007 (patch) | |
tree | 9bd7f74ed9ade281aba2f2ac41d5ac4c6ab50638 | |
parent | e0cbd8aa20457a884c14744b48f4132881a329c7 (diff) |
loplugin:finalclasses in starmath
Change-Id: I65ac9a8767c298c50606a3b269a227dd1513a112
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86550
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | shell/inc/xml_parser.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/ElementsDockingWindow.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/action.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/dialog.hxx | 22 | ||||
-rw-r--r-- | starmath/inc/edit.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/format.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 48 | ||||
-rw-r--r-- | starmath/inc/smmod.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/unomodel.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/visitors.hxx | 20 |
11 files changed, 55 insertions, 55 deletions
diff --git a/shell/inc/xml_parser.hxx b/shell/inc/xml_parser.hxx index 8dc3a62bc37e..b9f12a42f64c 100644 --- a/shell/inc/xml_parser.hxx +++ b/shell/inc/xml_parser.hxx @@ -25,7 +25,7 @@ #include <sal/types.h> -class xml_parser_exception : public std::runtime_error +class xml_parser_exception final : public std::runtime_error { public: diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index dbfb3734b8d8..c5645b70894a 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -53,7 +53,7 @@ public: virtual bool isSeparator() const { return false; } }; -class SmElementSeparator : public SmElement +class SmElementSeparator final : public SmElement { public: SmElementSeparator(); @@ -160,7 +160,7 @@ public: virtual FactoryFunction GetUITestFactory() const override; }; -class SmElementsDockingWindow : public SfxDockingWindow +class SmElementsDockingWindow final : public SfxDockingWindow { VclPtr<SmElementsControl> mpElementsControl; VclPtr<ListBox> mpElementListBox; diff --git a/starmath/inc/action.hxx b/starmath/inc/action.hxx index cde1e0ce3b47..da8d94402b56 100644 --- a/starmath/inc/action.hxx +++ b/starmath/inc/action.hxx @@ -25,7 +25,7 @@ class SmDocShell; -class SmFormatAction: public SfxUndoAction +class SmFormatAction final : public SfxUndoAction { SmDocShell *pDoc; SmFormat const aOldFormat; diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 615053baff78..48910cafec89 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -38,7 +38,7 @@ void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont); /**************************************************************************/ -class SmPrintOptionsTabPage : public SfxTabPage +class SmPrintOptionsTabPage final : public SfxTabPage { std::unique_ptr<weld::CheckButton> m_xTitle; std::unique_ptr<weld::CheckButton> m_xText; @@ -65,7 +65,7 @@ public: /**************************************************************************/ -class SmShowFont : public weld::CustomWidgetController +class SmShowFont final : public weld::CustomWidgetController { virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; @@ -105,7 +105,7 @@ public: /**************************************************************************/ -class SmFontSizeDialog : public weld::GenericDialogController +class SmFontSizeDialog final : public weld::GenericDialogController { std::unique_ptr<weld::MetricSpinButton> m_xBaseSize; std::unique_ptr<weld::MetricSpinButton> m_xTextSize; @@ -127,7 +127,7 @@ public: /**************************************************************************/ -class SmFontTypeDialog : public weld::GenericDialogController +class SmFontTypeDialog final : public weld::GenericDialogController { VclPtr<OutputDevice> pFontListDev; @@ -182,7 +182,7 @@ public: } }; -class SmDistanceDialog : public weld::GenericDialogController +class SmDistanceDialog final : public weld::GenericDialogController { std::unique_ptr<weld::Frame> m_xFrame; std::unique_ptr<weld::Label> m_xFixedText1; @@ -222,7 +222,7 @@ public: /**************************************************************************/ -class SmAlignDialog : public weld::GenericDialogController +class SmAlignDialog final : public weld::GenericDialogController { std::unique_ptr<weld::RadioButton> m_xLeft; std::unique_ptr<weld::RadioButton> m_xCenter; @@ -241,7 +241,7 @@ public: /**************************************************************************/ -class SmShowSymbolSet : public weld::CustomWidgetController +class SmShowSymbolSet final : public weld::CustomWidgetController { Size m_aOldSize; SymbolPtrVec_t aSymbolSet; @@ -284,7 +284,7 @@ public: void SetDblClickHdl(const Link<SmShowSymbolSet&,void>& rLink) { aDblClickHdlLink = rLink; } }; -class SmShowSymbol : public weld::CustomWidgetController +class SmShowSymbol final : public weld::CustomWidgetController { private: vcl::Font m_aFont; @@ -317,7 +317,7 @@ public: void SetDblClickHdl(const Link<SmShowSymbol&,void> &rLink) { aDblClickHdlLink = rLink; } }; -class SmSymbolDialog : public weld::GenericDialogController +class SmSymbolDialog final : public weld::GenericDialogController { SmViewShell &rViewSh; SmSymbolManager &rSymbolMgr; @@ -357,7 +357,7 @@ public: void SelectSymbol(sal_uInt16 nSymbolPos); }; -class SmShowChar : public weld::CustomWidgetController +class SmShowChar final : public weld::CustomWidgetController { private: OUString m_aText; @@ -386,7 +386,7 @@ public: const vcl::Font& GetFont() const { return m_aFont; } }; -class SmSymDefineDialog : public weld::GenericDialogController +class SmSymDefineDialog final : public weld::GenericDialogController { VclPtr<VirtualDevice> m_xVirDev; SmSymbolManager m_aSymbolMgrCopy; diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 2c732cccaa70..c1ce769ab1c6 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -42,7 +42,7 @@ namespace svtools { class ColorConfig; } void SmGetLeftSelectionPart(const ESelection &rSelection, sal_Int32 &nPara, sal_uInt16 &nPos); -class SmEditWindow : public vcl::Window, public DropTargetHelper +class SmEditWindow final : public vcl::Window, public DropTargetHelper { rtl::Reference<SmEditAccessible> mxAccessible; diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index 7b342a41195d..14fbfc2a6edd 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -88,7 +88,7 @@ enum class SmHorAlign { Right }; -class SmFormat : public SfxBroadcaster +class SmFormat final : public SfxBroadcaster { SmFace vFont[FNT_END + 1]; bool bDefaultFont[FNT_END + 1]; diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 845da0a95fc0..7694007144d9 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -318,7 +318,7 @@ public: * * Used for drawing the line in the OVER and OVERSTRIKE commands. */ -class SmRectangleNode : public SmGraphicNode +class SmRectangleNode final : public SmGraphicNode { Size maToSize; @@ -341,7 +341,7 @@ public: * * Used to draw the slash of the WIDESLASH command by SmBinDiagonalNode. */ -class SmPolyLineNode : public SmGraphicNode +class SmPolyLineNode final : public SmGraphicNode { tools::Polygon maPoly; Size maToSize; @@ -458,7 +458,7 @@ public: * For these commands an instance of SmGlyphSpecialNode is used for the * operator token, following the command. */ -class SmGlyphSpecialNode : public SmSpecialNode +class SmGlyphSpecialNode final : public SmSpecialNode { public: explicit SmGlyphSpecialNode(const SmToken &rNodeToken) @@ -504,7 +504,7 @@ public: * represent math symbols that should be exported as <mi> elements rather than * <mo> elements. */ -class SmMathIdentifierNode : public SmMathSymbolNode +class SmMathIdentifierNode final : public SmMathSymbolNode { public: explicit SmMathIdentifierNode(const SmToken &rNodeToken) @@ -518,7 +518,7 @@ public: * the line with the line above. I don't think this node should be used for * anything else. */ -class SmRootSymbolNode : public SmMathSymbolNode +class SmRootSymbolNode final : public SmMathSymbolNode { sal_uLong mnBodyWidth; // width of body (argument) of root sign @@ -543,7 +543,7 @@ public: * written. * It is drawn as a square with a shadow. */ -class SmPlaceNode : public SmMathSymbolNode +class SmPlaceNode final : public SmMathSymbolNode { public: explicit SmPlaceNode(const SmToken &rNodeToken) @@ -563,7 +563,7 @@ public: * This node is used for parsing errors and draws a questionmark turned upside * down (inverted question mark). */ -class SmErrorNode : public SmMathSymbolNode +class SmErrorNode final : public SmMathSymbolNode { public: explicit SmErrorNode(const SmToken &rNodeToken) @@ -585,7 +585,7 @@ public: * children are instances of SmLineNode, and in some obscure cases the child * can be an instance of SmExpressionNode, mainly when errors occur. */ -class SmTableNode : public SmStructureNode +class SmTableNode final : public SmStructureNode { long mnFormulaBaseline; public: @@ -642,7 +642,7 @@ public: * an expression node that allows "B + C" to be the denominator of the * SmBinVerNode, that the OVER command creates. */ -class SmExpressionNode : public SmLineNode +class SmExpressionNode final : public SmLineNode { public: explicit SmExpressionNode(const SmToken &rNodeToken) @@ -659,7 +659,7 @@ public: * * The same as SmBinHorNode except this is for unary operators. */ -class SmUnHorNode : public SmStructureNode +class SmUnHorNode final : public SmStructureNode { public: explicit SmUnHorNode(const SmToken &rNodeToken) @@ -683,7 +683,7 @@ public: * 2: Body<BR> * Where argument is optional and may be NULL. */ -class SmRootNode : public SmStructureNode +class SmRootNode final : public SmStructureNode { public: explicit SmRootNode(const SmToken &rNodeToken) @@ -715,7 +715,7 @@ public: * * None of the children may be NULL. */ -class SmBinHorNode : public SmStructureNode +class SmBinHorNode final : public SmStructureNode { public: explicit SmBinHorNode(const SmToken &rNodeToken) @@ -747,7 +747,7 @@ public: * 2: Denominator<BR> * None of the children may be NULL. */ -class SmBinVerNode : public SmStructureNode +class SmBinVerNode final : public SmStructureNode { public: explicit SmBinVerNode(const SmToken &rNodeToken) @@ -773,7 +773,7 @@ public: * 2: Line (instance of SmPolyLineNode).<BR> * None of the children may be NULL. */ -class SmBinDiagonalNode : public SmStructureNode +class SmBinDiagonalNode final : public SmStructureNode { bool mbAscending; @@ -835,7 +835,7 @@ enum SmSubSup * It is recommended that you access children using GetBody() and * GetSubSup(). */ -class SmSubSupNode : public SmStructureNode +class SmSubSupNode final : public SmStructureNode { bool mbUseLimits; @@ -887,7 +887,7 @@ public: * * Note that child 1 (Body) is usually SmBracebodyNode, but it can also be e.g. SmExpressionNode. */ -class SmBraceNode : public SmStructureNode +class SmBraceNode final : public SmStructureNode { public: explicit SmBraceNode(const SmToken &rNodeToken) @@ -917,7 +917,7 @@ public: * In this case SmBracebodyNode will have three children, "[body1]", "|" and * [body2]. */ -class SmBracebodyNode : public SmStructureNode +class SmBracebodyNode final : public SmStructureNode { long mnBodyHeight; @@ -946,7 +946,7 @@ public: * 2: script<BR> * (None of these children are optional, e.g. they must all be not NULL). */ -class SmVerticalBraceNode : public SmStructureNode +class SmVerticalBraceNode final : public SmStructureNode { public: explicit inline SmVerticalBraceNode(const SmToken &rNodeToken); @@ -979,7 +979,7 @@ inline SmVerticalBraceNode::SmVerticalBraceNode(const SmToken &rNodeToken) * None of the children may be NULL. * */ -class SmOperNode : public SmStructureNode +class SmOperNode final : public SmStructureNode { public: explicit SmOperNode(const SmToken &rNodeToken) @@ -1004,7 +1004,7 @@ public: * * This node has exactly one child at index 0. */ -class SmAlignNode : public SmStructureNode +class SmAlignNode final : public SmStructureNode { public: explicit SmAlignNode(const SmToken &rNodeToken) @@ -1026,7 +1026,7 @@ public: * 1: Body<BR> * None of these may be NULL. */ -class SmAttributNode : public SmStructureNode +class SmAttributNode final : public SmStructureNode { public: explicit SmAttributNode(const SmToken &rNodeToken) @@ -1048,7 +1048,7 @@ public: * * Used to change the font of its children. */ -class SmFontNode : public SmStructureNode +class SmFontNode final : public SmStructureNode { FontSizeType meSizeType; Fraction maFontSize; @@ -1077,7 +1077,7 @@ public: * Used to implement the MATRIX command, example: * "matrix{ 1 # 2 ## 3 # 4}". */ -class SmMatrixNode : public SmStructureNode +class SmMatrixNode final : public SmStructureNode { sal_uInt16 mnNumRows, mnNumCols; @@ -1106,7 +1106,7 @@ public: * * Used to implement the commands "~" and "`". This node is just a blank space. */ -class SmBlankNode : public SmGraphicNode +class SmBlankNode final : public SmGraphicNode { sal_uInt16 mnNum; diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 3dcbbcfe50b2..ceed3f2bc30c 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -62,7 +62,7 @@ public: static OUString GetExportSymbolSetName( const OUString &rUiName ); }; -class SmModule : public SfxModule, public utl::ConfigurationListener +class SmModule final : public SfxModule, public utl::ConfigurationListener { std::unique_ptr<svtools::ColorConfig> mpColorConfig; std::unique_ptr<SmMathConfig> mpConfig; diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index 1944f15aa5e5..b2b536dd6d62 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -43,7 +43,7 @@ public: }; -class SmModel : public SfxBaseModel, +class SmModel final : public SfxBaseModel, public comphelper::PropertySetHelper, public css::lang::XServiceInfo, public css::view::XRenderable, @@ -51,7 +51,7 @@ class SmModel : public SfxBaseModel, public oox::FormulaImportBase { std::unique_ptr<SmPrintUIOptions> m_pPrintUIOptions; -protected: + virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) override; virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) override; public: diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index bcd5736a27a5..0ce2ff346079 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -68,7 +68,7 @@ SmViewShell * SmGetActiveView(); bool IsItalic( const vcl::Font &rFont ); bool IsBold( const vcl::Font &rFont ); -class SmFace : public vcl::Font +class SmFace final : public vcl::Font { long nBorderWidth; diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index e90e3e187a40..7962180482ca 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -104,7 +104,7 @@ protected: // SmCaretDrawingVisitor /** Visitor for drawing a caret position */ -class SmCaretDrawingVisitor : public SmDefaultingVisitor +class SmCaretDrawingVisitor final : public SmDefaultingVisitor { public: /** Given position and device this constructor will draw the caret */ @@ -118,7 +118,7 @@ private: /** Offset to draw from */ Point const maOffset; bool const mbCaretVisible; -protected: + /** Default method for drawing pNodes */ void DefaultVisit( SmNode* pNode ) override; }; @@ -126,7 +126,7 @@ protected: // SmCaretPos2LineVisitor /** Visitor getting a line from a caret position */ -class SmCaretPos2LineVisitor : public SmDefaultingVisitor +class SmCaretPos2LineVisitor final : public SmDefaultingVisitor { public: /** Given position and device this constructor will compute a line for the caret */ @@ -148,7 +148,7 @@ private: SmCaretLine maLine; VclPtr<OutputDevice> mpDev; SmCaretPos maPos; -protected: + /** Default method for computing lines for pNodes */ void DefaultVisit( SmNode* pNode ) override; }; @@ -156,7 +156,7 @@ protected: // SmDrawingVisitor /** Visitor for drawing SmNodes to OutputDevice */ -class SmDrawingVisitor : public SmVisitor +class SmDrawingVisitor final : public SmVisitor { public: /** Create an instance of SmDrawingVisitor, and use it to draw a formula @@ -224,7 +224,7 @@ private: /** Set Selection Visitor * Sets the IsSelected( ) property on all SmNodes of the tree */ -class SmSetSelectionVisitor : public SmDefaultingVisitor +class SmSetSelectionVisitor final : public SmDefaultingVisitor { public: SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos endPos, SmNode* pNode); @@ -283,7 +283,7 @@ private: * pRightMost: A pointer to the right most position in the called line entry, if no there's * no caret positions in called line entry don't change this variable. */ -class SmCaretPosGraphBuildingVisitor : public SmVisitor +class SmCaretPosGraphBuildingVisitor final : public SmVisitor { public: /** Builds a caret position graph for pRootNode */ @@ -331,7 +331,7 @@ private: * * This visitor creates deep clones. */ -class SmCloningVisitor : public SmVisitor +class SmCloningVisitor final : public SmVisitor { public: SmCloningVisitor() @@ -378,7 +378,7 @@ private: // SmSelectionDrawingVisitor -class SmSelectionDrawingVisitor : public SmDefaultingVisitor +class SmSelectionDrawingVisitor final : public SmDefaultingVisitor { public: /** Draws a selection on rDevice for the selection on pTree */ @@ -404,7 +404,7 @@ private: // SmNodeToTextVisitor /** Extract command text from pNodes */ -class SmNodeToTextVisitor : public SmVisitor +class SmNodeToTextVisitor final : public SmVisitor { public: SmNodeToTextVisitor( SmNode* pNode, OUString &rText ); |