X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsgml.cpp;h=75802c2bd44d2113da87253c0c31ffb0fc267df0;hb=ddc28f0374478355217f975a25e544af7dbc8ea9;hp=125ef611fa89e345b18e00f23d8fec4cb8de0e3c;hpb=452a7a500c78aeb04f5a2695a368cfdc1efd4c0d;p=lyx.git diff --git a/src/sgml.cpp b/src/sgml.cpp index 125ef611fa..75802c2bd4 100644 --- a/src/sgml.cpp +++ b/src/sgml.cpp @@ -26,9 +26,9 @@ #include "support/docstream.h" #include "support/lstrings.h" #include "support/textutils.h" -#include "support/ThreadStorage.h" #include +#include using namespace std; using namespace lyx::support; @@ -137,10 +137,10 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams, docstring content; typedef map MangledMap; - static ThreadStorage tMangledNames; - MangledMap & mangledNames = *tMangledNames; - static ThreadStorage tMangleID; - int & mangleID = *tMangleID; + static QThreadStorage tMangledNames; + static QThreadStorage 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(mangleID++); - else if (isDigitASCII(content[content.size() - 1])) + } else if (isDigitASCII(content[content.size() - 1])) content += "."; mangledNames[orig] = content;