]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.cpp
Japanese docs: fix some more paths
[lyx.git] / src / sgml.cpp
index 125ef611fa89e345b18e00f23d8fec4cb8de0e3c..75802c2bd44d2113da87253c0c31ffb0fc267df0 100644 (file)
@@ -26,9 +26,9 @@
 #include "support/docstream.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
-#include "support/ThreadStorage.h"
 
 #include <map>
+#include <QThreadStorage>
 
 using namespace std;
 using namespace lyx::support;
@@ -137,10 +137,10 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams,
        docstring content;
 
        typedef map<docstring, docstring> MangledMap;
-       static ThreadStorage<MangledMap> tMangledNames;
-       MangledMap & mangledNames = *tMangledNames;
-       static ThreadStorage<int> tMangleID;
-       int & mangleID = *tMangleID;
+       static QThreadStorage<MangledMap> tMangledNames;
+       static QThreadStorage<int> tMangleID;
+
+       MangledMap & mangledNames = tMangledNames.localData();
 
        MangledMap::const_iterator const known = mangledNames.find(orig);
        if (known != mangledNames.end())
@@ -169,9 +169,10 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams,
                }
        }
 
-       if (mangle)
+       if (mangle) {
+               int & mangleID = tMangleID.localData();
                content += "-" + convert<docstring>(mangleID++);
-       else if (isDigitASCII(content[content.size() - 1]))
+       else if (isDigitASCII(content[content.size() - 1]))
                content += ".";
 
        mangledNames[orig] = content;