diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 29a8c52831..496356ab2e 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -24,6 +24,7 @@ #include "Paragraph.h" #include "ParIterator.h" #include "PDFOptions.h" +#include "Statistics.h" #include "xml.h" #include "texstream.h" #include "TocBackend.h" @@ -669,4 +670,13 @@ docstring InsetRef::getTOCString() const return (broken_ ? _("BROKEN: ") : docstring()) + toc_string_; } +void InsetRef::updateStatistics(Statistics & stats) const +{ + docstring const & ref = getParam("reference"); + string const & cmd = params().getCmdName(); + docstring const refstring = displayString(ref, cmd); + stats.update(refstring); +} + + } // namespace lyx diff --git a/src/insets/InsetRef.h b/src/insets/InsetRef.h index 52c8de79e2..423e53adde 100644 --- a/src/insets/InsetRef.h +++ b/src/insets/InsetRef.h @@ -75,6 +75,8 @@ public: /// void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override; /// + void updateStatistics(Statistics & stats) const override; + /// void addToToc(DocIterator const & di, bool output_active, UpdateType utype, TocBackend & backend) const override; ///