]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.cpp
adjust
[lyx.git] / src / sgml.cpp
index ff84339a376b4e90b3cb8d59bd142060592b5832..e1709a9a8da4337e013c2024e8651780b75f74ac 100644 (file)
@@ -17,6 +17,7 @@
 #include "BufferParams.h"
 #include "Counters.h"
 #include "Text.h"
+#include "Layout.h"
 #include "OutputParams.h"
 #include "Paragraph.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;
@@ -205,7 +206,7 @@ void sgml::closeTag(odocstream & os, string const & name)
 void sgml::openTag(Buffer const & buf, odocstream & os,
        OutputParams const & runparams, Paragraph const & par)
 {
-       Layout_ptr const & style = par.layout();
+       LayoutPtr const & style = par.layout();
        string const & name = style->latexname();
        string param = style->latexparam();
        Counters & counters = buf.params().getTextClass().counters();
@@ -240,7 +241,7 @@ void sgml::openTag(Buffer const & buf, odocstream & os,
 
 void sgml::closeTag(odocstream & os, Paragraph const & par)
 {
-       Layout_ptr const & style = par.layout();
+       LayoutPtr const & style = par.layout();
        closeTag(os, style->latexname());
 }