[Libreoffice-commits] libmspub.git: src/lib

Fridrich Å trba fridrich.strba at bluewin.ch
Wed Dec 11 13:08:19 PST 2013


 src/lib/MSPUBCollector.cpp    |   28 ++++++++++++-------------
 src/lib/MSPUBParser.cpp       |   46 +++++++++++++++++++++---------------------
 src/lib/MSPUBParser.h         |    2 -
 src/lib/MSPUBParser2k.cpp     |   16 +++++++-------
 src/lib/MSPUBParser97.cpp     |    2 -
 src/lib/PolygonUtils.cpp      |   32 ++++++++++++++---------------
 src/lib/ShapeGroupElement.cpp |    2 -
 7 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit d452d5853bd3f2c94f9f796d4f2e59d211dbbfee
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Dec 11 22:07:55 2013 +0100

    Re-astyle
    
    Change-Id: I07970ababe907fff2595f605abebb91fbd10db85

diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp
index fa28b0e..4636a16 100644
--- a/src/lib/MSPUBCollector.cpp
+++ b/src/lib/MSPUBCollector.cpp
@@ -130,55 +130,55 @@ librevenge::RVNGBinaryData &libmspub::MSPUBCollector::addEOTFont(const libreveng
 }
 
 void libmspub::MSPUBCollector::setShapePictureRecolor(unsigned seqNum,
-    const ColorReference &recolor)
+                                                      const ColorReference &recolor)
 {
   m_shapeInfosBySeqNum[seqNum].m_pictureRecolor = recolor;
 }
 
 void libmspub::MSPUBCollector::setShapePictureBrightness(unsigned seqNum,
-    int brightness)
+                                                         int brightness)
 {
   m_shapeInfosBySeqNum[seqNum].m_pictureBrightness = brightness;
 }
 
 void libmspub::MSPUBCollector::setShapePictureContrast(unsigned seqNum,
-    int contrast)
+                                                       int contrast)
 {
   m_shapeInfosBySeqNum[seqNum].m_pictureContrast = contrast;
 }
 
 void libmspub::MSPUBCollector::setShapeBeginArrow(unsigned seqNum,
-    const Arrow &arrow)
+                                                  const Arrow &arrow)
 {
   m_shapeInfosBySeqNum[seqNum].m_beginArrow = arrow;
 }
 
 void libmspub::MSPUBCollector::setShapeVerticalTextAlign(unsigned seqNum,
-    VerticalAlign va)
+                                                         VerticalAlign va)
 {
   m_shapeInfosBySeqNum[seqNum].m_verticalAlign = va;
 }
 
 void libmspub::MSPUBCollector::setShapeEndArrow(unsigned seqNum,
-    const Arrow &arrow)
+                                                const Arrow &arrow)
 {
   m_shapeInfosBySeqNum[seqNum].m_endArrow = arrow;
 }
 
 void libmspub::MSPUBCollector::setShapeTableInfo(unsigned seqNum,
-    const TableInfo &ti)
+                                                 const TableInfo &ti)
 {
   m_shapeInfosBySeqNum[seqNum].m_tableInfo = ti;
 }
 
 void libmspub::MSPUBCollector::setShapeNumColumns(unsigned seqNum,
-    unsigned numColumns)
+                                                  unsigned numColumns)
 {
   m_shapeInfosBySeqNum[seqNum].m_numColumns = numColumns;
 }
 
 void libmspub::MSPUBCollector::setShapeColumnSpacing(unsigned seqNum,
-    unsigned spacing)
+                                                     unsigned spacing)
 {
   m_shapeInfosBySeqNum[seqNum].m_columnSpacing = spacing;
 }
@@ -309,7 +309,7 @@ void libmspub::MSPUBCollector::setShapeBorderImageId(unsigned seqNum, unsigned i
 }
 
 void libmspub::MSPUBCollector::setShapeCustomPath(unsigned seqNum,
-    const DynamicCustomShape &shape)
+                                                  const DynamicCustomShape &shape)
 {
   m_shapeInfosBySeqNum[seqNum].m_customShape = shape;
 }
@@ -1004,14 +1004,14 @@ csd_fail:
 }
 
 void libmspub::MSPUBCollector::setShapeLineBackColor(unsigned shapeSeqNum,
-    ColorReference backColor)
+                                                     ColorReference backColor)
 {
   m_shapeInfosBySeqNum[shapeSeqNum].m_lineBackColor = backColor;
 }
 
 void libmspub::MSPUBCollector::writeImage(double x, double y,
-    double height, double width, ImgType type, const librevenge::RVNGBinaryData &blob,
-    boost::optional<Color> oneBitColor) const
+                                          double height, double width, ImgType type, const librevenge::RVNGBinaryData &blob,
+                                          boost::optional<Color> oneBitColor) const
 {
   librevenge::RVNGPropertyList props;
   if (!!oneBitColor)
@@ -1600,7 +1600,7 @@ bool libmspub::MSPUBCollector::addImage(unsigned index, ImgType type, librevenge
 }
 
 librevenge::RVNGBinaryData *libmspub::MSPUBCollector::addBorderImage(ImgType type,
-    unsigned borderArtIndex)
+                                                                     unsigned borderArtIndex)
 {
   while (borderArtIndex >= m_borderImages.size())
   {
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 5a3ed8a..e28708b 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -69,7 +69,7 @@ libmspub::MSPUBParser::~MSPUBParser()
 }
 
 bool libmspub::MSPUBParser::lineExistsByFlagPointer(unsigned *flags,
-    unsigned *geomFlags)
+                                                    unsigned *geomFlags)
 {
   return flags &&
          !(((*flags) & FLAG_USE_LINE) && !((*flags) & FLAG_LINE)) &&
@@ -1526,7 +1526,7 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
           const std::map<unsigned short, unsigned> &tertiaryFoptValues =
             maybe_tertiaryFoptValues.get();
           const unsigned *ptr_pictureRecolor = getIfExists_const(tertiaryFoptValues,
-                                               FIELDID_PICTURE_RECOLOR);
+                                                                 FIELDID_PICTURE_RECOLOR);
           if (ptr_pictureRecolor)
           {
             m_collector->setShapePictureRecolor(*shapeSeqNum,
@@ -1719,11 +1719,11 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
             }
           }
           unsigned *ptr_beginArrowStyle = getIfExists(foptValues.m_scalarValues,
-                                          FIELDID_BEGIN_ARROW_STYLE);
+                                                      FIELDID_BEGIN_ARROW_STYLE);
           unsigned *ptr_beginArrowWidth = getIfExists(foptValues.m_scalarValues,
-                                          FIELDID_BEGIN_ARROW_WIDTH);
+                                                      FIELDID_BEGIN_ARROW_WIDTH);
           unsigned *ptr_beginArrowHeight = getIfExists(foptValues.m_scalarValues,
-                                           FIELDID_BEGIN_ARROW_HEIGHT);
+                                                       FIELDID_BEGIN_ARROW_HEIGHT);
           m_collector->setShapeBeginArrow(*shapeSeqNum, Arrow(
                                             ptr_beginArrowStyle ? (ArrowStyle)(*ptr_beginArrowStyle) :
                                             NO_ARROW,
@@ -1732,11 +1732,11 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
                                             ptr_beginArrowHeight ? (ArrowSize)(*ptr_beginArrowHeight) :
                                             MEDIUM));
           unsigned *ptr_endArrowStyle = getIfExists(foptValues.m_scalarValues,
-                                        FIELDID_END_ARROW_STYLE);
+                                                    FIELDID_END_ARROW_STYLE);
           unsigned *ptr_endArrowWidth = getIfExists(foptValues.m_scalarValues,
-                                        FIELDID_END_ARROW_WIDTH);
+                                                    FIELDID_END_ARROW_WIDTH);
           unsigned *ptr_endArrowHeight = getIfExists(foptValues.m_scalarValues,
-                                         FIELDID_END_ARROW_HEIGHT);
+                                                     FIELDID_END_ARROW_HEIGHT);
           m_collector->setShapeEndArrow(*shapeSeqNum, Arrow(
                                           ptr_endArrowStyle ? (ArrowStyle)(*ptr_endArrowStyle) :
                                           NO_ARROW,
@@ -1763,15 +1763,15 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
               unsigned *shadowOriginX = getIfExists(foptValues.m_scalarValues, FIELDID_SHADOW_ORIGIN_X);
               unsigned *shadowOriginY = getIfExists(foptValues.m_scalarValues, FIELDID_SHADOW_ORIGIN_Y);
               m_collector->setShapeShadow(*shapeSeqNum, Shadow(shadowType,
-                                          shadowOffsetX ? static_cast<int>(*shadowOffsetX) : 0x6338,
-                                          shadowOffsetY ? static_cast<int>(*shadowOffsetY) : 0x6338,
-                                          shadowOffsetX2 ? static_cast<int>(*shadowOffsetX2) : 0,
-                                          shadowOffsetY2 ? static_cast<int>(*shadowOffsetY2) : 0,
-                                          shadowOriginX ? toFixedPoint(static_cast<int>(*shadowOriginX)) : 0,
-                                          shadowOriginY ? toFixedPoint(static_cast<int>(*shadowOriginY)) : 0,
-                                          toFixedPoint(shadowOpacity ? static_cast<int>(*shadowOpacity) : 0x10000),
-                                          ColorReference(shadowColor ? *shadowColor : 0x00808080),
-                                          ColorReference(shadowHColor ? *shadowHColor : 0x00CBCBCB)
+                                                               shadowOffsetX ? static_cast<int>(*shadowOffsetX) : 0x6338,
+                                                               shadowOffsetY ? static_cast<int>(*shadowOffsetY) : 0x6338,
+                                                               shadowOffsetX2 ? static_cast<int>(*shadowOffsetX2) : 0,
+                                                               shadowOffsetY2 ? static_cast<int>(*shadowOffsetY2) : 0,
+                                                               shadowOriginX ? toFixedPoint(static_cast<int>(*shadowOriginX)) : 0,
+                                                               shadowOriginY ? toFixedPoint(static_cast<int>(*shadowOriginY)) : 0,
+                                                               toFixedPoint(shadowOpacity ? static_cast<int>(*shadowOpacity) : 0x10000),
+                                                               ColorReference(shadowColor ? *shadowColor : 0x00808080),
+                                                               ColorReference(shadowHColor ? *shadowHColor : 0x00CBCBCB)
                                                               ));
 
             }
@@ -1787,8 +1787,8 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
             const std::vector<unsigned char> segmentData = foptValues.m_complexValues[FIELDID_P_SEGMENTS];
             const std::vector<unsigned char> guideData = foptValues.m_complexValues[FIELDID_P_GUIDES];
             m_collector->setShapeCustomPath(*shapeSeqNum, getDynamicCustomShape(vertexData, segmentData,
-                                            guideData, p_geoRight ? *p_geoRight : 21600,
-                                            p_geoBottom ? *p_geoBottom : 21600));
+                                                                                guideData, p_geoRight ? *p_geoRight : 21600,
+                                                                                p_geoBottom ? *p_geoBottom : 21600));
           }
           const std::vector<unsigned char> wrapVertexData = foptValues.m_complexValues[FIELDID_P_WRAPPOLYGONVERTICES];
           if (!wrapVertexData.empty())
