diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-29 19:27:02 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-29 19:27:02 (GMT) |
commit | 8deca51e0c8cca7873d40d5670edbea36ea38ee3 (patch) | |
tree | acfc070cde40e95164d4dbeb33c0554f55f5066b | |
parent | 88885c2fa885978cf958bebb6d312e1e0854a864 (diff) | |
download | Doxygen-8deca51e0c8cca7873d40d5670edbea36ea38ee3.zip Doxygen-8deca51e0c8cca7873d40d5670edbea36ea38ee3.tar.gz Doxygen-8deca51e0c8cca7873d40d5670edbea36ea38ee3.tar.bz2 |
Changed refiltering to forced use of insideTabbing
-rw-r--r-- | src/latexdocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/latexgen.cpp | 30 | ||||
-rw-r--r-- | src/template.cpp | 4 | ||||
-rw-r--r-- | src/util.cpp | 42 | ||||
-rw-r--r-- | src/util.h | 4 |
5 files changed, 26 insertions, 58 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 51e53e9..56691cf 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -565,9 +565,9 @@ void LatexDocVisitor::visit(DocIndexEntry *i) { if (m_hide) return; m_t << "\\index{"; - m_t << latexEscapeLabelName(i->entry(),false); + m_t << latexEscapeLabelName(i->entry()); m_t << "@{"; - m_t << latexEscapeIndexChars(i->entry(),false); + m_t << latexEscapeIndexChars(i->entry()); m_t << "}}"; } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 9f1372e..d061dd7 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1519,9 +1519,9 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name) if (name) { t << "\\label{" << stripPath(fileName) << "}\\index{"; - t << latexEscapeLabelName(name,insideTabbing); + t << latexEscapeLabelName(name); t << "@{"; - t << latexEscapeIndexChars(name,insideTabbing); + t << latexEscapeIndexChars(name); t << "}}" << endl; } } @@ -1602,27 +1602,27 @@ void LatexGenerator::startMemberDoc(const char *clname, t << "\\index{"; if (clname) { - t << latexEscapeLabelName(clname,insideTabbing); + t << latexEscapeLabelName(clname); t << "@{"; - t << latexEscapeIndexChars(clname,insideTabbing); + t << latexEscapeIndexChars(clname); t << "}!"; } - t << latexEscapeLabelName(memname,insideTabbing); + t << latexEscapeLabelName(memname); t << "@{"; - t << latexEscapeIndexChars(memname,insideTabbing); + t << latexEscapeIndexChars(memname); t << "}}" << endl; t << "\\index{"; - t << latexEscapeLabelName(memname,insideTabbing); + t << latexEscapeLabelName(memname); t << "@{"; - t << latexEscapeIndexChars(memname,insideTabbing); + t << latexEscapeIndexChars(memname); t << "}"; if (clname) { t << "!"; - t << latexEscapeLabelName(clname,insideTabbing); + t << latexEscapeLabelName(clname); t << "@{"; - t << latexEscapeIndexChars(clname,insideTabbing); + t << latexEscapeIndexChars(clname); t << "}"; } t << "}" << endl; @@ -1640,7 +1640,7 @@ void LatexGenerator::startMemberDoc(const char *clname, { t << "\\texorpdfstring{"; } - t << latexEscapeIndexChars(title,insideTabbing); + t << latexEscapeIndexChars(title); if (pdfHyperlinks) { t << "}{" << latexEscapePDFString(title) << "}"; @@ -1715,16 +1715,16 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2) if (s1) { t << "\\index{"; - t << latexEscapeLabelName(s1,insideTabbing); + t << latexEscapeLabelName(s1); t << "@{"; - t << latexEscapeIndexChars(s1,insideTabbing); + t << latexEscapeIndexChars(s1); t << "}"; if (s2) { t << "!"; - t << latexEscapeLabelName(s2,insideTabbing); + t << latexEscapeLabelName(s2); t << "@{"; - t << latexEscapeIndexChars(s2,insideTabbing); + t << latexEscapeIndexChars(s2); t << "}"; } t << "}"; diff --git a/src/template.cpp b/src/template.cpp index 3e39d3c..b1435ce 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -698,7 +698,7 @@ class FilterTexLabel { if (v.isValid() && (v.type()==TemplateVariant::String)) { - return TemplateVariant(latexEscapeLabelName(v.toString(),FALSE),TRUE); + return TemplateVariant(latexEscapeLabelName(v.toString()),TRUE); } else { @@ -717,7 +717,7 @@ class FilterTexIndex { if (v.isValid() && (v.type()==TemplateVariant::String)) { - return TemplateVariant(latexEscapeIndexChars(v.toString(),FALSE),TRUE); + return TemplateVariant(latexEscapeIndexChars(v.toString()),TRUE); } else { diff --git a/src/util.cpp b/src/util.cpp index 0a10e74..0f27794 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6927,37 +6927,11 @@ void filterLatexString(FTextStream &t,const char *str, } } -static void reFilterLatexString(FTextStream &t,const char *str) -{ - if (str==0) return; - const unsigned char *p=(const unsigned char *)str; - unsigned char c; - unsigned char pc='\0'; - while (*p) - { - c=*p++; - - switch(c) - { - case '\\': - if (*p == '+') p++; - else t << '\\'; - break; - default: - t << (char)c; - break; - } - pc = c; - } -} - -QCString latexEscapeLabelName(const char *s,bool insideTabbing) +QCString latexEscapeLabelName(const char *s) { QGString result; - QGString result1; QCString tmp(qstrlen(s)+1); FTextStream t(&result); - FTextStream t1(&result1); const char *p=s; char c; int i; @@ -6983,20 +6957,14 @@ QCString latexEscapeLabelName(const char *s,bool insideTabbing) p++; } tmp[i]=0; - filterLatexString(t,tmp.data(),insideTabbing); + filterLatexString(t,tmp,TRUE); break; } } - if (!insideTabbing) - { - reFilterLatexString(t1,result.data()); - return result1.data(); - } - else - return result.data(); + return result.data(); } -QCString latexEscapeIndexChars(const char *s,bool insideTabbing) +QCString latexEscapeIndexChars(const char *s) { QGString result; QCString tmp(qstrlen(s)+1); @@ -7027,7 +6995,7 @@ QCString latexEscapeIndexChars(const char *s,bool insideTabbing) p++; } tmp[i]=0; - filterLatexString(t,tmp.data(),insideTabbing); + filterLatexString(t,tmp.data(),TRUE); break; } } @@ -345,8 +345,8 @@ void filterLatexString(FTextStream &t,const char *str, bool insideItem=FALSE, bool keepSpaces=FALSE); -QCString latexEscapeLabelName(const char *s,bool insideTabbing); -QCString latexEscapeIndexChars(const char *s,bool insideTabbing); +QCString latexEscapeLabelName(const char *s); +QCString latexEscapeIndexChars(const char *s); QCString latexEscapePDFString(const char *s); QCString latexFilterURL(const char *s); |