[Libreoffice-commits] libmspub.git: src/conv src/lib

2018-02-02 Thread David Tardon
 src/conv/svg/pub2xhtml.cpp|3 +--
 src/lib/ColorReference.h  |2 ++
 src/lib/Dash.cpp  |2 ++
 src/lib/Fill.cpp  |2 ++
 src/lib/Fill.h|1 -
 src/lib/MSPUBCollector.cpp|   12 
 src/lib/MSPUBCollector.h  |   26 ++
 src/lib/MSPUBDocument.cpp |7 ++-
 src/lib/MSPUBMetaData.cpp |1 +
 src/lib/MSPUBMetaData.h   |2 --
 src/lib/MSPUBParser.cpp   |9 ++---
 src/lib/MSPUBParser.h |7 +--
 src/lib/MSPUBParser2k.cpp |3 +++
 src/lib/MSPUBParser97.cpp |3 ++-
 src/lib/MSPUBParser97.h   |2 ++
 src/lib/PolygonUtils.cpp  |4 
 src/lib/PolygonUtils.h|7 ---
 src/lib/ShapeGroupElement.cpp |5 +
 src/lib/ShapeGroupElement.h   |3 +++
 src/lib/libmspub_utils.h  |1 -
 20 files changed, 70 insertions(+), 32 deletions(-)

New commits:
commit a20be18c6101168da5779ec0faeb045c285bab4c
Author: David Tardon 
Date:   Fri Feb 2 19:23:59 2018 +0100

iwyu: prune includes

Change-Id: I9e8af1510a54668526bf739e30cb98eb4a3b3559

diff --git a/src/conv/svg/pub2xhtml.cpp b/src/conv/svg/pub2xhtml.cpp
index 6179223..f021b39 100644
--- a/src/conv/svg/pub2xhtml.cpp
+++ b/src/conv/svg/pub2xhtml.cpp
@@ -11,9 +11,8 @@
 #include "config.h"
 #endif
 
-#include 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/src/lib/ColorReference.h b/src/lib/ColorReference.h
index 2549366..61b2a52 100644
--- a/src/lib/ColorReference.h
+++ b/src/lib/ColorReference.h
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_COLORREFERENCE_H
 #define INCLUDED_COLORREFERENCE_H
 
+#include 
+
 #include "MSPUBTypes.h"
 
 namespace libmspub
diff --git a/src/lib/Dash.cpp b/src/lib/Dash.cpp
index bae6ee1..1ca3a17 100644
--- a/src/lib/Dash.cpp
+++ b/src/lib/Dash.cpp
@@ -8,6 +8,8 @@
  */
 
 #include "Dash.h"
+
+#include "MSPUBConstants.h"
 #include "libmspub_utils.h"
 
 namespace libmspub
diff --git a/src/lib/Fill.cpp b/src/lib/Fill.cpp
index eca9633..ccb3d42 100644
--- a/src/lib/Fill.cpp
+++ b/src/lib/Fill.cpp
@@ -9,6 +9,8 @@
 
 #include "Fill.h"
 
+#include 
+
 #include "FillType.h"
 #include "MSPUBCollector.h"
 #include "libmspub_utils.h"
diff --git a/src/lib/Fill.h b/src/lib/Fill.h
index d8250bf..39c5cab 100644
--- a/src/lib/Fill.h
+++ b/src/lib/Fill.h
@@ -10,7 +10,6 @@
 #ifndef INCLUDED_FILL_H
 #define INCLUDED_FILL_H
 
-#include 
 #include 
 
 #include 
diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp
index 350f029..fae688d 100644
--- a/src/lib/MSPUBCollector.cpp
+++ b/src/lib/MSPUBCollector.cpp
@@ -9,17 +9,29 @@
 
 #include "MSPUBCollector.h"
 
+#include 
+#include 
 #include 
+#include 
 
 #include 
 
 #include 
 #include 
 
+#include "Arrow.h"
 #include "Coordinate.h"
+#include "Dash.h"
+#include "Fill.h"
+#include "Line.h"
+#include "Margins.h"
 #include "MSPUBConstants.h"
 #include "MSPUBTypes.h"
 #include "PolygonUtils.h"
+#include "Shadow.h"
+#include "ShapeGroupElement.h"
+#include "TableInfo.h"
+#include "VectorTransformation2D.h"
 #include "libmspub_utils.h"
 
 namespace libmspub
diff --git a/src/lib/MSPUBCollector.h b/src/lib/MSPUBCollector.h
index 62a40fb..a1f0db3 100644
--- a/src/lib/MSPUBCollector.h
+++ b/src/lib/MSPUBCollector.h
@@ -10,36 +10,37 @@
 #ifndef INCLUDED_MSPUBCOLLECTOR_H
 #define INCLUDED_MSPUBCOLLECTOR_H
 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
 
