X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTocBackend.cpp;h=8646bc504869b86d6148f5111883ad58eff3a294;hb=6b651f2ad9f698c01993dcc6e340682c279f1c55;hp=ba72b747b99aa7db9162051b19f310ee4cd84ccd;hpb=6725b2db59fbc23f08962c187c5aac283fe9efbb;p=lyx.git diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index ba72b747b9..8646bc5048 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -16,19 +16,21 @@ #include "Buffer.h" #include "BufferParams.h" -#include "debug.h" #include "FloatList.h" #include "FuncRequest.h" #include "InsetList.h" #include "Layout.h" #include "LyXAction.h" #include "Paragraph.h" +#include "TextClass.h" #include "insets/InsetOptArg.h" #include "support/convert.h" +#include "support/debug.h" +#include "support/docstream.h" -using std::string; +using namespace std; namespace lyx { @@ -81,7 +83,7 @@ FuncRequest TocItem::action() const // /////////////////////////////////////////////////////////////////////////// -Toc const & TocBackend::toc(std::string const & type) const +Toc const & TocBackend::toc(string const & type) const { // Is the type already supported? TocList::const_iterator it = tocs_.find(type); @@ -96,8 +98,7 @@ void TocBackend::updateItem(ParConstIterator const & par_it) if (toc("tableofcontents").empty()) { // FIXME: should not happen, // a call to TocBackend::update() is missing somewhere - lyxerr << "TocBackend::updateItem called but the TOC is empty!" - << std::endl; + LYXERR0("TocBackend::updateItem called but the TOC is empty!"); return; } @@ -188,7 +189,7 @@ void TocBackend::update() } -TocIterator const TocBackend::item(std::string const & type, +TocIterator const TocBackend::item(string const & type, ParConstIterator const & par_it) const { TocList::const_iterator toclist_it = tocs_.find(type); @@ -233,7 +234,7 @@ void TocBackend::writePlaintextTocList(string const & type, odocstream & os) con TocIterator ccit = cit->second.begin(); TocIterator end = cit->second.end(); for (; ccit != end; ++ccit) - os << ccit->asString() << '\n'; + os << ccit->asString() << from_utf8("\n"); } }