diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2015-05-21 17:50:41 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2015-05-21 17:50:41 +0200 |
commit | 3f77d59d6debb7b7c23ec5e39bcf21f9c7b11278 (patch) | |
tree | 087685bfc69479493971c3238e1d95ac14b16d06 | |
parent | 886904f656d3bf592dc959a654341c5f87dff356 (diff) |
More debugging of embedded objects
Change-Id: I04e8ff201e70ff16e9adeda0d24ebefd29612b29
-rw-r--r-- | src/lib/FHCollector.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/FHCollector.cpp b/src/lib/FHCollector.cpp index 7ba6f34..bc31759 100644 --- a/src/lib/FHCollector.cpp +++ b/src/lib/FHCollector.cpp @@ -29,6 +29,9 @@ #ifndef DUMP_TILE_FILLS #define DUMP_TILE_FILLS 0 #endif +#ifndef DUMP_CLIP_GROUPS +#define DUMP_CLIP_GROUPS 0 +#endif #define FH_UNINITIALIZED(pI) \ FH_ALMOST_ZERO(pI.m_minX) && FH_ALMOST_ZERO(pI.m_minY) && FH_ALMOST_ZERO(pI.m_maxY) && FH_ALMOST_ZERO(pI.m_maxX) @@ -1099,6 +1102,20 @@ void libfreehand::FHCollector::_outputClipGroup(const libfreehand::FHGroup *grou "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"; librevenge::RVNGBinaryData output((const unsigned char *)header, strlen(header)); output.append((unsigned char *)svgOutput[0].cstr(), strlen(svgOutput[0].cstr())); +#if DUMP_CLIP_GROUPS + { + librevenge::RVNGString filename; + filename.sprintf("freehandclipgroup%.4x.svg", group->m_elementsId); + FILE *f = fopen(filename.cstr(), "wb"); + if (f) + { + const unsigned char *tmpBuffer = output.getDataBuffer(); + for (unsigned long k = 0; k < output.size(); k++) + fprintf(f, "%c",tmpBuffer[k]); + fclose(f); + } + } +#endif propList.insert("draw:stroke", "none"); propList.insert("draw:fill", "bitmap"); propList.insert("librevenge:mime-type", "image/svg+xml"); |