-#include "Arrow.h"
 #include "BorderArtInfo.h"
 #include "ColorReference.h"
-#include "Coordinate.h"
-#include "Dash.h"
 #include "EmbeddedFontInfo.h"
-#include "Fill.h"
-#include "MSPUBContentChunkType.h"
 #include "MSPUBTypes.h"
 #include "PolygonUtils.h"
-#include "Shadow.h"
-#include "ShapeGroupElement.h"
 #include "ShapeInfo.h"
 #include "ShapeType.h"
 #include "VerticalAlign.h"
-#include "libmspub_utils.h"
 
 namespace libmspub
 {
+
+class Fill;
+class ShapeGroupElement;
+class VectorTransformation2D;
+
+struct Arrow;
+struct Coordinate;
+struct Dash;
+struct Line;
+struct Shadow;
+struct TableInfo;
+
 class MSPUBCollector
 {
   friend class Fill;
@@ -200,6 +201,7 @@ private:
 public:
   static librevenge::RVNGString getColorString(const Color &);
 };
+
 } // namespace libmspub
 
 #endif /* INCLUDED_MSPUBCOLLECTOR_H */
diff --git a/src/lib/MSPUBDocument.cpp b/src/lib/MSPUBDocument.cpp
index 0f178fe..b44a558 100644
--- a/src/lib/MSPUBDocument.cpp
+++ b/src/lib/MSPUBDocument.cpp
@@ -7,13 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
-#include 
-#include 
-
 #include 
 
+#include 
+
 #include "MSPUBCollector.h"
 #include "MSPUBParser.h"
 #include "MSPUBParser2k.h"
diff --git a/src/lib/MSPUBMetaData.cpp b/src/lib/MSPUBMetaData.cpp
index ad12b7e..4152179 100644
--- a/src/lib/MSPUBMetaData.cpp
+++ b/src/lib/MSPUBMetaData.cpp
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 

[Libreoffice-commits] libmspub.git: src/conv

2017-12-30 Thread David Tardon
 src/conv/svg/Makefile.am |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 530c84c1d8bd8cdc9238c23a0c4e68cee7eac53d
Author: David Tardon 
Date:   Sat Dec 30 19:37:31 2017 +0100

fix copypasta

Change-Id: Ibdcda4d3bce06239eeaa22f240081707b17c18d3

diff --git a/src/conv/svg/Makefile.am b/src/conv/svg/Makefile.am
index 2127256..bfd2121 100644
--- a/src/conv/svg/Makefile.am
+++ b/src/conv/svg/Makefile.am
@@ -2,7 +2,7 @@ bin_PROGRAMS = pub2xhtml
 
 AM_CXXFLAGS = -I$(top_srcdir)/inc \
$(REVENGE_CFLAGS) \
-   $(REVENGE_STREAM_LIBS) \
+   $(REVENGE_STREAM_CFLAGS) \
$(DEBUG_CXXFLAGS)
 
 pub2xhtml_DEPENDENCIES = @PUB2XHTML_WIN32_RESOURCE@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libmspub.git: src/conv

2017-12-30 Thread David Tardon
 src/conv/raw/Makefile.am |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f28d5f585cc03bc1dcdffad978dd7ce903f3ff1
Author: David Tardon 
Date:   Sat Dec 30 19:36:20 2017 +0100

fix copypasta

Change-Id: Ibada0e5c6d4ba0825b5e9b66cc1391073b01df51

diff --git a/src/conv/raw/Makefile.am b/src/conv/raw/Makefile.am
index 5fbafa6..5f2a7f5 100644
--- a/src/conv/raw/Makefile.am
+++ b/src/conv/raw/Makefile.am
@@ -3,7 +3,7 @@ bin_PROGRAMS = pub2raw
 AM_CXXFLAGS = -I$(top_srcdir)/inc \
$(REVENGE_GENERATORS_CFLAGS) \
$(REVENGE_CFLAGS) \
-   $(REVENGE_STREAM_LIBS) \
+   $(REVENGE_STREAM_CFLAGS) \
$(DEBUG_CXXFLAGS)
 
 pub2raw_DEPENDENCIES = @PUB2RAW_WIN32_RESOURCE@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libmspub.git: src/conv src/lib

2017-09-06 Thread Miklos Vajna
 src/conv/raw/pub2raw.cpp   |2 
 src/conv/svg/pub2xhtml.cpp |2 
 src/lib/Fill.h |   10 
 src/lib/MSPUBCollector.cpp |   12 -
 src/lib/MSPUBParser.h  |2 
 src/lib/PolygonUtils.cpp   |  486 ++---
 src/lib/libmspub_utils.cpp |6 
 src/lib/libmspub_utils.h   |4 
 8 files changed, 262 insertions(+), 262 deletions(-)

