X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetNote.cpp;h=ab90288c6beb5530ad33f553567693c5c5bbf29d;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=bb22daf5bc7170e7b1bfc2e70121b0cd9f6058a2;hpb=ada361baf80cf44a35b7a62d5a2626202bc33183;p=lyx.git diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index bb22daf5bc..ab90288c6b 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -20,7 +20,6 @@ #include "BufferParams.h" #include "Counters.h" #include "Cursor.h" -#include "support/debug.h" #include "DispatchResult.h" #include "Exporter.h" #include "FuncRequest.h" @@ -34,6 +33,7 @@ #include "TextClass.h" #include "TocBackend.h" +#include "support/debug.h" #include "support/docstream.h" #include "support/Translator.h" @@ -138,7 +138,7 @@ docstring const InsetNote::editMessage() const docstring InsetNote::name() const { - return from_ascii(string("Note") + string(":") + string(notetranslator().find(params_.type))); + return from_ascii("Note:" + notetranslator().find(params_.type)); } @@ -220,14 +220,16 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it) } -void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIterator const &) const +void InsetNote::addToToc(Buffer const & buf, + ParConstIterator const & cpit) const { - ParConstIterator pit = par_const_iterator_begin(*this); + ParConstIterator pit = cpit; + pit.push_back(*this); - Toc & toc = toclist["note"]; - // FIXME: we probably want the note type too. + Toc & toc = buf.tocBackend().toc("note"); docstring str; - str = getNewLabel(str); + str = notetranslator_loc().find(params_.type) + from_ascii(": ") + + getNewLabel(str); toc.push_back(TocItem(pit, 0, str)); }