[Libreoffice-commits] libvisio.git: src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Mon Nov 25 07:26:53 PST 2013
src/lib/VSDContentCollector.cpp | 20 ++++++++++----------
src/lib/VSDContentCollector.h | 2 +-
src/lib/VSDOutputElementList.cpp | 4 ++--
src/lib/VSDParser.cpp | 2 +-
src/lib/VSDXMLHelper.cpp | 2 +-
src/lib/VSDXMLParserBase.cpp | 12 ++++++------
src/lib/VSDXMLTokenMap.cpp | 2 +-
src/lib/VisioDocument.cpp | 2 +-
8 files changed, 23 insertions(+), 23 deletions(-)
New commits:
commit a2638ebb7168596ec0dd352669b094c503c43f5f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Nov 25 16:26:23 2013 +0100
astyle -HU -A1 -k3 -y -n -s2 -r \*.cpp \*.h
Change-Id: I44eae8df69b2153f777c08332380ee9d5b386b50
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index d0553d9..c3889aa 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -461,7 +461,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++)
{
@@ -471,7 +471,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++)
{
@@ -1130,7 +1130,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const librevenge::RVNGBin
if (m_foreignType == 1)
{
- switch(m_foreignFormat)
+ switch (m_foreignFormat)
{
case 0:
case 255:
@@ -1170,7 +1170,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const librevenge::RVNGBin
librevenge::RVNGString filename;
if (m_foreignType == 1)
{
- switch(m_foreignFormat)
+ switch (m_foreignFormat)
{
case 0:
case 255:
@@ -1193,7 +1193,7 @@ void libvisio::VSDContentCollector::_handleForeignData(const librevenge::RVNGBin
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
@@ -1577,7 +1577,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;
@@ -2526,7 +2526,7 @@ void libvisio::VSDContentCollector::_fillAndShadowProperties(const VSDFillStyle
styleProps.insert("librevenge:end-opacity", 1, librevenge::RVNG_PERCENT);
styleProps.insert("draw:border", 0, librevenge::RVNG_PERCENT);
- switch(style.pattern)
+ switch (style.pattern)
{
case 25:
styleProps.insert("draw:angle", 270);
@@ -2591,7 +2591,7 @@ void libvisio::VSDContentCollector::_fillAndShadowProperties(const VSDFillStyle
styleProps.insert("librevenge:end-opacity", 1, librevenge::RVNG_PERCENT);
styleProps.insert("draw:border", 0, librevenge::RVNG_PERCENT);
- switch(style.pattern)
+ switch (style.pattern)
{
case 36:
styleProps.insert("svg:cx", 0, librevenge::RVNG_PERCENT);
@@ -2778,7 +2778,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;
@@ -2801,7 +2801,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 504747b..e56bb2d 100644
--- a/src/lib/VSDContentCollector.h
+++ b/src/lib/VSDContentCollector.h
@@ -216,7 +216,7 @@ private:
void appendCharacters(librevenge::RVNGString &text, const std::vector<unsigned char> &characters, TextFormat format);
void appendCharacters(librevenge::RVNGString &text, const std::vector<unsigned char> &characters);
void _convertDataToString(librevenge::RVNGString &result, const librevenge::RVNGBinaryData &data, TextFormat format);
- bool parseFormatId( const char *formatString, unsigned short &result );
+ bool parseFormatId(const char *formatString, unsigned short &result);
void _appendField(librevenge::RVNGString &text);
// NURBS processing functions
diff --git a/src/lib/VSDOutputElementList.cpp b/src/lib/VSDOutputElementList.cpp
index b7047f7..d09e9e3 100644
--- a/src/lib/VSDOutputElementList.cpp
+++ b/src/lib/VSDOutputElementList.cpp
@@ -346,7 +346,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();
@@ -365,7 +365,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/VSDParser.cpp b/src/lib/VSDParser.cpp
index f1fe1a3..b8519a0 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -989,7 +989,7 @@ void libvisio::VSDParser::readXFormData(librevenge::RVNGInputStream *input)
void libvisio::VSDParser::readTxtXForm(librevenge::RVNGInputStream *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, librevenge::RVNG_SEEK_CUR);
m_shape.m_txtxform->pinX = readDouble(input);
diff --git a/src/lib/VSDXMLHelper.cpp b/src/lib/VSDXMLHelper.cpp
index 799e93c..2367a45 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 762fb13..d024f4d 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -1109,7 +1109,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);
@@ -1485,7 +1485,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);
@@ -1927,7 +1927,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;
@@ -1935,7 +1935,7 @@ int libvisio::VSDXMLParserBase::readNURBSData(boost::optional<NURBSData> &data,
xmlFree(formula);
}
- if( !bRes )
+ if (!bRes)
return -1;
data = tmpData;
return 1;
@@ -1965,7 +1965,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;
@@ -1973,7 +1973,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 2f7b32a..ba8c69e 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;
diff --git a/src/lib/VisioDocument.cpp b/src/lib/VisioDocument.cpp
index e11a9e2..20db396 100644
--- a/src/lib/VisioDocument.cpp
+++ b/src/lib/VisioDocument.cpp
@@ -166,7 +166,7 @@ static bool parseBinaryVisioDocument(librevenge::RVNGInputStream *input, libreve
try
{
unsigned char version = libvisio::readU8(docStream);
- switch(version)
+ switch (version)
{
case 1:
case 2:
More information about the Libreoffice-commits
mailing list