New commits:
commit c99e38590c61677ea7c325e86bd161a984d6644d
Author: Miklos Vajna 
Date:   Wed Sep 6 09:15:17 2017 +0200

Convert 0 to nullptr where it's used as a pointer value

To make the code easier to read, because this means the remaining zeros
all mean numbers.

Change-Id: Ibced46aa923b95d500c00a8a90bd4bd3f3b0e966

diff --git a/src/conv/raw/pub2raw.cpp b/src/conv/raw/pub2raw.cpp
index 6084d27..cfc07c5 100644
--- a/src/conv/raw/pub2raw.cpp
+++ b/src/conv/raw/pub2raw.cpp
@@ -55,7 +55,7 @@ int printVersion()
 int main(int argc, char *argv[])
 {
   bool printIndentLevel = false;
-  char *file = 0;
+  char *file = nullptr;
 
   if (argc < 2)
 return printUsage();
diff --git a/src/conv/svg/pub2xhtml.cpp b/src/conv/svg/pub2xhtml.cpp
index 61349f7..6179223 100644
--- a/src/conv/svg/pub2xhtml.cpp
+++ b/src/conv/svg/pub2xhtml.cpp
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
   if (argc < 2)
 return printUsage();
 
-  char *in_file = 0, *out_file = 0;
+  char *in_file = nullptr, *out_file = nullptr;
 
   for (int i = 1; i < argc; i++)
   {
diff --git a/src/lib/Fill.h b/src/lib/Fill.h
index 5955697..1d08467 100644
--- a/src/lib/Fill.h
+++ b/src/lib/Fill.h
@@ -30,7 +30,7 @@ public:
   virtual void getProperties(librevenge::RVNGPropertyList *out) const = 0;
   virtual ~Fill() { }
 private:
-  Fill(const Fill &) : m_owner(NULL) { }
+  Fill(const Fill &) : m_owner(nullptr) { }
   Fill =(const Fill &);
 };
 
@@ -46,7 +46,7 @@ public:
   ImgFill(unsigned imgIndex, const MSPUBCollector *owner, bool isTexture, int 
rotation);
   void getProperties(librevenge::RVNGPropertyList *out) const override;
 private:
-  ImgFill(const ImgFill &) : Fill(NULL), m_imgIndex(0), m_isTexture(false), 
m_rotation(0) { }
+  ImgFill(const ImgFill &) : Fill(nullptr), m_imgIndex(0), m_isTexture(false), 
m_rotation(0) { }
   ImgFill =(const ImgFill &);
 };
 
@@ -58,7 +58,7 @@ public:
   PatternFill(unsigned imgIndex, const MSPUBCollector *owner, ColorReference 
fg, ColorReference bg);
   void getProperties(librevenge::RVNGPropertyList *out) const override;
 private:
-  PatternFill(const PatternFill &) : ImgFill(0, NULL, true, 0), 
m_fg(0x0800), m_bg(0x0800) { }
+  PatternFill(const PatternFill &) : ImgFill(0, nullptr, true, 0), 
m_fg(0x0800), m_bg(0x0800) { }
   PatternFill =(const ImgFill &);
 };
 
@@ -70,7 +70,7 @@ public:
   SolidFill(ColorReference color, double opacity, const MSPUBCollector *owner);
   void getProperties(librevenge::RVNGPropertyList *out) const override;
 private:
-  SolidFill(const SolidFill &) : Fill(NULL), m_color(0x0800), m_opacity(1) 
{ }
+  SolidFill(const SolidFill &) : Fill(nullptr), m_color(0x0800), 
m_opacity(1) { }
   SolidFill =(const SolidFill &);
 };
 
@@ -98,7 +98,7 @@ public:
   void completeComplexFill();
   void getProperties(librevenge::RVNGPropertyList *out) const override;
 private:
-  GradientFill(const GradientFill &) : Fill(NULL), m_stops(), m_angle(0), 
m_type(7), m_fillLeftVal(0.0), m_fillTopVal(0.0), m_fillRightVal(0.0), 
m_fillBottomVal(0.0) { }
+  GradientFill(const GradientFill &) : Fill(nullptr), m_stops(), m_angle(0), 
m_type(7), m_fillLeftVal(0.0), m_fillTopVal(0.0), m_fillRightVal(0.0), 
m_fillBottomVal(0.0) { }
   GradientFill =(const GradientFill &);
 };
 }
diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp
index 981d345..387db1c 100644
--- a/src/lib/MSPUBCollector.cpp
+++ b/src/lib/MSPUBCollector.cpp
@@ -377,7 +377,7 @@ 
MSPUBCollector::MSPUBCollector(librevenge::RVNGDrawingInterface *painter) :
   m_paletteColors(), m_shapeSeqNumsOrdered(),
   m_pageSeqNumsByShapeSeqNum(), m_bgShapeSeqNumsByPageSeqNum(),
   m_skipIfNotBgSeqNums(),
