]> git.lyx.org Git - features.git/commitdiff
Count quotes in document statistics as well.
authorPavel Sanda <sanda@lyx.org>
Tue, 9 May 2023 18:48:13 +0000 (20:48 +0200)
committerPavel Sanda <sanda@lyx.org>
Tue, 9 May 2023 18:48:13 +0000 (20:48 +0200)
Currently any quote counts as a single character.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219697.html

src/insets/InsetQuotes.cpp
src/insets/InsetQuotes.h

index 6fcc755d816e7ee44029afc62caf1fa20b49b2de..4c073da227b803586ee14c13591e5ba30f9a732d 100644 (file)
@@ -1021,4 +1021,11 @@ string InsetQuotes::contextMenuName() const
        return "context-quote";
 }
 
+
+pair<int, int> InsetQuotes::isWords() const
+{
+       //one character from the statistics perspective
+       return std::pair<int,int>(1, 0);
+}
+
 } // namespace lyx
index 5541af4a6793a45c411b83263e619617e4fe7de4..bebe9f1ec002157b95e499bef0ff68a7beb4ba9e 100644 (file)
@@ -173,6 +173,8 @@ public:
 
        /// Returns the current quote type
        std::string getType() const;
+       ///
+       std::pair<int, int> isWords() const override;
 
 private:
        ///