From efc0877f8fd33ad9369d06e5b638037c8d6a1b24 Mon Sep 17 00:00:00 2001 From: Yuriy Skalko Date: Thu, 1 Oct 2020 10:42:11 +0300 Subject: [PATCH] Add `override` specifiers to improve code maintainability --- src/AppleSpellChecker.h | 26 ++--- src/AspellChecker.h | 20 ++-- src/EnchantChecker.h | 20 ++-- src/HunspellChecker.h | 20 ++-- src/LyX.cpp | 2 +- src/Mover.h | 10 +- src/Session.h | 28 ++--- src/Text.cpp | 6 +- src/TextClass.h | 2 +- src/Trans.h | 18 ++-- src/frontends/NullPainter.h | 40 +++---- src/frontends/qt/CategorizedCombo.cpp | 6 +- src/frontends/qt/DialogView.h | 14 +-- src/frontends/qt/DockView.h | 14 +-- src/frontends/qt/FancyLineEdit.cpp | 2 +- src/frontends/qt/FindAndReplace.h | 14 +-- src/frontends/qt/FloatPlacement.h | 12 +-- src/frontends/qt/GuiAbout.h | 6 +- src/frontends/qt/GuiApplication.cpp | 20 ++-- src/frontends/qt/GuiBibitem.h | 12 +-- src/frontends/qt/GuiBibtex.h | 12 +-- src/frontends/qt/GuiBox.h | 12 +-- src/frontends/qt/GuiBranch.h | 12 +-- src/frontends/qt/GuiChanges.h | 12 +-- src/frontends/qt/GuiCharacter.h | 18 ++-- src/frontends/qt/GuiCitation.h | 18 ++-- src/frontends/qt/GuiCommandBuffer.cpp | 4 +- src/frontends/qt/GuiCompare.h | 14 +-- src/frontends/qt/GuiCompareHistory.h | 10 +- src/frontends/qt/GuiCompleter.cpp | 8 +- src/frontends/qt/GuiCounter.h | 14 +-- src/frontends/qt/GuiDelimiter.h | 8 +- src/frontends/qt/GuiDialog.h | 16 +-- src/frontends/qt/GuiDocument.cpp | 8 +- src/frontends/qt/GuiDocument.h | 18 ++-- src/frontends/qt/GuiERT.h | 12 +-- src/frontends/qt/GuiErrorList.h | 10 +- src/frontends/qt/GuiExternal.h | 12 +-- src/frontends/qt/GuiFontMetrics.h | 52 +++++----- src/frontends/qt/GuiGraphics.h | 14 +-- src/frontends/qt/GuiHSpace.h | 12 +-- src/frontends/qt/GuiHyperlink.h | 14 +-- src/frontends/qt/GuiInclude.h | 14 +-- src/frontends/qt/GuiIndex.h | 12 +-- src/frontends/qt/GuiInfo.h | 14 +-- src/frontends/qt/GuiLabel.h | 14 +-- src/frontends/qt/GuiLine.h | 12 +-- src/frontends/qt/GuiListings.h | 14 +-- src/frontends/qt/GuiLog.cpp | 2 +- src/frontends/qt/GuiLog.h | 12 +-- src/frontends/qt/GuiLyXFiles.h | 16 +-- src/frontends/qt/GuiMathMatrix.h | 8 +- src/frontends/qt/GuiNomenclature.h | 14 +-- src/frontends/qt/GuiNote.h | 12 +-- src/frontends/qt/GuiParagraph.h | 16 +-- src/frontends/qt/GuiPhantom.h | 12 +-- src/frontends/qt/GuiPrefs.cpp | 8 +- src/frontends/qt/GuiPrefs.h | 10 +- src/frontends/qt/GuiPrintNomencl.h | 12 +-- src/frontends/qt/GuiPrintindex.h | 12 +-- src/frontends/qt/GuiProgressView.h | 20 ++-- src/frontends/qt/GuiRef.h | 18 ++-- src/frontends/qt/GuiSearch.h | 8 +- src/frontends/qt/GuiSendto.h | 16 +-- src/frontends/qt/GuiShowFile.h | 10 +- src/frontends/qt/GuiSpellchecker.h | 10 +- src/frontends/qt/GuiSymbols.cpp | 8 +- src/frontends/qt/GuiSymbols.h | 10 +- src/frontends/qt/GuiTabular.h | 12 +-- src/frontends/qt/GuiTabularCreate.h | 12 +-- src/frontends/qt/GuiTexinfo.h | 12 +-- src/frontends/qt/GuiThesaurus.h | 14 +-- src/frontends/qt/GuiToc.h | 16 +-- src/frontends/qt/GuiToolbar.cpp | 2 +- src/frontends/qt/GuiVSpace.h | 12 +-- src/frontends/qt/GuiView.cpp | 4 +- src/frontends/qt/GuiViewSource.h | 24 ++--- src/frontends/qt/GuiWorkArea.h | 2 +- src/frontends/qt/GuiWrap.h | 12 +-- src/frontends/qt/InGuiThread.h | 4 +- src/frontends/qt/InsetParamsDialog.h | 12 +-- src/frontends/qt/LayoutBox.cpp | 6 +- src/frontends/qt/Menus.cpp | 2 +- src/insets/ExternalTransforms.h | 32 +++--- src/insets/Inset.h | 2 +- src/insets/InsetArgument.h | 54 +++++----- src/insets/InsetBibitem.h | 28 ++--- src/insets/InsetBibtex.h | 36 +++---- src/insets/InsetBox.h | 48 ++++----- src/insets/InsetBranch.h | 44 ++++---- src/insets/InsetCaption.h | 54 +++++----- src/insets/InsetCaptionable.h | 6 +- src/insets/InsetCitation.h | 36 +++---- src/insets/InsetCollapsible.h | 58 +++++------ src/insets/InsetCommand.h | 34 +++--- src/insets/InsetCounter.h | 28 ++--- src/insets/InsetERT.h | 30 +++--- src/insets/InsetExternal.h | 48 ++++----- src/insets/InsetFlex.h | 22 ++-- src/insets/InsetFloat.h | 44 ++++---- src/insets/InsetFloatList.h | 28 ++--- src/insets/InsetFoot.h | 20 ++-- src/insets/InsetFootlike.h | 12 +-- src/insets/InsetGraphics.h | 60 +++++------ src/insets/InsetHyperlink.h | 34 +++--- src/insets/InsetIPA.h | 42 ++++---- src/insets/InsetIPAMacro.h | 68 ++++++------ src/insets/InsetInclude.h | 48 ++++----- src/insets/InsetIndex.h | 64 ++++++------ src/insets/InsetInfo.h | 40 +++---- src/insets/InsetLabel.h | 30 +++--- src/insets/InsetLayout.h | 2 +- src/insets/InsetLine.h | 24 ++--- src/insets/InsetListings.h | 38 +++---- src/insets/InsetMarginal.h | 12 +-- src/insets/InsetNewline.h | 30 +++--- src/insets/InsetNewpage.h | 28 ++--- src/insets/InsetNomencl.h | 46 ++++---- src/insets/InsetNote.h | 38 +++---- src/insets/InsetPhantom.h | 34 +++--- src/insets/InsetPreview.h | 30 +++--- src/insets/InsetQuotes.h | 38 +++---- src/insets/InsetRef.h | 38 +++---- src/insets/InsetScript.h | 52 +++++----- src/insets/InsetSeparator.h | 32 +++--- src/insets/InsetSpace.h | 48 ++++----- src/insets/InsetSpecialChar.h | 42 ++++---- src/insets/InsetTOC.h | 22 ++-- src/insets/InsetTabular.h | 144 +++++++++++++------------- src/insets/InsetText.h | 112 ++++++++++---------- src/insets/InsetVSpace.h | 32 +++--- src/insets/InsetWrap.h | 36 +++---- src/insets/RenderButton.h | 8 +- src/insets/RenderGraphic.h | 8 +- src/insets/RenderPreview.h | 12 +-- src/mathed/InsetMath.h | 18 ++-- src/mathed/InsetMathAMSArray.h | 38 +++---- src/mathed/InsetMathArray.h | 28 ++--- src/mathed/InsetMathBig.h | 22 ++-- src/mathed/InsetMathBoldSymbol.h | 24 ++--- src/mathed/InsetMathBox.h | 84 +++++++-------- src/mathed/InsetMathBrace.h | 28 ++--- src/mathed/InsetMathCancel.h | 20 ++-- src/mathed/InsetMathCancelto.h | 20 ++-- src/mathed/InsetMathCases.h | 34 +++--- src/mathed/InsetMathChar.h | 32 +++--- src/mathed/InsetMathClass.h | 16 +-- src/mathed/InsetMathColor.h | 22 ++-- src/mathed/InsetMathCommand.h | 14 +-- src/mathed/InsetMathComment.h | 26 ++--- src/mathed/InsetMathDecoration.h | 28 ++--- src/mathed/InsetMathDelim.h | 32 +++--- src/mathed/InsetMathDiagram.h | 22 ++-- src/mathed/InsetMathDiff.h | 18 ++-- src/mathed/InsetMathDots.h | 16 +-- src/mathed/InsetMathEnsureMath.h | 24 ++--- src/mathed/InsetMathEnv.h | 14 +-- src/mathed/InsetMathExFunc.h | 22 ++-- src/mathed/InsetMathExInt.h | 20 ++-- src/mathed/InsetMathFont.h | 34 +++--- src/mathed/InsetMathFontOld.h | 24 ++--- src/mathed/InsetMathFrac.h | 72 ++++++------- src/mathed/InsetMathGrid.h | 68 ++++++------ src/mathed/InsetMathHull.h | 120 ++++++++++----------- src/mathed/InsetMathKern.h | 16 +-- src/mathed/InsetMathLefteqn.h | 12 +-- src/mathed/InsetMathLim.h | 18 ++-- src/mathed/InsetMathMacro.cpp | 38 +++---- src/mathed/InsetMathMacro.h | 92 ++++++++-------- src/mathed/InsetMathMacroArgument.h | 14 +-- src/mathed/InsetMathMacroTemplate.cpp | 32 +++--- src/mathed/InsetMathMacroTemplate.h | 44 ++++---- src/mathed/InsetMathMatrix.h | 24 ++--- src/mathed/InsetMathNest.h | 84 +++++++-------- src/mathed/InsetMathNumber.h | 20 ++-- src/mathed/InsetMathOverset.h | 22 ++-- src/mathed/InsetMathPar.h | 14 +-- src/mathed/InsetMathPhantom.h | 20 ++-- src/mathed/InsetMathRef.h | 28 ++--- src/mathed/InsetMathRoot.h | 28 ++--- src/mathed/InsetMathScript.h | 48 ++++----- src/mathed/InsetMathSideset.h | 34 +++--- src/mathed/InsetMathSize.h | 20 ++-- src/mathed/InsetMathSpace.h | 36 +++---- src/mathed/InsetMathSpecialChar.h | 36 +++---- src/mathed/InsetMathSplit.h | 28 ++--- src/mathed/InsetMathSqrt.h | 26 ++--- src/mathed/InsetMathStackrel.h | 24 ++--- src/mathed/InsetMathString.h | 24 ++--- src/mathed/InsetMathSubstack.h | 26 ++--- src/mathed/InsetMathSymbol.h | 40 +++---- src/mathed/InsetMathTabular.h | 22 ++-- src/mathed/InsetMathUnderset.h | 22 ++-- src/mathed/InsetMathUnknown.h | 28 ++--- src/mathed/InsetMathXArrow.h | 20 ++-- src/mathed/InsetMathXYMatrix.h | 26 ++--- src/support/FileName.h | 2 +- src/support/ForkedCalls.h | 4 +- src/support/Systemcall.cpp | 26 ++--- src/support/Timeout.cpp | 2 +- src/support/docstream.cpp | 22 ++-- src/support/docstring.cpp | 68 ++++++------ src/tex2lyx/tex2lyx.cpp | 2 +- 203 files changed, 2524 insertions(+), 2526 deletions(-) diff --git a/src/AppleSpellChecker.h b/src/AppleSpellChecker.h index 13b9bd0a94..d779777245 100644 --- a/src/AppleSpellChecker.h +++ b/src/AppleSpellChecker.h @@ -24,19 +24,19 @@ public: /// \name SpellChecker inherited methods //@{ - enum Result check(WordLangTuple const &); - void suggest(WordLangTuple const &, docstring_list &); - void stem(WordLangTuple const &, docstring_list &) {} - void insert(WordLangTuple const &); - void remove(WordLangTuple const &); - void accept(WordLangTuple const &); - bool hasDictionary(Language const * lang) const; - int numDictionaries() const; - bool canCheckParagraph() const { return true; } - int numMisspelledWords() const; - void misspelledWord(int index, int & start, int & length) const; - docstring const error(); - void advanceChangeNumber(); + enum Result check(WordLangTuple const &) override; + void suggest(WordLangTuple const &, docstring_list &) override; + void stem(WordLangTuple const &, docstring_list &) override {} + void insert(WordLangTuple const &) override; + void remove(WordLangTuple const &) override; + void accept(WordLangTuple const &) override; + bool hasDictionary(Language const * lang) const override; + int numDictionaries() const override; + bool canCheckParagraph() const override { return true; } + int numMisspelledWords() const override; + void misspelledWord(int index, int & start, int & length) const override; + docstring const error() override; + void advanceChangeNumber() override; //@} private: diff --git a/src/AspellChecker.h b/src/AspellChecker.h index 74ffb7036b..d3d744ff95 100644 --- a/src/AspellChecker.h +++ b/src/AspellChecker.h @@ -25,16 +25,16 @@ public: /// \name SpellChecker inherited methods //@{ - enum Result check(WordLangTuple const &); - void suggest(WordLangTuple const &, docstring_list &); - void stem(WordLangTuple const &, docstring_list &) {} - void insert(WordLangTuple const &); - void remove(WordLangTuple const &); - void accept(WordLangTuple const &); - bool hasDictionary(Language const * lang) const; - int numDictionaries() const; - docstring const error(); - void advanceChangeNumber(); + enum Result check(WordLangTuple const &) override; + void suggest(WordLangTuple const &, docstring_list &) override; + void stem(WordLangTuple const &, docstring_list &) override {} + void insert(WordLangTuple const &) override; + void remove(WordLangTuple const &) override; + void accept(WordLangTuple const &) override; + bool hasDictionary(Language const * lang) const override; + int numDictionaries() const override; + docstring const error() override; + void advanceChangeNumber() override; //@} private: diff --git a/src/EnchantChecker.h b/src/EnchantChecker.h index 559e4c8801..22ec9bc3dd 100644 --- a/src/EnchantChecker.h +++ b/src/EnchantChecker.h @@ -31,16 +31,16 @@ public: /// SpellChecker inherited methods. ///@{ - enum Result check(WordLangTuple const &); - void suggest(WordLangTuple const &, docstring_list &); - void stem(WordLangTuple const &, docstring_list &) {} - void insert(WordLangTuple const &); - void remove(WordLangTuple const &); - void accept(WordLangTuple const &); - bool hasDictionary(Language const * lang) const; - int numDictionaries() const; - docstring const error(); - void advanceChangeNumber(); + enum Result check(WordLangTuple const &) override; + void suggest(WordLangTuple const &, docstring_list &) override; + void stem(WordLangTuple const &, docstring_list &) override {} + void insert(WordLangTuple const &) override; + void remove(WordLangTuple const &) override; + void accept(WordLangTuple const &) override; + bool hasDictionary(Language const * lang) const override; + int numDictionaries() const override; + docstring const error() override; + void advanceChangeNumber() override; ///@} private: diff --git a/src/HunspellChecker.h b/src/HunspellChecker.h index 686f014384..a7225d9ebf 100644 --- a/src/HunspellChecker.h +++ b/src/HunspellChecker.h @@ -25,16 +25,16 @@ public: /// \name SpellChecker inherited methods. ///@{ - enum Result check(WordLangTuple const &); - void suggest(WordLangTuple const &, docstring_list &); - void stem(WordLangTuple const &, docstring_list &); - void insert(WordLangTuple const &); - void remove(WordLangTuple const &); - void accept(WordLangTuple const &); - bool hasDictionary(Language const * lang) const; - int numDictionaries() const; - docstring const error(); - void advanceChangeNumber(); + enum Result check(WordLangTuple const &) override; + void suggest(WordLangTuple const &, docstring_list &) override; + void stem(WordLangTuple const &, docstring_list &) override; + void insert(WordLangTuple const &) override; + void remove(WordLangTuple const &) override; + void accept(WordLangTuple const &) override; + bool hasDictionary(Language const * lang) const override; + int numDictionaries() const override; + docstring const error() override; + void advanceChangeNumber() override; ///@} private: diff --git a/src/LyX.cpp b/src/LyX.cpp index 9b637570d5..a8bfd60543 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -234,7 +234,7 @@ public: argc_(argc), argv_(argv) { } - void doExec() + void doExec() override { int const exit_status = lyx_->execWithoutGui(argc_, argv_); exit(exit_status); diff --git a/src/Mover.h b/src/Mover.h index ff3667e469..a684a87557 100644 --- a/src/Mover.h +++ b/src/Mover.h @@ -137,13 +137,11 @@ public: std::string const & command() const { return command_; } private: - virtual bool - do_copy(support::FileName const & from, support::FileName const & to, - std::string const & latex) const; + bool do_copy(support::FileName const & from, support::FileName const & to, + std::string const & latex) const override; - virtual bool - do_rename(support::FileName const & from, support::FileName const & to, - std::string const & latex) const; + bool do_rename(support::FileName const & from, support::FileName const & to, + std::string const & latex) const override; std::string command_; }; diff --git a/src/Session.h b/src/Session.h index 65bf19de13..5af5554d96 100644 --- a/src/Session.h +++ b/src/Session.h @@ -64,10 +64,10 @@ public: explicit LastFilesSection(unsigned int num = 4); /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// Return lastfiles container (vector) LastFiles const lastFiles() const { return lastfiles; } @@ -119,10 +119,10 @@ public: public: /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// Return lastopened container (vector) LastOpened const getfiles() const { return lastopened; } @@ -161,10 +161,10 @@ public: LastFilePosSection() : num_lastfilepos(100) {} /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /** add cursor position to the fname entry in the filepos list @param pos file name and position of the cursor when the BufferView is closed. @@ -253,10 +253,10 @@ public: void clear(); /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /** return bookmark list. Non-const container is used since bookmarks will be cleaned after use. @@ -283,10 +283,10 @@ public: /// LastCommandsSection(unsigned int num); /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// Return lastcommands container (vector) LastCommands const getcommands() const { return lastcommands; } @@ -327,10 +327,10 @@ public: explicit AuthFilesSection(); /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// bool find(std::string const & name) const; @@ -351,10 +351,10 @@ public: explicit ShellEscapeSection() {}; /// - void read(std::istream & is); + void read(std::istream & is) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// bool find(std::string const & name) const; diff --git a/src/Text.cpp b/src/Text.cpp index e5969b129d..0e058641d6 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -641,14 +641,14 @@ public: virtual ~TextCompletionList() {} /// - virtual bool sorted() const { return true; } + bool sorted() const override { return true; } /// - virtual size_t size() const + size_t size() const override { return list_.size(); } /// - virtual docstring const & data(size_t idx) const + docstring const & data(size_t idx) const override { return list_.word(idx); } diff --git a/src/TextClass.h b/src/TextClass.h index 11710edfe4..fa9ac20e1d 100644 --- a/src/TextClass.h +++ b/src/TextClass.h @@ -435,7 +435,7 @@ public: /// \return true if there is a Layout with latexname lay bool hasLaTeXLayout(std::string const & lay) const; /// A DocumentClass nevers count as loaded, since it is dynamic - virtual bool loaded() const { return false; } + bool loaded() const override { return false; } /// \return the layout object of an inset given by name. If the name /// is not found as such, the part after the ':' is stripped off, and /// searched again. In this way, an error fallback can be provided: diff --git a/src/Trans.h b/src/Trans.h index 4befc65740..c200bb9544 100644 --- a/src/Trans.h +++ b/src/Trans.h @@ -238,11 +238,11 @@ public: /// TransInitState(); /// - virtual docstring const normalkey(char_type); + docstring const normalkey(char_type) override; /// - virtual bool backspace() { return true; } + bool backspace() override { return true; } /// - virtual docstring const deadkey(char_type, KmodInfo); + docstring const deadkey(char_type, KmodInfo) override; }; @@ -252,14 +252,14 @@ public: /// TransDeadkeyState(); /// - virtual docstring const normalkey(char_type); + docstring const normalkey(char_type) override; /// - virtual bool backspace() { + bool backspace() override { currentState = init_state_; return false; } /// - virtual docstring const deadkey(char_type, KmodInfo); + docstring const deadkey(char_type, KmodInfo) override; }; @@ -269,9 +269,9 @@ public: /// TransCombinedState(); /// - virtual docstring const normalkey(char_type); + docstring const normalkey(char_type) override; /// - virtual bool backspace() { + bool backspace() override { // cancel the second deadkey deadkey2_ = 0; deadkey2_info_.accent = TEX_NOACCENT; @@ -280,7 +280,7 @@ public: return false; } /// - virtual docstring const deadkey(char_type, KmodInfo); + docstring const deadkey(char_type, KmodInfo) override; }; diff --git a/src/frontends/NullPainter.h b/src/frontends/NullPainter.h index 55a773e09c..4a4b5941b7 100644 --- a/src/frontends/NullPainter.h +++ b/src/frontends/NullPainter.h @@ -31,52 +31,52 @@ public: /// draw a line from point to point void line(int, int, int, int, Color, - line_style = line_solid, int = thin_line) {} + line_style = line_solid, int = thin_line) override {} /// void lines(int const *, int const *, int, Color, fill_style = fill_none, line_style = line_solid, - int = thin_line) {} + int = thin_line) override {} /// void path(int const *, int const *, int const *, int const *, int const *, int const *, int, Color, - fill_style = fill_none, line_style = line_solid, int = thin_line) {} + fill_style = fill_none, line_style = line_solid, int = thin_line) override {} /// draw a rectangle void rectangle(int, int, int, int, Color, - line_style = line_solid, int = thin_line) {} + line_style = line_solid, int = thin_line) override {} /// draw a filled rectangle - void fillRectangle(int, int, int, int, Color) {} + void fillRectangle(int, int, int, int, Color) override {} /// draw an arc - void arc(int, int, unsigned int, unsigned int, int, int, Color) {} + void arc(int, int, unsigned int, unsigned int, int, int, Color) override {} /// draw a pixel - void point(int, int, Color) {} + void point(int, int, Color) override {} /// draw an image from the image cache - void image(int, int, int, int, graphics::Image const &) {} + void image(int, int, int, int, graphics::Image const &) override {} /// draw a string - void text(int, int, docstring const &, FontInfo const &) {} + void text(int, int, docstring const &, FontInfo const &) override {} /// draw a char - void text(int, int, char_type, FontInfo const &) {} + void text(int, int, char_type, FontInfo const &) override {} /// draw a string - void text(int, int, docstring const &, Font const &, double, double) {} + void text(int, int, docstring const &, Font const &, double, double) override {} /// void text(int, int, docstring const &, Font const &, - Color, size_type, size_type, double, double) {} + Color, size_type, size_type, double, double) override {} /// This painter does not paint - bool isNull() const { return true; } + bool isNull() const override { return true; } /// draw the underbar, strikeout, xout, uuline and uwave font attributes - void textDecoration(FontInfo const &, int, int, int) {} + void textDecoration(FontInfo const &, int, int, int) override {} /** * Draw a string and enclose it inside a rectangle. If @@ -85,22 +85,22 @@ public: * around the text with the given color. */ void rectText(int, int, docstring const &, - FontInfo const &, Color, Color) {} + FontInfo const &, Color, Color) override {} /// draw a string and enclose it inside a button frame void buttonText(int, int, docstring const &, - FontInfo const &, Color, Color, int) {} + FontInfo const &, Color, Color, int) override {} /// draw a character of a preedit string for cjk support. int preeditText(int, int, char_type, FontInfo const &, - preedit_style) { return 0; } + preedit_style) override { return 0; } /// start monochrome painting mode, i.e. map every color a shade of \c blend. - void enterMonochromeMode(Color const &) {} + void enterMonochromeMode(Color const &) override {} /// leave monochrome painting mode - void leaveMonochromeMode() {} + void leaveMonochromeMode() override {} /// draws a wavy line that can be used for underlining. - void wavyHorizontalLine(int, int, int, ColorCode) {} + void wavyHorizontalLine(int, int, int, ColorCode) override {} }; } // namespace frontend diff --git a/src/frontends/qt/CategorizedCombo.cpp b/src/frontends/qt/CategorizedCombo.cpp index f8e8ef6b91..d86bd382f8 100644 --- a/src/frontends/qt/CategorizedCombo.cpp +++ b/src/frontends/qt/CategorizedCombo.cpp @@ -49,13 +49,13 @@ public: {} /// void paint(QPainter * painter, QStyleOptionViewItem const & option, - QModelIndex const & index) const; + QModelIndex const & index) const override; /// void drawDisplay(QPainter * painter, QStyleOptionViewItem const & opt, - const QRect & /*rect*/, const QString & text ) const; + const QRect & /*rect*/, const QString & text ) const override; /// QSize sizeHint(QStyleOptionViewItem const & opt, - QModelIndex const & index) const; + QModelIndex const & index) const override; private: /// diff --git a/src/frontends/qt/DialogView.h b/src/frontends/qt/DialogView.h index aa00f64e12..b99cdebfb8 100644 --- a/src/frontends/qt/DialogView.h +++ b/src/frontends/qt/DialogView.h @@ -32,16 +32,16 @@ public: /// \param title is the window title used for decoration. DialogView(GuiView & lv, QString const & name, QString const & title); - virtual QWidget * asQWidget() { return this; } - virtual QWidget const * asQWidget() const { return this; } + QWidget * asQWidget() override { return this; } + QWidget const * asQWidget() const override { return this; } protected: /// \name Dialog inherited methods //@{ - void applyView() {} - bool initialiseParams(std::string const & /*data*/) { return true; } - void clearParams() {} - bool needBufferOpen() const { return isBufferDependent(); } + void applyView() override {} + bool initialiseParams(std::string const & /*data*/) override { return true; } + void clearParams() override {} + bool needBufferOpen() const override { return isBufferDependent(); } //@} /// Any dialog that overrides this method should make sure to call it. void closeEvent(QCloseEvent * ev); @@ -49,7 +49,7 @@ protected: void hideEvent(QHideEvent * ev); protected Q_SLOTS: - void onBufferViewChanged() {}; + void onBufferViewChanged() override {}; }; } // namespace frontend diff --git a/src/frontends/qt/DockView.h b/src/frontends/qt/DockView.h index 3c54c2ad20..897fb392ff 100644 --- a/src/frontends/qt/DockView.h +++ b/src/frontends/qt/DockView.h @@ -42,23 +42,23 @@ public: virtual ~DockView() {} - virtual QWidget * asQWidget() { return this; } - virtual QWidget const * asQWidget() const { return this; } + QWidget * asQWidget() override { return this; } + QWidget const * asQWidget() const override { return this; } /// We don't want to restore geometry session for dock widgets. - void restoreSession() {} + void restoreSession() override {} void keyPressEvent(QKeyEvent * ev); /// Dialog inherited methods //@{ - void applyView() {} - bool isClosing() const { return false; } - bool needBufferOpen() const { return false; } + void applyView() override {} + bool isClosing() const override { return false; } + bool needBufferOpen() const override { return false; } //@} protected Q_SLOTS: - void onBufferViewChanged() {} //override + void onBufferViewChanged() override {} }; } // namespace frontend diff --git a/src/frontends/qt/FancyLineEdit.cpp b/src/frontends/qt/FancyLineEdit.cpp index ca7ca48162..c7035ac7c9 100644 --- a/src/frontends/qt/FancyLineEdit.cpp +++ b/src/frontends/qt/FancyLineEdit.cpp @@ -44,7 +44,7 @@ class FancyLineEditPrivate : public QObject { public: explicit FancyLineEditPrivate(FancyLineEdit *parent); - virtual bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject *obj, QEvent *event) override; FancyLineEdit *m_lineEdit; QPixmap m_pixmap[2]; diff --git a/src/frontends/qt/FindAndReplace.h b/src/frontends/qt/FindAndReplace.h index da854da7b7..d9c5f4ad28 100644 --- a/src/frontends/qt/FindAndReplace.h +++ b/src/frontends/qt/FindAndReplace.h @@ -82,19 +82,19 @@ public: ~FindAndReplace(); - bool initialiseParams(std::string const &); - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return false; } - bool canApplyToReadOnly() const { return true; } + bool initialiseParams(std::string const &) override; + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return false; } + bool canApplyToReadOnly() const override { return true; } void selectAll(); /// update - void updateView(); + void updateView() override; //virtual void update_contents() {} protected: - virtual bool wantInitialFocus() const { return true; } + bool wantInitialFocus() const override { return true; } private: /// The encapsulated widget. diff --git a/src/frontends/qt/FloatPlacement.h b/src/frontends/qt/FloatPlacement.h index d5d9449538..ebcd8b672a 100644 --- a/src/frontends/qt/FloatPlacement.h +++ b/src/frontends/qt/FloatPlacement.h @@ -33,12 +33,12 @@ public: /// \name DialogView inherited methods //@{ - InsetCode insetCode() const { return FLOAT_CODE; } - FuncCode creationCode() const { return LFUN_FLOAT_INSERT; } - QString dialogTitle() const { return qt_("Float Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return FLOAT_CODE; } + FuncCode creationCode() const override { return LFUN_FLOAT_INSERT; } + QString dialogTitle() const override { return qt_("Float Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} /// void useWide(); diff --git a/src/frontends/qt/GuiAbout.h b/src/frontends/qt/GuiAbout.h index acd485fe89..3fa8d5b4c8 100644 --- a/src/frontends/qt/GuiAbout.h +++ b/src/frontends/qt/GuiAbout.h @@ -34,9 +34,9 @@ private Q_SLOTS: private: /// Controller stuff ///@{ - void updateView() {} - void dispatchParams() {} - bool isBufferDependent() const { return false; } + void updateView() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return false; } ///@} struct Private; diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index eb92be7517..bf91789178 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -638,12 +638,12 @@ public: : QTranslator(parent) {} - virtual QString translate(const char * /* context */, + QString translate(const char * /* context */, const char *sourceText, #if QT_VERSION >= 0x050000 - const char * /* disambiguation */ = 0, int /* n */ = -1) const + const char * /* disambiguation */ = 0, int /* n */ = -1) const override #else - const char * /*comment*/ = 0) const + const char * /*comment*/ = 0) const override #endif { // Here we declare the strings that need to be translated from Qt own GUI @@ -761,13 +761,13 @@ public: QWindowsMimeMetafile() {} bool canConvertFromMime(FORMATETC const & /*formatetc*/, - QMimeData const * /*mimedata*/) const + QMimeData const * /*mimedata*/) const override { return false; } bool canConvertToMime(QString const & mimetype, - IDataObject * pDataObj) const + IDataObject * pDataObj) const override { if (mimetype != emfMimeType() && mimetype != wmfMimeType()) return false; @@ -776,13 +776,13 @@ public: } bool convertFromMime(FORMATETC const & /*formatetc*/, - const QMimeData * /*mimedata*/, STGMEDIUM * /*pmedium*/) const + const QMimeData * /*mimedata*/, STGMEDIUM * /*pmedium*/) const override { return false; } QVariant convertToMime(QString const & mimetype, IDataObject * pDataObj, - QVariant::Type /*preferredType*/) const + QVariant::Type /*preferredType*/) const override { QByteArray data; if (!canConvertToMime(mimetype, pDataObj)) @@ -813,7 +813,7 @@ public: QVector formatsForMime(QString const & mimetype, - QMimeData const * /*mimedata*/) const + QMimeData const * /*mimedata*/) const override { QVector formats; if (mimetype == emfMimeType() || mimetype == wmfMimeType()) @@ -821,7 +821,7 @@ public: return formats; } - QString mimeForFormat(FORMATETC const & formatetc) const + QString mimeForFormat(FORMATETC const & formatetc) const override { switch (formatetc.cfFormat) { case CF_ENHMETAFILE: @@ -861,7 +861,7 @@ public: bool started() const { return started_; } - bool eventFilter(QObject *obj, QEvent *event) { + bool eventFilter(QObject *obj, QEvent *event) override { LYXERR(Debug::ACTION, "Event Type: " << event->type()); switch (event->type()) { case QEvent::Show: diff --git a/src/frontends/qt/GuiBibitem.h b/src/frontends/qt/GuiBibitem.h index d96d7c1fd7..d18f7f0fad 100644 --- a/src/frontends/qt/GuiBibitem.h +++ b/src/frontends/qt/GuiBibitem.h @@ -31,12 +31,12 @@ public: private: /// \name DialogView inherited methods //@{ - InsetCode insetCode() const { return BIBITEM_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Bibliography Item Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return BIBITEM_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Bibliography Item Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiBibtex.h b/src/frontends/qt/GuiBibtex.h index d860e3f3fd..192628c623 100644 --- a/src/frontends/qt/GuiBibtex.h +++ b/src/frontends/qt/GuiBibtex.h @@ -49,9 +49,9 @@ private Q_SLOTS: private: /// Apply changes - void applyView(); + void applyView() override; /// update - void updateContents(); + void updateContents() override; /// Browse for a .bib file QString browseBib(QString const & in_name) const; @@ -91,13 +91,13 @@ private: void setFileEncodings(std::vector const & m); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams() { params_.clear(); } + void clearParams() override { params_.clear(); } /// clean-up on hide. - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } private: /// diff --git a/src/frontends/qt/GuiBox.h b/src/frontends/qt/GuiBox.h index 4c32dcf8fa..67630bb9a0 100644 --- a/src/frontends/qt/GuiBox.h +++ b/src/frontends/qt/GuiBox.h @@ -39,12 +39,12 @@ private Q_SLOTS: private: /// \name DialogView inherited methods //@{ - InsetCode insetCode() const { return BOX_CODE; } - FuncCode creationCode() const { return LFUN_BOX_INSERT; } - QString dialogTitle() const { return qt_("Box Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return BOX_CODE; } + FuncCode creationCode() const override { return LFUN_BOX_INSERT; } + QString dialogTitle() const override { return qt_("Box Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} /// Fill the color combos diff --git a/src/frontends/qt/GuiBranch.h b/src/frontends/qt/GuiBranch.h index 69aaa81052..610afeccb8 100644 --- a/src/frontends/qt/GuiBranch.h +++ b/src/frontends/qt/GuiBranch.h @@ -30,12 +30,12 @@ public: private: /// \name DialogView inherited methods //@{ - InsetCode insetCode() const { return BRANCH_CODE; } - FuncCode creationCode() const { return LFUN_BRANCH_INSERT; } - QString dialogTitle() const { return qt_("Branch Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return BRANCH_CODE; } + FuncCode creationCode() const override { return LFUN_BRANCH_INSERT; } + QString dialogTitle() const override { return qt_("Branch Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiChanges.h b/src/frontends/qt/GuiChanges.h index 1096e6293a..fce6150e34 100644 --- a/src/frontends/qt/GuiChanges.h +++ b/src/frontends/qt/GuiChanges.h @@ -42,18 +42,18 @@ protected Q_SLOTS: private: /// - void updateContents(); + void updateContents() override; /// Nothing to initialise in this case. - bool initialiseParams(std::string const &) { return true; } + bool initialiseParams(std::string const &) override { return true; } /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// always true since dispatchParams() is empty - bool canApply() const { return true; } + bool canApply() const override { return true; } }; } // namespace frontend diff --git a/src/frontends/qt/GuiCharacter.h b/src/frontends/qt/GuiCharacter.h index 40da643dff..408f122166 100644 --- a/src/frontends/qt/GuiCharacter.h +++ b/src/frontends/qt/GuiCharacter.h @@ -75,15 +75,15 @@ protected Q_SLOTS: private: /// \name Dialog inherited methods //@{ - void applyView(); - void updateContents(); - bool initialiseParams(std::string const & data); - void clearParams() {} - void dispatchParams(); - bool isBufferDependent() const { return true; } - FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; } - void saveSession(QSettings & settings) const; - void restoreSession(); + void applyView() override; + void updateContents() override; + bool initialiseParams(std::string const & data) override; + void clearParams() override {} + void dispatchParams() override; + bool isBufferDependent() const override { return true; } + FuncCode getLfun() const override { return LFUN_TEXTSTYLE_UPDATE; } + void saveSession(QSettings & settings) const override; + void restoreSession() override; //@} /// diff --git a/src/frontends/qt/GuiCitation.h b/src/frontends/qt/GuiCitation.h index 29b7b9b485..51a53b1107 100644 --- a/src/frontends/qt/GuiCitation.h +++ b/src/frontends/qt/GuiCitation.h @@ -72,18 +72,18 @@ private Q_SLOTS: private: /// Dialog inherited methods //@{ - void applyView(); - void updateView() {} - bool initialiseParams(std::string const & data); - void clearParams(); - void dispatchParams(); - bool isBufferDependent() const { return true; } - void saveSession(QSettings & settings) const; - void restoreSession(); + void applyView() override; + void updateView() override {} + bool initialiseParams(std::string const & data) override; + void clearParams() override; + void dispatchParams() override; + bool isBufferDependent() const override { return true; } + void saveSession(QSettings & settings) const override; + void restoreSession() override; /** Disconnect from the inset when the Apply button is pressed. * Allows easy insertion of multiple citations. */ - bool disconnectOnApply() const { return true; } + bool disconnectOnApply() const override { return true; } //@} /// diff --git a/src/frontends/qt/GuiCommandBuffer.cpp b/src/frontends/qt/GuiCommandBuffer.cpp index 4d94d97738..06ca59ca06 100644 --- a/src/frontends/qt/GuiCommandBuffer.cpp +++ b/src/frontends/qt/GuiCommandBuffer.cpp @@ -56,7 +56,7 @@ public: setAttribute(Qt::WA_DeleteOnClose); } protected: - bool event(QEvent * ev) { + bool event(QEvent * ev) override { if (ev->type() == QEvent::MouseButtonPress) { QMouseEvent * me = static_cast(ev); if (me->x() < 0 || me->y() < 0 @@ -67,7 +67,7 @@ protected: return QListWidget::event(ev); } - void keyPressEvent(QKeyEvent * ev) { + void keyPressEvent(QKeyEvent * ev) override { if (ev->key() == Qt::Key_Escape) { hide(); return; diff --git a/src/frontends/qt/GuiCompare.h b/src/frontends/qt/GuiCompare.h index c6f8eaa26d..82afcd2071 100644 --- a/src/frontends/qt/GuiCompare.h +++ b/src/frontends/qt/GuiCompare.h @@ -61,19 +61,19 @@ private Q_SLOTS: private: /// - void updateContents(); + void updateContents() override; /// - bool isValid(); + bool isValid() override; /// - bool initialiseParams(std::string const &); + bool initialiseParams(std::string const &) override; /// - bool isBufferDependent() const { return false; } + bool isBufferDependent() const override { return false; } /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams() {} + void dispatchParams() override {} /// - void apply() {} + void apply() override {} /// enable or disable all controls and rename the Close/Cancel button diff --git a/src/frontends/qt/GuiCompareHistory.h b/src/frontends/qt/GuiCompareHistory.h index 72e6982340..8adbfd0866 100644 --- a/src/frontends/qt/GuiCompareHistory.h +++ b/src/frontends/qt/GuiCompareHistory.h @@ -41,15 +41,15 @@ private Q_SLOTS: void selectBetweenrev(); private: /// - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const &); + bool initialiseParams(std::string const &) override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams() {} + void dispatchParams() override {} /// void enableControls(); diff --git a/src/frontends/qt/GuiCompleter.cpp b/src/frontends/qt/GuiCompleter.cpp index c4bb561c52..6fd39d3039 100644 --- a/src/frontends/qt/GuiCompleter.cpp +++ b/src/frontends/qt/GuiCompleter.cpp @@ -59,7 +59,7 @@ public: protected: void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const + const QModelIndex &index) const override { if (index.column() == 0) { QItemDelegate::paint(painter, option, index); @@ -107,12 +107,12 @@ public: return false; } /// - int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const + int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override { return 2; } /// - int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const + int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const override { if (list_ == 0) return 0; @@ -120,7 +120,7 @@ public: } /// - QVariant data(const QModelIndex & index, int role) const + QVariant data(const QModelIndex & index, int role) const override { if (list_ == 0) return QVariant(); diff --git a/src/frontends/qt/GuiCounter.h b/src/frontends/qt/GuiCounter.h index 7b13256039..fb589d6c7d 100644 --- a/src/frontends/qt/GuiCounter.h +++ b/src/frontends/qt/GuiCounter.h @@ -32,13 +32,13 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return COUNTER_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Counters"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; - bool initialiseParams(std::string const & data); + InsetCode insetCode() const override { return COUNTER_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Counters"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; + bool initialiseParams(std::string const & data) override; //@} void processParams(InsetCommandParams const & icp); /// diff --git a/src/frontends/qt/GuiDelimiter.h b/src/frontends/qt/GuiDelimiter.h index 3d44e224b0..e0450a296d 100644 --- a/src/frontends/qt/GuiDelimiter.h +++ b/src/frontends/qt/GuiDelimiter.h @@ -28,10 +28,10 @@ class GuiDelimiter : public GuiDialog, public Ui::DelimiterUi public: GuiDelimiter(GuiView & lv); - bool initialiseParams(std::string const &) { return true; } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return true; } + bool initialiseParams(std::string const &) override { return true; } + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return true; } public Q_SLOTS: void on_buttonBox_clicked(QAbstractButton * button); diff --git a/src/frontends/qt/GuiDialog.h b/src/frontends/qt/GuiDialog.h index d5f4227c08..b48f0aafe3 100644 --- a/src/frontends/qt/GuiDialog.h +++ b/src/frontends/qt/GuiDialog.h @@ -39,8 +39,8 @@ public: /// \param title is the window title used for decoration. GuiDialog(GuiView & lv, QString const & name, QString const & title); - virtual QWidget * asQWidget() { return this; } - virtual QWidget const * asQWidget() const { return this; } + QWidget * asQWidget() override { return this; } + QWidget const * asQWidget() const override { return this; } public Q_SLOTS: /** \name Buttons @@ -65,7 +65,7 @@ public Q_SLOTS: void closeEvent(QCloseEvent * e); protected Q_SLOTS: - void onBufferViewChanged() {};//override + void onBufferViewChanged() override {} public: /** Check whether we may apply our data. @@ -85,10 +85,10 @@ public: /// the dialog has changed contents virtual void changed(); - virtual void enableView(bool enable); + void enableView(bool enable) override; /// default: do nothing - virtual void applyView() {} + void applyView() override {} /// default: do nothing virtual void updateContents() {} @@ -101,13 +101,13 @@ public: /** When applying, it's useful to know whether the dialog is about * to close or not (no point refreshing the display for example). */ - bool isClosing() const { return is_closing_; } + bool isClosing() const override { return is_closing_; } /// - bool needBufferOpen() const { return isBufferDependent(); } + bool needBufferOpen() const override { return isBufferDependent(); } /// Update the display of the dialog whilst it is still visible. - virtual void updateView(); + void updateView() override; private: ButtonController bc_; diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index 9b4b97dc76..28e4a0a969 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -289,13 +289,13 @@ public: { excluded_modules_ = em.list(); } private: /// - virtual void updateAddPB(); + void updateAddPB() override; /// - virtual void updateUpPB(); + void updateUpPB() override; /// - virtual void updateDownPB(); + void updateDownPB() override; /// - virtual void updateDelPB(); + void updateDelPB() override; /// returns availableModel as a GuiIdListModel QStandardItemModel * getAvailableModel() { diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h index 4d13f44d0f..e4446b4220 100644 --- a/src/frontends/qt/GuiDocument.h +++ b/src/frontends/qt/GuiDocument.h @@ -92,7 +92,7 @@ public: BufferParams const & params() const { return bp_; } public Q_SLOTS: - void onBufferViewChanged();//override + void onBufferViewChanged() override; // OK button clicked void slotOK(); // Apply button clicked @@ -204,9 +204,9 @@ private: GuiIdListModel * selectedModel() { return &modules_sel_model_; } /// Apply changes - void applyView(); + void applyView() override; /// update - void updateContents(); + void updateContents() override; /// void updateAvailableModules(); /// @@ -238,24 +238,24 @@ private: FancyLineEdit * filter_; /// return false if validate_listings_params returns error - bool isValid(); + bool isValid() override; /// font family names for BufferParams::fonts_default_family static char const * const fontfamilies[5]; /// GUI names corresponding fontfamilies static char const * fontfamilies_gui[5]; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams(); + void dispatchParams() override; /// void modulesToParams(BufferParams &); /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// always true since we don't manipulate document contents - bool canApply() const { return true; } + bool canApply() const override { return true; } /// DocumentClass const & documentClass() const; /// diff --git a/src/frontends/qt/GuiERT.h b/src/frontends/qt/GuiERT.h index cc4caefbaf..337692fc94 100644 --- a/src/frontends/qt/GuiERT.h +++ b/src/frontends/qt/GuiERT.h @@ -28,12 +28,12 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return ERT_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("TeX Mode Inset Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return ERT_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("TeX Mode Inset Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiErrorList.h b/src/frontends/qt/GuiErrorList.h index fe4393d581..6a560eedf9 100644 --- a/src/frontends/qt/GuiErrorList.h +++ b/src/frontends/qt/GuiErrorList.h @@ -42,15 +42,15 @@ private: /// void paramsToDialog(); /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool canApply() const { return true; } + bool canApply() const override { return true; } /// goto this error in the parent bv. Returns success. bool goTo(int item); diff --git a/src/frontends/qt/GuiExternal.h b/src/frontends/qt/GuiExternal.h index e1157e977c..28044a47fa 100644 --- a/src/frontends/qt/GuiExternal.h +++ b/src/frontends/qt/GuiExternal.h @@ -49,22 +49,22 @@ private: /// bool activateAspectratio() const; /// Apply changes - void applyView(); + void applyView() override; /// update - void updateContents(); + void updateContents() override; /// Helper function called when the template is changed. void updateTemplate(); /// bool usingScale() const; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams(); + void clearParams() override; /// clean-up on hide. - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// QString browse(QString const & input_file, diff --git a/src/frontends/qt/GuiFontMetrics.h b/src/frontends/qt/GuiFontMetrics.h index c19a3cd426..e9af0ddcd6 100644 --- a/src/frontends/qt/GuiFontMetrics.h +++ b/src/frontends/qt/GuiFontMetrics.h @@ -34,39 +34,39 @@ public: virtual ~GuiFontMetrics() {} - virtual int maxAscent() const; - virtual int maxDescent() const; - virtual Dimension const defaultDimension() const; - virtual int em() const; - virtual int xHeight() const; - virtual int lineWidth() const; - virtual int underlinePos() const; - virtual int strikeoutPos() const; - virtual bool italic() const; - virtual double italicSlope() const; - virtual int width(char_type c) const; - virtual int ascent(char_type c) const; - virtual int descent(char_type c) const; - virtual int lbearing(char_type c) const; - virtual int rbearing(char_type c) const; - virtual int width(docstring const & s) const; - virtual int signedWidth(docstring const & s) const; - virtual int pos2x(docstring const & s, int pos, bool rtl, double ws) const; - virtual int x2pos(docstring const & s, int & x, bool rtl, double ws) const; - virtual bool breakAt(docstring & s, int & x, bool rtl, bool force) const; - virtual Dimension const dimension(char_type c) const; + int maxAscent() const override; + int maxDescent() const override; + Dimension const defaultDimension() const override; + int em() const override; + int xHeight() const override; + int lineWidth() const override; + int underlinePos() const override; + int strikeoutPos() const override; + bool italic() const override; + double italicSlope() const override; + int width(char_type c) const override; + int ascent(char_type c) const override; + int descent(char_type c) const override; + int lbearing(char_type c) const override; + int rbearing(char_type c) const override; + int width(docstring const & s) const override; + int signedWidth(docstring const & s) const override; + int pos2x(docstring const & s, int pos, bool rtl, double ws) const override; + int x2pos(docstring const & s, int & x, bool rtl, double ws) const override; + bool breakAt(docstring & s, int & x, bool rtl, bool force) const override; + Dimension const dimension(char_type c) const override; - virtual void rectText(docstring const & str, + void rectText(docstring const & str, int & width, int & ascent, - int & descent) const; - virtual void buttonText(docstring const & str, + int & descent) const override; + void buttonText(docstring const & str, const int offset, int & width, int & ascent, - int & descent) const; + int & descent) const override; - int countExpanders(docstring const & str) const; + int countExpanders(docstring const & str) const override; /// int width(QString const & str) const; diff --git a/src/frontends/qt/GuiGraphics.h b/src/frontends/qt/GuiGraphics.h index 6446949daf..66f614fef4 100644 --- a/src/frontends/qt/GuiGraphics.h +++ b/src/frontends/qt/GuiGraphics.h @@ -52,15 +52,15 @@ private Q_SLOTS: private: /// - bool isValid(); + bool isValid() override; /// Dialog inherited methods //@{ - void applyView(); - void updateContents() {} - bool initialiseParams(std::string const & data); - void clearParams(); - void dispatchParams(); - bool isBufferDependent() const { return true; } + void applyView() override; + void updateContents() override {} + bool initialiseParams(std::string const & data) override; + void clearParams() override; + void dispatchParams() override; + bool isBufferDependent() const override { return true; } //@} /// diff --git a/src/frontends/qt/GuiHSpace.h b/src/frontends/qt/GuiHSpace.h index 9be11ab689..7fc00dd0b0 100644 --- a/src/frontends/qt/GuiHSpace.h +++ b/src/frontends/qt/GuiHSpace.h @@ -34,12 +34,12 @@ private Q_SLOTS: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Horizontal Space Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Horizontal Space Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} /// bool const math_mode_; diff --git a/src/frontends/qt/GuiHyperlink.h b/src/frontends/qt/GuiHyperlink.h index 3f24fce848..bedd77c75d 100644 --- a/src/frontends/qt/GuiHyperlink.h +++ b/src/frontends/qt/GuiHyperlink.h @@ -30,13 +30,13 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return HYPERLINK_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Hyperlink Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; - bool initialiseParams(std::string const & data); + InsetCode insetCode() const override { return HYPERLINK_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Hyperlink Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; + bool initialiseParams(std::string const & data) override; //@} }; diff --git a/src/frontends/qt/GuiInclude.h b/src/frontends/qt/GuiInclude.h index 1106c3e02e..1c94692ebe 100644 --- a/src/frontends/qt/GuiInclude.h +++ b/src/frontends/qt/GuiInclude.h @@ -47,15 +47,15 @@ private Q_SLOTS: private: /// - bool initialiseParams(std::string const & sdata); + bool initialiseParams(std::string const & sdata) override; /// void paramsToDialog(InsetCommandParams const & icp); /// clean-up on hide. - void clearParams() { params_.clear(); } + void clearParams() override { params_.clear(); } /// clean-up on hide. - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// enum Type { @@ -73,11 +73,11 @@ private: /// validate listings parameters and return an error message, if any docstring validate_listings_params(); /// - bool isValid(); + bool isValid() override; /// Apply changes - void applyView(); + void applyView() override; /// update - void updateContents() {} + void updateContents() override {} /// Browse for a file QString browse(QString const &, Type) const; diff --git a/src/frontends/qt/GuiIndex.h b/src/frontends/qt/GuiIndex.h index 8a74c8087d..bb99a22efd 100644 --- a/src/frontends/qt/GuiIndex.h +++ b/src/frontends/qt/GuiIndex.h @@ -34,17 +34,17 @@ private Q_SLOTS: private: /// Apply changes - void applyView(); + void applyView() override; /// Update dialog before showing it - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// InsetIndexParams params_; diff --git a/src/frontends/qt/GuiInfo.h b/src/frontends/qt/GuiInfo.h index 03973c11ad..a82f73ff93 100644 --- a/src/frontends/qt/GuiInfo.h +++ b/src/frontends/qt/GuiInfo.h @@ -35,13 +35,13 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return INFO_CODE; } - FuncCode creationCode() const { return LFUN_INFO_INSERT; } - QString dialogTitle() const { return qt_("Field Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool initialiseParams(std::string const &); - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return INFO_CODE; } + FuncCode creationCode() const override { return LFUN_INFO_INSERT; } + QString dialogTitle() const override { return qt_("Field Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool initialiseParams(std::string const &) override; + bool checkWidgets(bool readonly) const override; //@} InsetInfoParams params_; }; diff --git a/src/frontends/qt/GuiLabel.h b/src/frontends/qt/GuiLabel.h index 261f145a5e..7eb6fd4e37 100644 --- a/src/frontends/qt/GuiLabel.h +++ b/src/frontends/qt/GuiLabel.h @@ -30,13 +30,13 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return LABEL_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Label Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; - bool initialiseParams(std::string const &); + InsetCode insetCode() const override { return LABEL_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Label Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; + bool initialiseParams(std::string const &) override; //@} }; diff --git a/src/frontends/qt/GuiLine.h b/src/frontends/qt/GuiLine.h index 076d5444b1..ce4b00ffc5 100644 --- a/src/frontends/qt/GuiLine.h +++ b/src/frontends/qt/GuiLine.h @@ -29,12 +29,12 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return LINE_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Line Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return LINE_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Line Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiListings.h b/src/frontends/qt/GuiListings.h index b9717d35e7..07be5f4deb 100644 --- a/src/frontends/qt/GuiListings.h +++ b/src/frontends/qt/GuiListings.h @@ -45,19 +45,19 @@ private Q_SLOTS: void on_languageCO_currentIndexChanged(int); private: /// return false if validate_listings_params returns error - bool isValid(); + bool isValid() override; /// Apply changes - void applyView(); + void applyView() override; /// update - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams(); + void clearParams() override; /// clean-up on hide. - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// void setParams(InsetListingsParams const &); diff --git a/src/frontends/qt/GuiLog.cpp b/src/frontends/qt/GuiLog.cpp index 6d5462faa2..6851994701 100644 --- a/src/frontends/qt/GuiLog.cpp +++ b/src/frontends/qt/GuiLog.cpp @@ -62,7 +62,7 @@ public: LogHighlighter(QTextDocument * parent); private: - void highlightBlock(QString const & text); + void highlightBlock(QString const & text) override; private: QTextCharFormat infoFormat; diff --git a/src/frontends/qt/GuiLog.h b/src/frontends/qt/GuiLog.h index ba4a479f5e..dc143f1ea7 100644 --- a/src/frontends/qt/GuiLog.h +++ b/src/frontends/qt/GuiLog.h @@ -32,7 +32,7 @@ public: GuiLog(GuiView & lv); private Q_SLOTS: - void updateContents(); + void updateContents() override; /// find content void find(); /// jump to next error message @@ -46,7 +46,7 @@ private Q_SLOTS: private: /// Apply changes - void applyView() {} + void applyView() override {} /// log syntax highlighter LogHighlighter * highlighter; @@ -54,13 +54,13 @@ private: /** \param data should contain " " * where is one of "latex", "literate", "lyx2lyx", "vc". */ - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// The title displayed by the dialog reflects the \c LogType docstring title() const; diff --git a/src/frontends/qt/GuiLyXFiles.h b/src/frontends/qt/GuiLyXFiles.h index 62be392ff9..e86678be35 100644 --- a/src/frontends/qt/GuiLyXFiles.h +++ b/src/frontends/qt/GuiLyXFiles.h @@ -52,24 +52,24 @@ private Q_SLOTS: private: /// - bool isValid(); + bool isValid() override; /// Apply from dialog - void applyView(); + void applyView() override; /// Update the dialog - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// void paramsToDialog(); /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return false; } + bool isBufferDependent() const override { return false; } /// - FuncCode getLfun() const; + FuncCode getLfun() const override; /// QString const getSuffix(); /// diff --git a/src/frontends/qt/GuiMathMatrix.h b/src/frontends/qt/GuiMathMatrix.h index 532bdef5c4..8c2a7ded7c 100644 --- a/src/frontends/qt/GuiMathMatrix.h +++ b/src/frontends/qt/GuiMathMatrix.h @@ -28,10 +28,10 @@ class GuiMathMatrix : public GuiDialog, public Ui::MathMatrixUi public: GuiMathMatrix(GuiView & lv); - bool initialiseParams(std::string const &) { return true; } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return true; } + bool initialiseParams(std::string const &) override { return true; } + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return true; } public Q_SLOTS: void on_buttonBox_clicked(QAbstractButton *); diff --git a/src/frontends/qt/GuiNomenclature.h b/src/frontends/qt/GuiNomenclature.h index 30fb2c846f..3799d74767 100644 --- a/src/frontends/qt/GuiNomenclature.h +++ b/src/frontends/qt/GuiNomenclature.h @@ -31,13 +31,13 @@ public: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return NOMENCL_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Nomenclature Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; - bool initialiseParams(std::string const &); + InsetCode insetCode() const override { return NOMENCL_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Nomenclature Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; + bool initialiseParams(std::string const &) override; //@} }; diff --git a/src/frontends/qt/GuiNote.h b/src/frontends/qt/GuiNote.h index a53f55e023..bccc781427 100644 --- a/src/frontends/qt/GuiNote.h +++ b/src/frontends/qt/GuiNote.h @@ -28,17 +28,17 @@ private Q_SLOTS: void change_adaptor(); private: /// Apply changes - void applyView(); + void applyView() override; /// Update dialog before showing it - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } private: /// InsetNoteParams params_; diff --git a/src/frontends/qt/GuiParagraph.h b/src/frontends/qt/GuiParagraph.h index 49e0074d64..4e8d31bc1e 100644 --- a/src/frontends/qt/GuiParagraph.h +++ b/src/frontends/qt/GuiParagraph.h @@ -33,14 +33,14 @@ public: /// Dialog inherited methods //@{ - void applyView(); - void updateView(); - void dispatchParams(); - void enableView(bool enable); - bool isBufferDependent() const { return true; } - virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; } - void saveSession(QSettings & settings) const; - void restoreSession(); + void applyView() override; + void updateView() override; + void dispatchParams() override; + void enableView(bool enable) override; + bool isBufferDependent() const override { return true; } + FuncCode getLfun() const override { return LFUN_PARAGRAPH_PARAMS_APPLY; } + void saveSession(QSettings & settings) const override; + void restoreSession() override; //@} private: diff --git a/src/frontends/qt/GuiPhantom.h b/src/frontends/qt/GuiPhantom.h index d28a7a1493..55ae113df8 100644 --- a/src/frontends/qt/GuiPhantom.h +++ b/src/frontends/qt/GuiPhantom.h @@ -28,17 +28,17 @@ private Q_SLOTS: void change_adaptor(); private: /// Apply changes - void applyView(); + void applyView() override; /// Update dialog before showing it - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } private: /// InsetPhantomParams params_; diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index b591f1d343..c17110ecae 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -1879,8 +1879,8 @@ class FormatValidator : public QValidator { public: FormatValidator(QWidget *, Formats const & f); - void fixup(QString & input) const; - QValidator::State validate(QString & input, int & pos) const; + void fixup(QString & input) const override; + QValidator::State validate(QString & input, int & pos) const override; private: virtual QString toString(Format const & format) const = 0; int nr() const; @@ -1946,7 +1946,7 @@ public: : FormatValidator(parent, f) {} private: - QString toString(Format const & format) const + QString toString(Format const & format) const override { return toqstr(format.name()); } @@ -1966,7 +1966,7 @@ public: : FormatValidator(parent, f) {} private: - QString toString(Format const & format) const + QString toString(Format const & format) const override { return toqstr(translateIfPossible(format.prettyname())); } diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h index 3699144939..a9ea86a6fa 100644 --- a/src/frontends/qt/GuiPrefs.h +++ b/src/frontends/qt/GuiPrefs.h @@ -76,18 +76,18 @@ Q_SIGNALS: public: /// Apply changes - void applyView(); + void applyView() override; std::vector modules_; /// - bool initialiseParams(std::string const &); + bool initialiseParams(std::string const &) override; /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return false; } + bool isBufferDependent() const override { return false; } /// various file pickers QString browsebind(QString const & file); diff --git a/src/frontends/qt/GuiPrintNomencl.h b/src/frontends/qt/GuiPrintNomencl.h index ad1a195446..39571a7587 100644 --- a/src/frontends/qt/GuiPrintNomencl.h +++ b/src/frontends/qt/GuiPrintNomencl.h @@ -35,13 +35,13 @@ private Q_SLOTS: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return NOMENCL_PRINT_CODE; } - FuncCode creationCode() const { return LFUN_NOMENCL_PRINT; } - QString dialogTitle() const { return qt_("Nomenclature List Settings"); } - void paramsToDialog(Inset const *); + InsetCode insetCode() const override { return NOMENCL_PRINT_CODE; } + FuncCode creationCode() const override { return LFUN_NOMENCL_PRINT; } + QString dialogTitle() const override { return qt_("Nomenclature List Settings"); } + void paramsToDialog(Inset const *) override; void paramsToDialog(InsetCommandParams const &); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiPrintindex.h b/src/frontends/qt/GuiPrintindex.h index 74343057c2..c27a4d1e24 100644 --- a/src/frontends/qt/GuiPrintindex.h +++ b/src/frontends/qt/GuiPrintindex.h @@ -34,19 +34,19 @@ private Q_SLOTS: private: /// Apply changes - void applyView(); + void applyView() override; /// Update dialog before showing it - void updateContents(); + void updateContents() override; /// void paramsToDialog(InsetCommandParams const & icp); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams() { params_.clear(); } + void clearParams() override { params_.clear(); } /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// InsetCommandParams params_; diff --git a/src/frontends/qt/GuiProgressView.h b/src/frontends/qt/GuiProgressView.h index 9498909319..2c7322072f 100644 --- a/src/frontends/qt/GuiProgressView.h +++ b/src/frontends/qt/GuiProgressView.h @@ -52,16 +52,16 @@ public: ~GuiProgressView(); /// Controller inherited method. ///@{ - bool initialiseParams(std::string const &) { return true; } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return false; } - bool canApply() const { return true; } - bool canApplyToReadOnly() const { return true; } - void updateView() {} - bool wantInitialFocus() const { return false; } - void restoreSession(); - void saveSession(QSettings & settings) const; + bool initialiseParams(std::string const &) override { return true; } + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return false; } + bool canApply() const override { return true; } + bool canApplyToReadOnly() const override { return true; } + void updateView() override {} + bool wantInitialFocus() const override { return false; } + void restoreSession() override; + void saveSession(QSettings & settings) const override; ///@} private Q_SLOTS: diff --git a/src/frontends/qt/GuiRef.h b/src/frontends/qt/GuiRef.h index d46bbad0a3..2dcd63e368 100644 --- a/src/frontends/qt/GuiRef.h +++ b/src/frontends/qt/GuiRef.h @@ -33,7 +33,7 @@ public: GuiRef(GuiView & lv); /// Dialog inherited methods //@{ - void enableView(bool enable); + void enableView(bool enable) override; //@} private Q_SLOTS: @@ -54,10 +54,10 @@ private Q_SLOTS: private: /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /** disconnect from the inset when the Apply button is pressed. Allows easy insertion of multiple references. */ - bool disconnectOnApply() const { return true; } + bool disconnectOnApply() const override { return true; } /// void gotoRef(std::string const &); /// @@ -65,11 +65,11 @@ private: /// void closeEvent(QCloseEvent * e); /// - bool isValid(); + bool isValid() override; /// apply changes - void applyView(); + void applyView() override; /// update dialog - void updateContents(); + void updateContents() override; /// void enableBoxes(); @@ -84,11 +84,11 @@ private: /// update references void updateRefs(); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams() { params_.clear(); } + void clearParams() override { params_.clear(); } /// clean-up on hide. - void dispatchParams(); + void dispatchParams() override; private: /// diff --git a/src/frontends/qt/GuiSearch.h b/src/frontends/qt/GuiSearch.h index a47825a25b..f61707704e 100644 --- a/src/frontends/qt/GuiSearch.h +++ b/src/frontends/qt/GuiSearch.h @@ -35,10 +35,10 @@ private Q_SLOTS: private: void showEvent(QShowEvent * e); /// - bool initialiseParams(std::string const &) { return true; } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return true; } + bool initialiseParams(std::string const &) override { return true; } + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return true; } /// Searches occurrence of string void find(docstring const & search, diff --git a/src/frontends/qt/GuiSendto.h b/src/frontends/qt/GuiSendto.h index ba0a2456f4..69437454e6 100644 --- a/src/frontends/qt/GuiSendto.h +++ b/src/frontends/qt/GuiSendto.h @@ -40,24 +40,24 @@ private Q_SLOTS: private: /// - bool isValid(); + bool isValid() override; /// Apply from dialog - void applyView(); + void applyView() override; /// Update the dialog - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// void paramsToDialog(Format const * format, QString const & command); /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// - FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; } + FuncCode getLfun() const override { return LFUN_BUFFER_EXPORT_CUSTOM; } private: /// diff --git a/src/frontends/qt/GuiShowFile.h b/src/frontends/qt/GuiShowFile.h index db82eae87e..9e5d1dd2c2 100644 --- a/src/frontends/qt/GuiShowFile.h +++ b/src/frontends/qt/GuiShowFile.h @@ -30,15 +30,15 @@ public: private: /// update - void updateContents(); + void updateContents() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool isBufferDependent() const { return false; } + bool isBufferDependent() const override { return false; } /// support::FileName filename_; diff --git a/src/frontends/qt/GuiSpellchecker.h b/src/frontends/qt/GuiSpellchecker.h index 41989697cf..5792f02cf6 100644 --- a/src/frontends/qt/GuiSpellchecker.h +++ b/src/frontends/qt/GuiSpellchecker.h @@ -70,12 +70,12 @@ public: private: ///{ - void updateView(); - bool initialiseParams(std::string const & sdata) + void updateView() override; + bool initialiseParams(std::string const & sdata) override { return widget_->initialiseParams(sdata); } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return false; } + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return false; } ///} /// The encapsulated widget. SpellcheckerWidget * widget_; diff --git a/src/frontends/qt/GuiSymbols.cpp b/src/frontends/qt/GuiSymbols.cpp index ea863b4968..a4fd4af650 100644 --- a/src/frontends/qt/GuiSymbols.cpp +++ b/src/frontends/qt/GuiSymbols.cpp @@ -210,22 +210,22 @@ public: : QAbstractListModel(parent), encoding_(0) {} - QModelIndex index(int row, int column, QModelIndex const &) const + QModelIndex index(int row, int column, QModelIndex const &) const override { return createIndex(row, column); } - QModelIndex parent(QModelIndex const &) const + QModelIndex parent(QModelIndex const &) const override { return QModelIndex(); } - int rowCount(QModelIndex const &) const + int rowCount(QModelIndex const &) const override { return symbols_.count(); } - QVariant data(QModelIndex const & index, int role) const + QVariant data(QModelIndex const & index, int role) const override { if (!index.isValid()) return QVariant(); diff --git a/src/frontends/qt/GuiSymbols.h b/src/frontends/qt/GuiSymbols.h index dde0623688..7799e560db 100644 --- a/src/frontends/qt/GuiSymbols.h +++ b/src/frontends/qt/GuiSymbols.h @@ -31,11 +31,11 @@ public: /// Dialog inherited methods //@{ - void updateView(); - void dispatchParams(); - void enableView(bool enable); - bool isBufferDependent() const { return true; } - FuncCode getLfun() const { return LFUN_SELF_INSERT; } + void updateView() override; + void dispatchParams() override; + void enableView(bool enable) override; + bool isBufferDependent() const override { return true; } + FuncCode getLfun() const override { return LFUN_SELF_INSERT; } //@} public Q_SLOTS: diff --git a/src/frontends/qt/GuiTabular.h b/src/frontends/qt/GuiTabular.h index a546ec09c7..612d0ed39f 100644 --- a/src/frontends/qt/GuiTabular.h +++ b/src/frontends/qt/GuiTabular.h @@ -43,12 +43,12 @@ private Q_SLOTS: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return TABULAR_CODE; } - FuncCode creationCode() const { return LFUN_TABULAR_INSERT; } - QString dialogTitle() const { return qt_("Tabular Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return TABULAR_CODE; } + FuncCode creationCode() const override { return LFUN_TABULAR_INSERT; } + QString dialogTitle() const override { return qt_("Tabular Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} /// diff --git a/src/frontends/qt/GuiTabularCreate.h b/src/frontends/qt/GuiTabularCreate.h index 0c3a951149..7495bc73b2 100644 --- a/src/frontends/qt/GuiTabularCreate.h +++ b/src/frontends/qt/GuiTabularCreate.h @@ -35,17 +35,17 @@ private Q_SLOTS: private: /// Apply changes - void applyView(); + void applyView() override; /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// clean-up on hide. - void clearParams(); + void clearParams() override; /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// - FuncCode getLfun() const; + FuncCode getLfun() const override; /// typedef std::pair rowsCols; diff --git a/src/frontends/qt/GuiTexinfo.h b/src/frontends/qt/GuiTexinfo.h index bada1fa2dc..167f19dce9 100644 --- a/src/frontends/qt/GuiTexinfo.h +++ b/src/frontends/qt/GuiTexinfo.h @@ -40,7 +40,7 @@ public: public Q_SLOTS: /// - void updateView(); + void updateView() override; private Q_SLOTS: /// @@ -54,15 +54,15 @@ private Q_SLOTS: private: /// Nothing to initialise in this case. - bool initialiseParams(std::string const &) { return true; } + bool initialiseParams(std::string const &) override { return true; } /// - void clearParams() {} + void clearParams() override {} /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool isBufferDependent() const { return false; } + bool isBufferDependent() const override { return false; } /// - void apply() {} + void apply() override {} /// void updateStyles(TexFileType); diff --git a/src/frontends/qt/GuiThesaurus.h b/src/frontends/qt/GuiThesaurus.h index 5fab7f6978..00990f47fd 100644 --- a/src/frontends/qt/GuiThesaurus.h +++ b/src/frontends/qt/GuiThesaurus.h @@ -28,7 +28,7 @@ class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi public: GuiThesaurus(GuiView & lv); - void checkStatus(); + void checkStatus() override; private Q_SLOTS: void change_adaptor(); @@ -40,17 +40,17 @@ private Q_SLOTS: private: /// update - void updateContents(); + void updateContents() override; /// void updateLists(); /// - bool initialiseParams(std::string const & data); + bool initialiseParams(std::string const & data) override; /// - void clearParams(); + void clearParams() override; /// - void dispatchParams() {} + void dispatchParams() override {} /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// replace the particular string void replace(docstring const & newstr); @@ -72,7 +72,7 @@ private: docstring lang_; /// not needed. - void apply() {} + void apply() override {} }; } // namespace frontend diff --git a/src/frontends/qt/GuiToc.h b/src/frontends/qt/GuiToc.h index 4042b8583b..c8826f7e09 100644 --- a/src/frontends/qt/GuiToc.h +++ b/src/frontends/qt/GuiToc.h @@ -35,20 +35,20 @@ public: Qt::WindowFlags flags = {}); /// - bool initialiseParams(std::string const & data); - void updateView(); - void enableView(bool enable); - bool wantInitialFocus() const { return false; } + bool initialiseParams(std::string const & data) override; + void updateView() override; + void enableView(bool enable) override; + bool wantInitialFocus() const override { return false; } void closeEvent(QCloseEvent * event); - bool isClosing() const { return is_closing_; } + bool isClosing() const override { return is_closing_; } public: /// clean-up on hide. - void clearParams() {} + void clearParams() override {} /// - void dispatchParams(); + void dispatchParams() override; /// - bool isBufferDependent() const { return true; } + bool isBufferDependent() const override { return true; } /// void doDispatch(Cursor & cur, FuncRequest const & fr, DispatchResult & dr); /// diff --git a/src/frontends/qt/GuiToolbar.cpp b/src/frontends/qt/GuiToolbar.cpp index f58069bde3..65f81c9b21 100644 --- a/src/frontends/qt/GuiToolbar.cpp +++ b/src/frontends/qt/GuiToolbar.cpp @@ -172,7 +172,7 @@ public: setIcon(getIcon(*tbinfo->items.begin()->func, true)); } - void mousePressEvent(QMouseEvent * e) + void mousePressEvent(QMouseEvent * e) override { if (initialized_) { QToolButton::mousePressEvent(e); diff --git a/src/frontends/qt/GuiVSpace.h b/src/frontends/qt/GuiVSpace.h index 36b4fecffa..83de979d4b 100644 --- a/src/frontends/qt/GuiVSpace.h +++ b/src/frontends/qt/GuiVSpace.h @@ -35,12 +35,12 @@ private Q_SLOTS: private: /// \name InsetParamsWidget inherited methods //@{ - InsetCode insetCode() const { return VSPACE_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - QString dialogTitle() const { return qt_("Vertical Space Settings"); } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets(bool readonly) const; + InsetCode insetCode() const override { return VSPACE_CODE; } + FuncCode creationCode() const override { return LFUN_INSET_INSERT; } + QString dialogTitle() const override { return qt_("Vertical Space Settings"); } + void paramsToDialog(Inset const *) override; + docstring dialogToParams() const override; + bool checkWidgets(bool readonly) const override; //@} }; diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 948deb9a75..cb351d1177 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -236,7 +236,7 @@ public: setFocusPolicy(Qt::StrongFocus); } - void paintEvent(QPaintEvent *) + void paintEvent(QPaintEvent *) override { int const w = width_; int const h = height_; @@ -250,7 +250,7 @@ public: pain.drawPixmap(x, y, w, h, splash_); } - void keyPressEvent(QKeyEvent * ev) + void keyPressEvent(QKeyEvent * ev) override { KeySymbol sym; setKeySymbol(&sym, ev); diff --git a/src/frontends/qt/GuiViewSource.h b/src/frontends/qt/GuiViewSource.h index 48f2903b74..cd589a8308 100644 --- a/src/frontends/qt/GuiViewSource.h +++ b/src/frontends/qt/GuiViewSource.h @@ -104,22 +104,22 @@ public: /// Controller inherited method. ///@{ - bool initialiseParams(std::string const & source); - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return true; } - bool canApply() const { return true; } - bool canApplyToReadOnly() const { return true; } - void updateView(); - void enableView(bool enable); - void saveSession(QSettings & settings) const; - void restoreSession(); - bool wantInitialFocus() const { return false; } + bool initialiseParams(std::string const & source) override; + void clearParams() override {} + void dispatchParams() override {} + bool isBufferDependent() const override { return true; } + bool canApply() const override { return true; } + bool canApplyToReadOnly() const override { return true; } + void updateView() override; + void enableView(bool enable) override; + void saveSession(QSettings & settings) const override; + void restoreSession() override; + bool wantInitialFocus() const override { return false; } ///@} public Q_SLOTS: /// - void onBufferViewChanged();//override + void onBufferViewChanged() override; private Q_SLOTS: /// The title displayed by the dialog reflects source type. diff --git a/src/frontends/qt/GuiWorkArea.h b/src/frontends/qt/GuiWorkArea.h index 6aae1dfdd4..0a50ea8b57 100644 --- a/src/frontends/qt/GuiWorkArea.h +++ b/src/frontends/qt/GuiWorkArea.h @@ -289,7 +289,7 @@ private Q_SLOTS: void ignore() const; protected: - void mouseDoubleClickEvent(QMouseEvent * event); //override + void mouseDoubleClickEvent(QMouseEvent * event) override; public: /// wa != 0 diff --git a/src/frontends/qt/GuiWrap.h b/src/frontends/qt/GuiWrap.h index 2cb1265d8c..8721690c9d 100644 --- a/src/frontends/qt/GuiWrap.h +++ b/src/frontends/qt/GuiWrap.h @@ -33,12 +33,12 @@ private Q_SLOTS: private: /// Dialog inherited methods //@{ - void applyView(); - void updateContents() {} - bool initialiseParams(std::string const & data); - void clearParams(); - void dispatchParams(); - bool isBufferDependent() const { return true; } + void applyView() override; + void updateContents() override {} + bool initialiseParams(std::string const & data) override; + void clearParams() override; + void dispatchParams() override; + bool isBufferDependent() const override { return true; } //@} /// diff --git a/src/frontends/qt/InGuiThread.h b/src/frontends/qt/InGuiThread.h index 98014d6cbd..6152570cb2 100644 --- a/src/frontends/qt/InGuiThread.h +++ b/src/frontends/qt/InGuiThread.h @@ -100,7 +100,7 @@ public: private: - void synchronousFunctionCall() + void synchronousFunctionCall() override { return_value_ = func_(); } @@ -163,7 +163,7 @@ public: private: - void synchronousFunctionCall() + void synchronousFunctionCall() override { func_(); } diff --git a/src/frontends/qt/InsetParamsDialog.h b/src/frontends/qt/InsetParamsDialog.h index 48385e2345..2683a4da83 100644 --- a/src/frontends/qt/InsetParamsDialog.h +++ b/src/frontends/qt/InsetParamsDialog.h @@ -41,7 +41,7 @@ public: protected Q_SLOTS: void onWidget_changed(); - void applyView(); + void applyView() override; void resetDialog(); void on_buttonBox_clicked(QAbstractButton *); void on_immediateApplyCB_stateChanged(int state); @@ -50,11 +50,11 @@ protected Q_SLOTS: private: /// \name DialogView inherited methods //@{ - void updateView(); - void dispatchParams() {} - bool isBufferDependent() const { return true; } - bool canApply() const { return true; } - bool initialiseParams(std::string const &); + void updateView() override; + void dispatchParams() override {} + bool isBufferDependent() const override { return true; } + bool canApply() const override { return true; } + bool initialiseParams(std::string const &) override; //@} /// void newInset(); diff --git a/src/frontends/qt/LayoutBox.cpp b/src/frontends/qt/LayoutBox.cpp index 01cb60e652..95814c942f 100644 --- a/src/frontends/qt/LayoutBox.cpp +++ b/src/frontends/qt/LayoutBox.cpp @@ -63,13 +63,13 @@ public: {} /// void paint(QPainter * painter, QStyleOptionViewItem const & option, - QModelIndex const & index) const; + QModelIndex const & index) const override; /// void drawDisplay(QPainter * painter, QStyleOptionViewItem const & opt, - const QRect & /*rect*/, const QString & text ) const; + const QRect & /*rect*/, const QString & text ) const override; /// QSize sizeHint(QStyleOptionViewItem const & opt, - QModelIndex const & index) const; + QModelIndex const & index) const override; private: /// diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 3c94781897..8d0529a919 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -2079,7 +2079,7 @@ void Menu::Impl::populate(QMenu * qMenu, MenuDefinition const & menu) class AlwaysMnemonicStyle : public QProxyStyle { public: int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0, - QStyleHintReturn *returnData = 0) const + QStyleHintReturn *returnData = 0) const override { if (hint == QStyle::SH_UnderlineShortcut) return 1; diff --git a/src/insets/ExternalTransforms.h b/src/insets/ExternalTransforms.h index 6d0f9afedb..e880158dc1 100644 --- a/src/insets/ExternalTransforms.h +++ b/src/insets/ExternalTransforms.h @@ -151,9 +151,9 @@ protected: explicit ResizeCommand(ResizeData const & data_) : data(data_) {} private: - virtual std::string const front_placeholder_impl() const + std::string const front_placeholder_impl() const override { return "$$ResizeFront"; } - virtual std::string const back_placeholder_impl() const + std::string const back_placeholder_impl() const override { return "$$ResizeBack"; } }; @@ -166,8 +166,8 @@ public: private: explicit ResizeLatexCommand(ResizeData const & data_) : ResizeCommand(data_) {} - virtual std::string const front_impl() const; - virtual std::string const back_impl() const; + std::string const front_impl() const override; + std::string const back_impl() const override; }; @@ -177,9 +177,9 @@ protected: explicit RotationCommand(RotationData const & data_) : data(data_) {} private: - virtual std::string const front_placeholder_impl() const + std::string const front_placeholder_impl() const override { return "$$RotateFront"; } - virtual std::string const back_placeholder_impl() const + std::string const back_placeholder_impl() const override { return "$$RotateBack"; } }; @@ -192,8 +192,8 @@ public: private: explicit RotationLatexCommand(RotationData const & data_) : RotationCommand(data_) {} - virtual std::string const front_impl() const; - virtual std::string const back_impl() const; + std::string const front_impl() const override; + std::string const back_impl() const override; }; @@ -223,7 +223,7 @@ protected: explicit ClipOption(ClipData const & data_) : data(data_) {} private: - virtual std::string const placeholder_impl() const + std::string const placeholder_impl() const override { return "$$Clip"; } }; @@ -236,7 +236,7 @@ public: private: explicit ClipLatexOption(ClipData const & data_) : ClipOption(data_) {} - virtual std::string const option_impl() const; + std::string const option_impl() const override; }; @@ -248,9 +248,9 @@ public: private: explicit ExtraOption(std::string const & data_) : data(data_) {} - virtual std::string const placeholder_impl() const + std::string const placeholder_impl() const override { return "$$Extra"; } - virtual std::string const option_impl() const + std::string const option_impl() const override { return data; } std::string data; }; @@ -262,7 +262,7 @@ protected: explicit ResizeOption(ResizeData const & data_) : data(data_) {} private: - virtual std::string const placeholder_impl() const + std::string const placeholder_impl() const override { return "$$Resize"; } }; @@ -275,7 +275,7 @@ public: private: explicit ResizeLatexOption(ResizeData const & data_) : ResizeOption(data_) {} - virtual std::string const option_impl() const; + std::string const option_impl() const override; }; @@ -285,7 +285,7 @@ protected: explicit RotationOption(RotationData const & data_) : data(data_) {} private: - virtual std::string const placeholder_impl() const + std::string const placeholder_impl() const override { return "$$Rotate"; } }; @@ -298,7 +298,7 @@ public: private: explicit RotationLatexOption(RotationData const & data_) : RotationOption(data_) {} - virtual std::string const option_impl() const; + std::string const option_impl() const override; }; diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 922d1cd743..5557e25fc9 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -593,7 +593,7 @@ public: /// returns whether this inset is allowed in other insets of given mode virtual bool allowedIn(mode_type) const { return true; } /// returns whether paragraph breaks can occur inside this inset - virtual bool allowMultiPar() const { return false; } + virtual bool allowMultiPar() const { return false; } /** * The font is inherited from the parent for LaTeX export if this * method returns true. No open font changes are closed in front of diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h index 933d66b32d..d77f3ca65e 100644 --- a/src/insets/InsetArgument.h +++ b/src/insets/InsetArgument.h @@ -30,7 +30,7 @@ public: InsetArgument(Buffer *, std::string const &); /// - InsetArgument const * asInsetArgument() const { return this; } + InsetArgument const * asInsetArgument() const override { return this; } /// Outputting the parameter of a LaTeX command void latexArgument(otexstream & os, OutputParams const & runparams_in, @@ -42,59 +42,59 @@ public: /// \name Public functions inherited from Inset class //@{ /// - bool hasSettings() const { return false; } + bool hasSettings() const override { return false; } /// - InsetCode lyxCode() const { return ARG_CODE; } + InsetCode lyxCode() const override { return ARG_CODE; } /// - docstring layoutName() const { return from_ascii("Argument"); } + docstring layoutName() const override { return from_ascii("Argument"); } /// Update the label string of this inset - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - void latex(otexstream &, OutputParams const &) const { } + void latex(otexstream &, OutputParams const &) const override { } /// - int plaintext(odocstringstream &, OutputParams const &, size_t) const { return 0; } + int plaintext(odocstringstream &, OutputParams const &, size_t) const override { return 0; } /// - void docbook(XMLStream &, OutputParams const &) const { return; } + void docbook(XMLStream &, OutputParams const &) const override { return; } /// - docstring xhtml(XMLStream &, OutputParams const &) const + docstring xhtml(XMLStream &, OutputParams const &) const override { return docstring(); } /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - bool isPassThru() const { return pass_thru_; } + bool isPassThru() const override { return pass_thru_; } /// - bool isFreeSpacing() const { return free_spacing_; } + bool isFreeSpacing() const override { return free_spacing_; } /// bool isTocCaption() const { return is_toc_caption_; } /// - bool resetFontEdit() const { return false; } + bool resetFontEdit() const override { return false; } //@} /// \name Public functions inherited from InsetCollapsible class //@{ /// - InsetLayout::InsetDecoration decoration() const; + InsetLayout::InsetDecoration decoration() const override; /// - FontInfo getFont() const; + FontInfo getFont() const override; /// - FontInfo getLabelfont() const; + FontInfo getLabelfont() const override; /// - ColorCode labelColor() const; + ColorCode labelColor() const override; /// - void setButtonLabel(); + void setButtonLabel() override; //@} /// void addToToc(DocIterator const & dit, bool output_active, - UpdateType utype, TocBackend & backend) const; //override + UpdateType utype, TocBackend & backend) const override; private: /// - docstring toolTip(BufferView const & bv, int, int) const; + docstring toolTip(BufferView const & bv, int, int) const override; /// void fixParagraphLanguage(Language const *); /// @@ -130,13 +130,13 @@ protected: /// \name Protected functions inherited from Inset class //@{ /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetArgument(*this); } + Inset * clone() const override { return new InsetArgument(*this); } /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } //@} }; diff --git a/src/insets/InsetBibitem.h b/src/insets/InsetBibitem.h index f0528f82c8..6eae701f27 100644 --- a/src/insets/InsetBibitem.h +++ b/src/insets/InsetBibitem.h @@ -44,27 +44,27 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return BIBITEM_CODE; } + InsetCode lyxCode() const override { return BIBITEM_CODE; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// \copydoc Inset::initView() /// verify label and update references. - void initView(); + void initView() override; /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// int plaintext(odocstringstream &, OutputParams const &, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - void collectBibKeys(InsetIterator const &, support::FileNameList &) const; + void collectBibKeys(InsetIterator const &, support::FileNameList &) const override; /// update the counter of this inset - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; ///@} /// \name Static public methods obligated for InsetCommand derived classes @@ -84,17 +84,17 @@ private: /// \name Private functions inherited from Inset class //@{ /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetBibitem(*this); } + Inset * clone() const override { return new InsetBibitem(*this); } /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } ///@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} friend docstring bibitemWidest(Buffer const & buffer, OutputParams const &); diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index 932fb0f48a..d82d8adab4 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -37,38 +37,38 @@ public: /// bool delDatabase(docstring const &); /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// \name Public functions inherited from Inset class //@{ /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - InsetCode lyxCode() const { return BIBTEX_CODE; } + InsetCode lyxCode() const override { return BIBTEX_CODE; } /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - void collectBibKeys(InsetIterator const &, support::FileNameList &) const; + void collectBibKeys(InsetIterator const &, support::FileNameList &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -98,17 +98,17 @@ private: //@{ /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetBibtex(*this); } + Inset * clone() const override { return new InsetBibtex(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} }; diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index 3398a52ed6..cc80da3ecd 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -102,64 +102,64 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return BOX_CODE; } + InsetCode lyxCode() const override { return BOX_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - ColorCode backgroundColor(PainterInfo const &) const; + ColorCode backgroundColor(PainterInfo const &) const override; /// - LyXAlignment contentAlignment() const; + LyXAlignment contentAlignment() const override; /// - bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); } + bool allowParagraphCustomization(idx_type = 0) const override { return !forcePlainLayout(); } /// - bool allowMultiPar() const; + bool allowMultiPar() const override; /// - bool forcePlainLayout(idx_type = 0) const; + bool forcePlainLayout(idx_type = 0) const override; /// bool needsCProtection(bool const maintext = false, - bool const fragile = false) const; + bool const fragile = false) const override; /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - bool hasFixedWidth() const; + bool hasFixedWidth() const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Public functions inherited from InsetCollapsible class //@{ /// - void setButtonLabel(); + void setButtonLabel() override; //@} protected: /// \name Protected functions inherited from Inset class //@{ /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetBox(*this); } + Inset * clone() const override { return new InsetBox(*this); } //@} private: diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index 42b11d215d..6106ce5a5c 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -61,34 +61,34 @@ public: private: /// - InsetCode lyxCode() const { return BRANCH_CODE; } + InsetCode lyxCode() const override { return BRANCH_CODE; } /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - docstring const buttonLabel(BufferView const &) const; + docstring const buttonLabel(BufferView const &) const override; /// - ColorCode backgroundColor(PainterInfo const &) const; + ColorCode backgroundColor(PainterInfo const &) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override; /** \returns true if params_.branch is listed as 'selected' in \c buffer. \p child only checks within child documents. @@ -100,21 +100,21 @@ private: * Note that Branch insets are considered part of the * document when they are selected XOR inverted. */ - bool producesOutput() const; + bool producesOutput() const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - bool isMacroScope() const; + bool isMacroScope() const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - bool usePlainLayout() const { return false; } + bool usePlainLayout() const override { return false; } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - docstring layoutName() const { return from_ascii("Branch:") + branch(); } + docstring layoutName() const override { return from_ascii("Branch:") + branch(); } /// - Inset * clone() const { return new InsetBranch(*this); } + Inset * clone() const override { return new InsetBranch(*this); } /// friend class InsetBranchParams; diff --git a/src/insets/InsetCaption.h b/src/insets/InsetCaption.h index 1fb1022faa..734564aaaf 100644 --- a/src/insets/InsetCaption.h +++ b/src/insets/InsetCaption.h @@ -25,7 +25,7 @@ public: /// std::string const & floattype() const { return floattype_; } /// - docstring layoutName() const; + docstring layoutName() const override; /// return the mandatory argument (LaTeX format) only void getArgument(otexstream & os, OutputParams const &) const; /// return the caption text @@ -35,61 +35,61 @@ public: /// return the caption text as HTML docstring getCaptionAsHTML(XMLStream & os, OutputParams const &) const; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; private: /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - bool forceLocalFontSwitch() const { return true; } + bool forceLocalFontSwitch() const override { return true; } /// - InsetCode lyxCode() const { return CAPTION_CODE; } + InsetCode lyxCode() const override { return CAPTION_CODE; } /// void cursorPos(BufferView const & bv, - CursorSlice const & sl, bool boundary, int & x, int & y) const; + CursorSlice const & sl, bool boundary, int & x, int & y) const override; /// - bool descendable(BufferView const &) const { return true; } + bool descendable(BufferView const &) const override { return true; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void drawBackground(PainterInfo & pi, int x, int y) const; + void drawBackground(PainterInfo & pi, int x, int y) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// Strike out the inset when deleted. - bool canPaintChange(BufferView const &) const { return true; } + bool canPaintChange(BufferView const &) const override { return true; } /// - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// - bool insetAllowed(InsetCode code) const; + bool insetAllowed(InsetCode code) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; // Update the counters of this inset and of its contents - void updateBuffer(ParIterator const &, UpdateType, bool const deleted); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted) override; /// - void latex(otexstream & os, OutputParams const &) const; + void latex(otexstream & os, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream & os, OutputParams const & runparams) const; + docstring xhtml(XMLStream & os, OutputParams const & runparams) const override; /// void addToToc(DocIterator const & di, bool output_active, UpdateType utype, - TocBackend & backend) const; + TocBackend & backend) const override; /// - virtual bool forcePlainLayout(idx_type = 0) const { return true; } + bool forcePlainLayout(idx_type = 0) const override { return true; } /// Captions don't accept alignment, spacing, etc. - virtual bool allowParagraphCustomization(idx_type = 0) const { return false; } + bool allowParagraphCustomization(idx_type = 0) const override { return false; } /// - Inset * clone() const { return new InsetCaption(*this); } + Inset * clone() const override { return new InsetCaption(*this); } /// mutable docstring full_label_; diff --git a/src/insets/InsetCaptionable.h b/src/insets/InsetCaptionable.h index 3190c9a01c..2d5175ffd9 100644 --- a/src/insets/InsetCaptionable.h +++ b/src/insets/InsetCaptionable.h @@ -45,11 +45,11 @@ protected: virtual bool hasSubCaptions(ParIterator const &) const { return false; } /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// Update the counters of this inset and of its contents - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - bool insetAllowed(InsetCode) const; + bool insetAllowed(InsetCode) const override; private: /// std::string caption_type_; diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h index e9f03479a1..b085a2c942 100644 --- a/src/insets/InsetCitation.h +++ b/src/insets/InsetCitation.h @@ -39,39 +39,39 @@ public: /// \name Public functions inherited from Inset class //@{ /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - InsetCode lyxCode() const { return CITE_CODE; } + InsetCode lyxCode() const override { return CITE_CODE; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - bool forceLTR(OutputParams const &) const; + bool forceLTR(OutputParams const &) const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -111,13 +111,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetCitation(*this); } + Inset * clone() const override { return new InsetCitation(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} /// diff --git a/src/insets/InsetCollapsible.h b/src/insets/InsetCollapsible.h index 95a8e1f52c..f07aec09f7 100644 --- a/src/insets/InsetCollapsible.h +++ b/src/insets/InsetCollapsible.h @@ -43,45 +43,45 @@ public: /// virtual ~InsetCollapsible(); /// - InsetCollapsible * asInsetCollapsible() { return this; } + InsetCollapsible * asInsetCollapsible() override { return this; } /// - InsetCollapsible const * asInsetCollapsible() const { return this; } + InsetCollapsible const * asInsetCollapsible() const override { return this; } /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - docstring layoutName() const { return from_ascii("Collapsible"); } + docstring layoutName() const override { return from_ascii("Collapsible"); } /// - void read(Lexer &); + void read(Lexer &) override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - int topOffset(BufferView const * bv) const; + int topOffset(BufferView const * bv) const override; /// - int bottomOffset(BufferView const * bv) const; + int bottomOffset(BufferView const * bv) const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - virtual void drawBackground(PainterInfo &, int, int) const {} + void drawBackground(PainterInfo &, int, int) const override {} /// return x,y of given position relative to the inset's baseline void cursorPos(BufferView const & bv, CursorSlice const & sl, - bool boundary, int & x, int & y) const; + bool boundary, int & x, int & y) const override; /// docstring const getNewLabel(docstring const & l) const; /// - bool editable() const; + bool editable() const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// Returns true if coordinates are over the inset's button. /// Always returns false when the inset does not have a /// button. - bool clickable(BufferView const & bv, int x, int y) const; + bool clickable(BufferView const & bv, int x, int y) const override; /// can we go further down on mouse click? - bool descendable(BufferView const & bv) const; + bool descendable(BufferView const & bv) const override; /// void setLabel(docstring const & l); /// @@ -141,37 +141,37 @@ public: /// and of course decoration(). Geometry geometry(BufferView const & bv) const; /// - bool canPaintChange(BufferView const & bv) const; + bool canPaintChange(BufferView const & bv) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - bool setMouseHover(BufferView const * bv, bool mouse_hover) const; + bool setMouseHover(BufferView const * bv, bool mouse_hover) const override; /// - ColorCode backgroundColor(PainterInfo const &) const + ColorCode backgroundColor(PainterInfo const &) const override { return getLayout().bgcolor(); } /// - ColorCode labelColor() const { return getLayout().labelfont().color(); } + ColorCode labelColor() const override { return getLayout().labelfont().color(); } /// - InsetCode lyxCode() const { return COLLAPSIBLE_CODE; } + InsetCode lyxCode() const override { return COLLAPSIBLE_CODE; } /// - virtual bool usePlainLayout() const { return true; } + bool usePlainLayout() const override { return true; } /// - std::string contextMenu(BufferView const & bv, int x, int y) const; + std::string contextMenu(BufferView const & bv, int x, int y) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// void addToToc(DocIterator const & dit, bool output_active, - UpdateType utype, TocBackend & backend) const; //override + UpdateType utype, TocBackend & backend) const override; protected: /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// void edit(Cursor & cur, bool front, - EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); + EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// mutable CollapseStatus status_; /// diff --git a/src/insets/InsetCommand.h b/src/insets/InsetCommand.h index 0c0cd1a954..7b2b5bde08 100644 --- a/src/insets/InsetCommand.h +++ b/src/insets/InsetCommand.h @@ -43,9 +43,9 @@ public: /// virtual ~InsetCommand(); /// - InsetCommand * asInsetCommand() { return this; } + InsetCommand * asInsetCommand() override { return this; } /// - InsetCommand const * asInsetCommand() const { return this; } + InsetCommand const * asInsetCommand() const override { return this; } /// \return true if params are successfully read static bool string2params(std::string const & data, @@ -70,41 +70,41 @@ public: /// \name Public functions inherited from Inset class //@{ /// - void write(std::ostream & os) const { p_.write(os); } + void write(std::ostream & os) const override { p_.write(os); } /// - void read(Lexer & lex) { p_.Read(lex, &buffer()); } + void read(Lexer & lex) override { p_.Read(lex, &buffer()); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - virtual void drawBackground(PainterInfo &, int, int) const {} + void drawBackground(PainterInfo &, int, int) const override {} /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - bool setMouseHover(BufferView const * bv, bool mouse_hover) const; + bool setMouseHover(BufferView const * bv, bool mouse_hover) const override; /// - bool clickable(BufferView const &, int, int) const { return hasSettings(); } + bool clickable(BufferView const &, int, int) const override { return hasSettings(); } //@} protected: /// \name Methods relaying to the InsetCommandParams p_ //@{ /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; //@} protected: diff --git a/src/insets/InsetCounter.h b/src/insets/InsetCounter.h index b50f71be56..92d6f5b061 100644 --- a/src/insets/InsetCounter.h +++ b/src/insets/InsetCounter.h @@ -25,31 +25,31 @@ public: /// \name Public functions inherited from Inset class //@{ /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - docstring toolTip(BufferView const &, int, int) const + docstring toolTip(BufferView const &, int, int) const override { return tooltip_; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - InsetCode lyxCode() const { return COUNTER_CODE; } + InsetCode lyxCode() const override { return COUNTER_CODE; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void updateBuffer(ParIterator const & it, UpdateType, bool const); + void updateBuffer(ParIterator const & it, UpdateType, bool const) override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -73,13 +73,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetCounter(*this); } + Inset * clone() const override { return new InsetCounter(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const { return screen_label_; } + docstring screenLabel() const override { return screen_label_; } //@} /// docstring lyxSaveCounter() const; diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index b24c93d628..1e127fc095 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -39,38 +39,38 @@ public: /// static std::string params2string(CollapseStatus); - std::string contextMenuName() const + std::string contextMenuName() const override { return "context-ert"; } private: /// - InsetCode lyxCode() const { return ERT_CODE; } + InsetCode lyxCode() const override { return ERT_CODE; } /// - docstring layoutName() const { return from_ascii("ERT"); } + docstring layoutName() const override { return from_ascii("ERT"); } /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures &) const {} + void validate(LaTeXFeatures &) const override {} /// should paragraph indentation be omitted in any case? - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - Inset * clone() const { return new InsetERT(*this); } + Inset * clone() const override { return new InsetERT(*this); } /// - docstring const buttonLabel(BufferView const & bv) const; + docstring const buttonLabel(BufferView const & bv) const override; /// - bool allowSpellCheck() const { return false; } + bool allowSpellCheck() const override { return false; } /// - bool insetAllowed(InsetCode code) const { return code == QUOTE_CODE; } + bool insetAllowed(InsetCode code) const override { return code == QUOTE_CODE; } }; diff --git a/src/insets/InsetExternal.h b/src/insets/InsetExternal.h index 8fb95b33d8..f124445f5e 100644 --- a/src/insets/InsetExternal.h +++ b/src/insets/InsetExternal.h @@ -110,60 +110,60 @@ public: /// Update not loaded previews void updatePreview() const; /// \returns the number of rows (\n's) of generated code. - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - bool setMouseHover(BufferView const * bv, bool mouse_hover) const; + bool setMouseHover(BufferView const * bv, bool mouse_hover) const override; /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - InsetCode lyxCode() const { return EXTERNAL_CODE; } + InsetCode lyxCode() const override { return EXTERNAL_CODE; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - int topOffset(BufferView const *) const { return 0; } + int topOffset(BufferView const *) const override { return 0; } /// - int bottomOffset(BufferView const *) const { return 0; } + int bottomOffset(BufferView const *) const override { return 0; } /// - int leftOffset(BufferView const *) const { return 0; } + int leftOffset(BufferView const *) const override { return 0; } /// - int rightOffset(BufferView const *) const { return 0; } + int rightOffset(BufferView const *) const override { return 0; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// void generateXML(XMLStream &, OutputParams const &, std::string const &) const; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// For now, this does nothing. Someone who knows about this /// should see what needs doing for XHTML output. - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// Update needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void addPreview(DocIterator const &, graphics::PreviewLoader &) const; + void addPreview(DocIterator const &, graphics::PreviewLoader &) const override; /// - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetExternal(*this); } + Inset * clone() const override { return new InsetExternal(*this); } /** Slot receiving a signal that the external file has changed * and the preview should be regenerated. */ diff --git a/src/insets/InsetFlex.h b/src/insets/InsetFlex.h index da29da565d..a781fb8a76 100644 --- a/src/insets/InsetFlex.h +++ b/src/insets/InsetFlex.h @@ -25,26 +25,26 @@ public: /// InsetFlex(Buffer *, std::string const & layoutName); /// - docstring layoutName() const { return from_utf8("Flex:" + name_); } + docstring layoutName() const override { return from_utf8("Flex:" + name_); } /// - InsetLayout const & getLayout() const; + InsetLayout const & getLayout() const override; /// - InsetCode lyxCode() const { return FLEX_CODE; } + InsetCode lyxCode() const override { return FLEX_CODE; } /// Default looks - InsetLayout::InsetDecoration decoration() const; + InsetLayout::InsetDecoration decoration() const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// should paragraph indentation be omitted in any case? - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - bool hasSettings() const { return false; } + bool hasSettings() const override { return false; } /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus &) const; + FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override; protected: /// @@ -52,7 +52,7 @@ protected: private: /// - Inset * clone() const { return new InsetFlex(*this); } + Inset * clone() const override { return new InsetFlex(*this); } /// std::string name_; }; diff --git a/src/insets/InsetFloat.h b/src/insets/InsetFloat.h index bdf68089a9..bb9b645191 100644 --- a/src/insets/InsetFloat.h +++ b/src/insets/InsetFloat.h @@ -73,57 +73,57 @@ public: /// InsetFloatParams const & params() const { return params_; } /// - bool allowsCaptionVariation(std::string const &) const; + bool allowsCaptionVariation(std::string const &) const override; /// - LyXAlignment contentAlignment() const; + LyXAlignment contentAlignment() const override; /// - bool forceParDirectionSwitch() const { return true; } + bool forceParDirectionSwitch() const override { return true; } private: /// - void setCaptionType(std::string const & type); + void setCaptionType(std::string const & type) override; /// - docstring layoutName() const; + docstring layoutName() const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return FLOAT_CODE; } + InsetCode lyxCode() const override { return FLOAT_CODE; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - bool insetAllowed(InsetCode) const; + bool insetAllowed(InsetCode) const override; /** returns false if, when outputting LaTeX, font changes should be closed before generating this inset. This is needed for insets that may contain several paragraphs */ - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - bool hasSubCaptions(ParIterator const & it) const; + bool hasSubCaptions(ParIterator const & it) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetFloat(*this); } + Inset * clone() const override { return new InsetFloat(*this); } /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } /// TexString getCaption(OutputParams const &) const; /// std::string getAlignment() const; /// - OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_OMITOBJECT; } + OutputParams::CtObject CtObject(OutputParams const &) const override { return OutputParams::CT_OMITOBJECT; } InsetFloatParams params_; }; diff --git a/src/insets/InsetFloatList.h b/src/insets/InsetFloatList.h index e0ae669de0..489b0fea98 100644 --- a/src/insets/InsetFloatList.h +++ b/src/insets/InsetFloatList.h @@ -30,28 +30,28 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return FLOAT_LIST_CODE; } + InsetCode lyxCode() const override { return FLOAT_LIST_CODE; } /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer &); + void read(Lexer &) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const { return; } + void docbook(XMLStream &, OutputParams const &) const override { return; } /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -68,15 +68,15 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetFloatList(*this); } + Inset * clone() const override { return new InsetFloatList(*this); } /// - docstring layoutName() const; + docstring layoutName() const override; //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} }; diff --git a/src/insets/InsetFoot.h b/src/insets/InsetFoot.h index bbc8a6934a..1e4b0d26e8 100644 --- a/src/insets/InsetFoot.h +++ b/src/insets/InsetFoot.h @@ -28,26 +28,26 @@ public: explicit InsetFoot(Buffer *); private: /// - InsetCode lyxCode() const { return FOOT_CODE; } + InsetCode lyxCode() const override { return FOOT_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// Update the counters of this inset and of its contents - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - Inset * clone() const { return new InsetFoot(*this); } + Inset * clone() const override { return new InsetFoot(*this); } /// - bool inheritFont() const { return true; } + bool inheritFont() const override { return true; } /// - bool allowMultiPar() const { return true; } + bool allowMultiPar() const override { return true; } /// docstring custom_label_; /// diff --git a/src/insets/InsetFootlike.h b/src/insets/InsetFootlike.h index c7805a6439..41732853f2 100644 --- a/src/insets/InsetFootlike.h +++ b/src/insets/InsetFootlike.h @@ -25,20 +25,20 @@ public: /// explicit InsetFootlike(Buffer *); /// - bool hasSettings() const { return false; } + bool hasSettings() const override { return false; } private: /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - bool insetAllowed(InsetCode) const; + bool insetAllowed(InsetCode) const override; /** returns false if, when outputting LaTeX, font changes should be closed before generating this inset. This is needed for insets that may contain several paragraphs */ - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } }; diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index c987ed0615..c68356569d 100644 --- a/src/insets/InsetGraphics.h +++ b/src/insets/InsetGraphics.h @@ -53,75 +53,75 @@ public: InsetGraphicsParams getParams() const { return params_;} /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } /// - bool canPaintChange(BufferView const &) const { return true; } + bool canPaintChange(BufferView const &) const override { return true; } /// - InsetGraphics * asInsetGraphics() { return this; } + InsetGraphics * asInsetGraphics() override { return this; } /// - InsetGraphics const * asInsetGraphics() const { return this; } + InsetGraphics const * asInsetGraphics() const override { return this; } /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /** returns the number of rows (\n's) of generated tex code. #fragile == true# means, that the inset should take care about fragile commands by adding a #\protect# before. */ - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream & os, OutputParams const &) const; + docstring xhtml(XMLStream & os, OutputParams const &) const override; /** Tell LyX what the latex features you need i.e. what latex packages you need to be included. */ - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// returns LyX code associated with the inset. Used for TOC, ...) - InsetCode lyxCode() const { return GRAPHICS_CODE; } + InsetCode lyxCode() const override { return GRAPHICS_CODE; } /// - docstring layoutName() const { return from_ascii("Graphics"); } + docstring layoutName() const override { return from_ascii("Graphics"); } /// Get the inset parameters, used by the GUIndependent dialog. InsetGraphicsParams const & params() const; /// - int topOffset(BufferView const *) const { return 0; } + int topOffset(BufferView const *) const override { return 0; } /// - int bottomOffset(BufferView const *) const { return 0; } + int bottomOffset(BufferView const *) const override { return 0; } /// - int leftOffset(BufferView const *) const { return 0; } + int leftOffset(BufferView const *) const override { return 0; } /// - int rightOffset(BufferView const *) const { return 0; } + int rightOffset(BufferView const *) const override { return 0; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; /// void editGraphics(InsetGraphicsParams const &) const; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// Force inset into LTR environment if surroundings are RTL - bool forceLTR(OutputParams const &) const { return true; } + bool forceLTR(OutputParams const &) const override { return true; } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const; + Inset * clone() const override; /// Get the status message, depends on the image loading status. std::string statusMessage() const; /// Get the output bounding box accounting for raster formats. @@ -141,7 +141,7 @@ public: /// or an empty string on error. std::string prepareHTMLFile(OutputParams const & runparams) const; /// - OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_OBJECT; } + OutputParams::CtObject CtObject(OutputParams const &) const override { return OutputParams::CT_OBJECT; } private: /// @@ -152,7 +152,7 @@ private: /// holds the entity name that defines the graphics location (SGML). docstring const graphic_label; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// The thing that actually draws the image on LyX's screen. RenderGraphic * graphic_; }; diff --git a/src/insets/InsetHyperlink.h b/src/insets/InsetHyperlink.h index 90ae05b94f..cfbc51e1c6 100644 --- a/src/insets/InsetHyperlink.h +++ b/src/insets/InsetHyperlink.h @@ -28,32 +28,32 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return HYPERLINK_CODE; } + InsetCode lyxCode() const override { return HYPERLINK_CODE; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - bool forceLTR(OutputParams const &) const { return true; } + bool forceLTR(OutputParams const &) const override { return true; } /// - bool isInToc() const { return true; } + bool isInToc() const override { return true; } /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -71,18 +71,18 @@ private: /// \name Private functions inherited from Inset class //@{ /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// - Inset * clone() const { return new InsetHyperlink(*this); } + Inset * clone() const override { return new InsetHyperlink(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} /// diff --git a/src/insets/InsetIPA.h b/src/insets/InsetIPA.h index 695179738f..e788b2b156 100644 --- a/src/insets/InsetIPA.h +++ b/src/insets/InsetIPA.h @@ -42,50 +42,50 @@ public: /// \name Methods inherited from Inset class //@{ - Inset * clone() const { return new InsetIPA(*this); } + Inset * clone() const override { return new InsetIPA(*this); } - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } - bool forceLocalFontSwitch() const { return true; } + bool forceLocalFontSwitch() const override { return true; } - InsetCode lyxCode() const { return IPA_CODE; } + InsetCode lyxCode() const override { return IPA_CODE; } - docstring layoutName() const { return from_ascii("IPA"); } + docstring layoutName() const override { return from_ascii("IPA"); } - bool descendable(BufferView const & /*bv*/) const { return true; } + bool descendable(BufferView const & /*bv*/) const override { return true; } - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; void addPreview(DocIterator const & inset_pos, - graphics::PreviewLoader & ploader) const; + graphics::PreviewLoader & ploader) const override; - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; - void write(std::ostream & os) const; + void write(std::ostream & os) const override; - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream & xs, OutputParams const &) const; + docstring xhtml(XMLStream & xs, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - bool allowSpellCheck() const { return false; } + bool allowSpellCheck() const override { return false; } /// - bool insetAllowed(InsetCode code) const; + bool insetAllowed(InsetCode code) const override; //@} protected: diff --git a/src/insets/InsetIPAMacro.h b/src/insets/InsetIPAMacro.h index 273e572e25..3305e6bf6e 100644 --- a/src/insets/InsetIPAMacro.h +++ b/src/insets/InsetIPAMacro.h @@ -60,42 +60,42 @@ public: InsetIPADecoParams const & params() const { return params_; } private: /// - InsetCode lyxCode() const { return IPADECO_CODE; } + InsetCode lyxCode() const override { return IPADECO_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - bool allowSpellCheck() const { return false; } + bool allowSpellCheck() const override { return false; } /// - bool insetAllowed(InsetCode code) const; + bool insetAllowed(InsetCode code) const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - Inset * clone() const { return new InsetIPADeco(*this); } + Inset * clone() const override { return new InsetIPADeco(*this); } /// used by the constructors void init(); /// @@ -137,39 +137,39 @@ public: /// Kind kind() const; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// Will not be used when lyxf3 - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - InsetCode lyxCode() const { return IPACHAR_CODE; } + InsetCode lyxCode() const override { return IPACHAR_CODE; } /// We don't need \begin_inset and \end_inset - bool directWrite() const { return true; } + bool directWrite() const override { return true; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// should this inset be handled like a normal character? - bool isChar() const { return true; } + bool isChar() const override { return true; } /// is this equivalent to a letter? - bool isLetter() const { return true; } + bool isLetter() const override { return true; } private: - Inset * clone() const { return new InsetIPAChar(*this); } + Inset * clone() const override { return new InsetIPAChar(*this); } /// And which kind is this? Kind kind_; diff --git a/src/insets/InsetInclude.h b/src/insets/InsetInclude.h index db7beca5d4..5a9958cec8 100644 --- a/src/insets/InsetInclude.h +++ b/src/insets/InsetInclude.h @@ -63,51 +63,51 @@ public: /// void updateCommand(); /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// \name Public functions inherited from Inset class //@{ /// - void setBuffer(Buffer & buffer); + void setBuffer(Buffer & buffer) override; /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// Override these InsetButton methods if Previewing - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// - InsetCode lyxCode() const { return INCLUDE_CODE; } + InsetCode lyxCode() const override { return INCLUDE_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /** Fills \c key * \param keys the list of bibkeys in the child buffer. * \param it not used here */ - void collectBibKeys(InsetIterator const &, support::FileNameList &) const; + void collectBibKeys(InsetIterator const &, support::FileNameList &) const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - void addPreview(DocIterator const &, graphics::PreviewLoader &) const; + void addPreview(DocIterator const &, graphics::PreviewLoader &) const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -120,7 +120,7 @@ public: static bool isCompatibleCommand(std::string const & s); /// bool needsCProtection(bool const maintext = false, - bool const fragile = false) const; + bool const fragile = false) const override; //@} protected: @@ -144,11 +144,11 @@ private: /// \name Private functions inherited from Inset class //@{ - Inset * clone() const { return new InsetInclude(*this); } + Inset * clone() const override { return new InsetInclude(*this); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; //@} /// \name Private functions inherited from InsetCommand class @@ -157,7 +157,7 @@ private: // FIXME:InsetCommmand::setParams is not virtual void setParams(InsetCommandParams const & params); /// get the text displayed on the button - docstring screenLabel() const; + docstring screenLabel() const override; //@} /// holds the entity name that defines the file location (XML) diff --git a/src/insets/InsetIndex.h b/src/insets/InsetIndex.h index a999ee5bb3..bddb8ba380 100644 --- a/src/insets/InsetIndex.h +++ b/src/insets/InsetIndex.h @@ -45,46 +45,46 @@ public: static void string2params(std::string const &, InsetIndexParams &); private: /// - bool hasSettings() const; + bool hasSettings() const override; /// - InsetCode lyxCode() const { return INDEX_CODE; } + InsetCode lyxCode() const override { return INDEX_CODE; } /// - docstring layoutName() const { return from_ascii("Index"); } + docstring layoutName() const override { return from_ascii("Index"); } /// - ColorCode labelColor() const; + ColorCode labelColor() const override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - bool showInsetDialog(BufferView *) const; + bool showInsetDialog(BufferView *) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// should paragraph indentation be omitted in any case? - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - docstring const buttonLabel(BufferView const & bv) const; + docstring const buttonLabel(BufferView const & bv) const override; /// Updates needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - Inset * clone() const { return new InsetIndex(*this); } + Inset * clone() const override { return new InsetIndex(*this); } /// Is the content of this inset part of the immediate text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } /// friend class InsetIndexParams; @@ -101,25 +101,25 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return INDEX_PRINT_CODE; } + InsetCode lyxCode() const override { return INDEX_PRINT_CODE; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// Updates needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - bool hasSettings() const; + bool hasSettings() const override; /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -136,13 +136,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetPrintIndex(*this); } + Inset * clone() const override { return new InsetPrintIndex(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} }; diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h index b130ab71b4..8f574fc7d6 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -168,55 +168,55 @@ public: /// InsetInfo(Buffer * buf, std::string const & info = std::string()); /// - InsetCode lyxCode() const { return INFO_CODE; } + InsetCode lyxCode() const override { return INFO_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /** FIXME: we would like to do that, but then InsetText::updateBuffer breaks * on info insets. Do we need to run this method on InsetInfo contents? * Having a InsetInfo that hides an InsetText is really annoying, actually. */ - ///bool isActive() const { return false; } + ///bool isActive() const override { return false; } /// - bool editable() const { return false; } + bool editable() const override { return false; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - bool validateModifyArgument(docstring const & argument) const { + bool validateModifyArgument(docstring const & argument) const override { return params_.validateArgument(&buffer(), argument); } /// - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// Force inset into LTR environment if surroundings are RTL - bool forceLTR(OutputParams const &) const; + bool forceLTR(OutputParams const &) const override; /// - bool forceLocalFontSwitch() const; + bool forceLocalFontSwitch() const override; /// void setInfo(std::string const & info); /// - void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - std::string contextMenu(BufferView const &, int, int) const; + std::string contextMenu(BufferView const &, int, int) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// should paragraph indentation be omitted in any case? - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// InsetInfoParams params() const { return params_; } private: /// - virtual Inset * clone() const { return new InsetInfo(*this); } + Inset * clone() const override { return new InsetInfo(*this); } /// void error(docstring const & err, Language const *); /// diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h index 4747bb5d3e..a5b9fefd82 100644 --- a/src/insets/InsetLabel.h +++ b/src/insets/InsetLabel.h @@ -40,29 +40,29 @@ public: /// \name Public functions inherited from Inset class //@{ /// verify label and update references. - void initView(); + void initView() override; /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - InsetCode lyxCode() const { return LABEL_CODE; } + InsetCode lyxCode() const override { return LABEL_CODE; } /// - void latex(otexstream & os, OutputParams const & runparams_in) const; + void latex(otexstream & os, OutputParams const & runparams_in) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -80,18 +80,18 @@ public: /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetLabel(*this); } + Inset * clone() const override { return new InsetLabel(*this); } /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; //@} /// diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index f11071fb6c..33aa15c2cd 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -201,7 +201,7 @@ public: /// bool isDisplay() const { return display_; } /// - bool forcelocalfontswitch() const { return forcelocalfontswitch_; } + bool forceLocalFontSwitch() const { return forcelocalfontswitch_; } /// docstring const & obsoleted_by() const { return obsoleted_by_; } /// diff --git a/src/insets/InsetLine.h b/src/insets/InsetLine.h index 4c918a872d..a6935445f2 100644 --- a/src/insets/InsetLine.h +++ b/src/insets/InsetLine.h @@ -29,7 +29,7 @@ public: /// InsetCommand inherited methods. //@{ - docstring screenLabel() const; + docstring screenLabel() const override; static ParamInfo const & findInfo(std::string const &); static std::string defaultCommand() { return "rule"; } static bool isCompatibleCommand(std::string const & s) @@ -40,18 +40,18 @@ private: /// Inset inherited methods. //@{ - InsetCode lyxCode() const { return LINE_CODE; } - void docbook(XMLStream &, OutputParams const &) const; - docstring xhtml(XMLStream &, OutputParams const &) const; - bool hasSettings() const { return true; } - void metrics(MetricsInfo &, Dimension &) const; - void draw(PainterInfo & pi, int x, int y) const; - void latex(otexstream &, OutputParams const &) const; + InsetCode lyxCode() const override { return LINE_CODE; } + void docbook(XMLStream &, OutputParams const &) const override; + docstring xhtml(XMLStream &, OutputParams const &) const override; + bool hasSettings() const override { return true; } + void metrics(MetricsInfo &, Dimension &) const override; + void draw(PainterInfo & pi, int x, int y) const override; + void latex(otexstream &, OutputParams const &) const override; int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; - void doDispatch(Cursor & cur, FuncRequest & cmd); - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; - Inset * clone() const { return new InsetLine(*this); } + size_t max_length = INT_MAX) const override; + void doDispatch(Cursor & cur, FuncRequest & cmd) override; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; + Inset * clone() const override { return new InsetLine(*this); } //@} /// cached line height and offset. diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h index a74569c544..41be4394ce 100644 --- a/src/insets/InsetListings.h +++ b/src/insets/InsetListings.h @@ -40,49 +40,49 @@ public: static std::string params2string(InsetListingsParams const &); private: /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// false is needed since listings do their own font handling. - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// - InsetCode lyxCode() const { return LISTINGS_CODE; } + InsetCode lyxCode() const override { return LISTINGS_CODE; } /// lstinline is inlined, normal listing is displayed - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// - docstring layoutName() const; + docstring layoutName() const override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - bool showInsetDialog(BufferView *) const; + bool showInsetDialog(BufferView *) const override; /// InsetListingsParams const & params() const { return params_; } /// InsetListingsParams & params() { return params_; } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - Inset * clone() const { return new InsetListings(*this); } + Inset * clone() const override { return new InsetListings(*this); } /// - docstring const buttonLabel(BufferView const & bv) const; + docstring const buttonLabel(BufferView const & bv) const override; /// TexString getCaption(OutputParams const &) const; /// - bool insetAllowed(InsetCode c) const { return c == CAPTION_CODE || c == QUOTE_CODE; } + bool insetAllowed(InsetCode c) const override { return c == CAPTION_CODE || c == QUOTE_CODE; } /// - Encoding const * forcedEncoding(Encoding const *, Encoding const *) const; + Encoding const * forcedEncoding(Encoding const *, Encoding const *) const override; /// InsetListingsParams params_; diff --git a/src/insets/InsetMarginal.h b/src/insets/InsetMarginal.h index 749a0c4152..8b6a403258 100644 --- a/src/insets/InsetMarginal.h +++ b/src/insets/InsetMarginal.h @@ -27,19 +27,19 @@ public: /// explicit InsetMarginal(Buffer *); /// - InsetCode lyxCode() const { return MARGIN_CODE; } + InsetCode lyxCode() const override { return MARGIN_CODE; } /// - docstring layoutName() const { return from_ascii("Marginal"); } + docstring layoutName() const override { return from_ascii("Marginal"); } /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const & runparams) const; + void docbook(XMLStream &, OutputParams const & runparams) const override; /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } private: /// - Inset * clone() const { return new InsetMarginal(*this); } + Inset * clone() const override { return new InsetMarginal(*this); } }; diff --git a/src/insets/InsetNewline.h b/src/insets/InsetNewline.h index 4209dfee38..3d540a8618 100644 --- a/src/insets/InsetNewline.h +++ b/src/insets/InsetNewline.h @@ -47,44 +47,44 @@ public: explicit InsetNewline(InsetNewlineParams par) : Inset(0) { params_.kind = par.kind; } /// - RowFlags rowFlags() const { return BreakAfter | RowAfter; } + RowFlags rowFlags() const override { return BreakAfter | RowAfter; } /// static void string2params(std::string const &, InsetNewlineParams &); /// static std::string params2string(InsetNewlineParams const &); private: /// - InsetCode lyxCode() const { return NEWLINE_CODE; } + InsetCode lyxCode() const override { return NEWLINE_CODE; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// is this equivalent to a space (which is BTW different from /// a line separator)? - bool isSpace() const { return true; } + bool isSpace() const override { return true; } /// ColorCode ColorName() const; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - Inset * clone() const { return new InsetNewline(*this); } + Inset * clone() const override { return new InsetNewline(*this); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// InsetNewlineParams params_; diff --git a/src/insets/InsetNewpage.h b/src/insets/InsetNewpage.h index 1fb3436b62..e7f1126a8a 100644 --- a/src/insets/InsetNewpage.h +++ b/src/insets/InsetNewpage.h @@ -55,38 +55,38 @@ public: static std::string params2string(InsetNewpageParams const &); private: /// - InsetCode lyxCode() const { return NEWPAGE_CODE; } + InsetCode lyxCode() const override { return NEWPAGE_CODE; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// docstring insetLabel() const; /// ColorCode ColorName() const; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - Inset * clone() const { return new InsetNewpage(*this); } + Inset * clone() const override { return new InsetNewpage(*this); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// InsetNewpageParams params_; diff --git a/src/insets/InsetNomencl.h b/src/insets/InsetNomencl.h index b36527c7bb..144064977a 100644 --- a/src/insets/InsetNomencl.h +++ b/src/insets/InsetNomencl.h @@ -31,23 +31,23 @@ public: /// \name Public functions inherited from Inset class //@{ /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// Updates needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - InsetCode lyxCode() const { return NOMENCL_CODE; } + InsetCode lyxCode() const override { return NOMENCL_CODE; } /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// Does nothing at the moment. - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -65,13 +65,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetNomencl(*this); } + Inset * clone() const override { return new InsetNomencl(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} /// unique id for this nomenclature entry for docbook export @@ -87,21 +87,21 @@ public: /// \name Public functions inherited from Inset class //@{ /// Updates needed features for this inset. - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - InsetCode lyxCode() const; + InsetCode lyxCode() const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -119,19 +119,19 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetPrintNomencl(*this); } + Inset * clone() const override { return new InsetPrintNomencl(*this); } /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - docstring layoutName() const { return from_ascii("PrintNomencl"); } + docstring layoutName() const override { return from_ascii("PrintNomencl"); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} }; diff --git a/src/insets/InsetNote.h b/src/insets/InsetNote.h index f76ce21ed6..aeab8f038b 100644 --- a/src/insets/InsetNote.h +++ b/src/insets/InsetNote.h @@ -58,49 +58,49 @@ public: InsetNoteParams const & params() const { return params_; } private: /// - InsetCode lyxCode() const { return NOTE_CODE; } + InsetCode lyxCode() const override { return NOTE_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /** returns false if, when outputting LaTeX, font changes should be closed before generating this inset. This is needed for insets that may contain several paragraphs */ - bool inheritFont() const { return params_.type == InsetNoteParams::Note; } + bool inheritFont() const override { return params_.type == InsetNoteParams::Note; } /// Is the content of this inset part of the output document? - bool producesOutput() const + bool producesOutput() const override { return params_.type == InsetNoteParams::Greyedout; } /// - bool allowSpellCheck() const; + bool allowSpellCheck() const override; /// - FontInfo getFont() const; + FontInfo getFont() const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// show the note dialog - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; /// - bool isMacroScope() const; + bool isMacroScope() const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetNote(*this); } + Inset * clone() const override { return new InsetNote(*this); } /// used by the constructors void init(); /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// friend class InsetNoteParams; diff --git a/src/insets/InsetPhantom.h b/src/insets/InsetPhantom.h index 89ccfb3d76..72281df2ae 100644 --- a/src/insets/InsetPhantom.h +++ b/src/insets/InsetPhantom.h @@ -58,42 +58,42 @@ public: InsetPhantomParams const & params() const { return params_; } private: /// - InsetCode lyxCode() const { return PHANTOM_CODE; } + InsetCode lyxCode() const override { return PHANTOM_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void setButtonLabel(); + void setButtonLabel() override; /// show the phantom dialog - bool showInsetDialog(BufferView * bv) const; + bool showInsetDialog(BufferView * bv) const override; /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// Makes no sense for XHTML. - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - Inset * clone() const { return new InsetPhantom(*this); } + Inset * clone() const override { return new InsetPhantom(*this); } /// used by the constructors void init(); /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// friend class InsetPhantomParams; diff --git a/src/insets/InsetPreview.h b/src/insets/InsetPreview.h index 123d947c99..834d892e23 100644 --- a/src/insets/InsetPreview.h +++ b/src/insets/InsetPreview.h @@ -42,37 +42,37 @@ public: /// \name Methods inherited from Inset class //@{ - Inset * clone() const { return new InsetPreview(*this); } + Inset * clone() const override { return new InsetPreview(*this); } - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } - InsetCode lyxCode() const { return PREVIEW_CODE; } + InsetCode lyxCode() const override { return PREVIEW_CODE; } - docstring layoutName() const { return from_ascii("Preview"); } + docstring layoutName() const override { return from_ascii("Preview"); } - bool descendable(BufferView const & /*bv*/) const { return true; } + bool descendable(BufferView const & /*bv*/) const override { return true; } - std::string contextMenuName() const + std::string contextMenuName() const override { return "context-preview"; } - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; void addPreview(DocIterator const & inset_pos, - graphics::PreviewLoader & ploader) const; + graphics::PreviewLoader & ploader) const override; - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; - void write(std::ostream & os) const; + void write(std::ostream & os) const override; - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; - bool canPaintChange(BufferView const &) const { return true; }; + bool canPaintChange(BufferView const &) const override { return true; }; //@} protected: diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h index 09eadec3c7..5bc7f39269 100644 --- a/src/insets/InsetQuotes.h +++ b/src/insets/InsetQuotes.h @@ -129,50 +129,50 @@ public: std::string const & side = std::string(), std::string const & style = std::string()); /// - docstring layoutName() const; + docstring layoutName() const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const maxlen, bool const) const; + void forOutliner(docstring &, size_t const maxlen, bool const) const override; /// Update the contextual information of this inset - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - InsetCode lyxCode() const { return QUOTE_CODE; } + InsetCode lyxCode() const override { return QUOTE_CODE; } /// should this inset be handled like a normal character - bool isChar() const { return true; } + bool isChar() const override { return true; } /// Returns the current quote type std::string getType() const; private: /// - Inset * clone() const { return new InsetQuotes(*this); } + Inset * clone() const override { return new InsetQuotes(*this); } /// Decide whether we need left or right quotation marks void setSide(char_type c); @@ -213,7 +213,7 @@ protected: /// \name Protected functions inherited from Inset class //@{ /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; //@} }; diff --git a/src/insets/InsetRef.h b/src/insets/InsetRef.h index 192ca0d696..d18f61939c 100644 --- a/src/insets/InsetRef.h +++ b/src/insets/InsetRef.h @@ -39,44 +39,44 @@ public: /// \name Public functions inherited from Inset class //@{ /// - docstring layoutName() const; + docstring layoutName() const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override; /// - bool isLabeled() const { return true; } + bool isLabeled() const override { return true; } /// - docstring toolTip(BufferView const &, int, int) const + docstring toolTip(BufferView const &, int, int) const override { return tooltip_; } /// docstring getTOCString() const; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - InsetCode lyxCode() const { return REF_CODE; } + InsetCode lyxCode() const override { return REF_CODE; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - bool forceLTR(OutputParams const &) const; + bool forceLTR(OutputParams const &) const override; //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -99,13 +99,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetRef(*this); } + Inset * clone() const override { return new InsetRef(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} /// \return the label with things that need to be escaped escaped diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h index 45e766f943..424772cfb9 100644 --- a/src/insets/InsetScript.h +++ b/src/insets/InsetScript.h @@ -63,71 +63,71 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return SCRIPT_CODE; } + InsetCode lyxCode() const override { return SCRIPT_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - int topOffset(BufferView const *) const { return 0; } + int topOffset(BufferView const *) const override { return 0; } /// - int bottomOffset(BufferView const *) const { return 0; } + int bottomOffset(BufferView const *) const override { return 0; } /// - int leftOffset(BufferView const *) const { return 0; } + int leftOffset(BufferView const *) const override { return 0; } /// - int rightOffset(BufferView const *) const { return 0; } + int rightOffset(BufferView const *) const override { return 0; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// void cursorPos(BufferView const & bv, - CursorSlice const & sl, bool boundary, int & x, int & y) const; + CursorSlice const & sl, bool boundary, int & x, int & y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - bool forcePlainLayout(idx_type = 0) const { return true; } + bool forcePlainLayout(idx_type = 0) const override { return true; } /// - bool allowParagraphCustomization(idx_type = 0) const { return false; } + bool allowParagraphCustomization(idx_type = 0) const override { return false; } /// - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - bool inheritFont() const { return true; } + bool inheritFont() const override { return true; } /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// void edit(Cursor & cur, bool front, - EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); + EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// - bool insetAllowed(InsetCode code) const; + bool insetAllowed(InsetCode code) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - Inset * clone() const { return new InsetScript(*this); } + Inset * clone() const override { return new InsetScript(*this); } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; //@} /// \name Public functions inherited from InsetText class //@{ /// - bool allowMultiPar() const { return false; } + bool allowMultiPar() const override { return false; } //@} protected: /// \name Protected functions inherited from Inset class //@{ /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; //@} private: diff --git a/src/insets/InsetSeparator.h b/src/insets/InsetSeparator.h index 85d9347ed8..3f8a84cb07 100644 --- a/src/insets/InsetSeparator.h +++ b/src/insets/InsetSeparator.h @@ -51,7 +51,7 @@ public: /// To be used in combination with inset-forall /// Here's a command that removes every latexpar separator: /// inset-forall Separator:latexpar char-delete-forward - docstring layoutName() const + docstring layoutName() const override { switch (params_.kind) { case InsetSeparatorParams::PLAIN: @@ -65,40 +65,40 @@ public: return docstring(); } /// - RowFlags rowFlags() const { return BreakAfter; } + RowFlags rowFlags() const override { return BreakAfter; } private: /// - InsetCode lyxCode() const { return SEPARATOR_CODE; } + InsetCode lyxCode() const override { return SEPARATOR_CODE; } /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// is this equivalent to a space (which is BTW different from /// a line separator)? - bool isSpace() const { return true; } + bool isSpace() const override { return true; } /// ColorCode ColorName() const; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - Inset * clone() const { return new InsetSeparator(*this); } + Inset * clone() const override { return new InsetSeparator(*this); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// InsetSeparatorParams params_; diff --git a/src/insets/InsetSpace.h b/src/insets/InsetSpace.h index 0ebcec1f54..1d200764a4 100644 --- a/src/insets/InsetSpace.h +++ b/src/insets/InsetSpace.h @@ -113,57 +113,57 @@ public: GlueLength length() const; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// unprotected spaces allow line breaking after them - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// Will not be used when lyxf3 - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } /// - InsetCode lyxCode() const { return SPACE_CODE; } + InsetCode lyxCode() const override { return SPACE_CODE; } /// does this inset try to use all available space (like \\hfill does)? - bool isHfill() const; + bool isHfill() const override; /// should this inset be handled like a normal character? - bool isChar() const { return true; } + bool isChar() const override { return true; } /// is this equivalent to a letter? - bool isLetter() const { return false; } + bool isLetter() const override { return false; } /// is this equivalent to a space (which is BTW different from // a line separator)? - bool isSpace() const { return true; } + bool isSpace() const override { return true; } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; protected: /// - Inset * clone() const { return new InsetSpace(*this); } + Inset * clone() const override { return new InsetSpace(*this); } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; public: /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; private: /// diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h index 286e3b9907..3056b105b4 100644 --- a/src/insets/InsetSpecialChar.h +++ b/src/insets/InsetSpecialChar.h @@ -61,49 +61,49 @@ public: /// Kind kind() const; /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// some special chars allow line breaking after them - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// Will not be used when lyxf3 - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - bool isInToc() const { return true; } + bool isInToc() const override { return true; } /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// - InsetCode lyxCode() const { return SPECIALCHAR_CODE; } + InsetCode lyxCode() const override { return SPECIALCHAR_CODE; } /// We don't need \begin_inset and \end_inset - bool directWrite() const { return true; } + bool directWrite() const override { return true; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// should this inset be handled like a normal character? - bool isChar() const; + bool isChar() const override; /// is this equivalent to a letter? - bool isLetter() const; + bool isLetter() const override; /// should we break lines after this inset? - bool isLineSeparator() const; + bool isLineSeparator() const override; /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return isChar(); } + bool isPartOfTextSequence() const override { return isChar(); } private: - Inset * clone() const { return new InsetSpecialChar(*this); } + Inset * clone() const override { return new InsetSpecialChar(*this); } /// And which kind is this? Kind kind_; diff --git a/src/insets/InsetTOC.h b/src/insets/InsetTOC.h index 4b92e329a2..045ae07e6d 100644 --- a/src/insets/InsetTOC.h +++ b/src/insets/InsetTOC.h @@ -33,24 +33,24 @@ public: /// \name Public functions inherited from Inset class //@{ /// - InsetCode lyxCode() const { return TOC_CODE; } + InsetCode lyxCode() const override { return TOC_CODE; } /// - docstring layoutName() const; + docstring layoutName() const override; /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - virtual void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream & xs, OutputParams const &) const; + docstring xhtml(XMLStream & xs, OutputParams const &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } //@} /// \name Static public methods obligated for InsetCommand derived classes @@ -74,13 +74,13 @@ private: /// \name Private functions inherited from Inset class //@{ /// - Inset * clone() const { return new InsetTOC(*this); } + Inset * clone() const override { return new InsetTOC(*this); } //@} /// \name Private functions inherited from InsetCommand class //@{ /// - docstring screenLabel() const; + docstring screenLabel() const override; //@} }; diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index fd942049ba..ef9735632d 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -55,12 +55,12 @@ public: /// explicit InsetTableCell(Buffer * buf); /// - InsetCode lyxCode() const { return CELL_CODE; } + InsetCode lyxCode() const override { return CELL_CODE; } /// - Inset * clone() const { return new InsetTableCell(*this); } + Inset * clone() const override { return new InsetTableCell(*this); } /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & status) const; + FuncStatus & status) const override; /// void toggleFixedWidth(bool fw) { isFixedWidth = fw; } /// @@ -73,18 +73,18 @@ public: /// descending into insets docstring asString(bool intoInsets = true); /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// Needs to be same as InsetTabular - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// Can the cell contain several paragraphs? - bool allowMultiPar() const { return !isMultiRow && (!isMultiColumn || isFixedWidth); } + bool allowMultiPar() const override { return !isMultiRow && (!isMultiColumn || isFixedWidth); } private: /// unimplemented InsetTableCell(); @@ -124,19 +124,19 @@ private: /// LyXAlignment contentAlign; /// should paragraph indentation be omitted in any case? - bool neverIndent() const { return true; } + bool neverIndent() const override { return true; } /// - LyXAlignment contentAlignment() const { return contentAlign; } + LyXAlignment contentAlignment() const override { return contentAlign; } /// - virtual bool usePlainLayout() const { return true; } + bool usePlainLayout() const override { return true; } /// - virtual bool forcePlainLayout(idx_type = 0) const; + bool forcePlainLayout(idx_type = 0) const override; /// - virtual bool allowParagraphCustomization(idx_type = 0) const; + bool allowParagraphCustomization(idx_type = 0) const override; /// - virtual bool forceLocalFontSwitch() const; + bool forceLocalFontSwitch() const override; /// Is the width forced to some value? - bool hasFixedWidth() const { return isFixedWidth; } + bool hasFixedWidth() const override { return isFixedWidth; } }; @@ -944,90 +944,90 @@ public: /// ~InsetTabular(); /// - void setBuffer(Buffer & buffer); + void setBuffer(Buffer & buffer) override; /// static void string2params(std::string const &, InsetTabular &); /// static std::string params2string(InsetTabular const &); /// - void read(Lexer &); + void read(Lexer &) override; /// - void write(std::ostream &) const; + void write(std::ostream &) const override; /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void drawSelection(PainterInfo & pi, int x, int y) const; + void drawSelection(PainterInfo & pi, int x, int y) const override; /// - void drawBackground(PainterInfo & pi, int x, int y) const; + void drawBackground(PainterInfo & pi, int x, int y) const override; /// - bool editable() const { return true; } + bool editable() const override { return true; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - bool insetAllowed(InsetCode code) const; + bool insetAllowed(InsetCode code) const override; /// - bool allowSpellCheck() const { return true; } + bool allowSpellCheck() const override { return true; } /// - bool canTrackChanges() const { return true; } + bool canTrackChanges() const override { return true; } /// - bool canPaintChange(BufferView const &) const { return true; } + bool canPaintChange(BufferView const &) const override { return true; } /** returns false if, when outputting LaTeX, font changes should be closed before generating this inset. This is needed for insets that may contain several paragraphs */ - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// - bool allowMultiPar() const; + bool allowMultiPar() const override; /// - bool allowsCaptionVariation(std::string const &) const; + bool allowsCaptionVariation(std::string const &) const override; // - bool isTable() const { return true; } + bool isTable() const override { return true; } /// - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return TABULAR_CODE; } + InsetCode lyxCode() const override { return TABULAR_CODE; } /// - std::string contextMenu(BufferView const &, int, int) const; + std::string contextMenu(BufferView const &, int, int) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// get offset of this cursor slice relative to our upper left corner void cursorPos(BufferView const & bv, CursorSlice const & sl, - bool boundary, int & x, int & y) const; + bool boundary, int & x, int & y) const override; /// Executes a space-separated sequence of tabular-features requests void tabularFeatures(Cursor & cur, std::string const & what); /// Change a single tabular feature; does not handle undo. void tabularFeatures(Cursor & cur, Tabular::Feature feature, std::string const & val = std::string()); /// number of cells - size_t nargs() const { return tabular.numberofcells; } + size_t nargs() const override { return tabular.numberofcells; } /// std::shared_ptr cell(idx_type) const; /// std::shared_ptr cell(idx_type); /// - Text * getText(int) const; + Text * getText(int) const override; /// does the inset contain changes ? - bool isChanged() const; + bool isChanged() const override; /// set the change for the entire inset - void setChange(Change const & change); + void setChange(Change const & change) override; /// accept the changes within the inset - void acceptChanges(); + void acceptChanges() override; /// reject the changes within the inset - void rejectChanges(); + void rejectChanges() override; // this should return true if we have a "normal" cell, otherwise false. // "normal" means without width set! @@ -1037,52 +1037,52 @@ public: virtual bool forcePlainLayout(idx_type cell = 0) const; /// void addPreview(DocIterator const & inset_pos, - graphics::PreviewLoader &) const; + graphics::PreviewLoader &) const override; /// lock cell with given index - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// get table row from x coordinate int rowFromY(Cursor & cur, int y) const; /// get table column from y coordinate int columnFromX(Cursor & cur, int x) const; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// can we go further down on mouse click? - bool descendable(BufferView const &) const { return true; } + bool descendable(BufferView const &) const override { return true; } /// Update the counters of this inset and of its contents - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - bool completionSupported(Cursor const &) const; + bool completionSupported(Cursor const &) const override; /// - bool inlineCompletionSupported(Cursor const & cur) const; + bool inlineCompletionSupported(Cursor const & cur) const override; /// - bool automaticInlineCompletion() const; + bool automaticInlineCompletion() const override; /// - bool automaticPopupCompletion() const; + bool automaticPopupCompletion() const override; /// - bool showCompletionCursor() const; + bool showCompletionCursor() const override; /// - CompletionList const * createCompletionList(Cursor const & cur) const; + CompletionList const * createCompletionList(Cursor const & cur) const override; /// - docstring completionPrefix(Cursor const & cur) const; + docstring completionPrefix(Cursor const & cur) const override; /// - bool insertCompletion(Cursor & cur, docstring const & s, bool finished); + bool insertCompletion(Cursor & cur, docstring const & s, bool finished) override; /// - void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const; + void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const override; /// - virtual bool usePlainLayout() const { return true; } + bool usePlainLayout() const override { return true; } /// - docstring layoutName() const { return from_ascii("Tabular"); } + docstring layoutName() const override { return from_ascii("Tabular"); } /// - InsetTabular * asInsetTabular() { return this; } + InsetTabular * asInsetTabular() override { return this; } /// - InsetTabular const * asInsetTabular() const { return this; } + InsetTabular const * asInsetTabular() const override { return this; } /// bool isRightToLeft(Cursor & cur) const; /// writes the cells between stidx and enidx as a string, optionally @@ -1104,21 +1104,21 @@ private: /// InsetTabular(InsetTabular const &); /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// bool getFeatureStatus(Cursor & cur, std::string const & s, std::string const & argument, FuncStatus & status) const; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - Inset * clone() const { return new InsetTabular(*this); } + Inset * clone() const override { return new InsetTabular(*this); } /// bool hitSelectRow(BufferView const & bv, int x) const; /// bool hitSelectColumn(BufferView const & bv, int y) const; /// Returns true if coordinates are on row/column selection zones - bool clickable(BufferView const &, int x, int y) const; + bool clickable(BufferView const &, int x, int y) const override; /// void drawCellLines(PainterInfo &, int x, int y, row_type row, diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index ca09a683c3..2f32bd2539 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -45,7 +45,7 @@ public: /// InsetText(InsetText const &); /// - void setBuffer(Buffer &); + void setBuffer(Buffer &) override; /// Dimension const dimensionHelper(BufferView const &) const; @@ -53,35 +53,35 @@ public: /// empty inset to empty par void clear(); /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// Drawing background is handled in draw - virtual void drawBackground(PainterInfo &, int, int) const {} + void drawBackground(PainterInfo &, int, int) const override {} /// - bool editable() const { return true; } + bool editable() const override { return true; } /// - bool canTrackChanges() const { return true; } + bool canTrackChanges() const override { return true; } /// Rely on RowPainter to draw the cue of inline insets. - bool canPaintChange(BufferView const &) const { return allowMultiPar(); } + bool canPaintChange(BufferView const &) const override { return allowMultiPar(); } /// - InsetText * asInsetText() { return this; } + InsetText * asInsetText() override { return this; } /// - InsetText const * asInsetText() const { return this; } + InsetText const * asInsetText() const override { return this; } /// Text & text() { return text_; } Text const & text() const { return text_; } /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// enum XHTMLOptions { JustText = 0, @@ -96,18 +96,18 @@ public: /// void docbook(XMLStream &, OutputParams const &, XHTMLOptions opts) const; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// return the argument(s) only void getArgs(otexstream & os, OutputParams const &, bool const post = false) const; /// return x,y of given position relative to the inset's baseline void cursorPos(BufferView const & bv, CursorSlice const & sl, - bool boundary, int & x, int & y) const; + bool boundary, int & x, int & y) const override; /// - InsetCode lyxCode() const { return TEXT_CODE; } + InsetCode lyxCode() const override { return TEXT_CODE; } /// void setText(docstring const &, Font const &, bool trackChanges); /// @@ -117,98 +117,98 @@ public: /// void setFrameColor(ColorCode); /// - Text * getText(int i) const { + Text * getText(int i) const override { return (i == 0) ? const_cast(&text_) : 0; } /// - virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// void fixParagraphsFont(); /// does the inset contain changes ? - bool isChanged() const { return is_changed_; } + bool isChanged() const override { return is_changed_; } /// this is const because value is mutable void isChanged(bool ic) const { is_changed_ = ic; } /// set the change for the entire inset - void setChange(Change const & change); + void setChange(Change const & change) override; /// accept the changes within the inset - void acceptChanges(); + void acceptChanges() override; /// reject the changes within the inset - void rejectChanges(); + void rejectChanges() override; /// append text onto the existing text void appendParagraphs(ParagraphList &); /// - void addPreview(DocIterator const &, graphics::PreviewLoader &) const; + void addPreview(DocIterator const &, graphics::PreviewLoader &) const override; /// - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// number of cells in this inset - size_t nargs() const { return 1; } + size_t nargs() const override { return 1; } /// ParagraphList & paragraphs(); /// ParagraphList const & paragraphs() const; /// - bool insetAllowed(InsetCode) const; + bool insetAllowed(InsetCode) const override; /// - bool allowSpellCheck() const { return getLayout().spellcheck() && !getLayout().isPassThru(); } + bool allowSpellCheck() const override { return getLayout().spellcheck() && !getLayout().isPassThru(); } /// virtual bool isMacroScope() const { return false; } /// - bool allowMultiPar() const { return getLayout().isMultiPar(); } + bool allowMultiPar() const override { return getLayout().isMultiPar(); } /// - bool isInTitle() const { return intitle_context_; } + bool isInTitle() const override { return intitle_context_; } /// /// should paragraphs be forced to use the empty layout? - virtual bool forcePlainLayout(idx_type = 0) const + bool forcePlainLayout(idx_type = 0) const override { return getLayout().forcePlainLayout(); } /// should the user be allowed to customize alignment, etc.? - virtual bool allowParagraphCustomization(idx_type = 0) const + bool allowParagraphCustomization(idx_type = 0) const override { return getLayout().allowParagraphCustomization(); } /// should paragraphs be forced to use a local font language switch? - virtual bool forceLocalFontSwitch() const - { return getLayout().forcelocalfontswitch(); } + bool forceLocalFontSwitch() const override + { return getLayout().forceLocalFontSwitch(); } /// Update the counters of this inset and of its contents - virtual void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// void setMacrocontextPositionRecursive(DocIterator const & pos); /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// - Inset * clone() const { return new InsetText(*this); } + Inset * clone() const override { return new InsetText(*this); } /// - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// - bool completionSupported(Cursor const &) const; + bool completionSupported(Cursor const &) const override; /// - bool inlineCompletionSupported(Cursor const & cur) const; + bool inlineCompletionSupported(Cursor const & cur) const override; /// - bool automaticInlineCompletion() const; + bool automaticInlineCompletion() const override; /// - bool automaticPopupCompletion() const; + bool automaticPopupCompletion() const override; /// - bool showCompletionCursor() const; + bool showCompletionCursor() const override; /// - CompletionList const * createCompletionList(Cursor const & cur) const; + CompletionList const * createCompletionList(Cursor const & cur) const override; /// - docstring completionPrefix(Cursor const & cur) const; + docstring completionPrefix(Cursor const & cur) const override; /// - bool insertCompletion(Cursor & cur, docstring const & s, bool finished); + bool insertCompletion(Cursor & cur, docstring const & s, bool finished) override; /// - void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const; + void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const override; /// returns the text to be used as tooltip /// \param prefix: a string that will precede the tooltip, /// e.g., "Index: ". @@ -222,18 +222,18 @@ public: size_t len = 400) const; /// - std::string contextMenu(BufferView const &, int, int) const; + std::string contextMenu(BufferView const &, int, int) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool confirmDeletion() const { return !text().empty(); } + bool confirmDeletion() const override { return !text().empty(); } /// bool needsCProtection(bool const maintext = false, - bool const fragile = false) const; + bool const fragile = false) const override; /// bool hasCProtectContent(bool fragile = false) const; diff --git a/src/insets/InsetVSpace.h b/src/insets/InsetVSpace.h index 6e307561d5..9b95f00ff0 100644 --- a/src/insets/InsetVSpace.h +++ b/src/insets/InsetVSpace.h @@ -28,47 +28,47 @@ public: /// How much? VSpace const & space() const { return space_; } /// - InsetCode lyxCode() const { return VSPACE_CODE; } + InsetCode lyxCode() const override { return VSPACE_CODE; } /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - bool clickable(BufferView const &, int, int) const { return true; } + bool clickable(BufferView const &, int, int) const override { return true; } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// static void string2params(std::string const &, VSpace &); /// static std::string params2string(VSpace const &); private: /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// Note that this returns the inset rather than writing it, /// so it will actually be written after the present paragraph. /// The normal case is that this inset will be on a line by /// itself, and in that case the present paragraph will not, /// in fact, appear at all. - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - RowFlags rowFlags() const { return Display; } + RowFlags rowFlags() const override { return Display; } /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override; /// - Inset * clone() const { return new InsetVSpace(*this); } + Inset * clone() const override { return new InsetVSpace(*this); } /// docstring const label() const; diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h index 5619dc042b..02e0a202b6 100644 --- a/src/insets/InsetWrap.h +++ b/src/insets/InsetWrap.h @@ -56,42 +56,42 @@ public: static std::string params2string(InsetWrapParams const &); private: /// - void setCaptionType(std::string const & type); + void setCaptionType(std::string const & type) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return WRAP_CODE; } + InsetCode lyxCode() const override { return WRAP_CODE; } /// - docstring toolTip(BufferView const & bv, int x, int y) const; + docstring toolTip(BufferView const & bv, int x, int y) const override; /// - void latex(otexstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const override; /// int plaintext(odocstringstream & ods, OutputParams const & op, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - bool insetAllowed(InsetCode) const; + bool insetAllowed(InsetCode) const override; /// - bool showInsetDialog(BufferView *) const; + bool showInsetDialog(BufferView *) const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// Update the label - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - docstring layoutName() const; + docstring layoutName() const override; /// - Inset * clone() const { return new InsetWrap(*this); } + Inset * clone() const override { return new InsetWrap(*this); } /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } /// InsetWrapParams params_; diff --git a/src/insets/RenderButton.h b/src/insets/RenderButton.h index 2dc2da6c9e..69513f09ad 100644 --- a/src/insets/RenderButton.h +++ b/src/insets/RenderButton.h @@ -25,12 +25,12 @@ class RenderButton : public RenderBase public: RenderButton(); - RenderBase * clone(Inset const *) const; + RenderBase * clone(Inset const *) const override; /// compute the size of the object returned in dim - virtual void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// draw inset and update (xo, yo)-cache - virtual void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// Provide the text for the button void update(docstring const &, bool editable, @@ -42,7 +42,7 @@ public: void setBox(Box b) { button_box_ = b; } /// equivalent to dynamic_cast - virtual RenderButton * asButton() { return this; } + RenderButton * asButton() override { return this; } private: /// The stored data. diff --git a/src/insets/RenderGraphic.h b/src/insets/RenderGraphic.h index 37f3aaaa93..8b17bd8824 100644 --- a/src/insets/RenderGraphic.h +++ b/src/insets/RenderGraphic.h @@ -26,12 +26,12 @@ class RenderGraphic : public RenderBase public: explicit RenderGraphic(Inset const *); RenderGraphic(RenderGraphic const &, Inset const *); - RenderBase * clone(Inset const *) const; + RenderBase * clone(Inset const *) const override; /// compute the size of the object returned in dim - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// draw inset - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// Refresh the info about which file to display and how to display it. void update(graphics::Params const & params); @@ -39,7 +39,7 @@ public: void reload() const; /// equivalent to dynamic_cast - virtual RenderGraphic * asGraphic() { return this; } + RenderGraphic * asGraphic() override { return this; } private: /// Not implemented. diff --git a/src/insets/RenderPreview.h b/src/insets/RenderPreview.h index c6eee309d0..ca85c04e95 100644 --- a/src/insets/RenderPreview.h +++ b/src/insets/RenderPreview.h @@ -47,12 +47,12 @@ public: explicit RenderPreview(Inset const *); RenderPreview(RenderPreview const &, Inset const *); - RenderBase * clone(Inset const *) const; + RenderBase * clone(Inset const *) const override; /// Compute the size of the object, returned in dim - void metrics(MetricsInfo &, Dimension & dim) const; + void metrics(MetricsInfo &, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /** Find the PreviewLoader and add a LaTeX snippet to it. * Do not start the loading process. @@ -86,7 +86,7 @@ public: getPreviewImage(Buffer const & buffer) const; /// equivalent to dynamic_cast - virtual RenderPreview * asPreview() { return this; } + RenderPreview * asPreview() override { return this; } private: /// Not implemented. @@ -112,7 +112,7 @@ class RenderMonitoredPreview : public RenderPreview { public: explicit RenderMonitoredPreview(Inset const *); /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// void setAbsFile(support::FileName const & file); /// @@ -127,7 +127,7 @@ public: signals2::connection connect(slot const & slot); /// equivalent to dynamic_cast - virtual RenderMonitoredPreview * asMonitoredPreview() { return this; } + RenderMonitoredPreview * asMonitoredPreview() override { return this; } private: /// This signal is emitted if the file is modified diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index 067bf6e876..157fcb1a9b 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -116,16 +116,16 @@ public: /// explicit InsetMath(Buffer * buf = 0) : Inset(buf) {} /// identification as math inset - InsetMath * asInsetMath() { return this; } + InsetMath * asInsetMath() override { return this; } /// identification as math inset - InsetMath const * asInsetMath() const { return this; } + InsetMath const * asInsetMath() const override { return this; } /// this is overridden in math text insets (i.e. mbox) - bool inMathed() const { return true; } + bool inMathed() const override { return true; } /// virtual docstring name() const; /// this is overridden by specific insets - virtual mode_type currentMode() const { return MATH_MODE; } + mode_type currentMode() const override { return MATH_MODE; } // The possible marker types for math insets enum marker_type { NO_MARKER, MARKER2, MARKER, BOX_MARKER }; @@ -248,10 +248,10 @@ public: virtual void octave(OctaveStream &) const; /// plain text output in ucs4 encoding - int plaintext(odocstringstream &, OutputParams const &, size_t) const; + int plaintext(odocstringstream &, OutputParams const &, size_t) const override; /// dump content to stderr for debugging - virtual void dump() const; + void dump() const override; /// LyXInset stuff virtual bool numberedType() const { return false; } @@ -261,14 +261,14 @@ public: virtual void mutate(HullType /*newtype*/) {} /// math stuff usually isn't allowed in text mode - virtual bool allowedIn(mode_type mode) const { return mode == MATH_MODE; } + bool allowedIn(mode_type mode) const override { return mode == MATH_MODE; } /// Italic correction as described in InsetMathScript.h virtual int kerning(BufferView const *) const { return 0; } /// - bool isInToc() const { return true; } + bool isInToc() const override { return true; } /// - InsetCode lyxCode() const { return MATH_CODE; } + InsetCode lyxCode() const override { return MATH_CODE; } /// uid_type id() const { return this; } }; diff --git a/src/mathed/InsetMathAMSArray.h b/src/mathed/InsetMathAMSArray.h index 25b81339dc..5186f5504e 100644 --- a/src/mathed/InsetMathAMSArray.h +++ b/src/mathed/InsetMathAMSArray.h @@ -26,50 +26,50 @@ public: InsetMathAMSArray(Buffer * buf, docstring const &); /// /// - int rowsep() const; + int rowsep() const override; /// - int colsep() const; + int colsep() const override; /// - int border() const; + int border() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pain, int x, int y) const; + void draw(PainterInfo & pain, int x, int y) const override; /// - InsetMathAMSArray * asAMSArrayInset() { return this; } + InsetMathAMSArray * asAMSArrayInset() override { return this; } /// - InsetMathAMSArray const * asAMSArrayInset() const { return this; } + InsetMathAMSArray const * asAMSArrayInset() const override { return this; } /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; // Don't need mathmlize or htmlize, as this is handled by // InsetMathMatrix after being extracted in MathExtern. - // void mathmlize(MathStream &) const; - // void htmlize(HTMLStream &) const; + // void mathmlize(MathStream &) const override; + // void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_AMSARRAY_CODE; } + InsetCode lyxCode() const override { return MATH_AMSARRAY_CODE; } /// char const * name_left() const; /// char const * name_right() const; /// - int leftMargin() const { return small() ? 3 : 6; } //override + int leftMargin() const override { return small() ? 3 : 6; } /// - int rightMargin() const { return small() ? 3: 6; } //override + int rightMargin() const override { return small() ? 3: 6; } /// - bool handlesMulticolumn() const { return true; } //override + bool handlesMulticolumn() const override { return true; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool small() const { return name_ == "smallmatrix"; } /// diff --git a/src/mathed/InsetMathArray.h b/src/mathed/InsetMathArray.h index b1cc3110ab..ce372a1707 100644 --- a/src/mathed/InsetMathArray.h +++ b/src/mathed/InsetMathArray.h @@ -29,35 +29,35 @@ public: /// convenience constructor from whitespace/newline separated data InsetMathArray(Buffer * buf, docstring const &, docstring const & str); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - InsetMathArray * asArrayInset() { return this; } + InsetMathArray * asArrayInset() override { return this; } /// - InsetMathArray const * asArrayInset() const { return this; } + InsetMathArray const * asArrayInset() const override { return this; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void maple(MapleStream & os) const; + void maple(MapleStream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_ARRAY_CODE; } + InsetCode lyxCode() const override { return MATH_ARRAY_CODE; } /// - int leftMargin() const { return 4; } //override + int leftMargin() const override { return 4; } /// - int rightMargin() const { return 2; } //override + int rightMargin() const override { return 2; } /// - bool handlesMulticolumn() const { return true; } //override + bool handlesMulticolumn() const override { return true; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// docstring name_; }; diff --git a/src/mathed/InsetMathBig.h b/src/mathed/InsetMathBig.h index 83010a9260..f479ed2f03 100644 --- a/src/mathed/InsetMathBig.h +++ b/src/mathed/InsetMathBig.h @@ -23,31 +23,31 @@ public: /// InsetMathBig(docstring const & name, docstring const & delim); /// - docstring name() const; + docstring name() const override; /// class is different for l(eft), r(ight) and m(iddle) - MathClass mathClass() const; + MathClass mathClass() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// void infoize2(odocstream & os) const; /// static bool isBigInsetDelim(docstring const &); /// - InsetCode lyxCode() const { return MATH_BIG_CODE; } + InsetCode lyxCode() const override { return MATH_BIG_CODE; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// size_type size() const; /// diff --git a/src/mathed/InsetMathBoldSymbol.h b/src/mathed/InsetMathBoldSymbol.h index 89f3813510..9d883d2c5d 100644 --- a/src/mathed/InsetMathBoldSymbol.h +++ b/src/mathed/InsetMathBoldSymbol.h @@ -28,31 +28,31 @@ public: /// InsetMathBoldSymbol(Buffer * buf, Kind kind = AMS_BOLD); /// - docstring name() const; + docstring name() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_BOLDSYMBOL_CODE; } + InsetCode lyxCode() const override { return MATH_BOLDSYMBOL_CODE; } /// Kind kind_; private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathBox.h b/src/mathed/InsetMathBox.h index e07fed9c48..0a8bf74cd2 100644 --- a/src/mathed/InsetMathBox.h +++ b/src/mathed/InsetMathBox.h @@ -23,28 +23,28 @@ public: /// explicit InsetMathBox(Buffer * buf, docstring const & name); /// - mode_type currentMode() const { return TEXT_MODE; } + mode_type currentMode() const override { return TEXT_MODE; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_BOX_CODE; } + InsetCode lyxCode() const override { return MATH_BOX_CODE; } private: - Inset * clone() const { return new InsetMathBox(*this); } + Inset * clone() const override { return new InsetMathBox(*this); } /// docstring name_; }; @@ -56,28 +56,28 @@ public: /// explicit InsetMathFBox(Buffer * buf); /// - mode_type currentMode() const { return TEXT_MODE; } + mode_type currentMode() const override { return TEXT_MODE; } /// - marker_type marker(BufferView const *) const { return NO_MARKER; } + marker_type marker(BufferView const *) const override { return NO_MARKER; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; private: /// - Inset * clone() const { return new InsetMathFBox(*this); } + Inset * clone() const override { return new InsetMathFBox(*this); } }; @@ -87,25 +87,25 @@ public: /// InsetMathMakebox(Buffer * buf, bool framebox); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// - mode_type currentMode() const { return TEXT_MODE; } + mode_type currentMode() const override { return TEXT_MODE; } /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; private: - Inset * clone() const { return new InsetMathMakebox(*this); } + Inset * clone() const override { return new InsetMathMakebox(*this); } /// bool framebox_; }; @@ -118,25 +118,25 @@ public: /// explicit InsetMathBoxed(Buffer * buf); /// - marker_type marker(BufferView const *) const { return NO_MARKER; } + marker_type marker(BufferView const *) const override { return NO_MARKER; } /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; private: - Inset * clone() const { return new InsetMathBoxed(*this); } + Inset * clone() const override { return new InsetMathBoxed(*this); } }; diff --git a/src/mathed/InsetMathBrace.h b/src/mathed/InsetMathBrace.h index 4a9efa716a..35082d1a7a 100644 --- a/src/mathed/InsetMathBrace.h +++ b/src/mathed/InsetMathBrace.h @@ -26,33 +26,33 @@ public: /// explicit InsetMathBrace(MathData const & ar); /// identifies brace insets - InsetMathBrace * asBraceInset() { return this; } + InsetMathBrace * asBraceInset() override { return this; } /// identifies brace insets - InsetMathBrace const * asBraceInset() const { return this; } + InsetMathBrace const * asBraceInset() const override { return this; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_BRACE_CODE; } + InsetCode lyxCode() const override { return MATH_BRACE_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathCancel.h b/src/mathed/InsetMathCancel.h index 4fc3fd0bc2..c429fb53ed 100644 --- a/src/mathed/InsetMathCancel.h +++ b/src/mathed/InsetMathCancel.h @@ -28,27 +28,27 @@ public: /// explicit InsetMathCancel(Buffer * buf, Kind); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_CANCEL_CODE; } + InsetCode lyxCode() const override { return MATH_CANCEL_CODE; } /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; private: /// - virtual Inset * clone() const; + Inset * clone() const override; /// Kind kind_; }; diff --git a/src/mathed/InsetMathCancelto.h b/src/mathed/InsetMathCancelto.h index ee88cb5e9d..d6da89043d 100644 --- a/src/mathed/InsetMathCancelto.h +++ b/src/mathed/InsetMathCancelto.h @@ -24,27 +24,27 @@ public: /// bool idxUpDown(Cursor & cur, bool up) const; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_CANCELTO_CODE; } + InsetCode lyxCode() const override { return MATH_CANCELTO_CODE; } /// Nothing for now - void mathmlize(MathStream &) const {} + void mathmlize(MathStream &) const override {} /// Nothing for HTML - void htmlize(HtmlStream &) const {} + void htmlize(HtmlStream &) const override {} /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; private: /// - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathCases.h b/src/mathed/InsetMathCases.h index 84e13979e8..f6b9dfc52f 100644 --- a/src/mathed/InsetMathCases.h +++ b/src/mathed/InsetMathCases.h @@ -25,42 +25,42 @@ public: /// explicit InsetMathCases(Buffer * buf, row_type rows = 1u); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_CASES_CODE; } + InsetCode lyxCode() const override { return MATH_CASES_CODE; } /// - int displayColSpace(col_type) const; + int displayColSpace(col_type) const override; /// - int leftMargin() const { return 8; } //override + int leftMargin() const override { return 8; } /// - int rightMargin() const { return 0; } //override + int rightMargin() const override { return 0; } /// see e.g. https://tex.stackexchange.com/a/133283/87201 - bool handlesMulticolumn() const { return true; } //override + bool handlesMulticolumn() const override { return true; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathChar.h b/src/mathed/InsetMathChar.h index 6e7ff72c9c..64e9ad0f6e 100644 --- a/src/mathed/InsetMathChar.h +++ b/src/mathed/InsetMathChar.h @@ -24,39 +24,39 @@ public: /// explicit InsetMathChar(char_type c); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter &, int x, int y) const; + void drawT(TextPainter &, int x, int y) const override; /// - int kerning(BufferView const *) const { return kerning_; } + int kerning(BufferView const *) const override { return kerning_; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void octave(OctaveStream & os) const; + void octave(OctaveStream & os) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// identifies Charinsets - InsetMathChar const * asCharInset() const { return this; } + InsetMathChar const * asCharInset() const override { return this; } /// - char_type getChar() const { return char_; } + char_type getChar() const override { return char_; } /// - MathClass mathClass() const; + MathClass mathClass() const override; /// - InsetCode lyxCode() const { return MATH_CHAR_CODE; } + InsetCode lyxCode() const override { return MATH_CHAR_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// the character char_type const char_; /// cached kerning for superscript diff --git a/src/mathed/InsetMathClass.h b/src/mathed/InsetMathClass.h index 1b30738f76..390d77aca0 100644 --- a/src/mathed/InsetMathClass.h +++ b/src/mathed/InsetMathClass.h @@ -27,24 +27,24 @@ public: /// InsetMathClass(Buffer * buf, MathClass); /// - docstring name() const; + docstring name() const override; /// - MathClass mathClass() const { return math_class_; } + MathClass mathClass() const override { return math_class_; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_CLASS_CODE; } + InsetCode lyxCode() const override { return MATH_CLASS_CODE; } /// InsetMathClass * asClassInset() { return this; } /// - InsetMathClass const * asClassInset() const { return this; } + InsetMathClass const * asClassInset() const override { return this; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// MathClass math_class_; }; diff --git a/src/mathed/InsetMathColor.h b/src/mathed/InsetMathColor.h index 08495b364d..55a02c2596 100644 --- a/src/mathed/InsetMathColor.h +++ b/src/mathed/InsetMathColor.h @@ -26,29 +26,29 @@ public: /// Create a color inset from LaTeX color name InsetMathColor(Buffer * buf, bool oldstyle, docstring const & color); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// we write extra braces in any case... /// FIXME Why? Are they necessary if oldstyle_ == false? - bool extraBraces() const { return true; } + bool extraBraces() const override { return true; } /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// we need package color - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// FIXME XHTML For now, we do nothing with color. - void mathmlize(MathStream &) const {} + void mathmlize(MathStream &) const override {} /// FIXME XHTML For now, we do nothing with color. - void htmlize(HtmlStream &) const {} + void htmlize(HtmlStream &) const override {} /// /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_COLOR_CODE; } + InsetCode lyxCode() const override { return MATH_COLOR_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool oldstyle_; /// Our color. Only valid LaTeX colors are allowed. diff --git a/src/mathed/InsetMathCommand.h b/src/mathed/InsetMathCommand.h index da4269c9ef..47ed450a58 100644 --- a/src/mathed/InsetMathCommand.h +++ b/src/mathed/InsetMathCommand.h @@ -28,15 +28,15 @@ public: explicit InsetMathCommand(Buffer * buf, docstring const & name, bool needs_math_mode = true); /// - marker_type marker(BufferView const *) const { return NO_MARKER; } + marker_type marker(BufferView const *) const override { return NO_MARKER; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - Inset * editXY(Cursor &, int, int); + Inset * editXY(Cursor &, int, int) override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; // // void infoize(odocstream & os) const; /// @@ -44,10 +44,10 @@ public: /// docstring const & commandname() const { return name_; } /// - bool isActive() const { return false; } + bool isActive() const override { return false; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// docstring name_; diff --git a/src/mathed/InsetMathComment.h b/src/mathed/InsetMathComment.h index 10b244613f..e4dcf65869 100644 --- a/src/mathed/InsetMathComment.h +++ b/src/mathed/InsetMathComment.h @@ -29,32 +29,32 @@ public: /// InsetMathComment(Buffer * buf, docstring const &); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const {} + void mathematica(MathematicaStream &) const override {} /// - void octave(OctaveStream &) const {} + void octave(OctaveStream &) const override {} /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_COMMENT_CODE; } + InsetCode lyxCode() const override { return MATH_COMMENT_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; } // namespace lyx diff --git a/src/mathed/InsetMathDecoration.h b/src/mathed/InsetMathDecoration.h index d6d925230b..3f3a54df9d 100644 --- a/src/mathed/InsetMathDecoration.h +++ b/src/mathed/InsetMathDecoration.h @@ -26,35 +26,35 @@ public: /// explicit InsetMathDecoration(Buffer * buf, latexkeys const * key); /// - mode_type currentMode() const; + mode_type currentMode() const override; /// void draw(PainterInfo &, int x, int y) const; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - MathClass mathClass() const; + MathClass mathClass() const override; /// The default limits value - Limits defaultLimits() const { return allowsLimitsChange() ? LIMITS : NO_LIMITS; } + Limits defaultLimits() const override { return allowsLimitsChange() ? LIMITS : NO_LIMITS; } /// whether the inset has limit-like sub/superscript - Limits limits() const { return limits_; } + Limits limits() const override { return limits_; } /// sets types of sub/superscripts - void limits(Limits lim) { limits_ = lim; } + void limits(Limits lim) override { limits_ = lim; } /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_DECORATION_CODE; } + InsetCode lyxCode() const override { return MATH_DECORATION_CODE; } /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool upper() const; /// diff --git a/src/mathed/InsetMathDelim.h b/src/mathed/InsetMathDelim.h index 5a7e816404..f575ee0b4b 100644 --- a/src/mathed/InsetMathDelim.h +++ b/src/mathed/InsetMathDelim.h @@ -27,11 +27,11 @@ public: InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right, MathData const &); /// - InsetMathDelim * asDelimInset() { return this; } + InsetMathDelim * asDelimInset() override { return this; } /// - InsetMathDelim const * asDelimInset() const { return this; } + InsetMathDelim const * asDelimInset() const override { return this; } /// - MathClass mathClass() const { return MC_INNER; } + MathClass mathClass() const override { return MC_INNER; } /// is it (...)? bool isParenthesis() const; /// is it [...]? @@ -39,38 +39,38 @@ public: /// is it |...|? bool isAbs() const; /// - mode_type currentMode() const { return MATH_MODE; } + mode_type currentMode() const override { return MATH_MODE; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - InsetCode lyxCode() const { return MATH_DELIM_CODE; } + InsetCode lyxCode() const override { return MATH_DELIM_CODE; } /// docstring left_; /// docstring right_; private: - virtual Inset * clone() const; + Inset * clone() const override; /// mutable int dw_; }; diff --git a/src/mathed/InsetMathDiagram.h b/src/mathed/InsetMathDiagram.h index c7928ef576..83652e5377 100644 --- a/src/mathed/InsetMathDiagram.h +++ b/src/mathed/InsetMathDiagram.h @@ -24,32 +24,32 @@ public: /// explicit InsetMathDiagram(Buffer * buf); /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// InsetMathDiagram const * asDiagramInset() const { return this; } /// - virtual int colsep() const; + int colsep() const override; /// - virtual int rowsep() const; + int rowsep() const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_DIAGRAM_CODE; } + InsetCode lyxCode() const override { return MATH_DIAGRAM_CODE; } private: /// - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathDiff.h b/src/mathed/InsetMathDiff.h index f0d16f12bb..486caa2b87 100644 --- a/src/mathed/InsetMathDiff.h +++ b/src/mathed/InsetMathDiff.h @@ -28,24 +28,24 @@ public: /// void addDer(MathData const & der); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_DIFF_CODE; } + InsetCode lyxCode() const override { return MATH_DIFF_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathDots.h b/src/mathed/InsetMathDots.h index 9155f7e11a..d2026de204 100644 --- a/src/mathed/InsetMathDots.h +++ b/src/mathed/InsetMathDots.h @@ -25,26 +25,26 @@ public: /// explicit InsetMathDots(latexkeys const * l); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - docstring name() const; + docstring name() const override; /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_DOTS_CODE; } + InsetCode lyxCode() const override { return MATH_DOTS_CODE; } /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & os) const; + void htmlize(HtmlStream & os) const override; protected: /// cache for the thing's height mutable int dh_; /// latexkeys const * key_; private: - virtual Inset * clone() const; + Inset * clone() const override; }; } // namespace lyx diff --git a/src/mathed/InsetMathEnsureMath.h b/src/mathed/InsetMathEnsureMath.h index 45dfa2ba9a..ac491aff75 100644 --- a/src/mathed/InsetMathEnsureMath.h +++ b/src/mathed/InsetMathEnsureMath.h @@ -24,29 +24,29 @@ class InsetMathEnsureMath : public InsetMathNest { public: explicit InsetMathEnsureMath(Buffer * buf); /// - mode_type currentMode() const { return MATH_MODE; } + mode_type currentMode() const override { return MATH_MODE; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_ENSUREMATH_CODE; } + InsetCode lyxCode() const override { return MATH_ENSUREMATH_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathEnv.h b/src/mathed/InsetMathEnv.h index 9bc338d904..22f6fecaab 100644 --- a/src/mathed/InsetMathEnv.h +++ b/src/mathed/InsetMathEnv.h @@ -24,20 +24,20 @@ public: /// InsetMathEnv(Buffer * buf, docstring const & name_); /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_ENV_CODE; } + InsetCode lyxCode() const override { return MATH_ENV_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// name of that environment docstring name_; }; diff --git a/src/mathed/InsetMathExFunc.h b/src/mathed/InsetMathExFunc.h index c3a43acfd1..48c16e98d8 100644 --- a/src/mathed/InsetMathExFunc.h +++ b/src/mathed/InsetMathExFunc.h @@ -28,29 +28,29 @@ public: /// InsetMathExFunc(Buffer * buf, docstring const & name, MathData const & ar); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - docstring name() const; + docstring name() const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - InsetCode lyxCode() const { return MATH_EXFUNC_CODE; } + InsetCode lyxCode() const override { return MATH_EXFUNC_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// docstring const name_; }; diff --git a/src/mathed/InsetMathExInt.h b/src/mathed/InsetMathExInt.h index 8e86571168..3205048af9 100644 --- a/src/mathed/InsetMathExInt.h +++ b/src/mathed/InsetMathExInt.h @@ -39,28 +39,28 @@ public: /// void symbol(docstring const &); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_EXINT_CODE; } + InsetCode lyxCode() const override { return MATH_EXINT_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool hasScripts() const; diff --git a/src/mathed/InsetMathFont.h b/src/mathed/InsetMathFont.h index 2dc524177e..32a360069f 100644 --- a/src/mathed/InsetMathFont.h +++ b/src/mathed/InsetMathFont.h @@ -26,42 +26,42 @@ public: /// explicit InsetMathFont(Buffer * buf, latexkeys const * key); /// - InsetMathFont * asFontInset() { return this; } + InsetMathFont * asFontInset() override { return this; } /// - InsetMathFont const * asFontInset() const { return this; } + InsetMathFont const * asFontInset() const override { return this; } /// are we in math mode, text mode, or unsure? - mode_type currentMode() const; + mode_type currentMode() const override; /// do we allow changing mode during latex export? - bool lockedMode() const; + bool lockedMode() const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - docstring name() const; + docstring name() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - int kerning(BufferView const * bv) const { return cell(0).kerning(bv); } + int kerning(BufferView const * bv) const override { return cell(0).kerning(bv); } /// - InsetCode lyxCode() const { return MATH_FONT_CODE; } + InsetCode lyxCode() const override { return MATH_FONT_CODE; } private: std::string font() const; /// - virtual Inset * clone() const; + Inset * clone() const override; /// the font to be used on screen latexkeys const * key_; }; diff --git a/src/mathed/InsetMathFontOld.h b/src/mathed/InsetMathFontOld.h index 261696d104..fe313411e4 100644 --- a/src/mathed/InsetMathFontOld.h +++ b/src/mathed/InsetMathFontOld.h @@ -26,32 +26,32 @@ public: /// explicit InsetMathFontOld(Buffer * buf, latexkeys const * key); /// we inherit the mode - mode_type currentMode() const { return current_mode_; } + mode_type currentMode() const override { return current_mode_; } /// we write extra braces in any case... - bool extraBraces() const { return true; } + bool extraBraces() const override { return true; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - int kerning(BufferView const * bv) const { return cell(0).kerning(bv); } + int kerning(BufferView const * bv) const override { return cell(0).kerning(bv); } /// - InsetCode lyxCode() const { return MATH_FONTOLD_CODE; } + InsetCode lyxCode() const override { return MATH_FONTOLD_CODE; } private: std::string font() const; /// - virtual Inset * clone() const; + Inset * clone() const override; /// the font to be used on screen latexkeys const * key_; /// the inherited mode diff --git a/src/mathed/InsetMathFrac.h b/src/mathed/InsetMathFrac.h index ba92006a98..0ced11473a 100644 --- a/src/mathed/InsetMathFrac.h +++ b/src/mathed/InsetMathFrac.h @@ -25,17 +25,17 @@ public: /// InsetMathFracBase(Buffer * buf, idx_type ncells = 2); /// - marker_type marker(BufferView const *) const { return MARKER2; } + marker_type marker(BufferView const *) const override { return MARKER2; } /// - bool idxUpDown(Cursor &, bool up) const; + bool idxUpDown(Cursor &, bool up) const override; /// - bool idxBackward(Cursor &) const { return false; } + bool idxBackward(Cursor &) const override { return false; } /// - bool idxForward(Cursor &) const { return false; } + bool idxForward(Cursor &) const override { return false; } /// - InsetMathFracBase * asFracBaseInset() { return this; } + InsetMathFracBase * asFracBaseInset() override { return this; } /// - InsetMathFracBase const * asFracBaseInset() const { return this; } + InsetMathFracBase const * asFracBaseInset() const override { return this; } }; @@ -60,46 +60,46 @@ public: /// explicit InsetMathFrac(Buffer * buf, Kind kind = FRAC, idx_type ncells = 2); /// - bool idxForward(Cursor &) const; + bool idxForward(Cursor &) const override; /// - bool idxBackward(Cursor &) const; + bool idxBackward(Cursor &) const override; /// - MathClass mathClass() const; + MathClass mathClass() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter &, int x, int y) const; + void drawT(TextPainter &, int x, int y) const override; /// identifies FracInsets - InsetMathFrac * asFracInset(); + InsetMathFrac * asFracInset() override; /// identifies FracInsets - InsetMathFrac const * asFracInset() const; + InsetMathFrac const * asFracInset() const override; /// - docstring name() const; + docstring name() const override; /// - bool extraBraces() const; + bool extraBraces() const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; private: /// vertical displacement int dy(FontInfo & fi) const; /// - Inset * clone() const; + Inset * clone() const override; /// Kind kind_; }; @@ -121,27 +121,27 @@ public: /// explicit InsetMathBinom(Buffer * buf, Kind kind = BINOM); /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// Generalized fractions are of inner class (see The TeXbook, p.292) - MathClass mathClass() const { return MC_INNER; } + MathClass mathClass() const override { return MC_INNER; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - bool extraBraces() const; + bool extraBraces() const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_FRAC_CODE; } + InsetCode lyxCode() const override { return MATH_FRAC_CODE; } private: - Inset * clone() const; + Inset * clone() const override; /// int dw(int height) const; /// diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index fa7c2f2691..d78e0891a5 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -104,17 +104,17 @@ public: InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign, docstring const & halign); /// - marker_type marker(BufferView const *) const { return MARKER2; }; + marker_type marker(BufferView const *) const override { return MARKER2; }; /// - void metrics(MetricsInfo & mi, Dimension &) const; + void metrics(MetricsInfo & mi, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// extract number of columns from alignment string static col_type guessColumns(docstring const & halign); /// accepts some LaTeX column codes: p,m,!,@,M,<,> @@ -144,36 +144,36 @@ public: /// CellInfo & cellinfo(idx_type idx) { return cellinfo_[idx]; } /// identifies GridInset - InsetMathGrid * asGridInset() { return this; } + InsetMathGrid * asGridInset() override { return this; } /// identifies GridInset - InsetMathGrid const * asGridInset() const { return this; } + InsetMathGrid const * asGridInset() const override { return this; } // - bool isTable() const { return true; } + bool isTable() const override { return true; } /// - col_type ncols() const; + col_type ncols() const override; /// - row_type nrows() const; + row_type nrows() const override; /// - col_type col(idx_type idx) const; + col_type col(idx_type idx) const override; /// - row_type row(idx_type idx) const; + row_type row(idx_type idx) const override; /// number of columns of cell \p idx col_type ncellcols(idx_type idx) const; /// - bool idxUpDown(Cursor &, bool up) const; + bool idxUpDown(Cursor &, bool up) const override; /// - bool idxBackward(Cursor &) const; + bool idxBackward(Cursor &) const override; /// - bool idxForward(Cursor &) const; + bool idxForward(Cursor &) const override; // - idx_type firstIdx() const; + idx_type firstIdx() const override; // - idx_type lastIdx() const; + idx_type lastIdx() const override; /// - bool idxDelete(idx_type & idx); + bool idxDelete(idx_type & idx) override; /// pulls cell after pressing erase - void idxGlue(idx_type idx); + void idxGlue(idx_type idx) override; /// add a row, one row down virtual void addRow(row_type r); @@ -192,9 +192,9 @@ public: /// swap two columns virtual void swapCol(col_type c); /// - idx_type index(row_type r, col_type c) const; + idx_type index(row_type r, col_type c) const override; /// - bool idxBetween(idx_type idx, idx_type from, idx_type to) const; + bool idxBetween(idx_type idx, idx_type from, idx_type to) const override; /// virtual int defaultColSpace(col_type) { return 0; } /// @@ -202,7 +202,7 @@ public: /// void setDefaults(); /// - virtual bool interpretString(Cursor & cur, docstring const & str); + bool interpretString(Cursor & cur, docstring const & str) override; /// virtual int colsep() const; @@ -218,32 +218,32 @@ public: virtual bool handlesMulticolumn() const { return false; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// void write(WriteStream & os, row_type beg_row, col_type beg_col, row_type end_row, col_type end_col) const; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - //void maple(MapleStream &) const; + //void maple(MapleStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// void htmlize(HtmlStream &, std::string attrib) const; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - //void octave(OctaveStream &) const; + //void octave(OctaveStream &) const override; protected: /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// returns x offset of cell compared to inset int cellXOffset(BufferView const &, idx_type idx) const; /// returns y offset of cell compared to inset @@ -282,7 +282,7 @@ protected: int hLineVOffset(BufferView const &, row_type row, unsigned int line) const; /// - InsetCode lyxCode() const { return MATH_GRID_CODE; } + InsetCode lyxCode() const override { return MATH_GRID_CODE; } private: /// row info. @@ -296,7 +296,7 @@ private: /// char v_align_; // FIXME: add approp. type /// - Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 42144a3f4b..0b085a11f9 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -47,26 +47,26 @@ public: /// virtual ~InsetMathHull(); /// - void setBuffer(Buffer &); + void setBuffer(Buffer &) override; /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; /// InsetMathHull & operator=(InsetMathHull const &); /// - mode_type currentMode() const; + mode_type currentMode() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void drawBackground(PainterInfo & pi, int x, int y) const; + void drawBackground(PainterInfo & pi, int x, int y) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter &, int x, int y) const; + void drawT(TextPainter &, int x, int y) const override; /// docstring label(row_type row) const; /// @@ -74,7 +74,7 @@ public: /// std::vector const & getLabels() { return label_; } /// - ColorCode backgroundColor(PainterInfo const &) const; + ColorCode backgroundColor(PainterInfo const &) const override; /// void numbered(row_type row, bool num) { numbered(row, num ? NUMBER : NONUMBER); } /// @@ -82,131 +82,131 @@ public: /// bool numbered(row_type row) const; /// - bool numberedType() const; + bool numberedType() const override; /// bool ams() const; /// bool outerDisplay() const; /// - OutputParams::CtObject CtObject(OutputParams const &) const; + OutputParams::CtObject CtObject(OutputParams const &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// identifies HullInset - InsetMathHull const * asHullInset() const { return this; } + InsetMathHull const * asHullInset() const override { return this; } /// identifies HullInset - InsetMathHull * asHullInset() { return this; } + InsetMathHull * asHullInset() override { return this; } /// add a row - void addRow(row_type row); + void addRow(row_type row) override; /// delete a row - void delRow(row_type row); + void delRow(row_type row) override; /// swap two rows - void swapRow(row_type row); + void swapRow(row_type row) override; /// add a column - void addCol(col_type col); + void addCol(col_type col) override; /// delete a column - void delCol(col_type col); + void delCol(col_type col) override; /// get type - HullType getType() const; + HullType getType() const override; /// is mutation implemented for this type? static bool isMutable(HullType type); /// change type - void mutate(HullType newtype); + void mutate(HullType newtype) override; /// - int defaultColSpace(col_type col); + int defaultColSpace(col_type col) override; /// - int displayColSpace(col_type col) const; + int displayColSpace(col_type col) const override; /// - char defaultColAlign(col_type col); + char defaultColAlign(col_type col) override; /// - char displayColAlign(idx_type idx) const; + char displayColAlign(idx_type idx) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// void header_write(WriteStream &) const; /// void footer_write(WriteStream &) const; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// bool readQuiet(Lexer & lex); /// int plaintext(odocstringstream &, OutputParams const &, - size_t max_length = INT_MAX) const; + size_t max_length = INT_MAX) const override; /// - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// void mathAsLatex(WriteStream &) const; /// - void toString(odocstream &) const; + void toString(odocstream &) const override; /// - void forOutliner(docstring &, size_t const, bool const) const; + void forOutliner(docstring &, size_t const, bool const) const override; /// get notification when the cursor leaves this inset - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// - //bool insetAllowed(InsetCode code) const; + //bool insetAllowed(InsetCode code) const override; /// void addPreview(DocIterator const & inset_pos, - graphics::PreviewLoader &) const; + graphics::PreviewLoader &) const override; /// Recreates the preview if preview is enabled. void reloadPreview(DocIterator const & pos) const; /// void usedMacros(MathData const & md, DocIterator const & pos, MacroNameSet & macros, MacroNameSet & defs) const; /// - void initUnicodeMath() const; + void initUnicodeMath() const override; /// Force inset into LTR environment if surroundings are RTL - virtual bool forceLTR(OutputParams const &) const { return true; } + bool forceLTR(OutputParams const &) const override { return true; } /// void recordLocation(DocIterator const & di); /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - InsetCode lyxCode() const { return MATH_HULL_CODE; } + InsetCode lyxCode() const override { return MATH_HULL_CODE; } /// - bool canPaintChange(BufferView const &) const; + bool canPaintChange(BufferView const &) const override; /// - bool confirmDeletion() const { return nargs() != 1 || !cell(0).empty(); } + bool confirmDeletion() const override { return nargs() != 1 || !cell(0).empty(); } protected: InsetMathHull(InsetMathHull const &); - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// do we want to handle this event? bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & status) const; + FuncStatus & status) const override; /// override to set to 0 for inline equation - int leftMargin() const; + int leftMargin() const override; /// override to set to 0 for inline equation - int rightMargin() const; + int rightMargin() const override; /// override to set to 0 for inline equation - int border() const; + int border() const override; /// docstring eolString(row_type row, bool fragile, bool latex, - bool last_eoln) const; + bool last_eoln) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// Prepare the preview if preview is enabled. /// \param forexport: whether this is intended for export /// If so, we ignore LyXRC and wait for the image to be generated. @@ -256,7 +256,7 @@ private: /// are any of the equations numbered? bool haveNumbers() const; /// draw four angular markers - virtual void drawMarkers(PainterInfo & pi, int x, int y) const; + void drawMarkers(PainterInfo & pi, int x, int y) const override; /// "none", "simple", "display", "eqnarray",... HullType type_; @@ -281,19 +281,19 @@ public: /// virtual void mutateToText(); /// - bool editable() const { return true; } + bool editable() const override { return true; } /// void edit(Cursor & cur, bool front, - EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); + EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// - RowFlags rowFlags() const; + RowFlags rowFlags() const override; /// helper function bool display() const { return rowFlags() & Display; } /// - int indent(BufferView const &) const; + int indent(BufferView const &) const override; protected: /// diff --git a/src/mathed/InsetMathKern.h b/src/mathed/InsetMathKern.h index 58d540d1fc..efb83e244f 100644 --- a/src/mathed/InsetMathKern.h +++ b/src/mathed/InsetMathKern.h @@ -32,24 +32,24 @@ public: /// explicit InsetMathKern(docstring const & wid); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void mathmlize(MathStream &) const { } + void mathmlize(MathStream &) const override { } /// - void htmlize(HtmlStream &) const { } + void htmlize(HtmlStream &) const override { } /// void infoize2(odocstream & os) const; /// - InsetCode lyxCode() const { return MATH_KERN_CODE; } + InsetCode lyxCode() const override { return MATH_KERN_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// width in em Length wid_; }; diff --git a/src/mathed/InsetMathLefteqn.h b/src/mathed/InsetMathLefteqn.h index 0ad64af111..87ff656d93 100644 --- a/src/mathed/InsetMathLefteqn.h +++ b/src/mathed/InsetMathLefteqn.h @@ -25,18 +25,18 @@ public: /// explicit InsetMathLefteqn(Buffer * buf); /// - docstring name() const; + docstring name() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_LEFTEQN_CODE; } + InsetCode lyxCode() const override { return MATH_LEFTEQN_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathLim.h b/src/mathed/InsetMathLim.h index 634c595e7f..1aee218906 100644 --- a/src/mathed/InsetMathLim.h +++ b/src/mathed/InsetMathLim.h @@ -27,25 +27,25 @@ public: InsetMathLim(Buffer * buf, MathData const & f, MathData const & x, MathData const & x0); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_LIM_CODE; } + InsetCode lyxCode() const override { return MATH_LIM_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathMacro.cpp b/src/mathed/InsetMathMacro.cpp index 5743dd0e45..15b5d29d9c 100644 --- a/src/mathed/InsetMathMacro.cpp +++ b/src/mathed/InsetMathMacro.cpp @@ -64,7 +64,7 @@ public: asArray(def, def_); } /// - void setBuffer(Buffer & buffer) + void setBuffer(Buffer & buffer) override { Inset::setBuffer(buffer); def_.setBuffer(buffer); @@ -74,9 +74,9 @@ public: /// InsetMathMacro const * owner() { return mathMacro_; } /// - marker_type marker(BufferView const *) const { return NO_MARKER; } + marker_type marker(BufferView const *) const override { return NO_MARKER; } /// - InsetCode lyxCode() const { return ARGUMENT_PROXY_CODE; } + InsetCode lyxCode() const override { return ARGUMENT_PROXY_CODE; } /// The math data to use for display MathData const & displayCell(BufferView const * bv) const { @@ -86,7 +86,7 @@ public: return use_def_arg ? def_ : mathMacro_->cell(idx_); } /// - bool addToMathRow(MathRow & mrow, MetricsInfo & mi) const + bool addToMathRow(MathRow & mrow, MetricsInfo & mi) const override { // macro arguments are in macros LATTEST(mathMacro_->nesting() > 0); @@ -121,17 +121,17 @@ public: return has_contents; } /// - void beforeMetrics() const + void beforeMetrics() const override { mathMacro_->macro()->unlock(); } /// - void afterMetrics() const + void afterMetrics() const override { mathMacro_->macro()->lock(); } /// - void beforeDraw(PainterInfo const & pi) const + void beforeDraw(PainterInfo const & pi) const override { // if the macro is being edited, then the painter is in // monochrome mode. @@ -139,42 +139,42 @@ public: pi.pain.leaveMonochromeMode(); } /// - void afterDraw(PainterInfo const & pi) const + void afterDraw(PainterInfo const & pi) const override { if (mathMacro_->editMetrics(pi.base.bv)) pi.pain.enterMonochromeMode(Color_mathmacroblend); } /// - void metrics(MetricsInfo &, Dimension &) const { + void metrics(MetricsInfo &, Dimension &) const override { // This should never be invoked, since InsetArgumentProxy insets are linearized LATTEST(false); } /// - void draw(PainterInfo &, int, int) const { + void draw(PainterInfo &, int, int) const override { // This should never be invoked, since InsetArgumentProxy insets are linearized LATTEST(false); } /// - int kerning(BufferView const * bv) const + int kerning(BufferView const * bv) const override { return displayCell(bv).kerning(bv); } // write(), normalize(), infoize() and infoize2() are not needed since // InsetMathMacro uses the definition and not the expanded cells. /// - void maple(MapleStream & ms) const { ms << mathMacro_->cell(idx_); } + void maple(MapleStream & ms) const override { ms << mathMacro_->cell(idx_); } /// - void maxima(MaximaStream & ms) const { ms << mathMacro_->cell(idx_); } + void maxima(MaximaStream & ms) const override { ms << mathMacro_->cell(idx_); } /// - void mathematica(MathematicaStream & ms) const { ms << mathMacro_->cell(idx_); } + void mathematica(MathematicaStream & ms) const override { ms << mathMacro_->cell(idx_); } /// - void mathmlize(MathStream & ms) const { ms << mathMacro_->cell(idx_); } + void mathmlize(MathStream & ms) const override { ms << mathMacro_->cell(idx_); } /// - void htmlize(HtmlStream & ms) const { ms << mathMacro_->cell(idx_); } + void htmlize(HtmlStream & ms) const override { ms << mathMacro_->cell(idx_); } /// - void octave(OctaveStream & os) const { os << mathMacro_->cell(idx_); } + void octave(OctaveStream & os) const override { os << mathMacro_->cell(idx_); } /// - MathClass mathClass() const + MathClass mathClass() const override { return MC_UNKNOWN; // This can be refined once the pointer issues are fixed. I did not @@ -185,7 +185,7 @@ public: private: /// - Inset * clone() const + Inset * clone() const override { return new InsetArgumentProxy(*this); } diff --git a/src/mathed/InsetMathMacro.h b/src/mathed/InsetMathMacro.h index 4332148bb9..38afcf066a 100644 --- a/src/mathed/InsetMathMacro.h +++ b/src/mathed/InsetMathMacro.h @@ -33,56 +33,56 @@ public: /// ~InsetMathMacro(); /// - virtual InsetMathMacro * asMacro() { return this; } + InsetMathMacro * asMacro() override { return this; } /// - virtual InsetMathMacro const * asMacro() const { return this; } + InsetMathMacro const * asMacro() const override { return this; } /// - marker_type marker(BufferView const *) const; + marker_type marker(BufferView const *) const override; /// If the macro is in normal edit mode, dissolve its contents in /// the row. Otherwise, just insert the inset. - bool addToMathRow(MathRow &, MetricsInfo & mi) const; + bool addToMathRow(MathRow &, MetricsInfo & mi) const override; /// Whether the inset allows \(no)limits bool allowsLimitsChange() const; /// The default limits value - Limits defaultLimits() const; + Limits defaultLimits() const override; /// whether the inset has limit-like sub/superscript - Limits limits() const; + Limits limits() const override; /// sets types of sub/superscripts - void limits(Limits lim); + void limits(Limits lim) override; /// - void beforeMetrics() const; + void beforeMetrics() const override; /// - void afterMetrics() const; + void afterMetrics() const override; /// - void beforeDraw(PainterInfo const &) const; + void beforeDraw(PainterInfo const &) const override; /// - void afterDraw(PainterInfo const &) const; + void afterDraw(PainterInfo const &) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// was the macro in edit mode when computing metrics? bool editMetrics(BufferView const * bv) const; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - int kerning(BufferView const * bv) const; + int kerning(BufferView const * bv) const override; /// get cursor position void cursorPos(BufferView const & bv, CursorSlice const & sl, - bool boundary, int & x, int & y) const; + bool boundary, int & x, int & y) const override; /// - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// target pos when we enter the inset while moving forward - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// target pos when we enter the inset while moving backwards - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// - virtual bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// Remove cell (starting from 0) void removeArgument(pos_type pos); @@ -90,30 +90,30 @@ public: void insertArgument(pos_type pos); /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - mode_type currentMode() const; + mode_type currentMode() const override; /// Assumes that macros are up-to-date - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void infoize(odocstream &) const; + void infoize(odocstream &) const override; /// - void infoize2(odocstream &) const; + void infoize2(odocstream &) const override; /// fold the macro in the next metrics call void fold(Cursor & cur); @@ -133,10 +133,10 @@ public: DisplayMode displayMode() const; /// - bool extraBraces() const; + bool extraBraces() const override; /// - docstring name() const; + docstring name() const override; /// FIXME: Often dangling. MacroData const * macro() const; /// @@ -155,12 +155,12 @@ public: /// Return the maximal number of arguments the macro is greedy for. size_t appetite() const; /// - InsetCode lyxCode() const { return MATH_MACRO_CODE; } + InsetCode lyxCode() const override { return MATH_MACRO_CODE; } /// This is not used for display; however whether it is mathrel determines /// how to split equations intelligently. - MathClass mathClass() const; //override + MathClass mathClass() const override; /// Override so as to set Buffer for defnition_ member, too. - void setBuffer(Buffer &); + void setBuffer(Buffer &) override; protected: friend class MathData; @@ -190,7 +190,7 @@ private: /// creation, in which case we fall back to the global macro with this name. MacroData const * macroBackup() const; /// - virtual Inset * clone() const; + Inset * clone() const override; /// bool editMode(BufferView const * bv) const; @@ -204,21 +204,21 @@ private: public: /// - bool completionSupported(Cursor const &) const; + bool completionSupported(Cursor const &) const override; /// - bool inlineCompletionSupported(Cursor const & cur) const; + bool inlineCompletionSupported(Cursor const & cur) const override; /// - bool automaticInlineCompletion() const; + bool automaticInlineCompletion() const override; /// - bool automaticPopupCompletion() const; + bool automaticPopupCompletion() const override; /// - CompletionList const * createCompletionList(Cursor const & cur) const; + CompletionList const * createCompletionList(Cursor const & cur) const override; /// - docstring completionPrefix(Cursor const & cur) const; + docstring completionPrefix(Cursor const & cur) const override; /// - bool insertCompletion(Cursor & cur, docstring const & s, bool finished); + bool insertCompletion(Cursor & cur, docstring const & s, bool finished) override; /// - void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const; + void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const override; }; } // namespace lyx diff --git a/src/mathed/InsetMathMacroArgument.h b/src/mathed/InsetMathMacroArgument.h index fe42f2be36..4fe0de435b 100644 --- a/src/mathed/InsetMathMacroArgument.h +++ b/src/mathed/InsetMathMacroArgument.h @@ -26,16 +26,16 @@ class InsetMathHash : public InsetMath { public: explicit InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {}; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; private: - Inset * clone() const; + Inset * clone() const override; protected: /// @@ -53,13 +53,13 @@ public: /// Assumes 0 < n <= 9 void setNumber(int n); /// - InsetCode lyxCode() const { return MATH_MACROARG_CODE; } + InsetCode lyxCode() const override { return MATH_MACROARG_CODE; } /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; private: - Inset * clone() const; + Inset * clone() const override; /// A number between 1 and 9 int number_; }; diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp index 6c109696a7..e48d169ce0 100644 --- a/src/mathed/InsetMathMacroTemplate.cpp +++ b/src/mathed/InsetMathMacroTemplate.cpp @@ -67,15 +67,15 @@ public: InsetLabelBox(Buffer * buf, docstring label, InsetMathMacroTemplate const & parent, bool frame = false); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; protected: /// InsetMathMacroTemplate const & parent_; /// - Inset * clone() const; + Inset * clone() const override; /// docstring const label_; /// @@ -190,15 +190,15 @@ public: InsetMathMacroTemplate const & parent); /// - marker_type marker(BufferView const *) const; + marker_type marker(BufferView const *) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; protected: /// - Inset * clone() const; + Inset * clone() const override; }; @@ -252,13 +252,13 @@ public: /// explicit InsetMathWrapper(MathData const * value) : value_(value) {} /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; private: /// - Inset * clone() const; + Inset * clone() const override; /// MathData const * value_; }; @@ -290,13 +290,13 @@ public: /// InsetColoredCell(Buffer * buf, ColorCode blend, MathAtom const & atom); /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; protected: /// - Inset * clone() const; + Inset * clone() const override; /// ColorCode blend_; }; @@ -342,15 +342,15 @@ public: /// InsetNameWrapper(MathData const * value, InsetMathMacroTemplate const & parent); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; private: /// InsetMathMacroTemplate const & parent_; /// - Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathMacroTemplate.h b/src/mathed/InsetMathMacroTemplate.h index bdba22143f..24a0b14875 100644 --- a/src/mathed/InsetMathMacroTemplate.h +++ b/src/mathed/InsetMathMacroTemplate.h @@ -37,28 +37,28 @@ public: /// parses from string, returns false if failed bool fromString (const docstring & str); /// - bool editable() const { return true; } + bool editable() const override { return true; } /// - void edit(Cursor & cur, bool front, EntryDirection entry_from); + void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// - void read(Lexer & lex); + void read(Lexer & lex) override; /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// Output LaTeX code, but assume that the macro is not defined yet /// if overwriteRedefinition is true int write(WriteStream & os, bool overwriteRedefinition) const; /// Nothing happens. This is simply to suppress the default output. - docstring xhtml(XMLStream &, OutputParams const &) const; + docstring xhtml(XMLStream &, OutputParams const &) const override; /// - int plaintext(odocstringstream &, OutputParams const &, size_t) const; + int plaintext(odocstringstream &, OutputParams const &, size_t) const override; /// - bool inheritFont() const { return false; } + bool inheritFont() const override { return false; } /// - docstring name() const; + docstring name() const override; /// void getDefaults(std::vector & defaults) const; /// @@ -83,41 +83,41 @@ public: bool fixNameAndCheckIfValid(); /// request "external features" - virtual void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// decide whether its a redefinition void updateToContext(MacroContext const & mc); /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// identifies macro templates - InsetMathMacroTemplate * asMacroTemplate() { return this; } + InsetMathMacroTemplate * asMacroTemplate() override { return this; } /// identifies macro templates - InsetMathMacroTemplate const * asMacroTemplate() const { return this; } + InsetMathMacroTemplate const * asMacroTemplate() const override { return this; } /// - InsetCode lyxCode() const { return MATHMACRO_CODE; } + InsetCode lyxCode() const override { return MATHMACRO_CODE; } /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype, TocBackend & backend) const; + UpdateType utype, TocBackend & backend) const override; protected: /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// do we want to handle this event? bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & status) const; + FuncStatus & status) const override; private: friend class InsetLabelBox; friend class InsetDisplayLabelBox; /// - virtual Inset * clone() const; + Inset * clone() const override; /// remove #n with from<=n<=to void removeArguments(Cursor & cur, DocIterator const & inset_pos, diff --git a/src/mathed/InsetMathMatrix.h b/src/mathed/InsetMathMatrix.h index 49c5ce4e5f..6f13b0f629 100644 --- a/src/mathed/InsetMathMatrix.h +++ b/src/mathed/InsetMathMatrix.h @@ -27,31 +27,31 @@ public: explicit InsetMathMatrix(InsetMathGrid const &, docstring const & left, docstring const & right); /// identifies MatrixInsets - InsetMathMatrix const * asMatrixInset() const { return this; } + InsetMathMatrix const * asMatrixInset() const override { return this; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - InsetCode lyxCode() const { return MATH_MATRIX_CODE; } + InsetCode lyxCode() const override { return MATH_MATRIX_CODE; } /// - bool handlesMulticolumn() const { return true; } //override + bool handlesMulticolumn() const override { return true; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// docstring left_; /// diff --git a/src/mathed/InsetMathNest.h b/src/mathed/InsetMathNest.h index 703d2d879d..0a6579011e 100644 --- a/src/mathed/InsetMathNest.h +++ b/src/mathed/InsetMathNest.h @@ -31,36 +31,36 @@ public: /// virtual ~InsetMathNest(); /// - void setBuffer(Buffer &); + void setBuffer(Buffer &) override; /// Update the cells metrics void cellsMetrics(MetricsInfo const & mi) const; /// draw background if locked - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// identifies NestInsets - InsetMathNest * asNestInset() { return this; } + InsetMathNest * asNestInset() override { return this; } /// identifies NestInsets - InsetMathNest const * asNestInset() const { return this; } + InsetMathNest const * asNestInset() const override { return this; } /// get cursor position void cursorPos(BufferView const & bv, CursorSlice const & sl, - bool boundary, int & x, int & y) const; + bool boundary, int & x, int & y) const override; /// void edit(Cursor & cur, bool front, - EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); + EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override; /// - Inset * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y) override; /// order of movement through the cells when moving backwards - bool idxBackward(Cursor &) const; + bool idxBackward(Cursor &) const override; /// order of movement through the cells when moving forward - bool idxForward(Cursor &) const; + bool idxForward(Cursor &) const override; /// move to next cell - bool idxNext(Cursor &) const; + bool idxNext(Cursor &) const override; /// move to previous cell - bool idxPrev(Cursor &) const; + bool idxPrev(Cursor &) const override; // The index of the cell entered while moving forward virtual idx_type firstIdx() const { return 0; } @@ -68,74 +68,74 @@ public: virtual idx_type lastIdx() const { return nargs() - 1; } /// target pos when we enter the inset while moving forward - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// target pos when we enter the inset while moving backwards - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// number of cells currently governed by us - idx_type nargs() const; + idx_type nargs() const override; /// access to the lock - bool lock() const; + bool lock() const override; /// access to the lock - void lock(bool); + void lock(bool) override; /// get notification when the cursor leaves this inset - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; //@{ /// direct access to the cell. /// Inlined because of performance reasons. - MathData & cell(idx_type i) { return cells_[i]; } - MathData const & cell(idx_type i) const { return cells_[i]; } + MathData & cell(idx_type i) override { return cells_[i]; } + MathData const & cell(idx_type i) const override { return cells_[i]; } //@} /// can we move into this cell (see macroarg.h) - bool isActive() const; + bool isActive() const override; /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// replace in all cells - void replace(ReplaceData &); + void replace(ReplaceData &) override; /// do we contain a given pattern? - bool contains(MathData const &) const; + bool contains(MathData const &) const override; /// glue everything to a single cell MathData glue() const; /// debug helper - void dump() const; + void dump() const override; /// writes \\, name(), and args in braces and '\\lyxlock' if necessary - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// writes [, name(), and args in [] - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void latex(otexstream & os, OutputParams const & runparams) const; + void latex(otexstream & os, OutputParams const & runparams) const override; /// - bool setMouseHover(BufferView const * bv, bool mouse_hover) const; + bool setMouseHover(BufferView const * bv, bool mouse_hover) const override; /// - bool mouseHovered(BufferView const * bv) const + bool mouseHovered(BufferView const * bv) const override { return mouse_hover_[bv]; } /// - bool completionSupported(Cursor const &) const; + bool completionSupported(Cursor const &) const override; /// - bool inlineCompletionSupported(Cursor const & cur) const; + bool inlineCompletionSupported(Cursor const & cur) const override; /// - bool automaticInlineCompletion() const; + bool automaticInlineCompletion() const override; /// - bool automaticPopupCompletion() const; + bool automaticPopupCompletion() const override; /// - CompletionList const * createCompletionList(Cursor const & cur) const; + CompletionList const * createCompletionList(Cursor const & cur) const override; /// - docstring completionPrefix(Cursor const & cur) const; + docstring completionPrefix(Cursor const & cur) const override; /// - bool insertCompletion(Cursor & cur, docstring const & s, bool finished); + bool insertCompletion(Cursor & cur, docstring const & s, bool finished) override; /// - void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const; + void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const override; /// - InsetCode lyxCode() const { return MATH_NEST_CODE; } + InsetCode lyxCode() const override { return MATH_NEST_CODE; } /// - bool confirmDeletion() const { return nargs() > 0; } + bool confirmDeletion() const override { return nargs() > 0; } protected: /// @@ -144,10 +144,10 @@ protected: InsetMathNest & operator=(InsetMathNest const &); /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// do we want to handle this event? bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & status) const; + FuncStatus & status) const override; /// void handleFont(Cursor & cur, docstring const & arg, docstring const & font); diff --git a/src/mathed/InsetMathNumber.h b/src/mathed/InsetMathNumber.h index 68d08bd315..e7481bb21f 100644 --- a/src/mathed/InsetMathNumber.h +++ b/src/mathed/InsetMathNumber.h @@ -26,7 +26,7 @@ public: /// explicit InsetMathNumber(docstring const & s); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// @@ -35,24 +35,24 @@ public: InsetMathNumber * asNumberInset() { return this; } /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_NUMBER_CODE; } + InsetCode lyxCode() const override { return MATH_NUMBER_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// the number as string docstring str_; }; diff --git a/src/mathed/InsetMathOverset.h b/src/mathed/InsetMathOverset.h index d7b8353922..095e0f590a 100644 --- a/src/mathed/InsetMathOverset.h +++ b/src/mathed/InsetMathOverset.h @@ -24,30 +24,30 @@ public: /// explicit InsetMathOverset(Buffer * buf) : InsetMathFracBase(buf) {} /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// bool idxUpDown(Cursor & cur, bool up) const; /// - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_OVERSET_CODE; } + InsetCode lyxCode() const override { return MATH_OVERSET_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathPar.h b/src/mathed/InsetMathPar.h index 5aadfa8b3a..36d3e9e7e3 100644 --- a/src/mathed/InsetMathPar.h +++ b/src/mathed/InsetMathPar.h @@ -25,21 +25,21 @@ public: /// InsetMathPar(Buffer * buf, MathData const & ar); /// - mode_type currentMode() const { return TEXT_MODE; } + mode_type currentMode() const override { return TEXT_MODE; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_PAR_CODE; } + InsetCode lyxCode() const override { return MATH_PAR_CODE; } private: /// - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathPhantom.h b/src/mathed/InsetMathPhantom.h index 63b8ea28de..aa1ccbfb83 100644 --- a/src/mathed/InsetMathPhantom.h +++ b/src/mathed/InsetMathPhantom.h @@ -34,29 +34,29 @@ public: /// explicit InsetMathPhantom(Buffer * buf, Kind); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_PHANTOM_CODE; } + InsetCode lyxCode() const override { return MATH_PHANTOM_CODE; } /// Nothing for now - void mathmlize(MathStream &) const {} + void mathmlize(MathStream &) const override {} /// Nothing for HTML - void htmlize(HtmlStream &) const {} + void htmlize(HtmlStream &) const override {} /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// Does the contents appear in LaTeX output? bool visibleContents() const; private: /// - virtual Inset * clone() const; + Inset * clone() const override; /// Kind kind_; }; diff --git a/src/mathed/InsetMathRef.h b/src/mathed/InsetMathRef.h index 1f5e0b8bb8..33df8bc96d 100644 --- a/src/mathed/InsetMathRef.h +++ b/src/mathed/InsetMathRef.h @@ -27,28 +27,28 @@ public: /// explicit InsetMathRef(Buffer * buf, docstring const & data); /// - void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - //void write(WriteStream & os) const; + //void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - mode_type currentMode() const { return TEXT_MODE; } + mode_type currentMode() const override { return TEXT_MODE; } /// - bool lockedMode() const { return true; } + bool lockedMode() const override { return true; } /// - bool asciiOnly() const { return true; } + bool asciiOnly() const override { return true; } /// - docstring const screenLabel() const; + docstring const screenLabel() const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// void changeTarget(docstring const & target); /// - virtual InsetMathRef * asRefInset() { return this; } + InsetMathRef * asRefInset() override { return this; } /// docbook output - void docbook(XMLStream &, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const override; /// generate something that will be understood by the Dialogs. std::string const createDialogStr() const; @@ -68,16 +68,16 @@ public: /// docstring const getTarget() const; /// - InsetCode lyxCode() const { return MATH_REF_CODE; } + InsetCode lyxCode() const override { return MATH_REF_CODE; } protected: /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; private: /// - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathRoot.h b/src/mathed/InsetMathRoot.h index 144ecdf7a6..a91e89b3b3 100644 --- a/src/mathed/InsetMathRoot.h +++ b/src/mathed/InsetMathRoot.h @@ -31,36 +31,36 @@ public: /// bool idxBackward(Cursor & cur) const; /// - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - InsetCode lyxCode() const { return MATH_ROOT_CODE; } + InsetCode lyxCode() const override { return MATH_ROOT_CODE; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; }; void mathed_root_metrics(MetricsInfo & mi, MathData const & nucleus, diff --git a/src/mathed/InsetMathScript.h b/src/mathed/InsetMathScript.h index bc048e2f1c..737d7c3ab2 100644 --- a/src/mathed/InsetMathScript.h +++ b/src/mathed/InsetMathScript.h @@ -31,46 +31,46 @@ public: /// create inset with single script and given nucleus InsetMathScript(Buffer * buf, MathAtom const & at, bool up); /// - mode_type currentMode() const { return MATH_MODE; } + mode_type currentMode() const override { return MATH_MODE; } /// - MathClass mathClass() const; + MathClass mathClass() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// move cursor backwards - bool idxBackward(Cursor & cur) const; + bool idxBackward(Cursor & cur) const override; /// move cursor forward - bool idxForward(Cursor & cur) const; + bool idxForward(Cursor & cur) const override; /// move cursor up or down - bool idxUpDown(Cursor & cur, bool up) const; + bool idxUpDown(Cursor & cur, bool up) const override; /// The index of the cell entered while moving backward size_type lastIdx() const { return 0; } /// write LaTeX and Lyx code - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// write content as something readable by Maple - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// write content as something readable by Mathematica - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// write content as MathML - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// write content as HTML - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// write content as something readable by Octave - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// identifies scriptinsets - InsetMathScript const * asScriptInset() const; + InsetMathScript const * asScriptInset() const override; /// - InsetMathScript * asScriptInset(); + InsetMathScript * asScriptInset() override; /// returns subscript. Always run 'hasDown' or 'has(false)' before! MathData const & down() const; @@ -97,15 +97,15 @@ public: /// make sure a script is accessible void ensure(bool up); /// say that we have scripts - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// say whether we have displayed limits - void infoize2(odocstream & os) const; + void infoize2(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_SCRIPT_CODE; } + InsetCode lyxCode() const override { return MATH_SCRIPT_CODE; } /// - void validate(LaTeXFeatures &features) const; + void validate(LaTeXFeatures &features) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// returns x offset for main part int dxx(BufferView const & bv) const; /// returns width of nucleus if any @@ -132,7 +132,7 @@ private: /// do we we have to draw the scripts above/below nucleus? bool hasLimits(FontInfo const &) const; /// clean up empty cells and return true if a cell has been deleted. - bool notifyCursorLeaves(Cursor const & old, Cursor & cur); + bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// possible subscript (index 0) and superscript (index 1) bool cell_1_is_up_; diff --git a/src/mathed/InsetMathSideset.h b/src/mathed/InsetMathSideset.h index b99e6308d9..8bfe8105bb 100644 --- a/src/mathed/InsetMathSideset.h +++ b/src/mathed/InsetMathSideset.h @@ -30,33 +30,33 @@ public: InsetMathSideset(Buffer * buf, bool scriptl, bool scriptr, MathAtom const & at); /// - mode_type currentMode() const { return MATH_MODE; } + mode_type currentMode() const override { return MATH_MODE; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter & pi, int x, int y) const; + void drawT(TextPainter & pi, int x, int y) const override; /// move cursor backwards - bool idxBackward(Cursor & cur) const; + bool idxBackward(Cursor & cur) const override; /// move cursor forward - bool idxForward(Cursor & cur) const; + bool idxForward(Cursor & cur) const override; /// move cursor up or down - bool idxUpDown(Cursor & cur, bool up) const; + bool idxUpDown(Cursor & cur, bool up) const override; /// The index of the cell entered while moving backward - size_type lastIdx() const { return 0; } + size_type lastIdx() const override { return 0; } /// write LaTeX and Lyx code - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// write normalized content - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// write content as MathML - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// write content as HTML - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// returns nucleus MathData const & nuc() const { return cell(0); } @@ -79,13 +79,13 @@ public: /// top right index or single right cell MathData & tr() { return cell(2 + scriptl_ + scriptr_); } /// say that we have scripts - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - InsetCode lyxCode() const { return MATH_SCRIPT_CODE; } + InsetCode lyxCode() const override { return MATH_SCRIPT_CODE; } /// - void validate(LaTeXFeatures &features) const; + void validate(LaTeXFeatures &features) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// returns x offset of nucleus int dxn(BufferView const & bv) const; /// returns width of nucleus if any diff --git a/src/mathed/InsetMathSize.h b/src/mathed/InsetMathSize.h index 446e398f1a..cf299013bc 100644 --- a/src/mathed/InsetMathSize.h +++ b/src/mathed/InsetMathSize.h @@ -27,29 +27,29 @@ public: /// explicit InsetMathSize(Buffer * buf, latexkeys const * l); /// we write extra braces in any case... - bool extraBraces() const { return true; } + bool extraBraces() const override { return true; } /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - InsetCode lyxCode() const { return MATH_SIZE_CODE; } + InsetCode lyxCode() const override { return MATH_SIZE_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// latexkeys const * key_; /// diff --git a/src/mathed/InsetMathSpace.h b/src/mathed/InsetMathSpace.h index 32147dbe25..ff23305466 100644 --- a/src/mathed/InsetMathSpace.h +++ b/src/mathed/InsetMathSpace.h @@ -31,48 +31,48 @@ public: /// explicit InsetMathSpace(Length const & length, bool const prot = false); /// - InsetMathSpace const * asSpaceInset() const { return this; } + InsetMathSpace const * asSpaceInset() const override { return this; } /// - InsetMathSpace * asSpaceInset() { return this; } + InsetMathSpace * asSpaceInset() override { return this; } /// void incSpace(); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// generate something that will be understood by the Dialogs. InsetSpaceParams params() const; /// - bool hasSettings() const { return true; } + bool hasSettings() const override { return true; } /// - std::string contextMenuName() const; + std::string contextMenuName() const override; /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - InsetCode lyxCode() const { return MATH_SPACE_CODE; } + InsetCode lyxCode() const override { return MATH_SPACE_CODE; } protected: /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool isNegative() const; /// diff --git a/src/mathed/InsetMathSpecialChar.h b/src/mathed/InsetMathSpecialChar.h index 1efdc93432..88acce613e 100644 --- a/src/mathed/InsetMathSpecialChar.h +++ b/src/mathed/InsetMathSpecialChar.h @@ -25,42 +25,42 @@ public: /// explicit InsetMathSpecialChar(docstring const & name); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void drawT(TextPainter &, int x, int y) const; + void drawT(TextPainter &, int x, int y) const override; /// - int kerning(BufferView const *) const { return kerning_; } + int kerning(BufferView const *) const override { return kerning_; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void octave(OctaveStream & os) const; + void octave(OctaveStream & os) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream & ms) const; + void mathmlize(MathStream & ms) const override; /// - void htmlize(HtmlStream & ms) const; + void htmlize(HtmlStream & ms) const override; /// identifies SpecialChar insets - InsetMathSpecialChar const * asSpecialCharInset() const { return this; } + InsetMathSpecialChar const * asSpecialCharInset() const override { return this; } /// - docstring name() const { return name_; } + docstring name() const override { return name_; } /// - char_type getChar() const { return char_; } + char_type getChar() const override { return char_; } /// - InsetCode lyxCode() const { return MATH_SPECIALCHAR_CODE; } + InsetCode lyxCode() const override { return MATH_SPECIALCHAR_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// the latex name docstring name_; /// the displayed character diff --git a/src/mathed/InsetMathSplit.h b/src/mathed/InsetMathSplit.h index 8893e7fe1d..c271414bc1 100644 --- a/src/mathed/InsetMathSplit.h +++ b/src/mathed/InsetMathSplit.h @@ -24,36 +24,36 @@ public: explicit InsetMathSplit(Buffer * buf, docstring const & name, char valign = 'c', bool numbered = false); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - int defaultColSpace(col_type) { return 0; } + int defaultColSpace(col_type) override { return 0; } /// - int displayColSpace(col_type col) const; + int displayColSpace(col_type col) const override; /// - char defaultColAlign(col_type); + char defaultColAlign(col_type) override; /// - char displayColAlign(idx_type idx) const; + char displayColAlign(idx_type idx) const override; /// - InsetCode lyxCode() const { return MATH_SPLIT_CODE; } + InsetCode lyxCode() const override { return MATH_SPLIT_CODE; } private: /// - virtual Inset * clone() const; + Inset * clone() const override; /// docstring name_; /// diff --git a/src/mathed/InsetMathSqrt.h b/src/mathed/InsetMathSqrt.h index 8a9a6fc455..829d5e209a 100644 --- a/src/mathed/InsetMathSqrt.h +++ b/src/mathed/InsetMathSqrt.h @@ -27,33 +27,33 @@ public: /// void draw(PainterInfo &, int x, int y) const; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void drawT(TextPainter &, int x, int y) const; + void drawT(TextPainter &, int x, int y) const override; /// - void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - InsetCode lyxCode() const { return MATH_SQRT_CODE; } + InsetCode lyxCode() const override { return MATH_SQRT_CODE; } /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathStackrel.h b/src/mathed/InsetMathStackrel.h index 5740fb922b..5fa4361625 100644 --- a/src/mathed/InsetMathStackrel.h +++ b/src/mathed/InsetMathStackrel.h @@ -24,30 +24,30 @@ public: /// bool idxUpDown(Cursor &, bool up) const; /// - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// - MathClass mathClass() const; + MathClass mathClass() const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - InsetCode lyxCode() const { return MATH_STACKREL_CODE; } + InsetCode lyxCode() const override { return MATH_STACKREL_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; } // namespace lyx diff --git a/src/mathed/InsetMathString.h b/src/mathed/InsetMathString.h index 9f94a7457f..9f2e0bf4f5 100644 --- a/src/mathed/InsetMathString.h +++ b/src/mathed/InsetMathString.h @@ -28,33 +28,33 @@ public: /// explicit InsetMathString(docstring const & s); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// docstring str() const { return str_; } /// - InsetMathString * asStringInset() { return this; } + InsetMathString * asStringInset() override { return this; } /// - InsetMathString const * asStringInset() const { return this; } + InsetMathString const * asStringInset() const override { return this; } /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - InsetCode lyxCode() const { return MATH_STRING_CODE; } + InsetCode lyxCode() const override { return MATH_STRING_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// the string docstring str_; }; diff --git a/src/mathed/InsetMathSubstack.h b/src/mathed/InsetMathSubstack.h index bb3089b61a..f5be05ff03 100644 --- a/src/mathed/InsetMathSubstack.h +++ b/src/mathed/InsetMathSubstack.h @@ -25,34 +25,34 @@ public: /// explicit InsetMathSubstack(Buffer * buf); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - InsetMathSubstack const * asSubstackInset() const { return this; } + InsetMathSubstack const * asSubstackInset() const override { return this; } /// bool getStatus(Cursor & cur, FuncRequest const & cmd, - FuncStatus & flag) const; + FuncStatus & flag) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const override; /// - InsetCode lyxCode() const { return MATH_SUBSTACK_CODE; } + InsetCode lyxCode() const override { return MATH_SUBSTACK_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathSymbol.h b/src/mathed/InsetMathSymbol.h index bbf37f9673..972fc53844 100644 --- a/src/mathed/InsetMathSymbol.h +++ b/src/mathed/InsetMathSymbol.h @@ -29,57 +29,57 @@ public: /// explicit InsetMathSymbol(docstring const & name); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// void draw(PainterInfo &, int x, int y) const; /// - int kerning(BufferView const *) const { return kerning_; } + int kerning(BufferView const *) const override { return kerning_; } /// - mode_type currentMode() const; + mode_type currentMode() const override; /// - MathClass mathClass() const; + MathClass mathClass() const override; /// bool isOrdAlpha() const; /// The default limits value - Limits defaultLimits() const; + Limits defaultLimits() const override; /// whether the inset has limit-like sub/superscript - Limits limits() const { return limits_; } + Limits limits() const override { return limits_; } /// sets types of sub/superscripts - void limits(Limits lim) { limits_ = lim; } + void limits(Limits lim) override { limits_ = lim; } /// identifies SymbolInset as such - InsetMathSymbol const * asSymbolInset() const { return this; } + InsetMathSymbol const * asSymbolInset() const override { return this; } /// the LaTeX name of the symbol (without the backslash) - docstring name() const; + docstring name() const override; /// request "external features" - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void maxima(MaximaStream &) const; + void maxima(MaximaStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// \param spacing controls whether we print spaces around /// "operator"-type symbols or just print them raw void htmlize(HtmlStream &, bool spacing) const; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// void infoize2(odocstream & os) const; /// - InsetCode lyxCode() const { return MATH_SYMBOL_CODE; } + InsetCode lyxCode() const override { return MATH_SYMBOL_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// latexkeys const * sym_; /// diff --git a/src/mathed/InsetMathTabular.h b/src/mathed/InsetMathTabular.h index 481d28ef0e..26676754a9 100644 --- a/src/mathed/InsetMathTabular.h +++ b/src/mathed/InsetMathTabular.h @@ -27,33 +27,33 @@ public: InsetMathTabular(Buffer * buf, docstring const &, int m, int n, char valign, docstring const & halign); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// InsetMathTabular * asTabularInset() { return this; } /// InsetMathTabular const * asTabularInset() const { return this; } /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - InsetCode lyxCode() const { return MATH_TABULAR_CODE; } + InsetCode lyxCode() const override { return MATH_TABULAR_CODE; } /// - int leftMargin() const { return 4; } //override + int leftMargin() const override { return 4; } /// - int rightMargin() const { return 2; } //override + int rightMargin() const override { return 2; } /// - bool handlesMulticolumn() const { return true; } //override + bool handlesMulticolumn() const override { return true; } private: - Inset * clone() const; + Inset * clone() const override; /// docstring name_; }; diff --git a/src/mathed/InsetMathUnderset.h b/src/mathed/InsetMathUnderset.h index 565f0d5cc4..a546f2420d 100644 --- a/src/mathed/InsetMathUnderset.h +++ b/src/mathed/InsetMathUnderset.h @@ -24,28 +24,28 @@ public: /// explicit InsetMathUnderset(Buffer * buf) : InsetMathFracBase(buf) {} /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - bool idxFirst(Cursor &) const; + bool idxFirst(Cursor &) const override; /// - bool idxLast(Cursor &) const; + bool idxLast(Cursor &) const override; /// - void write(WriteStream & ws) const; + void write(WriteStream & ws) const override; /// - void normalize(NormalStream & ns) const; + void normalize(NormalStream & ns) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_UNDERSET_CODE; } + InsetCode lyxCode() const override { return MATH_UNDERSET_CODE; } private: - virtual Inset * clone() const; + Inset * clone() const override; }; diff --git a/src/mathed/InsetMathUnknown.h b/src/mathed/InsetMathUnknown.h index 3d66df7555..cd73f96aa7 100644 --- a/src/mathed/InsetMathUnknown.h +++ b/src/mathed/InsetMathUnknown.h @@ -25,46 +25,46 @@ public: docstring const & selection = empty_docstring(), bool final = true, bool black = false); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// void setName(docstring const & name); /// - docstring name() const; + docstring name() const override; /// docstring const & selection() const { return selection_; } /// identifies UnknownInsets - InsetMathUnknown const * asUnknownInset() const { return this; } + InsetMathUnknown const * asUnknownInset() const override { return this; } /// identifies UnknownInsets - InsetMathUnknown * asUnknownInset() { return this; } + InsetMathUnknown * asUnknownInset() override { return this; } /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void mathematica(MathematicaStream &) const; + void mathematica(MathematicaStream &) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void octave(OctaveStream &) const; + void octave(OctaveStream &) const override; /// void finalize(); /// bool final() const; /// - int kerning(BufferView const *) const { return kerning_; } + int kerning(BufferView const *) const override { return kerning_; } /// - InsetCode lyxCode() const { return MATH_UNKNOWN_CODE; } + InsetCode lyxCode() const override { return MATH_UNKNOWN_CODE; } private: /// - Inset * clone() const { return new InsetMathUnknown(*this); } + Inset * clone() const override { return new InsetMathUnknown(*this); } /// docstring name_; diff --git a/src/mathed/InsetMathXArrow.h b/src/mathed/InsetMathXArrow.h index 722f4d58cd..7c98ccaa13 100644 --- a/src/mathed/InsetMathXArrow.h +++ b/src/mathed/InsetMathXArrow.h @@ -24,26 +24,26 @@ public: /// explicit InsetMathXArrow(Buffer * buf, docstring const & name); /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// - void normalize(NormalStream & os) const; + void normalize(NormalStream & os) const override; /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_XARROW_CODE; } + InsetCode lyxCode() const override { return MATH_XARROW_CODE; } /// - MathClass mathClass() const { return MC_REL; } + MathClass mathClass() const override { return MC_REL; } private: - virtual Inset * clone() const; + Inset * clone() const override; /// bool upper() const; /// diff --git a/src/mathed/InsetMathXYMatrix.h b/src/mathed/InsetMathXYMatrix.h index 68de02813a..5655e33c75 100644 --- a/src/mathed/InsetMathXYMatrix.h +++ b/src/mathed/InsetMathXYMatrix.h @@ -26,36 +26,36 @@ public: InsetMathXYMatrix(Buffer * buf, Length const & = Length(), char c = '\0', bool equal_spacing = false); /// - void metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const override; /// - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y) const override; /// InsetMathXYMatrix const * asXYMatrixInset() const { return this; } /// - virtual int colsep() const; + int colsep() const override; /// - virtual int rowsep() const; + int rowsep() const override; /// - void write(WriteStream & os) const; + void write(WriteStream & os) const override; /// - void infoize(odocstream & os) const; + void infoize(odocstream & os) const override; /// - void normalize(NormalStream &) const; + void normalize(NormalStream &) const override; /// - void maple(MapleStream &) const; + void maple(MapleStream &) const override; /// - void validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const override; /// - InsetCode lyxCode() const { return MATH_XYMATRIX_CODE; } + InsetCode lyxCode() const override { return MATH_XYMATRIX_CODE; } /// - void mathmlize(MathStream &) const; + void mathmlize(MathStream &) const override; /// - void htmlize(HtmlStream &) const; + void htmlize(HtmlStream &) const override; private: /// - virtual Inset * clone() const; + Inset * clone() const override; /// extra spacing, may be empty Length spacing_; /// diff --git a/src/support/FileName.h b/src/support/FileName.h index 923962b03a..1cf1e730f4 100644 --- a/src/support/FileName.h +++ b/src/support/FileName.h @@ -260,7 +260,7 @@ public: */ void set(std::string const & filename, std::string const & buffer_path); /// - void erase(); + void erase() override; /// bool saveAbsPath() const { return save_abs_path_; } /// \param buffer_path if empty, uses `pwd` diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h index 51cacd6d79..681b88965d 100644 --- a/src/support/ForkedCalls.h +++ b/src/support/ForkedCalls.h @@ -157,7 +157,7 @@ public: ForkedCall(std::string const & path = empty_string(), std::string const & lpath = empty_string()); /// - virtual std::shared_ptr clone() const { + std::shared_ptr clone() const override { return std::make_shared(*this); } @@ -181,7 +181,7 @@ public: private: /// - virtual int generateChild(); + int generateChild() override; /// std::string cmd_prefix_; }; diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index 6ec50e1238..815223d378 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -59,22 +59,22 @@ class ProgressDummy : public ProgressInterface public: ProgressDummy() {} - void processStarted(QString const &) {} - void processFinished(QString const &) {} - void appendMessage(QString const &) {} - void appendError(QString const &) {} - void clearMessages() {} - void lyxerrFlush() {} + void processStarted(QString const &) override {} + void processFinished(QString const &) override {} + void appendMessage(QString const &) override {} + void appendError(QString const &) override {} + void clearMessages() override {} + void lyxerrFlush() override {} - void lyxerrConnect() {} - void lyxerrDisconnect() {} + void lyxerrConnect() override {} + void lyxerrDisconnect() override {} - void warning(QString const &, QString const &) {} - void toggleWarning(QString const &, QString const &, QString const &) {} - void error(QString const &, QString const &, QString const &) {} - void information(QString const &, QString const &) {} + void warning(QString const &, QString const &) override {} + void toggleWarning(QString const &, QString const &, QString const &) override {} + void error(QString const &, QString const &, QString const &) override {} + void information(QString const &, QString const &) override {} int prompt(docstring const &, docstring const &, int default_but, int, - docstring const &, docstring const &) { return default_but; } + docstring const &, docstring const &) override { return default_but; } }; diff --git a/src/support/Timeout.cpp b/src/support/Timeout.cpp index 06571197e4..3c3502e412 100644 --- a/src/support/Timeout.cpp +++ b/src/support/Timeout.cpp @@ -46,7 +46,7 @@ public: protected: /// - void timerEvent(QTimerEvent *) { owner_.emit(); } + void timerEvent(QTimerEvent *) override { owner_.emit(); } private: /// diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp index c2d2d7e867..df41c31f38 100644 --- a/src/support/docstream.cpp +++ b/src/support/docstream.cpp @@ -105,10 +105,10 @@ protected: fflush(stderr); } } - virtual result do_out(state_type &, intern_type const * from, + result do_out(state_type &, intern_type const * from, intern_type const * from_end, intern_type const *& from_next, extern_type * to, extern_type * to_end, - extern_type *& to_next) const + extern_type *& to_next) const override { #define WORKAROUND_ICONV_BUG 1 #if WORKAROUND_ICONV_BUG @@ -184,18 +184,18 @@ protected: } return retval; } - virtual result do_unshift(state_type &, extern_type * to, - extern_type *, extern_type *& to_next) const + result do_unshift(state_type &, extern_type * to, + extern_type *, extern_type *& to_next) const override { // utf8 does not use shifting to_next = to; return base::noconv; } - virtual result do_in(state_type &, + result do_in(state_type &, extern_type const * from, extern_type const * from_end, extern_type const *& from_next, intern_type * to, intern_type * to_end, - intern_type *& to_next) const + intern_type *& to_next) const override { size_t inbytesleft = (from_end - from) * sizeof(extern_type); size_t outbytesleft = (to_end - to) * sizeof(intern_type); @@ -236,16 +236,16 @@ protected: } return retval; } - virtual int do_encoding() const throw() + int do_encoding() const throw() override { return 0; } - virtual bool do_always_noconv() const throw() + bool do_always_noconv() const throw() override { return false; } - virtual int do_length(state_type & /*state*/, extern_type const * from, - extern_type const * end, size_t max) const + int do_length(state_type & /*state*/, extern_type const * from, + extern_type const * end, size_t max) const override { // The docs are a bit unclear about this method. // It seems that we should calculate the actual length of the @@ -266,7 +266,7 @@ protected: return min(length, max); #endif } - virtual int do_max_length() const throw() + int do_max_length() const throw() override { return lyx::max_encoded_bytes(encoding_); } diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp index 6d69915a89..0c5d3e68a7 100644 --- a/src/support/docstring.cpp +++ b/src/support/docstring.cpp @@ -115,7 +115,7 @@ class to_local8bit_failure : public bad_cast { public: to_local8bit_failure() throw() : bad_cast() {} virtual ~to_local8bit_failure() throw() {} - virtual const char* what() const throw() + const char* what() const throw() override { return "A string could not be converted from unicode to the local 8 bit encoding."; } @@ -282,7 +282,7 @@ class ctype_failure : public bad_cast { public: ctype_failure() throw() : bad_cast() {} virtual ~ctype_failure() throw() {} - virtual const char* what() const throw() + const char* what() const throw() override { return "The ctype locale facet does only support ASCII characters on this platform."; } @@ -293,7 +293,7 @@ class num_put_failure : public bad_cast { public: num_put_failure() throw() : bad_cast() {} virtual ~num_put_failure() throw() {} - virtual const char* what() const throw() + const char* what() const throw() override { return "The num_put locale facet does only support ASCII characters on this platform."; } @@ -360,13 +360,13 @@ protected: } } virtual ~ascii_ctype_facet() {} - char_type do_toupper(char_type c) const + char_type do_toupper(char_type c) const override { if (c >= 0x80) throw ctype_failure(); return toupper(static_cast(c)); } - char_type const * do_toupper(char_type * lo, char_type const * hi) const + char_type const * do_toupper(char_type * lo, char_type const * hi) const override { while (lo < hi) { if (*lo >= 0x80) @@ -376,13 +376,13 @@ protected: } return hi; } - char_type do_tolower(char_type c) const + char_type do_tolower(char_type c) const override { if (c >= 0x80) throw ctype_failure(); return tolower(c); } - char_type const * do_tolower(char_type * lo, char_type const * hi) const + char_type const * do_tolower(char_type * lo, char_type const * hi) const override { while (lo < hi) { if (*lo >= 0x80) @@ -392,7 +392,7 @@ protected: } return hi; } - bool do_is(mask m, char_type c) const + bool do_is(mask m, char_type c) const override { if (c >= 0x80) throw ctype_failure(); @@ -411,7 +411,7 @@ protected: } return ret; } - char_type const * do_is(char_type const * lo, char_type const * hi, mask * vec) const + char_type const * do_is(char_type const * lo, char_type const * hi, mask * vec) const override { for (;lo < hi; ++vec, ++lo) { if (*lo >= 0x80) @@ -430,25 +430,25 @@ protected: } return hi; } - char_type const * do_scan_is(mask m, char_type const * lo, char_type const * hi) const + char_type const * do_scan_is(mask m, char_type const * lo, char_type const * hi) const override { while (lo < hi && !this->do_is(m, *lo)) ++lo; return lo; } - char_type const * do_scan_not(mask m, char_type const * lo, char_type const * hi) const + char_type const * do_scan_not(mask m, char_type const * lo, char_type const * hi) const override { while (lo < hi && this->do_is(m, *lo) != 0) ++lo; return lo; } - char_type do_widen(char c) const + char_type do_widen(char c) const override { if (static_cast(c) < 0x80) return c; throw ctype_failure(); } - const char* do_widen(const char* lo, const char* hi, char_type* dest) const + const char* do_widen(const char* lo, const char* hi, char_type* dest) const override { while (lo < hi) { if (static_cast(*lo) >= 0x80) @@ -459,13 +459,13 @@ protected: } return hi; } - char do_narrow(char_type wc, char) const + char do_narrow(char_type wc, char) const override { if (wc < 0x80) return static_cast(wc); throw ctype_failure(); } - const char_type * do_narrow(const char_type * lo, const char_type * hi, char, char * dest) const + const char_type * do_narrow(const char_type * lo, const char_type * hi, char, char * dest) const override { while (lo < hi) { if (*lo < 0x80) @@ -497,51 +497,51 @@ public: protected: iter_type - do_put(iter_type oit, ios_base & b, char_type fill, bool v) const + do_put(iter_type oit, ios_base & b, char_type fill, bool v) const override { return do_put_helper(oit, b, fill, v); } iter_type - do_put(iter_type oit, ios_base & b, char_type fill, long v) const + do_put(iter_type oit, ios_base & b, char_type fill, long v) const override { return do_put_helper(oit, b, fill, v); } iter_type - do_put(iter_type oit, ios_base & b, char_type fill, unsigned long v) const + do_put(iter_type oit, ios_base & b, char_type fill, unsigned long v) const override { return do_put_helper(oit, b, fill, v); } #ifdef HAVE_LONG_LONG_INT iter_type - do_put(iter_type oit, ios_base & b, char_type fill, long long v) const + do_put(iter_type oit, ios_base & b, char_type fill, long long v) const override { return do_put_helper(oit, b, fill, v); } iter_type - do_put(iter_type oit, ios_base & b, char_type fill, unsigned long long v) const + do_put(iter_type oit, ios_base & b, char_type fill, unsigned long long v) const override { return do_put_helper(oit, b, fill, v); } #endif iter_type - do_put(iter_type oit, ios_base & b, char_type fill, double v) const + do_put(iter_type oit, ios_base & b, char_type fill, double v) const override { return do_put_helper(oit, b, fill, v); } iter_type - do_put(iter_type oit, ios_base & b, char_type fill, long double v) const + do_put(iter_type oit, ios_base & b, char_type fill, long double v) const override { return do_put_helper(oit, b, fill, v); } iter_type - do_put(iter_type oit, ios_base & b, char_type fill, void const * v) const + do_put(iter_type oit, ios_base & b, char_type fill, void const * v) const override { return do_put_helper(oit, b, fill, v); } @@ -596,7 +596,7 @@ public: protected: iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, bool & v) const + ios_base::iostate & err, bool & v) const override { if (b.flags() & ios_base::boolalpha) { numpunct_facet p; @@ -649,28 +649,28 @@ protected: iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, long & v) const + ios_base::iostate & err, long & v) const override { return do_get_integer(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, unsigned short & v) const + ios_base::iostate & err, unsigned short & v) const override { return do_get_integer(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, unsigned int & v) const + ios_base::iostate & err, unsigned int & v) const override { return do_get_integer(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, unsigned long & v) const + ios_base::iostate & err, unsigned long & v) const override { return do_get_integer(iit, eit, b, err, v); } @@ -678,14 +678,14 @@ protected: #ifdef HAVE_LONG_LONG_INT iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, long long & v) const + ios_base::iostate & err, long long & v) const override { return do_get_integer(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, unsigned long long & v) const + ios_base::iostate & err, unsigned long long & v) const override { return do_get_integer(iit, eit, b, err, v); } @@ -693,28 +693,28 @@ protected: iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, float & v) const + ios_base::iostate & err, float & v) const override { return do_get_float(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, double & v) const + ios_base::iostate & err, double & v) const override { return do_get_float(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, long double & v) const + ios_base::iostate & err, long double & v) const override { return do_get_float(iit, eit, b, err, v); } iter_type do_get(iter_type iit, iter_type eit, ios_base & b, - ios_base::iostate & err, void * & v) const + ios_base::iostate & err, void * & v) const override { unsigned long val; iter_type end = do_get_integer(iit, eit, b, err, val); diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 667fad76b6..8197068c3a 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -620,7 +620,7 @@ public: argc_(argc), argv_(argv) { } - void doExec() + void doExec() override { try { int const exit_status = run();