]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Improved character count statistics for letter based insets (e.g. the LyX logo).
[lyx.git] / src / Buffer.cpp
index 5059cebe4a714ce02d76b0492017e0131099f661..97a6cfbd31afe1e771034326ef982b37fff7a7fb 100644 (file)
@@ -2230,7 +2230,7 @@ Buffer::ExportStatus Buffer::writeLyXHTMLSource(odocstream & os,
                os << "<title>"
                   << (doctitle.empty() ?
                         from_ascii("LyX Document") :
-                        xml::xmlize(doctitle, XMLStream::ESCAPE_ALL))
+                        xml::escapeString(doctitle, XMLStream::ESCAPE_ALL))
                   << "</title>\n";
 
                docstring styles = features.getTClassHTMLPreamble();
@@ -5242,11 +5242,6 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype, bool const dele
        // to resolve macros in it.
        parit.text()->setMacrocontextPosition(parit);
 
-       // Reset bibitem counter in master (#8499)
-       Buffer const * const master = masterBuffer();
-       if (master == this && !d->ignore_parent)
-               master->params().documentClass().counters().reset(from_ascii("bibitem"));
-
        depth_type maxdepth = 0;
        pit_type const lastpit = parit.lastpit();
        bool changed = false;
@@ -5367,8 +5362,11 @@ void Buffer::Impl::updateStatistics(DocIterator & from, DocIterator & to, bool s
                                        ++word_count_;
                                        inword = true;
                                }
-                               if (ins && ins->isLetter())
-                                       ++char_count_;
+                               if (ins && ins->isLetter()) {
+                                       odocstringstream os;
+                                       ins->toString(os);
+                                       char_count_ += os.str().length();
+                               }
                                else if (ins && ins->isSpace())
                                        ++blank_count_;
                                else {