@@ -1853,7 +1853,7 @@ void libmspub::MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input,
 }
 
 boost::shared_ptr<libmspub::Fill> libmspub::MSPUBParser::getNewFill(const std::map<unsigned short, unsigned> &foptProperties,
-    bool &skipIfNotBg, std::map<unsigned short, std::vector<unsigned char> > &foptValues)
+                                                                    bool &skipIfNotBg, std::map<unsigned short, std::vector<unsigned char> > &foptValues)
 {
   const FillType *ptr_fillType = (FillType *)getIfExists_const(foptProperties, FIELDID_FILL_TYPE);
   FillType fillType = ptr_fillType ? *ptr_fillType : SOLID;
@@ -2308,7 +2308,7 @@ bool libmspub::MSPUBParser::parseContentChunkReference(librevenge::RVNGInputStre
     else if (type == BORDER_ART)
     {
       m_contentChunks.push_back(ContentChunkReference(type, offset, 0,
-                                m_lastSeenSeqNum, seenParentSeqNum ? parentSeqNum : 0));
+                                                      m_lastSeenSeqNum, seenParentSeqNum ? parentSeqNum : 0));
       m_borderArtChunkIndices.push_back(
         unsigned(m_contentChunks.size() - 1));
       return true;
@@ -2316,8 +2316,8 @@ bool libmspub::MSPUBParser::parseContentChunkReference(librevenge::RVNGInputStre
     else if (type == FONT)
     {
       m_contentChunks.push_back(ContentChunkReference(type, offset, 0,
-                                m_lastSeenSeqNum,
-                                seenParentSeqNum ? parentSeqNum : 0));
+                                                      m_lastSeenSeqNum,
+                                                      seenParentSeqNum ? parentSeqNum : 0));
       m_fontChunkIndices.push_back(unsigned(m_contentChunks.size() - 1));
       return true;
     }
