]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.cpp
* src/LyXRC.{cpp,h}:
[lyx.git] / src / sgml.cpp
index 68a96a3717f9011fa07332489dc4ad36c9ddccf1..b7871e195b5c07ae88592bb9c25ff3f8df649921 100644 (file)
 #include "BufferParams.h"
 #include "Counters.h"
 #include "Text.h"
+#include "Layout.h"
 #include "OutputParams.h"
 #include "Paragraph.h"
 
-#include "support/docstring.h"
+#include "support/docstream.h"
 #include "support/lstrings.h"
 #include "support/std_ostream.h"
 #include "support/convert.h"
@@ -125,8 +126,8 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams,
        // If you know what you are doing, you can set allowed==""
        // to disable this mangling.
        TextClass const & tclass = buf.params().getTextClass();
-       string const allowed =
-               runparams.flavor == OutputParams::XML? ".-_:":tclass.options();
+       docstring const allowed = from_ascii(
+               runparams.flavor == OutputParams::XML? ".-_:":tclass.options());
 
        if (allowed.empty())
                return orig;
@@ -150,7 +151,7 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams,
 
        bool mangle = false;
        for (; it != end; ++it) {
-               char c = *it;
+               char_type c = *it;
                if (isAlphaASCII(c) || isDigitASCII(c) || c == '-' || c == '.'
                      || allowed.find(c) < allowed.size())
                        content += c;