[LyX/master] Constify InsetQuotesParams

Yuriy Skalko yuriy.skalko at gmail.com
Sun Nov 1 19:56:31 UTC 2020


commit 9c47e736f872907c67e4d82dab8b24ca485e9ca7
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Sun Nov 1 12:57:14 2020 +0200

    Constify InsetQuotesParams
---
 src/insets/InsetQuotes.cpp |   10 +++++-----
 src/insets/InsetQuotes.h   |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp
index c93de5a..b9b6557 100644
--- a/src/insets/InsetQuotes.cpp
+++ b/src/insets/InsetQuotes.cpp
@@ -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);
diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h
index 5bc7f39..b4d96ff 100644
--- a/src/insets/InsetQuotes.h
+++ b/src/insets/InsetQuotes.h
@@ -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;
 };
 
 ///


More information about the lyx-cvs mailing list