diff --git a/src/lib/MSPUBParser.h b/src/lib/MSPUBParser.h
index 7f698e6..3663443 100644
--- a/src/lib/MSPUBParser.h
+++ b/src/lib/MSPUBParser.h
@@ -148,7 +148,7 @@ protected:
   std::vector<Vertex> parseVertices(const std::vector<unsigned char>
                                     &vertexData);
   std::vector<unsigned> parseTableCellDefinitions(librevenge::RVNGInputStream *input,
-      const QuillChunkReference &chunk);
+                                                  const QuillChunkReference &chunk);
   std::vector<unsigned short> parseSegments(
     const std::vector<unsigned char> &segmentData);
   DynamicCustomShape getDynamicCustomShape(
diff --git a/src/lib/MSPUBParser2k.cpp b/src/lib/MSPUBParser2k.cpp
index 5830680..24006f9 100644
--- a/src/lib/MSPUBParser2k.cpp
+++ b/src/lib/MSPUBParser2k.cpp
@@ -478,7 +478,7 @@ bool libmspub::MSPUBParser2k::parseDocument(librevenge::RVNGInputStream *input)
 }
 
 void libmspub::MSPUBParser2k::parseShapeRotation(librevenge::RVNGInputStream *input, bool isGroup, bool isLine,
-    unsigned seqNum, unsigned chunkOffset)
+                                                 unsigned seqNum, unsigned chunkOffset)
 {
   input->seek(chunkOffset + 4, librevenge::RVNG_SEEK_SET);
   // shape transforms are NOT compounded with group transforms. They are equal to what they would be
@@ -494,7 +494,7 @@ void libmspub::MSPUBParser2k::parseShapeRotation(librevenge::RVNGInputStream *in
 }
 
 bool libmspub::MSPUBParser2k::parse2kShapeChunk(const ContentChunkReference &chunk, librevenge::RVNGInputStream *input,
-    boost::optional<unsigned> pageSeqNum, bool topLevelCall)
+                                                boost::optional<unsigned> pageSeqNum, bool topLevelCall)
 {
   unsigned page = pageSeqNum.get_value_or(chunk.parentSeqNum);
   input->seek(chunk.offset, librevenge::RVNG_SEEK_SET);
@@ -611,7 +611,7 @@ void libmspub::MSPUBParser2k::assignShapeImgIndex(unsigned seqNum)
 }
 
 void libmspub::MSPUBParser2k::parseShapeCoordinates(librevenge::RVNGInputStream *input, unsigned seqNum,
-    unsigned chunkOffset)
+                                                    unsigned chunkOffset)
 {
   input->seek(chunkOffset + 6, librevenge::RVNG_SEEK_SET);
   int xs = translateCoordinateIfNecessary(readS32(input));
@@ -627,7 +627,7 @@ int libmspub::MSPUBParser2k::translateCoordinateIfNecessary(int coordinate) cons
 }
 
 void libmspub::MSPUBParser2k::parseShapeFlips(librevenge::RVNGInputStream *input, unsigned flagsOffset, unsigned seqNum,
-    unsigned chunkOffset)
+                                              unsigned chunkOffset)
 {
   if (flagsOffset)
   {
@@ -640,9 +640,9 @@ void libmspub::MSPUBParser2k::parseShapeFlips(librevenge::RVNGInputStream *input
 }
 
 void libmspub::MSPUBParser2k::parseShapeType(librevenge::RVNGInputStream *input,
-    unsigned seqNum, unsigned chunkOffset,
-    bool &isGroup, bool &isLine, bool &isImage, bool &isRectangle,
-    unsigned &flagsOffset)
+                                             unsigned seqNum, unsigned chunkOffset,
+                                             bool &isGroup, bool &isLine, bool &isImage, bool &isRectangle,
+                                             unsigned &flagsOffset)
 {
   input->seek(chunkOffset, librevenge::RVNG_SEEK_SET);
   unsigned short typeMarker = readU16(input);
@@ -712,7 +712,7 @@ unsigned libmspub::MSPUBParser2k::getSecondLineOffset() const
 }
 
 void libmspub::MSPUBParser2k::parseShapeLine(librevenge::RVNGInputStream *input, bool isRectangle, unsigned offset,
-    unsigned seqNum)
+                                             unsigned seqNum)
 {
   input->seek(offset + getFirstLineOffset(), librevenge::RVNG_SEEK_SET);
   unsigned short leftLineWidth = readU8(input);
diff --git a/src/lib/MSPUBParser97.cpp b/src/lib/MSPUBParser97.cpp
index a386733..22e7a1d 100644
--- a/src/lib/MSPUBParser97.cpp
+++ b/src/lib/MSPUBParser97.cpp
@@ -92,7 +92,7 @@ void libmspub::MSPUBParser97::parseContentsTextIfNecessary(librevenge::RVNGInput
   unsigned prop3Index = readU16(input);
   unsigned prop3End = readU16(input);
   std::vector<SpanInfo97> spanInfos = getSpansInfo(input, prop1Index,
-                                      prop2Index, prop3Index, prop3End);
+                                                   prop2Index, prop3Index, prop3End);
   input->seek(textStart, librevenge::RVNG_SEEK_SET);
   TextInfo97 textInfo = getTextInfo(input, textEnd - textStart);
   unsigned iParaEnd = 0, iSpanEnd = 0;
diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp
index cf8516e..ddf0f0d 100644
--- a/src/lib/PolygonUtils.cpp
+++ b/src/lib/PolygonUtils.cpp
@@ -6394,22 +6394,22 @@ bool libmspub::isShapeTypeRectangle(ShapeType type)
 boost::shared_ptr<const libmspub::CustomShape> libmspub::getFromDynamicCustomShape(const libmspub::DynamicCustomShape &dcs)
 {
   return boost::shared_ptr<const CustomShape>(new CustomShape(
-           dcs.m_vertices.empty() ? NULL : &dcs.m_vertices[0],
-           dcs.m_vertices.size(),
-           dcs.m_elements.empty() ? NULL : &dcs.m_elements[0],
-           dcs.m_elements.size(),
-           dcs.m_calculations.empty() ? NULL : &dcs.m_calculations[0],
-           dcs.m_calculations.size(),
-           dcs.m_defaultAdjustValues.empty() ? NULL :
-           &dcs.m_defaultAdjustValues[0],
-           dcs.m_defaultAdjustValues.size(),
-           dcs.m_textRectangles.empty() ? NULL : &dcs.m_textRectangles[0],
-           dcs.m_textRectangles.size(),
-           dcs.m_coordWidth, dcs.m_coordHeight,
-           dcs.m_gluePoints.empty() ? NULL : &dcs.m_gluePoints[0],
-           dcs.m_gluePoints.size(),
-           dcs.m_adjustShiftMask
-         ));
+                                                dcs.m_vertices.empty() ? NULL : &dcs.m_vertices[0],
+                                                dcs.m_vertices.size(),
+                                                dcs.m_elements.empty() ? NULL : &dcs.m_elements[0],
+                                                dcs.m_elements.size(),
+                                                dcs.m_calculations.empty() ? NULL : &dcs.m_calculations[0],
+                                                dcs.m_calculations.size(),
+                                                dcs.m_defaultAdjustValues.empty() ? NULL :
+                                                &dcs.m_defaultAdjustValues[0],
+                                                dcs.m_defaultAdjustValues.size(),
+                                                dcs.m_textRectangles.empty() ? NULL : &dcs.m_textRectangles[0],
+                                                dcs.m_textRectangles.size(),
+                                                dcs.m_coordWidth, dcs.m_coordHeight,
+                                                dcs.m_gluePoints.empty() ? NULL : &dcs.m_gluePoints[0],
+                                                dcs.m_gluePoints.size(),
+                                                dcs.m_adjustShiftMask
+                                              ));
 }
 
 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/ShapeGroupElement.cpp b/src/lib/ShapeGroupElement.cpp
index 57c6468..1edf391 100644
--- a/src/lib/ShapeGroupElement.cpp
+++ b/src/lib/ShapeGroupElement.cpp
@@ -85,7 +85,7 @@ void libmspub::ShapeGroupElement::visit(boost::function<
   double offsetX = centerX - relativeCenterX;
   double offsetY = centerY - relativeCenterY;
   VectorTransformation2D foldedTransform = VectorTransformation2D::fromTranslate(-offsetX, -offsetY)
-      * parentFoldedTransform * VectorTransformation2D::fromTranslate(offsetX, offsetY) * m_transform;
+                                           * parentFoldedTransform * VectorTransformation2D::fromTranslate(offsetX, offsetY) * m_transform;
   boost::function<void(void)> afterOp = visitor(info, relativeTo, foldedTransform, isGroup(), m_transform);
   for (unsigned i = 0; i < m_children.size(); ++i)
   {


More information about the Libreoffice-commits mailing list