summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2014-02-03 13:42:11 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-02-03 13:42:11 +0100
commite6784950aa4ce27414de5fef419bdf5a4a9c4c14 (patch)
tree8cb4f37f5bb1696d62a8a7b831a78fcd3f031ab9 /src/lib
parent34abd70d8da0d2f567978df3a770406c737c7928 (diff)
Astyle action
Change-Id: Ia2abc5ed73b7df83c30e493176b1fbaeb73be16b
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/VDXParser.cpp4
-rw-r--r--src/lib/VSD5Parser.cpp8
-rw-r--r--src/lib/VSD6Parser.cpp8
-rw-r--r--src/lib/VSDCharacterList.cpp12
-rw-r--r--src/lib/VSDContentCollector.cpp110
-rw-r--r--src/lib/VSDContentCollector.h2
-rw-r--r--src/lib/VSDGeometryList.cpp38
-rw-r--r--src/lib/VSDOutputElementList.cpp4
-rw-r--r--src/lib/VSDParagraphList.cpp6
-rw-r--r--src/lib/VSDParser.cpp12
-rw-r--r--src/lib/VSDSVGGenerator.cpp56
-rw-r--r--src/lib/VSDStylesCollector.cpp116
-rw-r--r--src/lib/VSDXMLHelper.cpp2
-rw-r--r--src/lib/VSDXMLParserBase.cpp18
-rw-r--r--src/lib/VSDXMLTokenMap.cpp8
-rw-r--r--src/lib/VSDXParser.cpp4
-rw-r--r--src/lib/VSDZipStream.cpp2
-rw-r--r--src/lib/VisioDocument.cpp2
18 files changed, 206 insertions, 206 deletions
diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
index bef0b59..588d5e9 100644
--- a/src/lib/VDXParser.cpp
+++ b/src/lib/VDXParser.cpp
@@ -458,7 +458,7 @@ void libvisio::VDXParser::readFillAndShadow(xmlTextReaderPtr reader)
VSD_DEBUG_MSG(("Found stencil fill\n"));
}
m_shape.m_fillStyle.override(VSDOptionalFillStyle(fillColourFG, fillColourBG, fillPattern, fillFGTransparency, fillBGTransparency,
- shadowColourFG, shadowPattern, shadowOffsetX, shadowOffsetY));
+ shadowColourFG, shadowPattern, shadowOffsetX, shadowOffsetY));
}
}
@@ -804,7 +804,7 @@ void libvisio::VDXParser::readTextBlock(xmlTextReaderPtr reader)
verticalAlign, !!bgClrId, bgColour, defaultTabStop, textDirection);
else
m_shape.m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin,
- verticalAlign, !!bgClrId, bgColour, defaultTabStop, textDirection));
+ verticalAlign, !!bgClrId, bgColour, defaultTabStop, textDirection));
}
xmlChar *libvisio::VDXParser::readStringData(xmlTextReaderPtr reader)
diff --git a/src/lib/VSD5Parser.cpp b/src/lib/VSD5Parser.cpp
index 1ccb7d8..219595a 100644
--- a/src/lib/VSD5Parser.cpp
+++ b/src/lib/VSD5Parser.cpp
@@ -278,8 +278,8 @@ void libvisio::VSD5Parser::readCharIX(WPXInputStream *input)
}
m_shape.m_charStyle.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize,
- bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
- allcaps, initcaps, smallcaps, superscript, subscript));
+ bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
+ allcaps, initcaps, smallcaps, superscript, subscript));
m_shape.m_charList.addCharIX(m_header.id, m_header.level, charCount, font, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript);
@@ -314,7 +314,7 @@ void libvisio::VSD5Parser::readFillAndShadow(WPXInputStream *input)
shadowOffsetY = m_shadowOffsetY;
}
m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, 0.0,
- 0.0, shfgc, shadowPattern, shadowOffsetX, shadowOffsetY));
+ 0.0, shfgc, shadowPattern, shadowOffsetX, shadowOffsetY));
}
}
@@ -406,7 +406,7 @@ void libvisio::VSD5Parser::readTextBlock(WPXInputStream *input)
verticalAlign, isBgFilled, c, 0.0, (unsigned char)0);
else
m_shape.m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin,
- verticalAlign, isBgFilled, c, 0.0, (unsigned char)0));
+ verticalAlign, isBgFilled, c, 0.0, (unsigned char)0));
}
void libvisio::VSD5Parser::readTextField(WPXInputStream *input)
diff --git a/src/lib/VSD6Parser.cpp b/src/lib/VSD6Parser.cpp
index a34862b..1de9283 100644
--- a/src/lib/VSD6Parser.cpp
+++ b/src/lib/VSD6Parser.cpp
@@ -161,8 +161,8 @@ void libvisio::VSD6Parser::readCharIX(WPXInputStream *input)
}
m_shape.m_charStyle.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize,
- bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
- allcaps, initcaps, smallcaps, superscript, subscript));
+ bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
+ allcaps, initcaps, smallcaps, superscript, subscript));
m_shape.m_charList.addCharIX(m_header.id, m_header.level, charCount, font, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript);
@@ -197,7 +197,7 @@ void libvisio::VSD6Parser::readParaIX(WPXInputStream *input)
}
m_shape.m_paraStyle.override(VSDOptionalParaStyle(charCount, indFirst, indLeft, indRight,
- spLine, spBefore, spAfter, align, (unsigned)0));
+ spLine, spBefore, spAfter, align, (unsigned)0));
m_shape.m_paraList.addParaIX(m_header.id, m_header.level, charCount, indFirst, indLeft, indRight,
spLine, spBefore, spAfter, align, (unsigned)0);
}
@@ -267,7 +267,7 @@ void libvisio::VSD6Parser::readFillAndShadow(WPXInputStream *input)
shadowOffsetY = m_shadowOffsetY;
}
m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency,
- fillBGTransparency, shadowFG, shadowPattern, shadowOffsetX, shadowOffsetY));
+ fillBGTransparency, shadowFG, shadowPattern, shadowOffsetX, shadowOffsetY));
}
}
diff --git a/src/lib/VSDCharacterList.cpp b/src/lib/VSDCharacterList.cpp
index bdec705..72bb0ce 100644
--- a/src/lib/VSDCharacterList.cpp
+++ b/src/lib/VSDCharacterList.cpp
@@ -124,11 +124,11 @@ libvisio::VSDCharacterList::~VSDCharacterList()
}
void libvisio::VSDCharacterList::addCharIX(unsigned id, unsigned level, unsigned charCount,
- const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize,
- const boost::optional<bool> &bold, const boost::optional<bool> &italic, const boost::optional<bool> &underline,
- const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout,
- const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
- const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
+ const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize,
+ const boost::optional<bool> &bold, const boost::optional<bool> &italic, const boost::optional<bool> &underline,
+ const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout,
+ const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
+ const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
{
VSDCharIX *tmpElement = dynamic_cast<VSDCharIX *>(m_elements[id]);
if (!tmpElement)
@@ -141,7 +141,7 @@ void libvisio::VSDCharacterList::addCharIX(unsigned id, unsigned level, unsigned
}
else
tmpElement->m_style.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize, bold, italic, underline,
- doubleunderline, strikeout, doublestrikeout, allcaps, initcaps, smallcaps, superscript, subscript));
+ doubleunderline, strikeout, doublestrikeout, allcaps, initcaps, smallcaps, superscript, subscript));
}
void libvisio::VSDCharacterList::addCharIX(unsigned id, unsigned level, const VSDOptionalCharStyle &style)
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 6063fe2..09d6654 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -457,7 +457,7 @@ void libvisio::VSDContentCollector::_flushText()
if (m_paraFormats.empty())
m_paraFormats.push_back(m_defaultParaStyle);
- unsigned numCharsInText = (unsigned)(m_textFormat == VSD_TEXT_UTF16 ? m_textStream.size() / 2 : m_textStream.size());
+ unsigned numCharsInText = (unsigned)(m_textFormat == VSD_TEXT_UTF16 ? m_textStream.size() / 2 : m_textStream.size());
for (unsigned iChar = 0; iChar < m_charFormats.size(); iChar++)
{
@@ -467,7 +467,7 @@ void libvisio::VSDContentCollector::_flushText()
m_charFormats[iChar].charCount = numCharsInText;
}
- numCharsInText = (unsigned)(m_textFormat == VSD_TEXT_UTF16 ? m_textStream.size() / 2 : m_textStream.size());
+ numCharsInText = (unsigned)(m_textFormat == VSD_TEXT_UTF16 ? m_textStream.size() / 2 : m_textStream.size());
for (unsigned iPara = 0; iPara < m_paraFormats.size(); iPara++)
{
@@ -593,7 +593,7 @@ void libvisio::VSDContentCollector::_flushText()
if (tmpBuffer.size() >= 2)
{
if (tmpBuffer[tmpBuffer.size() - 1] == 0 && (tmpBuffer[tmpBuffer.size() - 2] == 0x0a ||
- tmpBuffer[tmpBuffer.size() - 2] == '\n' || tmpBuffer[tmpBuffer.size() - 2] == 0x0e))
+ tmpBuffer[tmpBuffer.size() - 2] == '\n' || tmpBuffer[tmpBuffer.size() - 2] == 0x0e))
{
tmpBuffer.pop_back();
tmpBuffer.pop_back();
@@ -1053,24 +1053,24 @@ void libvisio::VSDContentCollector::collectRelQuadBezTo(unsigned /* id */, unsig
}
void libvisio::VSDContentCollector::collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
- const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker, const boost::optional<unsigned char> &lineCap)
+ const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker, const boost::optional<unsigned char> &lineCap)
{
_handleLevelChange(level);
m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap));
}
void libvisio::VSDContentCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
- const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
- const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
- const boost::optional<double> &shadowOffsetY)
+ const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
+ const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
+ const boost::optional<double> &shadowOffsetY)
{
_handleLevelChange(level);
m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shfgc, shadowPattern, shadowOffsetX, shadowOffsetY));
}
void libvisio::VSDContentCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
- const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
- const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc)
+ const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
+ const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc)
{
collectFillAndShadow(level, colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowPattern, shfgc, m_shadowOffsetX, m_shadowOffsetY);
}
@@ -1125,7 +1125,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const WPXBinaryData &bina
if (m_foreignType == 1)
{
- switch(m_foreignFormat)
+ switch (m_foreignFormat)
{
case 0:
case 255:
@@ -1165,7 +1165,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const WPXBinaryData &bina
::WPXString filename;
if (m_foreignType == 1)
{
- switch(m_foreignFormat)
+ switch (m_foreignFormat)
{
case 0:
case 255:
@@ -1188,7 +1188,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const WPXBinaryData &bina
break;
}
}
- else if (m_foreignType == 0 || m_foreignType == 4)
+ else if (m_foreignType == 0 || m_foreignType == 4)
{
const unsigned char *tmpBinData = m_currentForeignData.getDataBuffer();
// Check for EMF signature
@@ -1383,7 +1383,7 @@ void libvisio::VSDContentCollector::_outputLinearBezierSegment(const std::vector
}
void libvisio::VSDContentCollector::_generateBezierSegmentsFromNURBS(unsigned degree,
- const std::vector<std::pair<double, double> > &controlPoints, const std::vector<double> &knotVector)
+ const std::vector<std::pair<double, double> > &controlPoints, const std::vector<double> &knotVector)
{
if (controlPoints.empty() || knotVector.empty() || !degree)
return;
@@ -1486,7 +1486,7 @@ double libvisio::VSDContentCollector::_NURBSBasis(unsigned knot, unsigned degree
#define VSD_NUM_POLYLINES_PER_KNOT 100
void libvisio::VSDContentCollector::_generatePolylineFromNURBS(unsigned degree, const std::vector<std::pair<double, double> > &controlPoints,
- const std::vector<double> &knotVector, const std::vector<double> &weights)
+ const std::vector<double> &knotVector, const std::vector<double> &weights)
{
if (m_noShow)
return;
@@ -1537,8 +1537,8 @@ bool libvisio::VSDContentCollector::_isUniform(const std::vector<double> &weight
}
void libvisio::VSDContentCollector::collectNURBSTo(unsigned /* id */, unsigned level, double x2, double y2,
- unsigned char xType, unsigned char yType, unsigned degree, const std::vector<std::pair<double, double> > &ctrlPnts,
- const std::vector<double> &kntVec, const std::vector<double> &weights)
+ unsigned char xType, unsigned char yType, unsigned degree, const std::vector<std::pair<double, double> > &ctrlPnts,
+ const std::vector<double> &kntVec, const std::vector<double> &weights)
{
_handleLevelChange(level);
@@ -1572,7 +1572,7 @@ void libvisio::VSDContentCollector::collectNURBSTo(unsigned /* id */, unsigned l
// Let knotVector run from 0 to 1
double firstKnot = knotVector[0];
double lastKnot = knotVector.back()-knotVector[0];
- for(std::vector<double>::iterator knot = knotVector.begin(); knot != knotVector.end(); ++knot)
+ for (std::vector<double>::iterator knot = knotVector.begin(); knot != knotVector.end(); ++knot)
{
*knot -= firstKnot;
*knot /= lastKnot;
@@ -2102,8 +2102,8 @@ void libvisio::VSDContentCollector::collectText(unsigned level, const WPXBinaryD
}
void libvisio::VSDContentCollector::collectParaIX(unsigned /* id */ , unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
- const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine, const boost::optional<double> &spBefore,
- const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
+ const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine, const boost::optional<double> &spBefore,
+ const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
{
_handleLevelChange(level);
VSDParaStyle format(m_defaultParaStyle);
@@ -2113,17 +2113,17 @@ void libvisio::VSDContentCollector::collectParaIX(unsigned /* id */ , unsigned l
}
void libvisio::VSDContentCollector::collectDefaultParaStyle(unsigned charCount, const boost::optional<double> &indFirst,
- const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine, const boost::optional<double> &spBefore,
- const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
+ const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine, const boost::optional<double> &spBefore,
+ const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
{
m_defaultParaStyle.override(VSDOptionalParaStyle(charCount, indFirst, indLeft, indRight, spLine, spBefore, spAfter, align, flags));
}
void libvisio::VSDContentCollector::collectCharIX(unsigned /* id */ , unsigned level, unsigned charCount,
- const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
- const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout,
- const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
- const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
+ const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
+ const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout,
+ const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
+ const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
{
_handleLevelChange(level);
VSDCharStyle format(m_defaultCharStyle);
@@ -2134,19 +2134,19 @@ void libvisio::VSDContentCollector::collectCharIX(unsigned /* id */ , unsigned l
}
void libvisio::VSDContentCollector::collectDefaultCharStyle(unsigned charCount,
- const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
- const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout,
- const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
- const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
+ const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
+ const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout,
+ const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
+ const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
{
m_defaultCharStyle.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize, bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
- allcaps, initcaps, smallcaps, superscript, subscript));
+ allcaps, initcaps, smallcaps, superscript, subscript));
}
void libvisio::VSDContentCollector::collectTextBlock(unsigned level, const boost::optional<double> &leftMargin, const boost::optional<double> &rightMargin,
- const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin, const boost::optional<unsigned char> &verticalAlign,
- const boost::optional<bool> &isBgFilled, const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
- const boost::optional<unsigned char> &textDirection)
+ const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin, const boost::optional<unsigned char> &verticalAlign,
+ const boost::optional<bool> &isBgFilled, const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
+ const boost::optional<unsigned char> &textDirection)
{
_handleLevelChange(level);
m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin, verticalAlign, isBgFilled, bgColour, defaultTabStop, textDirection));
@@ -2195,17 +2195,17 @@ void libvisio::VSDContentCollector::collectStyleSheet(unsigned id, unsigned leve
}
void libvisio::VSDContentCollector::collectLineStyle(unsigned /* level */, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c,
- const boost::optional<unsigned char> &linePattern, const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
- const boost::optional<unsigned char> &lineCap)
+ const boost::optional<unsigned char> &linePattern, const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
+ const boost::optional<unsigned char> &lineCap)
{
VSDOptionalLineStyle lineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap);
m_styles.addLineStyle(m_currentStyleSheet, lineStyle);
}
void libvisio::VSDContentCollector::collectFillStyle(unsigned /* level */, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
- const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
- const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
- const boost::optional<double> &shadowOffsetY)
+ const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
+ const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
+ const boost::optional<double> &shadowOffsetY)
{
VSDOptionalFillStyle fillStyle(colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shfgc, shadowPattern, shadowOffsetX, shadowOffsetY);
m_styles.addFillStyle(m_currentStyleSheet, fillStyle);
@@ -2213,16 +2213,16 @@ void libvisio::VSDContentCollector::collectFillStyle(unsigned /* level */, const
}
void libvisio::VSDContentCollector::collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
- const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
- const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc)
+ const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
+ const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc)
{
collectFillStyle(level, colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowPattern, shfgc, m_shadowOffsetX, m_shadowOffsetY);
}
void libvisio::VSDContentCollector::collectParaIXStyle(unsigned /* id */, unsigned /* level */, unsigned charCount,
- const boost::optional<double> &indFirst, const boost::optional<double> &indLeft, const boost::optional<double> &indRight,
- const boost::optional<double> &spLine, const boost::optional<double> &spBefore, const boost::optional<double> &spAfter,
- const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
+ const boost::optional<double> &indFirst, const boost::optional<double> &indLeft, const boost::optional<double> &indRight,
+ const boost::optional<double> &spLine, const boost::optional<double> &spBefore, const boost::optional<double> &spAfter,
+ const boost::optional<unsigned char> &align, const boost::optional<unsigned> &flags)
{
VSDOptionalParaStyle paraStyle(charCount, indFirst, indLeft, indRight, spLine, spBefore, spAfter, align, flags);
m_styles.addParaStyle(m_currentStyleSheet, paraStyle);
@@ -2230,11 +2230,11 @@ void libvisio::VSDContentCollector::collectParaIXStyle(unsigned /* id */, unsign
void libvisio::VSDContentCollector::collectCharIXStyle(unsigned /* id */, unsigned /* level */, unsigned charCount,
- const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize,
- const boost::optional<bool> &bold, const boost::optional<bool> &italic, const boost::optional<bool> &underline,
- const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout,
- const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
- const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
+ const boost::optional<VSDName> &font, const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize,
+ const boost::optional<bool> &bold, const boost::optional<bool> &italic, const boost::optional<bool> &underline,
+ const boost::optional<bool> &doubleunderline, const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout,
+ const boost::optional<bool> &allcaps, const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps,
+ const boost::optional<bool> &superscript, const boost::optional<bool> &subscript)
{
VSDOptionalCharStyle charStyle(charCount, font, fontColour, fontSize, bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript);
@@ -2242,9 +2242,9 @@ void libvisio::VSDContentCollector::collectCharIXStyle(unsigned /* id */, unsign
}
void libvisio::VSDContentCollector::collectTextBlockStyle(unsigned /* level */, const boost::optional<double> &leftMargin, const boost::optional<double> &rightMargin,
- const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin, const boost::optional<unsigned char> &verticalAlign,
- const boost::optional<bool> &isBgFilled, const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
- const boost::optional<unsigned char> &textDirection)
+ const boost::optional<double> &topMargin, const boost::optional<double> &bottomMargin, const boost::optional<unsigned char> &verticalAlign,
+ const boost::optional<bool> &isBgFilled, const boost::optional<Colour> &bgColour, const boost::optional<double> &defaultTabStop,
+ const boost::optional<unsigned char> &textDirection)
{
VSDOptionalTextBlockStyle textBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin, verticalAlign, isBgFilled, bgColour, defaultTabStop, textDirection);
m_styles.addTextBlockStyle(m_currentStyleSheet, textBlockStyle);
@@ -2521,7 +2521,7 @@ void libvisio::VSDContentCollector::_fillAndShadowProperties(const VSDFillStyle
styleProps.insert("libwpg:end-opacity", 1, WPX_PERCENT);
styleProps.insert("draw:border", 0, WPX_PERCENT);
- switch(style.pattern)
+ switch (style.pattern)
{
case 25:
styleProps.insert("draw:angle", 270);
@@ -2586,7 +2586,7 @@ void libvisio::VSDContentCollector::_fillAndShadowProperties(const VSDFillStyle
styleProps.insert("libwpg:end-opacity", 1, WPX_PERCENT);
styleProps.insert("draw:border", 0, WPX_PERCENT);
- switch(style.pattern)
+ switch (style.pattern)
{
case 36:
styleProps.insert("svg:cx", 0, WPX_PERCENT);
@@ -2773,7 +2773,7 @@ void libvisio::VSDContentCollector::endPages()
m_pages.draw(m_painter);
}
-bool libvisio::VSDContentCollector::parseFormatId( const char *formatString, unsigned short &result )
+bool libvisio::VSDContentCollector::parseFormatId(const char *formatString, unsigned short &result)
{
using namespace ::boost::spirit::classic;
@@ -2796,7 +2796,7 @@ bool libvisio::VSDContentCollector::parseFormatId( const char *formatString, uns
)
)>> end_p,
// End grammar
- space_p).full )
+ space_p).full)
{
return true;
}
diff --git a/src/lib/VSDContentCollector.h b/src/lib/VSDContentCollector.h
index 4889770..73db5c9 100644
--- a/src/lib/VSDContentCollector.h
+++ b/src/lib/VSDContentCollector.h
@@ -217,7 +217,7 @@ private:
void appendCharacters(WPXString &text, const std::vector<unsigned char> &characters, TextFormat format);
void appendCharacters(WPXString &text, const std::vector<unsigned char> &characters);
void _convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format);
- bool parseFormatId( const char *formatString, unsigned short &result );
+ bool parseFormatId(const char *formatString, unsigned short &result);
void _appendField(WPXString &text);
// NURBS processing functions
diff --git a/src/lib/VSDGeometryList.cpp b/src/lib/VSDGeometryList.cpp
index 89181b5..19b2836 100644
--- a/src/lib/VSDGeometryList.cpp
+++ b/src/lib/VSDGeometryList.cpp
@@ -615,7 +615,7 @@ libvisio::VSDGeometryList::~VSDGeometryList()
}
void libvisio::VSDGeometryList::addGeometry(unsigned id, unsigned level, const boost::optional<bool> &noFill,
- const boost::optional<bool> &noLine, const boost::optional<bool> &noShow)
+ const boost::optional<bool> &noLine, const boost::optional<bool> &noShow)
{
VSDGeometry *tmpElement = dynamic_cast<VSDGeometry *>(m_elements[id]);
if (!tmpElement)
@@ -638,7 +638,7 @@ void libvisio::VSDGeometryList::addEmpty(unsigned id, unsigned level)
}
void libvisio::VSDGeometryList::addMoveTo(unsigned id, unsigned level, const boost::optional<double> &x,
- const boost::optional<double> &y)
+ const boost::optional<double> &y)
{
VSDMoveTo *tmpElement = dynamic_cast<VSDMoveTo *>(m_elements[id]);
if (!tmpElement)
@@ -669,7 +669,7 @@ void libvisio::VSDGeometryList::addLineTo(unsigned id, unsigned level, const boo
}
void libvisio::VSDGeometryList::addArcTo(unsigned id, unsigned level, const boost::optional<double> &x2,
- const boost::optional<double> &y2, const boost::optional<double> &bow)
+ const boost::optional<double> &y2, const boost::optional<double> &bow)
{
VSDArcTo *tmpElement = dynamic_cast<VSDArcTo *>(m_elements[id]);
if (!tmpElement)
@@ -686,7 +686,7 @@ void libvisio::VSDGeometryList::addArcTo(unsigned id, unsigned level, const boos
}
void libvisio::VSDGeometryList::addNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree,
- const std::vector<std::pair<double, double> > &controlPoints, const std::vector<double> &knotVector, const std::vector<double> &weights)
+ const std::vector<std::pair<double, double> > &controlPoints, const std::vector<double> &knotVector, const std::vector<double> &weights)
{
clearElement(id);
m_elements[id] = new VSDNURBSTo1(id, level, x2, y2, xType, yType, degree, controlPoints, knotVector, weights);
@@ -699,8 +699,8 @@ void libvisio::VSDGeometryList::addNURBSTo(unsigned id, unsigned level, double x
}
void libvisio::VSDGeometryList::addNURBSTo(unsigned id, unsigned level, const boost::optional<double> &x2, const boost::optional<double> &y2,
- const boost::optional<double> &knot, const boost::optional<double> &knotPrev, const boost::optional<double> &weight,
- const boost::optional<double> &weightPrev, const boost::optional<NURBSData> &data)
+ const boost::optional<double> &knot, const boost::optional<double> &knotPrev, const boost::optional<double> &weight,
+ const boost::optional<double> &weightPrev, const boost::optional<NURBSData> &data)
{
VSDNURBSTo3 *tmpElement = dynamic_cast<VSDNURBSTo3 *>(m_elements[id]);
if (!tmpElement)
@@ -721,7 +721,7 @@ void libvisio::VSDGeometryList::addNURBSTo(unsigned id, unsigned level, const bo
}
void libvisio::VSDGeometryList::addPolylineTo(unsigned id , unsigned level, double x, double y, unsigned char xType, unsigned char yType,
- const std::vector<std::pair<double, double> > &points)
+ const std::vector<std::pair<double, double> > &points)
{
clearElement(id);
m_elements[id] = new VSDPolylineTo1(id, level, x, y, xType, yType, points);
@@ -750,8 +750,8 @@ void libvisio::VSDGeometryList::addPolylineTo(unsigned id , unsigned level, boos
}
void libvisio::VSDGeometryList::addEllipse(unsigned id, unsigned level, const boost::optional<double> &cx,
- const boost::optional<double> &cy,const boost::optional<double> &xleft, const boost::optional<double> &yleft,
- const boost::optional<double> &xtop, const boost::optional<double> &ytop)
+ const boost::optional<double> &cy,const boost::optional<double> &xleft, const boost::optional<double> &yleft,
+ const boost::optional<double> &xtop, const boost::optional<double> &ytop)
{
VSDEllipse *tmpElement = dynamic_cast<VSDEllipse *>(m_elements[id]);
if (!tmpElement)
@@ -771,8 +771,8 @@ void libvisio::VSDGeometryList::addEllipse(unsigned id, unsigned level, const bo
}
void libvisio::VSDGeometryList::addEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3,
- const boost::optional<double> &y3, const boost::optional<double> &x2, const boost::optional<double> &y2,
- const boost::optional<double> &angle, const boost::optional<double> &ecc)
+ const boost::optional<double> &y3, const boost::optional<double> &x2, const boost::optional<double> &y2,
+ const boost::optional<double> &angle, const boost::optional<double> &ecc)
{
VSDEllipticalArcTo *tmpElement = dynamic_cast<VSDEllipticalArcTo *>(m_elements[id]);
if (!tmpElement)
@@ -792,8 +792,8 @@ void libvisio::VSDGeometryList::addEllipticalArcTo(unsigned id, unsigned level,
}
void libvisio::VSDGeometryList::addSplineStart(unsigned id, unsigned level, const boost::optional<double> &x,
- const boost::optional<double> &y, const boost::optional<double> &secondKnot, const boost::optional<double> &firstKnot,
- const boost::optional<double> &lastKnot, const boost::optional<unsigned> &degree)
+ const boost::optional<double> &y, const boost::optional<double> &secondKnot, const boost::optional<double> &firstKnot,
+ const boost::optional<double> &lastKnot, const boost::optional<unsigned> &degree)
{
VSDSplineStart *tmpElement = dynamic_cast<VSDSplineStart *>(m_elements[id]);
if (!tmpElement)
@@ -813,7 +813,7 @@ void libvisio::VSDGeometryList::addSplineStart(unsigned id, unsigned level, cons
}
void libvisio::VSDGeometryList::addSplineKnot(unsigned id, unsigned level, const boost::optional<double> &x,
- const boost::optional<double> &y, const boost::optional<double> &knot)
+ const boost::optional<double> &y, const boost::optional<double> &knot)
{
VSDSplineKnot *tmpElement = dynamic_cast<VSDSplineKnot *>(m_elements[id]);
if (!tmpElement)
@@ -830,7 +830,7 @@ void libvisio::VSDGeometryList::addSplineKnot(unsigned id, unsigned level, const
}
void libvisio::VSDGeometryList::addInfiniteLine(unsigned id, unsigned level, const boost::optional<double> &x1,
- const boost::optional<double> &y1, const boost::optional<double> &x2, const boost::optional<double> &y2)
+ const boost::optional<double> &y1, const boost::optional<double> &x2, const boost::optional<double> &y2)
{
VSDInfiniteLine *tmpElement = dynamic_cast<VSDInfiniteLine *>(m_elements[id]);
if (!tmpElement)
@@ -848,8 +848,8 @@ void libvisio::VSDGeometryList::addInfiniteLine(unsigned id, unsigned level, con
}
void libvisio::VSDGeometryList::addRelCubBezTo(unsigned id, unsigned level, const boost::optional<double> &x,
- const boost::optional<double> &y, const boost::optional<double> &a, const boost::optional<double> &b,
- const boost::optional<double> &c, const boost::optional<double> &d)
+ const boost::optional<double> &y, const boost::optional<double> &a, const boost::optional<double> &b,
+ const boost::optional<double> &c, const boost::optional<double> &d)
{
VSDRelCubBezTo *tmpElement = dynamic_cast<VSDRelCubBezTo *>(m_elements[id]);
if (!tmpElement)
@@ -869,8 +869,8 @@ void libvisio::VSDGeometryList::addRelCubBezTo(unsigned id, unsigned level, cons
}
void libvisio::VSDGeometryList::addRelEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3,
- const boost::optional<double> &y3, const boost::optional<double> &x2, const boost::optional<double> &y2,
- const boost::optional<double> &angle, const boost::optional<double> &ecc)
+ const boost::optional<double> &y3, const boost::optional<double> &x2, const boost::optional<double> &y2,
+ const boost::optional<double> &angle, const boost::optional<double> &ecc)
{
VSDRelEllipticalArcTo *tmpElement = dynamic_cast<VSDRelEllipticalArcTo *>(m_elements[id]);
if (!tmpElement)
diff --git a/src/lib/VSDOutputElementList.cpp b/src/lib/VSDOutputElementList.cpp
index 7ec9e13..d63a8b3 100644
--- a/src/lib/VSDOutputElementList.cpp
+++ b/src/lib/VSDOutputElementList.cpp
@@ -349,7 +349,7 @@ libvisio::VSDOutputElementList::VSDOutputElementList(const libvisio::VSDOutputEl
libvisio::VSDOutputElementList &libvisio::VSDOutputElementList::operator=(const libvisio::VSDOutputElementList &elementList)
{
for (std::vector<VSDOutputElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter)
- delete (*iter);
+ delete(*iter);
m_elements.clear();
@@ -368,7 +368,7 @@ void libvisio::VSDOutputElementList::append(const libvisio::VSDOutputElementList
libvisio::VSDOutputElementList::~VSDOutputElementList()
{
for (std::vector<VSDOutputElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter)
- delete (*iter);
+ delete(*iter);
m_elements.clear();
}
diff --git a/src/lib/VSDParagraphList.cpp b/src/lib/VSDParagraphList.cpp
index b1b1507..2acfda8 100644
--- a/src/lib/VSDParagraphList.cpp
+++ b/src/lib/VSDParagraphList.cpp
@@ -116,9 +116,9 @@ libvisio::VSDParagraphList::~VSDParagraphList()
}
void libvisio::VSDParagraphList::addParaIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
- const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine,
- const boost::optional<double> &spBefore, const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
- const boost::optional<unsigned> &flags)
+ const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine,
+ const boost::optional<double> &spBefore, const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
+ const boost::optional<unsigned> &flags)
{
VSDParaIX *tmpElement = dynamic_cast<VSDParaIX *>(m_elements[id]);
if (!tmpElement)
diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 351518a..659329d 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -837,7 +837,7 @@ void libvisio::VSDParser::readTextBlock(WPXInputStream *input)
verticalAlign, isBgFilled, c, defaultTabStop, textDirection);
else
m_shape.m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin,
- verticalAlign, isBgFilled, c, defaultTabStop, textDirection));
+ verticalAlign, isBgFilled, c, defaultTabStop, textDirection));
}
void libvisio::VSDParser::readGeomList(WPXInputStream *input)
@@ -989,7 +989,7 @@ void libvisio::VSDParser::readXFormData(WPXInputStream *input)
void libvisio::VSDParser::readTxtXForm(WPXInputStream *input)
{
if (m_shape.m_txtxform)
- delete (m_shape.m_txtxform);
+ delete(m_shape.m_txtxform);
m_shape.m_txtxform = new XForm();
input->seek(1, WPX_SEEK_CUR);
m_shape.m_txtxform->pinX = readDouble(input);
@@ -1743,8 +1743,8 @@ void libvisio::VSDParser::readCharIX(WPXInputStream *input)
}
m_shape.m_charStyle.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize,
- bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
- allcaps, initcaps, smallcaps, superscript, subscript));
+ bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
+ allcaps, initcaps, smallcaps, superscript, subscript));
m_shape.m_charList.addCharIX(m_header.id, m_header.level, charCount, font, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript);
@@ -1781,7 +1781,7 @@ void libvisio::VSDParser::readParaIX(WPXInputStream *input)
}
m_shape.m_paraStyle.override(VSDOptionalParaStyle(charCount, indFirst, indLeft, indRight,
- spLine, spBefore, spAfter, align, flags));
+ spLine, spBefore, spAfter, align, flags));
m_shape.m_paraList.addParaIX(m_header.id, m_header.level, charCount, indFirst, indLeft, indRight,
spLine, spBefore, spAfter, align, flags);
}
@@ -1851,7 +1851,7 @@ void libvisio::VSDParser::readFillAndShadow(WPXInputStream *input)
VSD_DEBUG_MSG(("Found stencil fill\n"));
}
m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency,
- fillBGTransparency, shadowFG, shadowPattern, shadowOffsetX, shadowOffsetY));
+ fillBGTransparency, shadowFG, shadowPattern, shadowOffsetX, shadowOffsetY));
}
}
diff --git a/src/lib/VSDSVGGenerator.cpp b/src/lib/VSDSVGGenerator.cpp
index a133571..b4d90ee 100644
--- a/src/lib/VSDSVGGenerator.cpp
+++ b/src/lib/VSDSVGGenerator.cpp
@@ -116,10 +116,10 @@ VSDSVGGeneratorPrivate::VSDSVGGeneratorPrivate(VSDStringVector &vec, const WPXSt
void VSDSVGGeneratorPrivate::drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed)
{
- if(vertices.count() < 2)
+ if (vertices.count() < 2)
return;
- if(vertices.count() == 2)
+ if (vertices.count() == 2)
{
if (!vertices[0]["svg:x"]||!vertices[0]["svg:y"]||!vertices[1]["svg:x"]||!vertices[1]["svg:y"])
return;
@@ -137,7 +137,7 @@ void VSDSVGGeneratorPrivate::drawPolySomething(const ::WPXPropertyListVector &ve
m_outputSink << "<" << getNamespaceAndDelim() << "polyline ";
m_outputSink << "points=\"";
- for(unsigned i = 0; i < vertices.count(); i++)
+ for (unsigned i = 0; i < vertices.count(); i++)
{
if (!vertices[i]["svg:x"]||!vertices[i]["svg:y"])
continue;
@@ -157,7 +157,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_style = propList;
m_gradient = gradient;
- if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible" && m_style["draw:shadow-opacity"])
+ if (m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible" && m_style["draw:shadow-opacity"])
{
double shadowRed = 0.0;
double shadowGreen = 0.0;
@@ -181,7 +181,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << "0 0 0 0 " << doubleToString(shadowRed) ;
m_outputSink << " 0 0 0 0 " << doubleToString(shadowGreen);
m_outputSink << " 0 0 0 0 " << doubleToString(shadowBlue);
- if(m_style["draw:opacity"] && m_style["draw:opacity"]->getDouble() < 1)
+ if (m_style["draw:opacity"] && m_style["draw:opacity"]->getDouble() < 1)
m_outputSink << " 0 0 0 " << doubleToString(m_style["draw:shadow-opacity"]->getDouble()/m_style["draw:opacity"]->getDouble()) << " 0\"/>";
else
m_outputSink << " 0 0 0 " << doubleToString(m_style["draw:shadow-opacity"]->getDouble()) << " 0\"/>";
@@ -194,13 +194,13 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << "</" << getNamespaceAndDelim() << "defs>";
}
- if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient" && m_style["draw:style"])
+ if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient" && m_style["draw:style"])
{
double angle = (m_style["draw:angle"] ? m_style["draw:angle"]->getDouble() : 0.0);
angle *= -1.0;
- while(angle < 0)
+ while (angle < 0)
angle += 360;
- while(angle > 360)
+ while (angle > 360)
angle -= 360;
if (m_style["draw:style"]->getStr() == "radial" || m_style["draw:style"]->getStr() == "rectangular" ||
@@ -227,7 +227,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << " >\n";
if (m_gradient.count())
{
- for(unsigned c = 0; c < m_gradient.count(); c++)
+ for (unsigned c = 0; c < m_gradient.count(); c++)
{
WPXPropertyList const &grad=m_gradient[c];
m_outputSink << " <" << getNamespaceAndDelim() << "stop";
@@ -265,7 +265,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
{
// check if we can reconstruct the linear offset, ie. if each offset is a valid percent%
canBuildAxial = true;
- for(unsigned c = 0; c < m_gradient.count(); ++c)
+ for (unsigned c = 0; c < m_gradient.count(); ++c)
{
WPXPropertyList const &grad=m_gradient[c];
if (!grad["svg:offset"] || grad["svg:offset"]->getDouble()<0 || grad["svg:offset"]->getDouble() > 1)
@@ -284,7 +284,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
}
if (canBuildAxial)
{
- for(unsigned c = m_gradient.count(); c>0 ; )
+ for (unsigned c = m_gradient.count(); c>0 ;)
{
WPXPropertyList const &grad=m_gradient[--c];
m_outputSink << " <" << getNamespaceAndDelim() << "stop ";
@@ -296,7 +296,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << " stop-opacity=\"" << doubleToString(grad["svg:stop-opacity"]->getDouble()) << "\"";
m_outputSink << "/>" << std::endl;
}
- for(unsigned c = 0; c < m_gradient.count(); ++c)
+ for (unsigned c = 0; c < m_gradient.count(); ++c)
{
WPXPropertyList const &grad=m_gradient[c];
if (c==0 && grad["svg:offset"] && grad["svg:offset"]->getDouble() <= 0)
@@ -313,7 +313,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
}
else
{
- for(unsigned c = 0; c < m_gradient.count(); c++)
+ for (unsigned c = 0; c < m_gradient.count(); c++)
{
WPXPropertyList const &grad=m_gradient[c];
m_outputSink << " <" << getNamespaceAndDelim() << "stop";
@@ -357,7 +357,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << " </" << getNamespaceAndDelim() << "linearGradient>\n";
// not a simple horizontal gradient
- if(angle != 270)
+ if (angle != 270)
{
m_outputSink << " <" << getNamespaceAndDelim() << "linearGradient xlink:href=\"#grad" << m_gradientIndex-1 << "\"";
m_outputSink << " id=\"grad" << m_gradientIndex++ << "\" ";
@@ -370,7 +370,7 @@ void VSDSVGGeneratorPrivate::setStyle(const ::WPXPropertyList &propList, const :
m_outputSink << "</" << getNamespaceAndDelim() << "defs>\n";
}
}
- else if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap" && m_style["draw:fill-image"] && m_style["libwpg:mime-type"])
+ else if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap" && m_style["draw:fill-image"] && m_style["libwpg:mime-type"])
{
m_outputSink << "<" << getNamespaceAndDelim() << "defs>\n";
m_outputSink << " <" << getNamespaceAndDelim() << "pattern id=\"img" << m_patternIndex++ << "\" patternUnits=\"userSpaceOnUse\" ";
@@ -456,7 +456,7 @@ void VSDSVGGeneratorPrivate::writeStyle(bool /* isClosed */)
{
if (m_style["svg:stroke-color"])
m_outputSink << "stroke: " << m_style["svg:stroke-color"]->getStr().cstr() << "; ";
- if(m_style["svg:stroke-opacity"] && m_style["svg:stroke-opacity"]->getInt()!= 1)
+ if (m_style["svg:stroke-opacity"] && m_style["svg:stroke-opacity"]->getInt()!= 1)
m_outputSink << "stroke-opacity: " << doubleToString(m_style["svg:stroke-opacity"]->getDouble()) << "; ";
}
@@ -513,23 +513,23 @@ void VSDSVGGeneratorPrivate::writeStyle(bool /* isClosed */)
if (m_style["svg:stroke-linejoin"])
m_outputSink << "stroke-linejoin: " << m_style["svg:stroke-linejoin"]->getStr().cstr() << "; ";
- if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none")
+ if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none")
m_outputSink << "fill: none; ";
- else if(m_style["svg:fill-rule"])
+ else if (m_style["svg:fill-rule"])
m_outputSink << "fill-rule: " << m_style["svg:fill-rule"]->getStr().cstr() << "; ";
- if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient")
+ if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient")
m_outputSink << "fill: url(#grad" << m_gradientIndex-1 << "); ";
- else if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap")
+ else if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap")
m_outputSink << "fill: url(#img" << m_patternIndex-1 << "); ";
- if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible")
+ if (m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible")
m_outputSink << "filter:url(#shadow" << m_shadowIndex-1 << "); ";
- if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "solid")
+ if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "solid")
if (m_style["draw:fill-color"])
m_outputSink << "fill: " << m_style["draw:fill-color"]->getStr().cstr() << "; ";
- if(m_style["draw:opacity"] && m_style["draw:opacity"]->getDouble() < 1)
+ if (m_style["draw:opacity"] && m_style["draw:opacity"]->getDouble() < 1)
m_outputSink << "fill-opacity: " << doubleToString(m_style["draw:opacity"]->getDouble()) << "; ";
if (m_style["draw:marker-start-path"])
@@ -606,7 +606,7 @@ void VSDSVGGenerator::drawRectangle(const ::WPXPropertyList &propList)
m_pImpl->m_outputSink << "<" << m_pImpl->getNamespaceAndDelim() << "rect ";
m_pImpl->m_outputSink << "x=\"" << doubleToString(72*propList["svg:x"]->getDouble()) << "\" y=\"" << doubleToString(72*propList["svg:y"]->getDouble()) << "\" ";
m_pImpl->m_outputSink << "width=\"" << doubleToString(72*propList["svg:width"]->getDouble()) << "\" height=\"" << doubleToString(72*propList["svg:height"]->getDouble()) << "\" ";
- if(propList["svg:rx"] && propList["svg:rx"]->getDouble() > 0 && propList["svg:ry"] && propList["svg:ry"]->getDouble()>0)
+ if (propList["svg:rx"] && propList["svg:rx"]->getDouble() > 0 && propList["svg:ry"] && propList["svg:ry"]->getDouble()>0)
m_pImpl->m_outputSink << "rx=\"" << doubleToString(72*propList["svg:rx"]->getDouble()) << "\" ry=\"" << doubleToString(72*propList["svg:ry"]->getDouble()) << "\" ";
m_pImpl->writeStyle();
m_pImpl->m_outputSink << "/>\n";
@@ -643,7 +643,7 @@ void VSDSVGGenerator::drawPath(const ::WPXPropertyListVector &path)
m_pImpl->m_outputSink << "<" << m_pImpl->getNamespaceAndDelim() << "path d=\" ";
bool isClosed = false;
unsigned i=0;
- for(i=0; i < path.count(); i++)
+ for (i=0; i < path.count(); i++)
{
WPXPropertyList propList = path[i];
if (!propList["libwpg:path-action"]) continue;
@@ -683,7 +683,7 @@ void VSDSVGGenerator::drawPath(const ::WPXPropertyListVector &path)
m_pImpl->m_outputSink << (propList["libwpg:sweep"] ? propList["libwpg:sweep"]->getInt() : 1) << " ";
m_pImpl->m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble()));
}
- else if (action[0] == 'Z' )
+ else if (action[0] == 'Z')
{
isClosed = true;
m_pImpl->m_outputSink << "\nZ";
@@ -717,7 +717,7 @@ void VSDSVGGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const
double xmiddle = x + width / 2.0;
double ymiddle = y + height / 2.0;
m_pImpl->m_outputSink << "transform=\"";
- m_pImpl->m_outputSink << " translate(" << doubleToString(72*xmiddle) << ", " << doubleToString (72*ymiddle) << ") ";
+ m_pImpl->m_outputSink << " translate(" << doubleToString(72*xmiddle) << ", " << doubleToString(72*ymiddle) << ") ";
m_pImpl->m_outputSink << " scale(" << (flipX ? "-1" : "1") << ", " << (flipY ? "-1" : "1") << ") ";
// rotation is around the center of the object's bounding box
if (propList["libwpg:rotate"])
@@ -729,7 +729,7 @@ void VSDSVGGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const
angle += 360.0;
m_pImpl->m_outputSink << " rotate(" << doubleToString(angle) << ") ";
}
- m_pImpl->m_outputSink << " translate(" << doubleToString(-72*xmiddle) << ", " << doubleToString (-72*ymiddle) << ") ";
+ m_pImpl->m_outputSink << " translate(" << doubleToString(-72*xmiddle) << ", " << doubleToString(-72*ymiddle) << ") ";
m_pImpl->m_outputSink << "\" ";
}
}
diff --git a/src/lib/VSDStylesCollector.cpp b/src/lib/VSDStylesCollector.cpp
index 5fb1b36..7d4195e 100644
--- a/src/lib/VSDStylesCollector.cpp
+++ b/src/lib/VSDStylesCollector.cpp
@@ -52,7 +52,7 @@ libvisio::VSDStylesCollector::VSDStylesCollector(
}
void libvisio::VSDStylesCollector::collectEllipticalArcTo(unsigned /* id */, unsigned level, double /* x3 */, double /* y3 */,
- double /* x2 */, double /* y2 */, double /* angle */, double /* ecc */)
+ double /* x2 */, double /* y2 */, double /* angle */, double /* ecc */)
{
_handleLevelChange(level);
}
@@ -68,30 +68,30 @@ void libvisio::VSDStylesCollector::collectOLEData(unsigned /* id */, unsigned le
}
void libvisio::VSDStylesCollector::collectEllipse(unsigned /* id */, unsigned level, double /* cx */, double /* cy */,
- double /* xleft */, double /* yleft */, double /* xtop */, double /* ytop */)
+ double /* xleft */, double /* yleft */, double /* xtop */, double /* ytop */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectLine(unsigned level, const boost::optional<double> & /* strokeWidth */,
- const boost::optional<Colour> & /* c */, const boost::optional<unsigned char> & /* linePattern */,
- const boost::optional<unsigned char> & /* startMarker */, const boost::optional<unsigned char> & /* endMarker */,
- const boost::optional<unsigned char> &/* lineCap */)
+ const boost::optional<Colour> & /* c */, const boost::optional<unsigned char> & /* linePattern */,
+ const boost::optional<unsigned char> & /* startMarker */, const boost::optional<unsigned char> & /* endMarker */,
+ const boost::optional<unsigned char> &/* lineCap */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> & /* colourFG */, const boost::optional<Colour> & /* colourBG */,
- const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */,
- const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */,
- const boost::optional<double> & /* shadowOffsetX */, const boost::optional<double> &/* shadowOffsetY */)
+ const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */,
+ const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */,
+ const boost::optional<double> & /* shadowOffsetX */, const boost::optional<double> &/* shadowOffsetY */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> & /* colourFG */, const boost::optional<Colour> & /* colourBG */,
- const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */,
- const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */)
+ const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */,
+ const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */)
{
_handleLevelChange(level);
}
@@ -117,27 +117,27 @@ void libvisio::VSDStylesCollector::collectArcTo(unsigned /* id */, unsigned leve
}
void libvisio::VSDStylesCollector::collectNURBSTo(unsigned /* id */, unsigned level, double /* x2 */, double /* y2 */,
- unsigned char /* xType */, unsigned char /* yType */, unsigned /* degree */, const std::vector<std::pair<double, double> > & /* ctrlPts */,
- const std::vector<double> & /* kntVec */, const std::vector<double> & /* weights */)
+ unsigned char /* xType */, unsigned char /* yType */, unsigned /* degree */, const std::vector<std::pair<double, double> > & /* ctrlPts */,
+ const std::vector<double> & /* kntVec */, const std::vector<double> & /* weights */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectNURBSTo(unsigned /* id */, unsigned level, double /* x2 */, double /* y2 */, double /* knot */,
- double /* knotPrev */, double /* weight */, double /* weightPrev */, unsigned /* dataID */)
+ double /* knotPrev */, double /* weight */, double /* weightPrev */, unsigned /* dataID */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectNURBSTo(unsigned /* id */, unsigned level, double /* x2 */, double /* y2 */, double /* knot */,
- double /* knotPrev */, double /* weight */, double /* weightPrev */, const NURBSData & /* data */)
+ double /* knotPrev */, double /* weight */, double /* weightPrev */, const NURBSData & /* data */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectPolylineTo(unsigned /* id */, unsigned level, double /* x */, double /* y */,
- unsigned char /* xType */, unsigned char /* yType */,
- const std::vector<std::pair<double, double> > & /* points */)
+ unsigned char /* xType */, unsigned char /* yType */,
+ const std::vector<std::pair<double, double> > & /* points */)
{
_handleLevelChange(level);
}
@@ -153,7 +153,7 @@ void libvisio::VSDStylesCollector::collectPolylineTo(unsigned /* id */, unsigned
}
void libvisio::VSDStylesCollector::collectSplineStart(unsigned /* id */, unsigned level, double /* x */, double /* y */,
- double /* secondKnot */, double /* firstKnot */, double /* lastKnot */, unsigned /* degree */)
+ double /* secondKnot */, double /* firstKnot */, double /* lastKnot */, unsigned /* degree */)
{
_handleLevelChange(level);
}
@@ -198,14 +198,14 @@ void libvisio::VSDStylesCollector::collectRelQuadBezTo(unsigned /* id */, unsign
}
void libvisio::VSDStylesCollector::collectShapeData(unsigned /* id */, unsigned level, unsigned char /* xType */, unsigned char /* yType */,
- unsigned /* degree */, double /*lastKnot*/, std::vector<std::pair<double, double> > /* controlPoints */,
- std::vector<double> /* knotVector */, std::vector<double> /* weights */)
+ unsigned /* degree */, double /*lastKnot*/, std::vector<std::pair<double, double> > /* controlPoints */,
+ std::vector<double> /* knotVector */, std::vector<double> /* weights */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectShapeData(unsigned /* id */, unsigned level, unsigned char /* xType */, unsigned char /* yType */,
- std::vector<std::pair<double, double> > /* points */)
+ std::vector<std::pair<double, double> > /* points */)
{
_handleLevelChange(level);
}
@@ -232,13 +232,13 @@ void libvisio::VSDStylesCollector::collectShapesOrder(unsigned /* id */, unsigne
}
void libvisio::VSDStylesCollector::collectForeignDataType(unsigned level, unsigned /* foreignType */, unsigned /* foreignFormat */,
- double /* offsetX */, double /* offsetY */, double /* width */, double /* height */)
+ double /* offsetX */, double /* offsetY */, double /* width */, double /* height */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectPageProps(unsigned /* id */, unsigned level, double /* pageWidth */, double /* pageHeight */,
- double /* shadowOffsetX */, double /* shadowOffsetY */, double /* scale */)
+ double /* shadowOffsetX */, double /* shadowOffsetY */, double /* scale */)
{
_handleLevelChange(level);
}
@@ -249,7 +249,7 @@ void libvisio::VSDStylesCollector::collectPage(unsigned /* id */, unsigned level
}
void libvisio::VSDStylesCollector::collectShape(unsigned id, unsigned level, unsigned parent, unsigned /*masterPage*/, unsigned /*masterShape*/,
- unsigned /* lineStyle */, unsigned /* fillStyle */, unsigned /* textStyle */)
+ unsigned /* lineStyle */, unsigned /* fillStyle */, unsigned /* textStyle */)
{
_handleLevelChange(level);
m_currentShapeLevel = level;
@@ -275,43 +275,43 @@ void libvisio::VSDStylesCollector::collectText(unsigned level, const ::WPXBinary
}
void libvisio::VSDStylesCollector::collectParaIX(unsigned /* id */, unsigned level, unsigned /* charCount */,
- const boost::optional<double> & /* indFirst */, const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */,
- const boost::optional<double> & /* spLine */, const boost::optional<double> & /* spBefore */, const boost::optional<double> & /* spAfter */,
- const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
+ const boost::optional<double> & /* indFirst */, const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */,
+ const boost::optional<double> & /* spLine */, const boost::optional<double> & /* spBefore */, const boost::optional<double> & /* spAfter */,
+ const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectDefaultParaStyle(unsigned /* charCount */, const boost::optional<double> & /* indFirst */,
- const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */, const boost::optional<double> & /* spLine */,
- const boost::optional<double> & /* spBefore */, const boost::optional<double> & /* spAfter */,
- const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
+ const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */, const boost::optional<double> & /* spLine */,
+ const boost::optional<double> & /* spBefore */, const boost::optional<double> & /* spAfter */,
+ const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
{
}
void libvisio::VSDStylesCollector::collectCharIX(unsigned /* id */, unsigned level, unsigned /* charCount */,
- const boost::optional<VSDName> & /* font */, const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */,
- const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */, const boost::optional<bool> & /* underline */,
- const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */, const boost::optional<bool> & /* doublestrikeout */,
- const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
- const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
+ const boost::optional<VSDName> & /* font */, const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */,
+ const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */, const boost::optional<bool> & /* underline */,
+ const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */, const boost::optional<bool> & /* doublestrikeout */,
+ const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
+ const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectDefaultCharStyle(unsigned /* charCount */,
- const boost::optional<VSDName> & /* font */, const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */,
- const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */, const boost::optional<bool> & /* underline */,
- const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */, const boost::optional<bool> & /* doublestrikeout */,
- const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
- const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
+ const boost::optional<VSDName> & /* font */, const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */,
+ const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */, const boost::optional<bool> & /* underline */,
+ const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */, const boost::optional<bool> & /* doublestrikeout */,
+ const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
+ const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
{
}
void libvisio::VSDStylesCollector::collectTextBlock(unsigned level, const boost::optional<double> & /* leftMargin */,
- const boost::optional<double> & /* rightMargin */, const boost::optional<double> & /* topMargin */, const boost::optional<double> & /* bottomMargin */,
- const boost::optional<unsigned char> & /* verticalAlign */, const boost::optional<bool> & /* isBgFilled */, const boost::optional<Colour> & /* bgColour */,
- const boost::optional<double> & /* defaultTabStop */, const boost::optional<unsigned char> & /* textDirection */)
+ const boost::optional<double> & /* rightMargin */, const boost::optional<double> & /* topMargin */, const boost::optional<double> & /* bottomMargin */,
+ const boost::optional<unsigned char> & /* verticalAlign */, const boost::optional<bool> & /* isBgFilled */, const boost::optional<Colour> & /* bgColour */,
+ const boost::optional<double> & /* defaultTabStop */, const boost::optional<unsigned char> & /* textDirection */)
{
_handleLevelChange(level);
}
@@ -333,48 +333,48 @@ void libvisio::VSDStylesCollector::collectStyleSheet(unsigned /* id */, unsigned
}
void libvisio::VSDStylesCollector::collectLineStyle(unsigned level, const boost::optional<double> & /* strokeWidth */, const boost::optional<Colour> & /* c */,
- const boost::optional<unsigned char> & /* linePattern */, const boost::optional<unsigned char> & /* startMarker */, const boost::optional<unsigned char> & /* endMarker */,
- const boost::optional<unsigned char> & /* lineCap */)
+ const boost::optional<unsigned char> & /* linePattern */, const boost::optional<unsigned char> & /* startMarker */, const boost::optional<unsigned char> & /* endMarker */,
+ const boost::optional<unsigned char> & /* lineCap */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectFillStyle(unsigned level, const boost::optional<Colour> & /* colourFG */, const boost::optional<Colour> & /* colourBG */,
- const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */, const boost::optional<double> & /* fillBGTransparency */,
- const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */, const boost::optional<double> & /* shadowOffsetX */,
- const boost::optional<double> & /* shadowOffsetY */)
+ const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */, const boost::optional<double> & /* fillBGTransparency */,
+ const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */, const boost::optional<double> & /* shadowOffsetX */,
+ const boost::optional<double> & /* shadowOffsetY */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectFillStyle(unsigned level, const boost::optional<Colour> & /* colourFG */, const boost::optional<Colour> & /* colourBG */,
- const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */, const boost::optional<double> & /* fillBGTransparency */,
- const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */)
+ const boost::optional<unsigned char> & /* fillPattern */, const boost::optional<double> & /* fillFGTransparency */, const boost::optional<double> & /* fillBGTransparency */,
+ const boost::optional<unsigned char> & /* shadowPattern */, const boost::optional<Colour> & /* shfgc */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectCharIXStyle(unsigned /* id */, unsigned level, unsigned /* charCount */, const boost::optional<VSDName> & /* font */,
- const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */, const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */,
- const boost::optional<bool> & /* underline */, const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */,
- const boost::optional<bool> & /* doublestrikeout */, const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
- const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
+ const boost::optional<Colour> & /* fontColour */, const boost::optional<double> & /* fontSize */, const boost::optional<bool> & /* bold */, const boost::optional<bool> & /* italic */,
+ const boost::optional<bool> & /* underline */, const boost::optional<bool> & /* doubleunderline */, const boost::optional<bool> & /* strikeout */,
+ const boost::optional<bool> & /* doublestrikeout */, const boost::optional<bool> & /* allcaps */, const boost::optional<bool> & /* initcaps */, const boost::optional<bool> & /* smallcaps */,
+ const boost::optional<bool> & /* superscript */, const boost::optional<bool> & /* subscript */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectParaIXStyle(unsigned /* id */, unsigned level, unsigned /* charCount */, const boost::optional<double> & /* indFirst */,
- const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */, const boost::optional<double> & /* spLine */, const boost::optional<double> & /* spBefore */,
- const boost::optional<double> & /* spAfter */, const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
+ const boost::optional<double> & /* indLeft */, const boost::optional<double> & /* indRight */, const boost::optional<double> & /* spLine */, const boost::optional<double> & /* spBefore */,
+ const boost::optional<double> & /* spAfter */, const boost::optional<unsigned char> & /* align */, const boost::optional<unsigned> & /* flags */)
{
_handleLevelChange(level);
}
void libvisio::VSDStylesCollector::collectTextBlockStyle(unsigned level, const boost::optional<double> & /* leftMargin */, const boost::optional<double> & /* rightMargin */,
- const boost::optional<double> & /* topMargin */, const boost::optional<double> & /* bottomMargin */, const boost::optional<unsigned char> & /* verticalAlign */,
- const boost::optional<bool> & /* isBgFilled */, const boost::optional<Colour> & /* bgColour */, const boost::optional<double> & /* defaultTabStop */,
- const boost::optional<unsigned char> & /* textDirection */)
+ const boost::optional<double> & /* topMargin */, const boost::optional<double> & /* bottomMargin */, const boost::optional<unsigned char> & /* verticalAlign */,
+ const boost::optional<bool> & /* isBgFilled */, const boost::optional<Colour> & /* bgColour */, const boost::optional<double> & /* defaultTabStop */,
+ const boost::optional<unsigned char> & /* textDirection */)
{
_handleLevelChange(level);
}
diff --git a/src/lib/VSDXMLHelper.cpp b/src/lib/VSDXMLHelper.cpp
index 7ff7db6..5756bb2 100644
--- a/src/lib/VSDXMLHelper.cpp
+++ b/src/lib/VSDXMLHelper.cpp
@@ -274,7 +274,7 @@ void libvisio::VSDXRelationship::rebaseTarget(const char *baseDir)
}
target.clear();
- for(unsigned j = 0; j < normalizedSegments.size(); ++j)
+ for (unsigned j = 0; j < normalizedSegments.size(); ++j)
{
if (!target.empty())
target.append("/");
diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index 894af90..5e1ca09 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -1110,7 +1110,7 @@ void libvisio::VSDXMLParserBase::readPage(xmlTextReaderPtr reader)
if (id)
{
unsigned nId = (unsigned)xmlStringToLong(id);
- unsigned backgroundPageID = (unsigned)(bgndPage ? xmlStringToLong(bgndPage) : -1);
+ unsigned backgroundPageID = (unsigned)(bgndPage ? xmlStringToLong(bgndPage) : -1);
bool isBackgroundPage = background ? xmlStringToBool(background) : false;
m_isPageStarted = true;
m_collector->startPage(nId);
@@ -1382,8 +1382,8 @@ void libvisio::VSDXMLParserBase::readCharIX(xmlTextReaderPtr reader)
{
if (!ix || m_shape.m_charList.empty()) // character style 0 is the default character style
m_shape.m_charStyle.override(VSDOptionalCharStyle(charCount, font, fontColour, fontSize, bold,
- italic, underline, doubleunderline, strikeout, doublestrikeout,
- allcaps, initcaps, smallcaps, superscript, subscript));
+ italic, underline, doubleunderline, strikeout, doublestrikeout,
+ allcaps, initcaps, smallcaps, superscript, subscript));
m_shape.m_charList.addCharIX(ix, level, charCount, font, fontColour, fontSize, bold, italic,
underline, doubleunderline, strikeout, doublestrikeout, allcaps,
@@ -1470,7 +1470,7 @@ void libvisio::VSDXMLParserBase::readParaIX(xmlTextReaderPtr reader)
{
if (!ix || m_shape.m_paraList.empty()) // paragraph style 0 is the default paragraph style
m_shape.m_paraStyle.override(VSDOptionalParaStyle(charCount, indFirst, indLeft, indRight,
- spLine, spBefore, spAfter, align, flags));
+ spLine, spBefore, spAfter, align, flags));
m_shape.m_paraList.addParaIX(ix, level, charCount, indFirst, indLeft, indRight,
spLine, spBefore, spAfter, align, flags);
@@ -1486,7 +1486,7 @@ void libvisio::VSDXMLParserBase::readStyleSheet(xmlTextReaderPtr reader)
if (id)
{
unsigned nId = (unsigned)xmlStringToLong(id);
- unsigned nLineStyle = (unsigned)(lineStyle ? xmlStringToLong(lineStyle) : -1);
+ unsigned nLineStyle = (unsigned)(lineStyle ? xmlStringToLong(lineStyle) : -1);
unsigned nFillStyle = (unsigned)(fillStyle ? xmlStringToLong(fillStyle) : -1);
unsigned nTextStyle = (unsigned)(textStyle ? xmlStringToLong(textStyle) : -1);
m_collector->collectStyleSheet(nId, (unsigned)getElementDepth(reader), nLineStyle, nFillStyle, nTextStyle);
@@ -1928,7 +1928,7 @@ int libvisio::VSDXMLParserBase::readNURBSData(boost::optional<NURBSData> &data,
real_p[assign_a(point.second)])[push_back_a(tmpData.points,point)]
>> (',' | eps_p) >>
real_p[push_back_a(tmpData.knots)] >> (',' | eps_p) >>
- real_p[push_back_a(tmpData.weights)]), ',' | eps_p ))
+ real_p[push_back_a(tmpData.weights)]), ',' | eps_p))
) >> ')' >> end_p,
// End grammar
space_p).full;
@@ -1936,7 +1936,7 @@ int libvisio::VSDXMLParserBase::readNURBSData(boost::optional<NURBSData> &data,
xmlFree(formula);
}
- if( !bRes )
+ if (!bRes)
return -1;
data = tmpData;
return 1;
@@ -1966,7 +1966,7 @@ int libvisio::VSDXMLParserBase::readPolylineData(boost::optional<PolylineData> &
(list_p(
(
(real_p[assign_a(point.first)] >> (',' | eps_p) >>
- real_p[assign_a(point.second)])[push_back_a(tmpData.points,point)]), ',' | eps_p ))
+ real_p[assign_a(point.second)])[push_back_a(tmpData.points,point)]), ',' | eps_p))
) >> ')' >> end_p,
// End grammar
space_p).full;
@@ -1974,7 +1974,7 @@ int libvisio::VSDXMLParserBase::readPolylineData(boost::optional<PolylineData> &
xmlFree(formula);
}
- if( !bRes )
+ if (!bRes)
return -1;
data = tmpData;
return 1;
diff --git a/src/lib/VSDXMLTokenMap.cpp b/src/lib/VSDXMLTokenMap.cpp
index 08070dd..d73f773 100644
--- a/src/lib/VSDXMLTokenMap.cpp
+++ b/src/lib/VSDXMLTokenMap.cpp
@@ -40,7 +40,7 @@ namespace
int libvisio::VSDXMLTokenMap::getTokenId(const xmlChar *name)
{
const xmltoken *token = Perfect_Hash::in_word_set((const char *)name, xmlStrlen(name));
- if(token)
+ if (token)
return token->tokenId;
else
return XML_TOKEN_INVALID;
@@ -48,13 +48,13 @@ int libvisio::VSDXMLTokenMap::getTokenId(const xmlChar *name)
const xmlChar *libvisio::VSDXMLTokenMap::getTokenName(int tokenId)
{
- if(tokenId >= XML_TOKEN_COUNT)
+ if (tokenId >= XML_TOKEN_COUNT)
return 0;
const xmltoken *currentToken = wordlist;
- while(currentToken != wordlist+sizeof(wordlist)/sizeof(*wordlist))
+ while (currentToken != wordlist+sizeof(wordlist)/sizeof(*wordlist))
{
- if(currentToken->tokenId == tokenId)
+ if (currentToken->tokenId == tokenId)
return BAD_CAST(currentToken->name);
++currentToken;
}
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index e4dc1b1..4cb6f07 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -914,9 +914,9 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
{
m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, strokeColour, linePattern, startMarker, endMarker, lineCap));
m_shape.m_fillStyle.override(VSDOptionalFillStyle(fillColourFG, fillColourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowColourFG,
- shadowPattern, shadowOffsetX, shadowOffsetY));
+ shadowPattern, shadowOffsetX, shadowOffsetY));
m_shape.m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin, verticalAlign, !!bgClrId, bgColour,
- defaultTabStop, textDirection));
+ defaultTabStop, textDirection));
}
}
diff --git a/src/lib/VSDZipStream.cpp b/src/lib/VSDZipStream.cpp
index 1c12d56..65d2deb 100644
--- a/src/lib/VSDZipStream.cpp
+++ b/src/lib/VSDZipStream.cpp
@@ -189,7 +189,7 @@ bool libvisio::VSDZipStreamImpl::isZipStream()
{
if (m_cdir_offset)
{
- if(m_cdir.empty())
+ if (m_cdir.empty())
return false;
return true;
}
diff --git a/src/lib/VisioDocument.cpp b/src/lib/VisioDocument.cpp
index 15f6f75..64aab71 100644
--- a/src/lib/VisioDocument.cpp
+++ b/src/lib/VisioDocument.cpp
@@ -168,7 +168,7 @@ static bool parseBinaryVisioDocument(WPXInputStream *input, libwpg::WPGPaintInte
try
{
unsigned char version = libvisio::readU8(docStream);
- switch(version)
+ switch (version)
{
case 1:
case 2: