]> git.lyx.org Git - features.git/commitdiff
Constify InsetQuotesParams
authorYuriy Skalko <yuriy.skalko@gmail.com>
Sun, 1 Nov 2020 10:57:14 +0000 (12:57 +0200)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Sun, 1 Nov 2020 20:24:31 +0000 (22:24 +0200)
src/insets/InsetQuotes.cpp
src/insets/InsetQuotes.h

index c93de5a06395c4ad301d04838659cfc1f9e73346..b9b6557a5ebc3950d5a2d01af19c8c48b9d773bc 100644 (file)
@@ -100,7 +100,7 @@ char InsetQuotesParams::getStyleChar(QuoteStyle const & style) const
 
 
 InsetQuotesParams::QuoteStyle InsetQuotesParams::getQuoteStyle(string const & s,
-                           bool const allow_wildcards, QuoteStyle fb)
+                           bool const allow_wildcards, QuoteStyle fb) const
 {
        QuoteStyle res = fb;
 
@@ -132,7 +132,7 @@ InsetQuotesParams::QuoteStyle InsetQuotesParams::getQuoteStyle(string const & s,
 
 
 InsetQuotesParams::QuoteSide InsetQuotesParams::getQuoteSide(string const & s,
-                       bool const allow_wildcards, QuoteSide fb)
+                       bool const allow_wildcards, QuoteSide fb) const
 {
        QuoteSide res = fb;
 
@@ -164,7 +164,7 @@ InsetQuotesParams::QuoteSide InsetQuotesParams::getQuoteSide(string const & s,
 
 
 InsetQuotesParams::QuoteLevel InsetQuotesParams::getQuoteLevel(string const & s,
-                       bool const allow_wildcards, QuoteLevel fb)
+                       bool const allow_wildcards, QuoteLevel fb) const
 {
        QuoteLevel res = fb;
 
@@ -574,7 +574,7 @@ map<string, docstring> InsetQuotesParams::getTypes() const
 }
 
 
-docstring const InsetQuotesParams::getGuiLabel(QuoteStyle const & qs, bool langdef)
+docstring const InsetQuotesParams::getGuiLabel(QuoteStyle const & qs, bool langdef) const
 {
        docstring const styledesc =
                bformat(_("%1$souter%2$s and %3$sinner%4$s[[quotation marks]]"),
@@ -592,7 +592,7 @@ docstring const InsetQuotesParams::getGuiLabel(QuoteStyle const & qs, bool langd
 }
 
 
-docstring const InsetQuotesParams::getShortGuiLabel(docstring const & str)
+docstring const InsetQuotesParams::getShortGuiLabel(docstring const & str) const
 {
        string const s = to_ascii(str);
        QuoteStyle const style = getQuoteStyle(s);
index 5bc7f392696eeb72f4dbd4e561e9689af418201f..b4d96ffc75df3ae26cf9c27e3713190372591198 100644 (file)
@@ -86,9 +86,9 @@ public:
        docstring getXMLQuote(char_type c) const;
        /// Returns a descriptive label of a style suitable for dialog and menu
        docstring const getGuiLabel(QuoteStyle const & qs,
-                                   bool langdef = false);
+                                   bool langdef = false) const;
        /// Returns a descriptive label of a given char
-       docstring const getShortGuiLabel(docstring const & str);
+       docstring const getShortGuiLabel(docstring const & str) const;
        ///
        int stylescount() const;
        /// Returns the matching style shortcut char
@@ -96,15 +96,15 @@ public:
        /// Returns the quote style from the shortcut string
        QuoteStyle getQuoteStyle(std::string const & s,
                bool const allow_wildcards = false,
-               QuoteStyle fallback = EnglishQuotes);
+               QuoteStyle fallback = EnglishQuotes) const;
        /// Returns the quote sind from the shortcut string
        QuoteSide getQuoteSide(std::string const & s,
                bool const allow_wildcards = false,
-               QuoteSide fallback = OpeningQuote);
+               QuoteSide fallback = OpeningQuote) const;
        /// Returns the quote level from the shortcut string
        QuoteLevel getQuoteLevel(std::string const & s,
                bool const allow_wildcards = false,
-               QuoteLevel fallback = PrimaryQuotes);
+               QuoteLevel fallback = PrimaryQuotes) const;
 };
 
 ///