From 63ff4f44317b62f27d671106099c29c0a706a143 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 9 May 2023 20:48:13 +0200 Subject: [PATCH] Count quotes in document statistics as well. Currently any quote counts as a single character. https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219697.html --- src/insets/InsetQuotes.cpp | 7 +++++++ src/insets/InsetQuotes.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 6fcc755d81..4c073da227 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -1021,4 +1021,11 @@ string InsetQuotes::contextMenuName() const return "context-quote"; } + +pair InsetQuotes::isWords() const +{ + //one character from the statistics perspective + return std::pair(1, 0); +} + } // namespace lyx diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h index 5541af4a67..bebe9f1ec0 100644 --- a/src/insets/InsetQuotes.h +++ b/src/insets/InsetQuotes.h @@ -173,6 +173,8 @@ public: /// Returns the current quote type std::string getType() const; + /// + std::pair isWords() const override; private: /// -- 2.39.5