Skip to content

Commit b3bd9e1

Browse files
committed
issue #8657 Plantuml ditaa diagram is not visible in refman.pdf
- Using `find` instead of explicit loop - documentation (instead of #8662)
1 parent 1c4cb5f commit b3bd9e1

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

doc/commands.doc

+6-4
Original file line numberDiff line numberDiff line change
@@ -2966,13 +2966,15 @@ class Receiver
29662966
\note You need to install Java and the PlantUML's jar file,
29672967
if you want to use this command. When using PlantUML in \LaTeX you have to download
29682968
some more `jar` files, for details see the PlantUML documentation.
2969-
The location of the jar file should be specified using
2970-
\ref cfg_plantuml_jar_path "PLANTUML_JAR_PATH".
2969+
This also is valid for the `<engine>`s `latex` and `math`.
2970+
The location of the PlantUML file should be specified using
2971+
\ref cfg_plantuml_jar_path "PLANTUML_JAR_PATH". The other jar files should also reside
2972+
in this directory.
29712973

29722974
Not all diagrams can be created with the PlantUML `@startuml` command but need another
29732975
PlantUML `@start...` command. This will look like `@start<engine>` where currently supported are
2974-
the following `<engine>`'s: `uml`, `bpm`, `wire`, `dot`, `ditaa`, `salt`, `math`, `latex`,
2975-
`gantt`, `mindmap`, `wbs`, `yaml`, `creole`, `json`, `flow`a, `board` and `git`.s
2976+
the following `<engine>`s: `uml`, `bpm`, `wire`, `dot`, `ditaa`, `salt`, `math`, `latex`,
2977+
`gantt`, `mindmap`, `wbs`, `yaml`, `creole`, `json`, `flow`, `board` and `git`.
29762978
By default the `<engine>` is `uml`. The `<engine>` can be specified as an option.
29772979
Also the file to write the resulting image to can be specified by means of an option, see the
29782980
description of the first (optional) argument for details.

src/docparser.cpp

+7-14
Original file line numberDiff line numberDiff line change
@@ -5575,20 +5575,13 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
55755575
}
55765576
else if (engine == "uml")
55775577
{
5578-
// check on ditaa in first line
5579-
if (!trimmedVerb.isEmpty())
5580-
{
5581-
const char *p = trimmedVerb.data();
5582-
int i=0;
5583-
while (*p)
5584-
{
5585-
if (*p=='\n') break;
5586-
i++;
5587-
p++;
5588-
}
5589-
QCString firstLine = trimmedVerb.left(i);
5590-
if (firstLine.stripWhiteSpace() == "ditaa") dv->setUseBitmap(true);
5591-
}
5578+
int i = trimmedVerb.find('\n');
5579+
QCString firstLine;
5580+
if (i == -1)
5581+
firstLine = trimmedVerb;
5582+
else
5583+
firstLine = trimmedVerb.left(i);
5584+
if (firstLine.stripWhiteSpace() == "ditaa") dv->setUseBitmap(true);
55925585
}
55935586
dv->setText(trimmedVerb);
55945587
dv->setWidth(width);

0 commit comments

Comments
 (0)