[Libreoffice-commits] libmspub.git: 2 commits - src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Nov 20 07:56:27 PST 2013
src/lib/MSPUBCollector.cpp | 2 -
src/lib/MSPUBParser.cpp | 10 +++---
src/lib/MSPUBParser2k.cpp | 74 ++++++++++++++++++++++-----------------------
src/lib/PolygonUtils.cpp | 4 +-
4 files changed, 46 insertions(+), 44 deletions(-)
New commits:
commit 4a37910aafea0a69be1377045239244d1ce0f7e0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Wed Nov 20 16:56:01 2013 +0100
Astyle
Change-Id: Iefe93634d0573d57a95c1c0b96848db2f4ec2b8c
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index c3bf61d..d6cc2c7 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1618,16 +1618,16 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
m_collector->addShapeLine(*shapeSeqNum,
topExists ? Line(ColorReference(*ptr_topColor), ptr_topWidth ? *ptr_topWidth : 9525, true) :
- Line(ColorReference(0), 0, false));
+ Line(ColorReference(0), 0, false));
m_collector->addShapeLine(*shapeSeqNum,
rightExists ? Line(ColorReference(*ptr_rightColor), ptr_rightWidth ? *ptr_rightWidth : 9525, true) :
- Line(ColorReference(0), 0, false));
+ Line(ColorReference(0), 0, false));
m_collector->addShapeLine(*shapeSeqNum,
bottomExists ? Line(ColorReference(*ptr_bottomColor), ptr_bottomWidth ? *ptr_bottomWidth : 9525, true) :
- Line(ColorReference(0), 0, false));
+ Line(ColorReference(0), 0, false));
m_collector->addShapeLine(*shapeSeqNum,
leftExists ? Line(ColorReference(*ptr_leftColor), ptr_leftWidth ? *ptr_leftWidth : 9525, true) :
- Line(ColorReference(0), 0, false));
+ Line(ColorReference(0), 0, false));
// Amazing feat of Microsoft engineering:
// The detailed interaction of four flags describes ONE true/false property!
@@ -1636,7 +1636,7 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
(*ptr_leftFlags & FLAG_USE_LEFT_INSET_PEN) &&
(!(*ptr_leftFlags & FLAG_USE_LEFT_INSET_PEN_OK) || (*ptr_leftFlags & FLAG_LEFT_INSET_PEN_OK)) &&
(*ptr_leftFlags & FLAG_LEFT_INSET_PEN))
- {
+ {
m_collector->setShapeBorderPosition(*shapeSeqNum, INSIDE_SHAPE);
}
else
diff --git a/src/lib/MSPUBParser2k.cpp b/src/lib/MSPUBParser2k.cpp
index 90a2780..974a310 100644
--- a/src/lib/MSPUBParser2k.cpp
+++ b/src/lib/MSPUBParser2k.cpp
@@ -240,10 +240,10 @@ libmspub::ShapeType libmspub::MSPUBParser2k::getShapeType(unsigned char shapeSpe
{
case 0x1:
return RIGHT_TRIANGLE;
- /*
- case 0x2:
- return GENERAL_TRIANGLE;
- */
+ /*
+ case 0x2:
+ return GENERAL_TRIANGLE;
+ */
case 0x3:
return UP_ARROW;
case 0x4:
@@ -254,10 +254,10 @@ libmspub::ShapeType libmspub::MSPUBParser2k::getShapeType(unsigned char shapeSpe
return ISOCELES_TRIANGLE;
case 0x7:
return PARALLELOGRAM;
- /*
- case 0x8:
- return TILTED_TRAPEZOID;
- */
+ /*
+ case 0x8:
+ return TILTED_TRAPEZOID;
+ */
case 0x9:
return UP_DOWN_ARROW;
case 0xA:
@@ -274,41 +274,41 @@ libmspub::ShapeType libmspub::MSPUBParser2k::getShapeType(unsigned char shapeSpe
return BENT_ARROW;
case 0x10:
return SEAL_24;
- /*
- case 0x11:
- return PIE;
- */
+ /*
+ case 0x11:
+ return PIE;
+ */
case 0x12:
return PENTAGON;
case 0x13:
return HOME_PLATE;
- /*
- case 0x14:
- return NOTCHED_TRIANGLE;
- */
+ /*
+ case 0x14:
+ return NOTCHED_TRIANGLE;
+ */
case 0x15:
return U_TURN_ARROW;
case 0x16:
return IRREGULAR_SEAL_1;
- /*
- case 0x17:
- return CHORD;
- */
+ /*
+ case 0x17:
+ return CHORD;
+ */
case 0x18:
return HEXAGON;
- /*
- case 0x19:
- return NOTCHED_RECTANGLE;
- */
- /*
- case 0x1A:
- return W_SHAPE; //This is a bizarre shape; the number of vertices depends on one of the adjust values.
- //We need to refactor our escher shape drawing routines before we can handle it.
- */
- /*
- case 0x1B:
- return ROUND_RECT_CALLOUT_2K; //This is not quite the same as the round rect. found in 2k2 and above.
- */
+ /*
+ case 0x19:
+ return NOTCHED_RECTANGLE;
+ */
+ /*
+ case 0x1A:
+ return W_SHAPE; //This is a bizarre shape; the number of vertices depends on one of the adjust values.
+ //We need to refactor our escher shape drawing routines before we can handle it.
+ */
+ /*
+ case 0x1B:
+ return ROUND_RECT_CALLOUT_2K; //This is not quite the same as the round rect. found in 2k2 and above.
+ */
case 0x1C:
return IRREGULAR_SEAL_2;
case 0x1D:
@@ -319,10 +319,10 @@ libmspub::ShapeType libmspub::MSPUBParser2k::getShapeType(unsigned char shapeSpe
return PLUS;
case 0x20:
return CUBE;
- /*
- case 0x21:
- return OVAL_CALLOUT_2K; //Not sure yet if this is the same as the 2k2 one.
- */
+ /*
+ case 0x21:
+ return OVAL_CALLOUT_2K; //Not sure yet if this is the same as the 2k2 one.
+ */
case 0x22:
return LIGHTNING_BOLT;
default:
commit 8f538353e8a2bc698fa7fb793737950a6f46afb0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Wed Nov 20 16:55:44 2013 +0100
Fold paths into property lists
Change-Id: Ic69f12aa3be7cea1047fd481b913df6ab25974f3
diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp
index d1f0832..23d8a18 100644
--- a/src/lib/MSPUBCollector.cpp
+++ b/src/lib/MSPUBCollector.cpp
@@ -832,7 +832,7 @@ boost::function<void(void)> libmspub::MSPUBCollector::paintShape(const ShapeInfo
if (ngap > 0)
props.insert("fo:column-gap", (double)ngap / EMUS_IN_INCH);
}
- m_painter->startTextObject(props, librevenge::RVNGPropertyListVector());
+ m_painter->startTextObject(props);
for (unsigned i_lines = 0; i_lines < text.size(); ++i_lines)
{
librevenge::RVNGPropertyList paraProps = getParaStyleProps(text[i_lines].style, text[i_lines].style.m_defaultCharStyleIndex);
diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp
index 591513e..2325812 100644
--- a/src/lib/PolygonUtils.cpp
+++ b/src/lib/PolygonUtils.cpp
@@ -6375,7 +6375,9 @@ void libmspub::writeCustomShape(ShapeType shapeType, librevenge::RVNGPropertyLis
vertices.append(end);
}
}
- painter->drawPath(vertices);
+ librevenge::RVNGPropertyList propList;
+ propList.insert("svg:d", vertices);
+ painter->drawPath(propList);
}
}
More information about the Libreoffice-commits
mailing list