summaryrefslogtreecommitdiffstats
path: root/src/cmdmapper.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2014-11-28 13:44:07 (GMT)
committeralbert-github <albert.tests@gmail.com>2014-11-28 13:44:07 (GMT)
commit329a4ddc036ac9dfe72b11d62cb4043bc8488c20 (patch)
tree8ca50b460259cbadced0e68f100ba3fb620faed7 /src/cmdmapper.cpp
parent0fea3d4ca57187f271d7580ff16f32b7ab4657df (diff)
downloadDoxygen-329a4ddc036ac9dfe72b11d62cb4043bc8488c20.zip
Doxygen-329a4ddc036ac9dfe72b11d62cb4043bc8488c20.tar.gz
Doxygen-329a4ddc036ac9dfe72b11d62cb4043bc8488c20.tar.bz2
Limit images sizes and make more uniform (LaTeX)
This patch adjusts some problems regarding image sizes in LaTeX output of doxygen (a.o. Bug 738299 - When using msc or PlantUML, the default latex for the created image should include [width=\linewidth]) this has been done is such a way that all the "image" commands (i.e. image, dot, dotfile, msc, mscfile, diafile, startuml) operate in a similar way / have the same possibilities. - commands.doc Adjusted documentation to reflect changes. - cmdmapper.cpp - cmdmapper.h Added utility function to map command id back to command name - doctokenizer.h - doctokenizer.l Handle Caption and Size indication. Required also that some other rules had to be tightened a bit (like usage of {} in startuml and usage of "" for captions. This was already described in the documentation in this way). - docparser.cpp - docparser.h Created routine to uniformly handle the Caption and size indications and store them in a general way. - latexgen.cpp Replaced graphicx package by adjustbox package (includes graphicx) to support "min width" etc. - doxygen.sty templates\latex Added commands to make commands with and without caption behave similar. - docbookvisitor.cpp - docbookvisitor.h - htmldocvisitor.cpp - latexdocvisitor.cpp - latexdocvisitor.h - printdocvisitor.h - xmldocvisitor.cpp Created routine to uniformly handle the Caption and size indications in a general way. - indexpage.xml (testing\022) - indexpage.xml (testing\031) - class_receiver.xml (testing\037) - class_sender.xml (testing\037) Adjusted example output.
Diffstat (limited to 'src/cmdmapper.cpp')
-rw-r--r--src/cmdmapper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index b0ca85f..3782ff3 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -226,6 +226,16 @@ int Mapper::map(const char *n)
return !name.isEmpty() && (result=m_map.find(name)) ? *result: 0;
}
+QString Mapper::map(const int n)
+{
+ QDictIterator<int> mapIterator(m_map);
+ for (int *curVal = mapIterator.toFirst();curVal = mapIterator.current();++mapIterator)
+ {
+ if (*curVal == n || (*curVal == (n | SIMPLESECT_BIT))) return mapIterator.currentKey();
+ }
+ return NULL;
+}
+
Mapper::Mapper(const CommandMap *cm,bool caseSensitive) : m_map(89), m_cs(caseSensitive)
{
m_map.setAutoDelete(TRUE);