-  m_currentShapeGroup(NULL), m_topLevelShapes(),
+  m_currentShapeGroup(nullptr), m_topLevelShapes(),
   m_groupsBySeqNum(), m_embeddedFonts(),
   m_shapeInfosBySeqNum(), m_masterPages(),
   m_shapesWithCoordinatesRotated90(),
@@ -1158,13 +1158,13 @@ const char *MSPUBCollector::getCalculatedEncoding() 
const
   }
   // for older versions of PUB, see if we can get ICU to tell us the encoding.
   UErrorCode status = U_ZERO_ERROR;
-  UCharsetDetector *ucd = NULL;
-  const UCharsetMatch **matches = NULL;
-  const UCharsetMatch *ucm = NULL;
+  UCharsetDetector *ucd = nullptr;
+  const UCharsetMatch **matches = nullptr;
+  const UCharsetMatch *ucm = nullptr;
   ucd = ucsdet_open();
   int matchesFound = -1;
-  const char *name = NULL;
-  const char *windowsName = NULL;
+  const char *name = nullptr;
+  const char *windowsName = nullptr;
   if (m_allText.empty())
   {
 goto 

[Libreoffice-commits] libmspub.git: src/conv

2013-11-30 Thread Fridrich Štrba
 src/conv/raw/pub2raw.cpp |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 78cfbdf6bd95ba24f5f8990b28fabbe5aa9cbad5
Author: Fridrich Å trba fridrich.st...@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(--helpShows 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;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libmspub.git: src/conv src/Makefile.am

2013-11-07 Thread Fridrich Štrba
 src/Makefile.am|6 +-
 src/conv/Makefile.am   |3 +++
 src/conv/raw/Makefile.am   |4 
 src/conv/svg/Makefile.am   |4 
 src/conv/svg/pub2xhtml.cpp |2 +-
 5 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 1eebf9a725a30cd64c041533c8671f01d37d53db
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Thu Nov 7 22:37:36 2013 +0100

Make --disable-tools effective

Change-Id: Iba7371e85e1fdb17c0be5b364cbfcb9e3a5c47f9

diff --git a/src/Makefile.am b/src/Makefile.am
index 4796627..64fd45e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1 +1,5 @@
-SUBDIRS = lib conv
+SUBDIRS = lib
+
+if BUILD_TOOLS
+SUBDIRS += conv
+endif
diff --git a/src/conv/Makefile.am b/src/conv/Makefile.am
index f43c908..99a8b67 100644
--- a/src/conv/Makefile.am
+++ b/src/conv/Makefile.am
@@ -1,2 +1,5 @@
+if BUILD_TOOLS
+
 SUBDIRS = raw svg
 
+endif
diff --git a/src/conv/raw/Makefile.am b/src/conv/raw/Makefile.am
index d8a25dd..6ac2242 100644
--- a/src/conv/raw/Makefile.am
+++ b/src/conv/raw/Makefile.am
@@ -1,3 +1,5 @@
+if BUILD_TOOLS
+
 bin_PROGRAMS = pub2raw
 
 AM_CXXFLAGS = -I$(top_srcdir)/inc \
@@ -32,3 +34,5 @@ EXTRA_DIST = \
 # These may be in the builddir too
 BUILD_EXTRA_DIST = \
pub2raw.rc   
+
+endif # BUILD_TOOLS
diff --git a/src/conv/svg/Makefile.am b/src/conv/svg/Makefile.am
index 2c03601..e0406a0 100644
--- a/src/conv/svg/Makefile.am
+++ b/src/conv/svg/Makefile.am
@@ -1,3 +1,5 @@
+if BUILD_TOOLS
+
 bin_PROGRAMS = pub2xhtml
 
 AM_CXXFLAGS = -I$(top_srcdir)/inc \
@@ -30,3 +32,5 @@ EXTRA_DIST = \
 # These may be in the builddir too
 BUILD_EXTRA_DIST = \
pub2xhtml.rc
+
+endif # BUILD_TOOLS
diff --git a/src/conv/svg/pub2xhtml.cpp b/src/conv/svg/pub2xhtml.cpp
index 3955d52..ee722fc 100644
--- a/src/conv/svg/pub2xhtml.cpp
+++ b/src/conv/svg/pub2xhtml.cpp
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
   }
 
   librevenge::RVNGStringVector outputStrings;
-  librevenge::RVNGSVGDrawingGenerator generator(outputStrings, );
+  librevenge::RVNGSVGDrawingGenerator generator(outputStrings, svg);
   if (!libmspub::MSPUBDocument::parse(input, generator))
   {
 std::cerr  ERROR: SVG Generation failed!  std::endl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits