summaryrefslogtreecommitdiffstats
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-11-18 18:00:27 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-11-18 18:00:27 (GMT)
commit8fc23878b4375546bfb6a9149f009fbe0f7da42f (patch)
tree2998696e061c0b029415b90a1018c8fc0c0be0c6 /src/rtfgen.cpp
parent64764a854d8824bb3a9714a159f5ebbd226d3a88 (diff)
downloadDoxygen-8fc23878b4375546bfb6a9149f009fbe0f7da42f.zip
Doxygen-8fc23878b4375546bfb6a9149f009fbe0f7da42f.tar.gz
Doxygen-8fc23878b4375546bfb6a9149f009fbe0f7da42f.tar.bz2
RTF lists more levels and removing extra paragraphs
- In a RTF list after the last indent a number of extra paragraphs were displayed (with e.g. bullets), these extra paragraphs are removed - Increased the number of levels conform the changes for latex (#6622)
Diffstat (limited to 'src/rtfgen.cpp')
-rw-r--r--src/rtfgen.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 34af705..2e67c26 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -287,21 +287,22 @@ void RTFGenerator::beginRTFDocument()
t << "\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
// sort styles ascending by \s-number via an intermediate QArray
- QArray<const StyleData*> array(128);
- array.fill(0);
QDictIterator<StyleData> iter(rtf_Style);
const StyleData* style;
+ unsigned maxIndex = 0;
+ for(; (style = iter.current()); ++iter)
+ {
+ unsigned index = style->index;
+ if (maxIndex < index) maxIndex = index;
+ }
+ QArray<const StyleData*> array(maxIndex + 1);
+ array.fill(0);
+ ASSERT(maxIndex < array.size());
+
+ iter.toFirst();
for(; (style = iter.current()); ++iter)
{
unsigned index = style->index;
- unsigned size = array.size();
- if (index >= size)
- {
- // +1 to add at least one element, then align up to multiple of 8
- array.resize((index + 1 + 7) & ~7);
- array.fill(0, size);
- ASSERT(index < array.size());
- }
if (array.at(index) != 0)
{
QCString key(iter.currentKey());