src/lib/MSPUBCollector.cpp | 8 ++++---- src/lib/MSPUBDocument.cpp | 2 +- src/lib/MSPUBParser.cpp | 16 ++++++++-------- src/lib/MSPUBParser2k.cpp | 4 ++-- src/lib/PolygonUtils.cpp | 14 +++++++------- src/lib/PolygonUtils.h | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-)
New commits: commit dc74c1d6918ad6531daf6c1bd8e0c3fcd84b7155 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Mon Nov 25 16:27:54 2013 +0100 astyle -HU -A1 -k3 -y -n -s2 -r \*.cpp \*.h Change-Id: I58b1148474af8440672d623385440cfee275f472 diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp index 8ab12a9..ff16298 100644 --- a/src/lib/MSPUBCollector.cpp +++ b/src/lib/MSPUBCollector.cpp @@ -803,7 +803,7 @@ boost::function<void(void)> libmspub::MSPUBCollector::paintShape(const ShapeInfo props.insert("fo:padding-top", (double)margins.m_top / EMUS_IN_INCH); props.insert("fo:padding-right", (double)margins.m_right / EMUS_IN_INCH); props.insert("fo:padding-bottom", (double)margins.m_bottom / EMUS_IN_INCH); - if(!!info.m_verticalAlign) + if (!!info.m_verticalAlign) { switch (info.m_verticalAlign.get()) { @@ -1043,9 +1043,9 @@ double libmspub::MSPUBCollector::getCalculationValue(const ShapeInfo &info, unsi case 8: return atan2(valTwo, valOne) / (M_PI / 180); case 9: - return valOne * sin(valTwo * (M_PI / 180) ); + return valOne * sin(valTwo * (M_PI / 180)); case 10: - return valOne * cos(valTwo * (M_PI / 180) ); + return valOne * cos(valTwo * (M_PI / 180)); case 11: return valOne * cos(atan2(valThree, valTwo)); case 12: @@ -1104,7 +1104,7 @@ void libmspub::MSPUBCollector::addDefaultParagraphStyle(const ParagraphStyle &st bool libmspub::MSPUBCollector::addPage(unsigned seqNum) { - if (! (m_widthSet && m_heightSet) ) + if (!(m_widthSet && m_heightSet)) { return false; } diff --git a/src/lib/MSPUBDocument.cpp b/src/lib/MSPUBDocument.cpp index 6ee6108..0371b00 100644 --- a/src/lib/MSPUBDocument.cpp +++ b/src/lib/MSPUBDocument.cpp @@ -69,7 +69,7 @@ MSPUBVersion getVersion(librevenge::RVNGInputStream *input) return MSPUB_UNKNOWN_VERSION; MSPUBVersion version = MSPUB_UNKNOWN_VERSION; - switch(magicVersionByte) + switch (magicVersionByte) { case 0x2C: version = MSPUB_2K2; diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp index d6cc2c7..5a3ed8a 100644 --- a/src/lib/MSPUBParser.cpp +++ b/src/lib/MSPUBParser.cpp @@ -85,7 +85,7 @@ unsigned libmspub::MSPUBParser::getColorIndexByQuillEntry(unsigned entry) short libmspub::MSPUBParser::getBlockDataLength(unsigned type) // -1 for variable-length block with the data length as the first DWORD { - switch(type) + switch (type) { case DUMMY: case 0x5: @@ -247,7 +247,7 @@ int libmspub::MSPUBParser::getStartOffset(ImgType type, unsigned short initial) bool libmspub::MSPUBParser::parseEscherDelay(librevenge::RVNGInputStream *input) { - while (stillReading (input, (unsigned long)-1)) + while (stillReading(input, (unsigned long)-1)) { EscherContainerInfo info = parseEscherContainer(input); const ImgType imgType = imgTypeByBlipType(info.type); @@ -704,7 +704,7 @@ bool libmspub::MSPUBParser::parseShape(librevenge::RVNGInputStream *input, unsigned columnFirstOffset = 0; input->seek(rcao, librevenge::RVNG_SEEK_SET); unsigned arrayLength = readU32(input); - while(stillReading(input, rcao + arrayLength)) + while (stillReading(input, rcao + arrayLength)) { MSPUBBlockInfo info = parseBlock(input, true); if (info.id == 0) @@ -1176,7 +1176,7 @@ libmspub::ParagraphStyle libmspub::MSPUBParser::getParagraphStyle(librevenge::RV while (stillReading(input, offset + len)) { MSPUBBlockInfo info = parseBlock(input, true); - switch(info.id) + switch (info.id) { case PARAGRAPH_ALIGNMENT: ret.m_align = (Alignment)(info.data & 0xFF); // Is this correct? @@ -1219,7 +1219,7 @@ libmspub::ParagraphStyle libmspub::MSPUBParser::getParagraphStyle(librevenge::RV break; case PARAGRAPH_TABS: input->seek(info.dataOffset + 4, librevenge::RVNG_SEEK_SET); - while(stillReading(input, info.dataOffset + info.dataLength)) + while (stillReading(input, info.dataOffset + info.dataLength)) { MSPUBBlockInfo tabArrayInfo = parseBlock(input, true); if (tabArrayInfo.id == TAB_ARRAY) @@ -1409,7 +1409,7 @@ bool libmspub::MSPUBParser::parseEscher(librevenge::RVNGInputStream *input) { unsigned begin = input->tell(); input->seek(begin + 10, librevenge::RVNG_SEEK_SET); - if (! (readU32(input) == 0 && readU32(input) == 0 && readU32(input) == 0 && readU32(input) == 0)) + if (!(readU32(input) == 0 && readU32(input) == 0 && readU32(input) == 0 && readU32(input) == 0)) { m_escherDelayIndices.push_back(currentDelayIndex++); } @@ -2080,7 +2080,7 @@ std::vector<libmspub::Vertex> libmspub::MSPUBParser::parseVertices( { entrySize = 4; } - if (! (entrySize == 2 || entrySize == 4 || entrySize == 8)) + if (!(entrySize == 2 || entrySize == 4 || entrySize == 8)) { MSPUB_DEBUG_MSG(("Incomprehensible entry size %u in vertex complex data!\n", entrySize)); return ret; @@ -2399,7 +2399,7 @@ libmspub::MSPUBBlockInfo libmspub::MSPUBParser::parseBlock(librevenge::RVNGInput libmspub::PageType libmspub::MSPUBParser::getPageTypeBySeqNum(unsigned seqNum) { - switch(seqNum) + switch (seqNum) { case 0x10d: case 0x110: diff --git a/src/lib/MSPUBParser2k.cpp b/src/lib/MSPUBParser2k.cpp index 974a310..5830680 100644 --- a/src/lib/MSPUBParser2k.cpp +++ b/src/lib/MSPUBParser2k.cpp @@ -98,7 +98,7 @@ libmspub::Color libmspub::MSPUBParser2k::getColorBy2kHex(unsigned hex) libmspub::Color libmspub::MSPUBParser2k::getColorBy2kIndex(unsigned char index) { - switch(index) + switch (index) { case 0x00: return Color(0, 0, 0); @@ -780,7 +780,7 @@ bool libmspub::MSPUBParser2k::parse() libmspub::PageType libmspub::MSPUBParser2k::getPageTypeBySeqNum(unsigned seqNum) { - switch(seqNum) + switch (seqNum) { case 0x116: case 0x108: diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp index 78d4b4f..cf8516e 100644 --- a/src/lib/PolygonUtils.cpp +++ b/src/lib/PolygonUtils.cpp @@ -5262,7 +5262,7 @@ const CustomShape CS_ACTION_BUTTON_MOVIE( const CustomShape *libmspub::getCustomShape(ShapeType type) { - switch(type) + switch (type) { case RECTANGLE: return &CS_RECTANGLE; @@ -5623,7 +5623,7 @@ ShapeElementCommand getCommandFromBinary(unsigned short binary) { Command cmd; unsigned count = 0; - switch(binary >> 8) + switch (binary >> 8) { case 0xAA: cmd = NOFILL; @@ -5692,13 +5692,13 @@ ShapeElementCommand getCommandFromBinary(unsigned short binary) return ShapeElementCommand(cmd, count); } -double getSpecialIfNecessary(boost::function<double (unsigned index)> calculator, int val) +double getSpecialIfNecessary(boost::function<double(unsigned index)> calculator, int val) { bool special = val & 0x80000000; return special ? calculator(val ^ 0x80000000) : val; } -Coordinate libmspub::CustomShape::getTextRectangle(double x, double y, double width, double height, boost::function<double (unsigned index)> calculator) const +Coordinate libmspub::CustomShape::getTextRectangle(double x, double y, double width, double height, boost::function<double(unsigned index)> calculator) const { double scaleX = width * m_coordWidth; double scaleY = height * m_coordHeight; @@ -5742,7 +5742,7 @@ void drawEmulatedLine(boost::shared_ptr<const CustomShape> shape, ShapeType shap Vector2D center, VectorTransformation2D transform, double x, double y, double scaleX, double scaleY, bool drawStroke, librevenge::RVNGPropertyList &graphicsProps, librevenge::RVNGDrawingInterface *painter, - boost::function<double (unsigned index)> calculator, + boost::function<double(unsigned index)> calculator, const std::vector<Color> &palette) { std::vector<LineInfo> lineInfos; @@ -6309,8 +6309,8 @@ void libmspub::writeCustomShape(ShapeType shapeType, librevenge::RVNGPropertyLis Vector2D secondCtrl(x + scaleX * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 1].m_x), y + scaleY * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 1].m_y)); secondCtrl = transform.transformWithOrigin(secondCtrl, center); - Vector2D end( x + scaleX * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 2].m_x), - y + scaleY * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 2].m_y)); + Vector2D end(x + scaleX * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 2].m_x), + y + scaleY * getSpecialIfNecessary(calculator, shape->mp_vertices[vertexIndex + 2].m_y)); lastPoint = end; end = transform.transformWithOrigin(end, center); librevenge::RVNGPropertyList bezier; diff --git a/src/lib/PolygonUtils.h b/src/lib/PolygonUtils.h index 73e92a2..3e73e77 100644 --- a/src/lib/PolygonUtils.h +++ b/src/lib/PolygonUtils.h @@ -92,7 +92,7 @@ struct CustomShape unsigned m_numGluePoints; unsigned char m_adjustShiftMask; - Coordinate getTextRectangle(double x, double y, double width, double height, boost::function<double (unsigned index)> calculator) const; + Coordinate getTextRectangle(double x, double y, double width, double height, boost::function<double(unsigned index)> calculator) const; CustomShape(const Vertex *p_vertices, unsigned numVertices, const unsigned short *p_elements, unsigned numElements, const Calculation *p_calculations, unsigned numCalculations, const int *p_defaultAdjustValues, unsigned numDefaultAdjustValues, const TextRectangle *p_textRectangles, unsigned numTextRectangles, unsigned coordWidth, unsigned coordHeight, const Vertex *p_gluePoints, unsigned numGluePoints, unsigned char adjustShiftMask = 0) : mp_vertices(p_vertices), m_numVertices(numVertices),
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits