[Libreoffice-commits] libmspub.git: src/conv
Fridrich Å trba
fridrich.strba at bluewin.ch
Sat Nov 30 13:38:35 PST 2013
src/conv/raw/pub2raw.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 78cfbdf6bd95ba24f5f8990b28fabbe5aa9cbad5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Sat Nov 30 22:38:07 2013 +0100
Allow pub2raw output callgraph
Change-Id: I03482201ff551ddb5849cc29f844ba8271060485
diff --git a/src/conv/raw/pub2raw.cpp b/src/conv/raw/pub2raw.cpp
index dceb472..104c792 100644
--- a/src/conv/raw/pub2raw.cpp
+++ b/src/conv/raw/pub2raw.cpp
@@ -44,6 +44,7 @@ int printUsage()
printf("Usage: pub2raw [OPTION] <Microsoft Publisher Document>\n");
printf("\n");
printf("Options:\n");
+ printf("--callgraph Display the call graph nesting level\n");
printf("--help Shows this help message\n");
return -1;
}
@@ -52,14 +53,17 @@ int printUsage()
int main(int argc, char *argv[])
{
+ bool printIndentLevel = false;
+ char *file = 0;
+
if (argc < 2)
return printUsage();
- char *file = 0;
-
for (int i = 1; i < argc; i++)
{
- if (!file && strncmp(argv[i], "--", 2))
+ if (!strcmp(argv[i], "--callgraph"))
+ printIndentLevel = true;
+ else if (!file && strncmp(argv[i], "--", 2))
file = argv[i];
else
return printUsage();
@@ -76,7 +80,7 @@ int main(int argc, char *argv[])
return 1;
}
- librevenge::RVNGRawDrawingGenerator painter;
+ librevenge::RVNGRawDrawingGenerator painter(printIndentLevel);
libmspub::MSPUBDocument::parse(&input, &painter);
return 0;
More information about the Libreoffice-commits
mailing list