src/lib/CDRCollector.cpp | 2 +- src/lib/CDROutputElementList.cpp | 4 ++-- src/lib/CDRParser.cpp | 8 ++++---- src/lib/CDRPath.cpp | 22 +++++++++++----------- src/lib/CommonParser.cpp | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-)
New commits: commit 5c5d18e14ca19ef90d42a71cb1dab4fa060689dd Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Mon Nov 25 16:27:07 2013 +0100 astyle -HU -A1 -k3 -y -n -s2 -r \*.cpp \*.h Change-Id: Iadd40c708ad1cf74843dda3a6ee6f7d374766f68 diff --git a/src/lib/CDRCollector.cpp b/src/lib/CDRCollector.cpp index 266f1d6..eabfd35 100644 --- a/src/lib/CDRCollector.cpp +++ b/src/lib/CDRCollector.cpp @@ -454,7 +454,7 @@ unsigned libcdr::CDRParserState::_getRGBColor(const CDRColor &color) if (hue < 120) { - satRed = (double)(120 - hue) / 60.0; + satRed = (double)(120 - hue) / 60.0; satGreen = (double)hue/60.0; satBlue = 0.0; } diff --git a/src/lib/CDROutputElementList.cpp b/src/lib/CDROutputElementList.cpp index 6a2ecd3..0491b8f 100644 --- a/src/lib/CDROutputElementList.cpp +++ b/src/lib/CDROutputElementList.cpp @@ -343,7 +343,7 @@ libcdr::CDROutputElementList::CDROutputElementList(const libcdr::CDROutputElemen libcdr::CDROutputElementList &libcdr::CDROutputElementList::operator=(const libcdr::CDROutputElementList &elementList) { for (std::vector<CDROutputElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter) - delete (*iter); + delete(*iter); m_elements.clear(); @@ -356,7 +356,7 @@ libcdr::CDROutputElementList &libcdr::CDROutputElementList::operator=(const libc libcdr::CDROutputElementList::~CDROutputElementList() { for (std::vector<CDROutputElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter) - delete (*iter); + delete(*iter); m_elements.clear(); } diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index f73e54f..e3cbbb9 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -158,7 +158,7 @@ static int parseColourString(const char *colourString, libcdr::CDRColor &colour, space_p).full; } - if( !bRes ) + if (!bRes) return -1; if (colourModel == "CMYK") @@ -1099,7 +1099,7 @@ libcdr::CDRColor libcdr::CDRParser::readColor(librevenge::RVNGInputStream *input colorModel = 0x05; // RGB unsigned red = (unsigned)tint * (unsigned)r + 255 * (100 - tint); unsigned green = (unsigned)tint * (unsigned)g + 255 * (100 - tint); - unsigned blue = (unsigned )tint * (unsigned)b + 255 * (100 - tint); + unsigned blue = (unsigned)tint * (unsigned)b + 255 * (100 - tint); red /= 100; green /= 100; blue /= 100; @@ -2575,7 +2575,7 @@ void libcdr::CDRParser::readFont(librevenge::RVNGInputStream *input, unsigned le else { unsigned char character = 0; - while(true) + while (true) { character = readU8(input); if (character) @@ -3333,7 +3333,7 @@ void libcdr::CDRParser::readStyd(librevenge::RVNGInputStream *input) { input->seek(startPosition+argOffsets[i], librevenge::RVNG_SEEK_SET); CDR_DEBUG_MSG(("Styd: argument type: 0x%x\n", argTypes[i])); - switch(argTypes[i]) + switch (argTypes[i]) { case STYD_NAME: break; diff --git a/src/lib/CDRPath.cpp b/src/lib/CDRPath.cpp index 16cac55..01b5907 100644 --- a/src/lib/CDRPath.cpp +++ b/src/lib/CDRPath.cpp @@ -45,7 +45,7 @@ namespace static inline double getAngle(double bx, double by) { - return fmod(2*M_PI + (by > 0.0 ? 1.0 : -1.0) * acos( bx / sqrt(bx * bx + by * by) ), 2*M_PI); + return fmod(2*M_PI + (by > 0.0 ? 1.0 : -1.0) * acos(bx / sqrt(bx * bx + by * by)), 2*M_PI); } static void getEllipticalArcBBox(double x0, double y0, @@ -126,7 +126,7 @@ static void getEllipticalArcBBox(double x0, double y0, else { txmin = -atan(ry*tan(phi)/rx); - txmax = M_PI - atan (ry*tan(phi)/rx); + txmax = M_PI - atan(ry*tan(phi)/rx); xmin = cx + rx*cos(txmin)*cos(phi) - ry*sin(txmin)*sin(phi); xmax = cx + rx*cos(txmax)*cos(phi) - ry*sin(txmax)*sin(phi); double tmpY = cy + rx*cos(txmin)*sin(phi) + ry*sin(txmin)*cos(phi); @@ -198,7 +198,7 @@ static void getQuadraticBezierBBox(double x0, double y0, double x1, double y1, d ymax = y0 > y ? y0 : y; double t = quadraticDerivative(x0, x1, x); - if(t>=0 && t<=1) + if (t>=0 && t<=1) { double tmpx = quadraticExtreme(t, x0, x1, x); xmin = tmpx < xmin ? tmpx : xmin; @@ -206,7 +206,7 @@ static void getQuadraticBezierBBox(double x0, double y0, double x1, double y1, d } t = quadraticDerivative(y0, y1, y); - if(t>=0 && t<=1) + if (t>=0 && t<=1) { double tmpy = quadraticExtreme(t, y0, y1, y); ymin = tmpy < ymin ? tmpy : ymin; @@ -704,10 +704,10 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr { librevenge::RVNGPropertyListVector vec; writeOut(vec); - if(vec.count() == 0) + if (vec.count() == 0) return; // This must be a mistake and we do not want to crash lower - if(vec[0]["librevenge:path-action"]->getStr() == "Z") + if (vec[0]["librevenge:path-action"]->getStr() == "Z") return; // try to find the bounding box @@ -717,7 +717,7 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr double lastX = 0.0; double lastY = 0.0; - for(unsigned k = 0; k < vec.count(); ++k) + for (unsigned k = 0; k < vec.count(); ++k) { if (!vec[k]["svg:x"] || !vec[k]["svg:y"]) continue; @@ -738,7 +738,7 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr double xmin, xmax, ymin, ymax; - if(vec[k]["librevenge:path-action"]->getStr() == "C") + if (vec[k]["librevenge:path-action"]->getStr() == "C") { getCubicBezierBBox(lastX, lastY, vec[k]["svg:x1"]->getDouble(), vec[k]["svg:y1"]->getDouble(), vec[k]["svg:x2"]->getDouble(), vec[k]["svg:y2"]->getDouble(), @@ -749,7 +749,7 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr qx = (qx < xmax ? xmax : qx); qy = (qy < ymax ? ymax : qy); } - if(vec[k]["librevenge:path-action"]->getStr() == "Q") + if (vec[k]["librevenge:path-action"]->getStr() == "Q") { getQuadraticBezierBBox(lastX, lastY, vec[k]["svg:x1"]->getDouble(), vec[k]["svg:y1"]->getDouble(), vec[k]["svg:x"]->getDouble(), vec[k]["svg:y"]->getDouble(), xmin, ymin, xmax, ymax); @@ -759,7 +759,7 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr qx = (qx < xmax ? xmax : qx); qy = (qy < ymax ? ymax : qy); } - if(vec[k]["librevenge:path-action"]->getStr() == "A") + if (vec[k]["librevenge:path-action"]->getStr() == "A") { getEllipticalArcBBox(lastX, lastY, vec[k]["svg:rx"]->getDouble(), vec[k]["svg:ry"]->getDouble(), vec[k]["librevenge:rotate"] ? vec[k]["librevenge:rotate"]->getDouble() : 0.0, @@ -780,7 +780,7 @@ void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGStr width = qy - py; viewBox.sprintf("%i %i %i %i", 0, 0, (unsigned)(2540*(qx - px)), (unsigned)(2540*(qy - py))); - for(unsigned i = 0; i < vec.count(); ++i) + for (unsigned i = 0; i < vec.count(); ++i) { librevenge::RVNGString sElement; if (vec[i]["librevenge:path-action"]->getStr() == "M") diff --git a/src/lib/CommonParser.cpp b/src/lib/CommonParser.cpp index 8b0f810..652fc42 100644 --- a/src/lib/CommonParser.cpp +++ b/src/lib/CommonParser.cpp @@ -143,7 +143,7 @@ void libcdr::CommonParser::processPath(const std::vector<std::pair<double, doubl path.appendClosePath(); tmpPoints.clear(); } - else if((type & 0x40) && (type & 0x80)) + else if ((type & 0x40) && (type & 0x80)) { tmpPoints.push_back(points[k]); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits