]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.cpp
* Doxy: polish html output.
[lyx.git] / src / TocBackend.cpp
index 87a909a1fd33f17506f5e5f0f1d0555775f9aca1..8646bc504869b86d6148f5111883ad58eff3a294 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "Buffer.h"
 #include "BufferParams.h"
-#include "debug.h"
 #include "FloatList.h"
 #include "FuncRequest.h"
 #include "InsetList.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 {
 
@@ -82,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);
@@ -97,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;
        }
 
@@ -189,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);
@@ -234,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");
        }
 }