summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:08:56 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-19 19:22:02 +0100
commitc4ab5393e1c2332d92ea6672d3c8ffc3a6220afa (patch)
tree322f3de17afd5fccc26f3b2f9df56714b97cfc65 /oox
parentde80fdc2060abe5b171bcef72944dd7b914ccd33 (diff)
tdf#123936 Formatting files in module oox with clang-format
Change-Id: Ie061189450e0f9004ca503bb28164885812f2acc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105694 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/objectdefaultcontext.hxx10
-rw-r--r--oox/inc/drawingml/shapepropertiescontext.hxx12
-rw-r--r--oox/inc/drawingml/shapestylecontext.hxx12
-rw-r--r--oox/inc/drawingml/spdefcontext.hxx10
-rw-r--r--oox/inc/drawingml/table/tablecellcontext.hxx13
-rw-r--r--oox/inc/drawingml/table/tablecontext.hxx11
-rw-r--r--oox/inc/drawingml/table/tablerow.hxx13
-rw-r--r--oox/inc/drawingml/table/tablerowcontext.hxx13
-rw-r--r--oox/inc/drawingml/textliststyle.hxx20
-rw-r--r--oox/inc/drawingml/themeelementscontext.hxx10
-rw-r--r--oox/qa/unit/vba_encryption.cxx1
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx54
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitors.cxx33
-rw-r--r--oox/source/drawingml/embeddedwavaudiofile.cxx15
-rw-r--r--oox/source/drawingml/table/tablerow.cxx7
-rw-r--r--oox/source/drawingml/table/tablestyle.cxx7
-rw-r--r--oox/source/drawingml/table/tablestylelist.cxx11
-rw-r--r--oox/source/drawingml/table/tablestylepart.cxx7
-rw-r--r--oox/source/drawingml/textspacingcontext.hxx12
-rw-r--r--oox/source/mathml/export.cxx5
-rw-r--r--oox/source/ppt/animationtypes.cxx13
-rw-r--r--oox/source/ppt/animationtypes.hxx9
-rw-r--r--oox/source/ppt/comments.cxx18
-rw-r--r--oox/source/token/namespacemap.cxx5
-rw-r--r--oox/source/token/propertynames.cxx15
25 files changed, 159 insertions, 177 deletions
diff --git a/oox/inc/drawingml/objectdefaultcontext.hxx b/oox/inc/drawingml/objectdefaultcontext.hxx
index 703b03097673..45873c8253ff 100644
--- a/oox/inc/drawingml/objectdefaultcontext.hxx
+++ b/oox/inc/drawingml/objectdefaultcontext.hxx
@@ -22,20 +22,20 @@
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class Theme;
class objectDefaultContext final : public oox::core::ContextHandler2
{
public:
- objectDefaultContext( ::oox::core::ContextHandler2Helper const & rParent, Theme& rTheme );
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ objectDefaultContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rTheme);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
Theme& mrTheme;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
diff --git a/oox/inc/drawingml/shapepropertiescontext.hxx b/oox/inc/drawingml/shapepropertiescontext.hxx
index 6736403f6063..9d047c15c224 100644
--- a/oox/inc/drawingml/shapepropertiescontext.hxx
+++ b/oox/inc/drawingml/shapepropertiescontext.hxx
@@ -23,19 +23,19 @@
#include <oox/core/contexthandler2.hxx>
#include <oox/drawingml/shape.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class ShapePropertiesContext : public ::oox::core::ContextHandler2
{
public:
- ShapePropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, Shape& rShape );
+ ShapePropertiesContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rShape);
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
protected:
- Shape& mrShape;
+ Shape& mrShape;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
diff --git a/oox/inc/drawingml/shapestylecontext.hxx b/oox/inc/drawingml/shapestylecontext.hxx
index 8a2cf9f904fd..02faa22a7670 100644
--- a/oox/inc/drawingml/shapestylecontext.hxx
+++ b/oox/inc/drawingml/shapestylecontext.hxx
@@ -23,20 +23,20 @@
#include <oox/drawingml/shape.hxx>
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class ShapeStyleContext final : public ::oox::core::ContextHandler2
{
public:
- ShapeStyleContext( ::oox::core::ContextHandler2Helper const & rParent, Shape& rShape );
+ ShapeStyleContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rShape);
virtual ~ShapeStyleContext() override;
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
- Shape& mrShape;
+ Shape& mrShape;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
diff --git a/oox/inc/drawingml/spdefcontext.hxx b/oox/inc/drawingml/spdefcontext.hxx
index 6b046af5b61a..6e9206d4acc0 100644
--- a/oox/inc/drawingml/spdefcontext.hxx
+++ b/oox/inc/drawingml/spdefcontext.hxx
@@ -23,18 +23,18 @@
#include <oox/drawingml/shape.hxx>
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class spDefContext final : public oox::core::ContextHandler2
{
public:
- spDefContext( ::oox::core::ContextHandler2Helper const & rParent, Shape& rDefaultObject );
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ spDefContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rDefaultObject);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
Shape& mrDefaultObject;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
diff --git a/oox/inc/drawingml/table/tablecellcontext.hxx b/oox/inc/drawingml/table/tablecellcontext.hxx
index b4c32cdb67cc..a70ad2475e6e 100644
--- a/oox/inc/drawingml/table/tablecellcontext.hxx
+++ b/oox/inc/drawingml/table/tablecellcontext.hxx
@@ -23,22 +23,21 @@
#include <oox/core/contexthandler2.hxx>
#include <drawingml/table/tablecell.hxx>
-namespace oox::drawingml::table {
-
+namespace oox::drawingml::table
+{
class TableCellContext : public ::oox::core::ContextHandler2
{
public:
- TableCellContext( ::oox::core::ContextHandler2Helper const & rParent,
- const ::oox::AttributeList& rAttribs, TableCell& rTableCell );
+ TableCellContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableCell& rTableCell);
virtual ~TableCellContext() override;
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
-
TableCell& mrTableCell;
};
-
}
#endif
diff --git a/oox/inc/drawingml/table/tablecontext.hxx b/oox/inc/drawingml/table/tablecontext.hxx
index a6866ec2c18f..3004333d2739 100644
--- a/oox/inc/drawingml/table/tablecontext.hxx
+++ b/oox/inc/drawingml/table/tablecontext.hxx
@@ -22,23 +22,22 @@
#include <oox/drawingml/shapecontext.hxx>
-namespace oox::drawingml::table {
-
+namespace oox::drawingml::table
+{
class TableProperties;
class TableContext final : public ShapeContext
{
public:
- TableContext( ::oox::core::ContextHandler2Helper const & rParent, const ShapePtr& pShapePtr );
+ TableContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr);
virtual ~TableContext() override;
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
-
TableProperties& mrTableProperties;
};
-
}
#endif
diff --git a/oox/inc/drawingml/table/tablerow.hxx b/oox/inc/drawingml/table/tablerow.hxx
index b344a75cea6c..7f8d212c111e 100644
--- a/oox/inc/drawingml/table/tablerow.hxx
+++ b/oox/inc/drawingml/table/tablerow.hxx
@@ -23,24 +23,21 @@
#include <drawingml/table/tablecell.hxx>
#include <vector>
-namespace oox::drawingml::table {
-
+namespace oox::drawingml::table
+{
class TableRow
{
public:
-
TableRow();
- void setHeight( sal_Int32 nHeight ){ mnHeight = nHeight; };
+ void setHeight(sal_Int32 nHeight) { mnHeight = nHeight; };
sal_Int32 getHeight() const { return mnHeight; };
- std::vector< TableCell >& getTableCells() { return mvTableCells; };
+ std::vector<TableCell>& getTableCells() { return mvTableCells; };
private:
-
sal_Int32 mnHeight;
- std::vector< TableCell > mvTableCells;
+ std::vector<TableCell> mvTableCells;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
diff --git a/oox/inc/drawingml/table/tablerowcontext.hxx b/oox/inc/drawingml/table/tablerowcontext.hxx
index 4d5c7348b7bd..1b18e45d16da 100644
--- a/oox/inc/drawingml/table/tablerowcontext.hxx
+++ b/oox/inc/drawingml/table/tablerowcontext.hxx
@@ -22,24 +22,23 @@
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml::table {
-
+namespace oox::drawingml::table
+{
class TableRow;
class TableRowContext final : public ::oox::core::ContextHandler2
{
public:
- TableRowContext( ::oox::core::ContextHandler2Helper const & rParent,
- const ::oox::AttributeList& rAttribs, TableRow& rTableRow );
+ TableRowContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableRow& rTableRow);
virtual ~TableRowContext() override;
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
-
TableRow& mrTableRow;
};
-
}
#endif
diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx
index 95f101e0a6c4..52cb29330877 100644
--- a/oox/inc/drawingml/textliststyle.hxx
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -23,38 +23,38 @@
#include <drawingml/textparagraphproperties.hxx>
#include <oox/helper/refvector.hxx>
-namespace oox::drawingml {
-
-typedef RefVector< TextParagraphProperties > TextParagraphPropertiesVector;
+namespace oox::drawingml
+{
+typedef RefVector<TextParagraphProperties> TextParagraphPropertiesVector;
class TextListStyle
{
public:
-
TextListStyle();
~TextListStyle();
TextListStyle(const TextListStyle& rStyle);
TextListStyle& operator=(const TextListStyle& rStyle);
- void apply( const TextListStyle& rTextListStyle );
+ void apply(const TextListStyle& rTextListStyle);
const TextParagraphPropertiesVector& getListStyle() const { return maListStyle; };
- TextParagraphPropertiesVector& getListStyle() { return maListStyle; };
+ TextParagraphPropertiesVector& getListStyle() { return maListStyle; };
- const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
- TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; };
+ const TextParagraphPropertiesVector& getAggregationListStyle() const
+ {
+ return maAggregationListStyle;
+ };
+ TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; };
#ifdef DBG_UTIL
void dump() const;
#endif
private:
-
TextParagraphPropertiesVector maListStyle;
TextParagraphPropertiesVector maAggregationListStyle;
};
-
}
#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
diff --git a/oox/inc/drawingml/themeelementscontext.hxx b/oox/inc/drawingml/themeelementscontext.hxx
index 1f292fca7cff..4c113762e10c 100644
--- a/oox/inc/drawingml/themeelementscontext.hxx
+++ b/oox/inc/drawingml/themeelementscontext.hxx
@@ -22,16 +22,16 @@
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class Theme;
class ThemeElementsContext final : public oox::core::ContextHandler2
{
public:
- ThemeElementsContext( ::oox::core::ContextHandler2Helper const & rParent, Theme& rTheme );
- virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement,
- const ::oox::AttributeList& rAttribs ) override;
+ ThemeElementsContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rTheme);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override;
private:
Theme& mrTheme;
diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx
index 0797cc02f6a2..023cc197bafb 100644
--- a/oox/qa/unit/vba_encryption.cxx
+++ b/oox/qa/unit/vba_encryption.cxx
@@ -16,7 +16,6 @@
class TestVbaEncryption : public CppUnit::TestFixture
{
public:
-
#if 0
// an initial test for the encryption taken from the spec
void testSimple1();
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index 7dd653099fdc..cae8a1331036 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -23,13 +23,13 @@
#include <sal/log.hxx>
-namespace {
-
+namespace
+{
void lcl_getListOfStreams(oox::StorageBase* pStorage, std::vector<OUString>& rElementNames)
{
- std::vector< OUString > oElementNames;
+ std::vector<OUString> oElementNames;
pStorage->getElementNames(oElementNames);
- for (const auto & sName : oElementNames)
+ for (const auto& sName : oElementNames)
{
oox::StorageRef rSubStorage = pStorage->openSubStorage(sName, false);
if (rSubStorage && rSubStorage->isStorage())
@@ -45,39 +45,39 @@ void lcl_getListOfStreams(oox::StorageBase* pStorage, std::vector<OUString>& rEl
}
}
}
-
}
-namespace oox::crypto {
-
+namespace oox::crypto
+{
using namespace css;
-DocumentDecryption::DocumentDecryption(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- oox::ole::OleStorage& rOleStorage) :
- mxContext(rxContext),
- mrOleStorage(rOleStorage)
+DocumentDecryption::DocumentDecryption(
+ const css::uno::Reference<css::uno::XComponentContext>& rxContext,
+ oox::ole::OleStorage& rOleStorage)
+ : mxContext(rxContext)
+ , mrOleStorage(rOleStorage)
{
// Get OLE streams into sequences for later use in CryptoEngine
- std::vector< OUString > aStreamNames;
+ std::vector<OUString> aStreamNames;
lcl_getListOfStreams(&mrOleStorage, aStreamNames);
comphelper::SequenceAsHashMap aStreamsData;
- for (const auto & sStreamName : aStreamNames)
+ for (const auto& sStreamName : aStreamNames)
{
uno::Reference<io::XInputStream> xStream = mrOleStorage.openInputStream(sStreamName);
if (!xStream.is())
- throw io::IOException( "Cannot open OLE input stream for " + sStreamName + "!" );
+ throw io::IOException("Cannot open OLE input stream for " + sStreamName + "!");
BinaryXInputStream aBinaryInputStream(xStream, true);
- css::uno::Sequence< sal_Int8 > oData;
+ css::uno::Sequence<sal_Int8> oData;
sal_Int32 nStreamSize = aBinaryInputStream.size();
sal_Int32 nReadBytes = aBinaryInputStream.readData(oData, nStreamSize);
if (nStreamSize != nReadBytes)
{
SAL_WARN("oox", "OLE stream invalid content");
- throw io::IOException( "OLE stream invalid content for " + sStreamName + "!" );
+ throw io::IOException("OLE stream invalid content for " + sStreamName + "!");
}
aStreamsData[sStreamName] <<= oData;
@@ -98,7 +98,8 @@ bool DocumentDecryption::readEncryptionInfo()
return false;
// Read 0x6DataSpaces/DataSpaceMap
- uno::Reference<io::XInputStream> xDataSpaceMap = mrOleStorage.openInputStream("\006DataSpaces/DataSpaceMap");
+ uno::Reference<io::XInputStream> xDataSpaceMap
+ = mrOleStorage.openInputStream("\006DataSpaces/DataSpaceMap");
OUString sDataSpaceName;
if (xDataSpaceMap.is())
@@ -107,9 +108,11 @@ bool DocumentDecryption::readEncryptionInfo()
BinaryXInputStream aDataSpaceStream(xDataSpaceMap, true);
sal_uInt32 aHeaderLength = aDataSpaceStream.readuInt32();
- SAL_WARN_IF(aHeaderLength != 8, "oox", "DataSpaceMap length != 8 is not supported. Some content may be skipped");
+ SAL_WARN_IF(aHeaderLength != 8, "oox",
+ "DataSpaceMap length != 8 is not supported. Some content may be skipped");
sal_uInt32 aEntryCount = aDataSpaceStream.readuInt32();
- SAL_WARN_IF(aEntryCount != 1, "oox", "DataSpaceMap contains more than one entry. Some content may be skipped");
+ SAL_WARN_IF(aEntryCount != 1, "oox",
+ "DataSpaceMap contains more than one entry. Some content may be skipped");
// Read each DataSpaceMapEntry (MS-OFFCRYPTO 2.1.6.1)
for (sal_uInt32 i = 0; i < aEntryCount && !bBroken; i++)
@@ -132,7 +135,8 @@ bool DocumentDecryption::readEncryptionInfo()
break;
}
aDataSpaceStream.readUnicodeArray(aReferenceComponentNameLength / 2);
- aDataSpaceStream.skip((4 - (aReferenceComponentNameLength & 3)) & 3); // Skip padding
+ aDataSpaceStream.skip((4 - (aReferenceComponentNameLength & 3))
+ & 3); // Skip padding
bBroken |= aDataSpaceStream.isEof();
}
@@ -144,7 +148,7 @@ bool DocumentDecryption::readEncryptionInfo()
break;
}
sDataSpaceName = aDataSpaceStream.readUnicodeArray(aDataSpaceNameLength / 2);
- aDataSpaceStream.skip((4 - (aDataSpaceNameLength & 3)) & 3); // Skip padding
+ aDataSpaceStream.skip((4 - (aDataSpaceNameLength & 3)) & 3); // Skip padding
bBroken |= aDataSpaceStream.isEof();
}
@@ -163,10 +167,11 @@ bool DocumentDecryption::readEncryptionInfo()
sDataSpaceName = "StrongEncryptionDataSpace";
}
- uno::Sequence< uno::Any > aArguments;
+ uno::Sequence<uno::Any> aArguments;
mxPackageEncryption.set(
mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.oox.crypto." + sDataSpaceName, aArguments, mxContext), css::uno::UNO_QUERY);
+ "com.sun.star.comp.oox.crypto." + sDataSpaceName, aArguments, mxContext),
+ css::uno::UNO_QUERY);
if (!mxPackageEncryption.is())
{
@@ -196,7 +201,8 @@ bool DocumentDecryption::decrypt(const uno::Reference<io::XStream>& xDocumentStr
return false;
// open the required input streams in the encrypted package
- uno::Reference<io::XInputStream> xEncryptedPackage = mrOleStorage.openInputStream("EncryptedPackage");
+ uno::Reference<io::XInputStream> xEncryptedPackage
+ = mrOleStorage.openInputStream("EncryptedPackage");
// create temporary file for unencrypted package
uno::Reference<io::XOutputStream> xDecryptedPackage = xDocumentStream->getOutputStream();
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index 5d31fd21cc71..11ead81a6bb7 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -28,8 +28,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
using namespace ::oox::core;
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
void ShapeCreationVisitor::visit(ConstraintAtom& /*rAtom*/)
{
// stop processing
@@ -56,8 +56,10 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
// stop processing if it's not a child of previous LayoutNode
- const DiagramData::PointsNameMap::const_iterator aDataNode = mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
- if (aDataNode == mrDgm.getData()->getPointsPresNameMap().end() || mnCurrIdx >= static_cast<sal_Int32>(aDataNode->second.size()))
+ const DiagramData::PointsNameMap::const_iterator aDataNode
+ = mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
+ if (aDataNode == mrDgm.getData()->getPointsPresNameMap().end()
+ || mnCurrIdx >= static_cast<sal_Int32>(aDataNode->second.size()))
return;
const dgm::Point* pNewNode = aDataNode->second.at(mnCurrIdx);
@@ -65,8 +67,9 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
return;
bool bIsChild = false;
- for (const auto & aConnection : mrDgm.getData()->getConnections())
- if (aConnection.msSourceId == mpCurrentNode->msModelId && aConnection.msDestId == pNewNode->msModelId)
+ for (const auto& aConnection : mrDgm.getData()->getConnections())
+ if (aConnection.msSourceId == mpCurrentNode->msModelId
+ && aConnection.msDestId == pNewNode->msModelId)
bIsChild = true;
if (!bIsChild)
@@ -93,9 +96,9 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
if (pShape)
{
- SAL_INFO(
- "oox.drawingml",
- "processing shape type " << (pShape->getCustomShapeProperties()->getShapePresetType()));
+ SAL_INFO("oox.drawingml",
+ "processing shape type "
+ << (pShape->getCustomShapeProperties()->getShapePresetType()));
if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
{
@@ -108,7 +111,9 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
}
else
{
- SAL_WARN("oox.drawingml", "ShapeCreationVisitor::visit: no shape set while processing layoutnode named " << rAtom.getName());
+ SAL_WARN("oox.drawingml",
+ "ShapeCreationVisitor::visit: no shape set while processing layoutnode named "
+ << rAtom.getName());
}
}
@@ -117,7 +122,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
// set new parent for children
ShapePtr pPreviousParent(mpParentShape);
- mpParentShape=pCurrParent;
+ mpParentShape = pCurrParent;
// process children
meLookFor = LAYOUT_NODE;
@@ -128,7 +133,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
meLookFor = LAYOUT_NODE;
// restore parent
- mpParentShape=pPreviousParent;
+ mpParentShape = pPreviousParent;
mpCurrentNode = pPreviousNode;
}
@@ -196,7 +201,8 @@ void ShapeLayoutingVisitor::visit(AlgAtom& rAtom)
{
if (meLookFor == ALGORITHM)
{
- const PresPointShapeMap aMap = rAtom.getLayoutNode().getDiagram().getLayout()->getPresPointShapeMap();
+ const PresPointShapeMap aMap
+ = rAtom.getLayoutNode().getDiagram().getLayout()->getPresPointShapeMap();
auto pShape = aMap.find(mpCurrentNode);
if (pShape != aMap.end())
rAtom.layoutShape(pShape->second, maConstraints, maRules);
@@ -254,7 +260,6 @@ void ShapeLayoutingVisitor::visit(ShapeAtom& /*rAtom*/)
{
// stop processing
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/embeddedwavaudiofile.cxx b/oox/source/drawingml/embeddedwavaudiofile.cxx
index a46c3b5d757e..613e34ccbbe5 100644
--- a/oox/source/drawingml/embeddedwavaudiofile.cxx
+++ b/oox/source/drawingml/embeddedwavaudiofile.cxx
@@ -22,17 +22,16 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
-namespace oox::drawingml {
-
- // CT_EmbeddedWAVAudioFile
-OUString getEmbeddedWAVAudioFile( const core::Relations& rRelations, const AttributeList& rAttribs )
+namespace oox::drawingml
+{
+// CT_EmbeddedWAVAudioFile
+OUString getEmbeddedWAVAudioFile(const core::Relations& rRelations, const AttributeList& rAttribs)
{
- if (rAttribs.getBool( XML_builtIn, false ))
- return rAttribs.getString( XML_name ).get();
+ if (rAttribs.getBool(XML_builtIn, false))
+ return rAttribs.getString(XML_name).get();
else
- return rRelations.getFragmentPathFromRelId( rAttribs.getString( R_TOKEN(embed) ).get() );
+ return rRelations.getFragmentPathFromRelId(rAttribs.getString(R_TOKEN(embed)).get());
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablerow.cxx b/oox/source/drawingml/table/tablerow.cxx
index a45e9a7ac302..3284c7c840db 100644
--- a/oox/source/drawingml/table/tablerow.cxx
+++ b/oox/source/drawingml/table/tablerow.cxx
@@ -24,13 +24,12 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-namespace oox::drawingml::table {
-
+namespace oox::drawingml::table
+{
TableRow::TableRow()
-: mnHeight( 0 )
+ : mnHeight(0)
{
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestyle.cxx b/oox/source/drawingml/table/tablestyle.cxx
index 15ae746eaede..e0ae76e9a884 100644
--- a/oox/source/drawingml/table/tablestyle.cxx
+++ b/oox/source/drawingml/table/tablestyle.cxx
@@ -19,12 +19,9 @@
#include <drawingml/table/tablestyle.hxx>
-namespace oox::drawingml::table {
-
-TableStyle::TableStyle()
+namespace oox::drawingml::table
{
-}
-
+TableStyle::TableStyle() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylelist.cxx b/oox/source/drawingml/table/tablestylelist.cxx
index b04ed5188da9..57a0ba489425 100644
--- a/oox/source/drawingml/table/tablestylelist.cxx
+++ b/oox/source/drawingml/table/tablestylelist.cxx
@@ -20,16 +20,11 @@
#include <drawingml/table/tablestylelist.hxx>
#include <drawingml/table/tablestyle.hxx>
-namespace oox::drawingml::table {
-
-TableStyleList::TableStyleList()
+namespace oox::drawingml::table
{
-}
-
-TableStyleList::~TableStyleList()
-{
-}
+TableStyleList::TableStyleList() {}
+TableStyleList::~TableStyleList() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylepart.cxx b/oox/source/drawingml/table/tablestylepart.cxx
index e9fed946021f..729604f26f54 100644
--- a/oox/source/drawingml/table/tablestylepart.cxx
+++ b/oox/source/drawingml/table/tablestylepart.cxx
@@ -25,12 +25,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-namespace oox::drawingml::table {
-
-TableStylePart::TableStylePart()
+namespace oox::drawingml::table
{
-}
-
+TableStylePart::TableStylePart() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textspacingcontext.hxx b/oox/source/drawingml/textspacingcontext.hxx
index a5abe50f7bf7..5af2c05440a1 100644
--- a/oox/source/drawingml/textspacingcontext.hxx
+++ b/oox/source/drawingml/textspacingcontext.hxx
@@ -22,21 +22,21 @@
#include <oox/core/contexthandler2.hxx>
-namespace oox::drawingml {
-
+namespace oox::drawingml
+{
class TextSpacing;
class TextSpacingContext : public ::oox::core::ContextHandler2
{
public:
- TextSpacingContext( ::oox::core::ContextHandler2Helper const & rParent, TextSpacing & aSpacing );
+ TextSpacingContext(::oox::core::ContextHandler2Helper const& rParent, TextSpacing& aSpacing);
- virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
private:
- TextSpacing& maSpacing;
+ TextSpacing& maSpacing;
};
-
}
#endif
diff --git a/oox/source/mathml/export.cxx b/oox/source/mathml/export.cxx
index 299373e2f103..ceb40d0df0c6 100644
--- a/oox/source/mathml/export.cxx
+++ b/oox/source/mathml/export.cxx
@@ -11,10 +11,7 @@
namespace oox
{
-
-FormulaExportBase::FormulaExportBase()
-{
-}
+FormulaExportBase::FormulaExportBase() {}
} // namespace
diff --git a/oox/source/ppt/animationtypes.cxx b/oox/source/ppt/animationtypes.cxx
index c3fa2b53ebd0..c6b49b3e8703 100644
--- a/oox/source/ppt/animationtypes.cxx
+++ b/oox/source/ppt/animationtypes.cxx
@@ -27,13 +27,13 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::animations;
using namespace ::com::sun::star::xml::sax;
-namespace oox::ppt {
-
+namespace oox::ppt
+{
// ST_TLTime
-Any GetTime( const OUString & val )
+Any GetTime(const OUString& val)
{
Any aDuration;
- if( val == "indefinite" )
+ if (val == "indefinite")
{
aDuration <<= Timing_INDEFINITE;
}
@@ -45,10 +45,10 @@ Any GetTime( const OUString & val )
}
// ST_TLTimeAnimateValueTime
-Any GetTimeAnimateValueTime( const OUString & val )
+Any GetTimeAnimateValueTime(const OUString& val)
{
Any aPercent;
- if( val == "indefinite" )
+ if (val == "indefinite")
{
aPercent <<= Timing_INDEFINITE;
}
@@ -58,7 +58,6 @@ Any GetTimeAnimateValueTime( const OUString & val )
}
return aPercent;
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animationtypes.hxx b/oox/source/ppt/animationtypes.hxx
index 3861456b3e51..92652978fd44 100644
--- a/oox/source/ppt/animationtypes.hxx
+++ b/oox/source/ppt/animationtypes.hxx
@@ -22,13 +22,12 @@
#include <com/sun/star/uno/Any.hxx>
-namespace oox::ppt {
-
+namespace oox::ppt
+{
// ST_TLTime
-css::uno::Any GetTime( const OUString & val );
+css::uno::Any GetTime(const OUString& val);
// ST_TLTimeAnimateValueTime
-css::uno::Any GetTimeAnimateValueTime( const OUString & val );
-
+css::uno::Any GetTimeAnimateValueTime(const OUString& val);
}
#endif
diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx
index 810ac57eb755..78dc5295497f 100644
--- a/oox/source/ppt/comments.cxx
+++ b/oox/source/ppt/comments.cxx
@@ -11,8 +11,8 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <rtl/math.hxx>
-namespace oox::ppt {
-
+namespace oox::ppt
+{
void CommentAuthorList::setValues(const CommentAuthorList& list)
{
for (auto const& author : list.cmAuthorLst)
@@ -29,7 +29,7 @@ void CommentAuthorList::setValues(const CommentAuthorList& list)
}
//DateTime is saved as : 2013-01-10T15:53:26.000
-void Comment::setDateTime (const OUString& sDateTime)
+void Comment::setDateTime(const OUString& sDateTime)
{
sal_Int32 nIdx{ 0 };
aDateTime.Year = sDateTime.getToken(0, '-', nIdx).toInt32();
@@ -61,26 +61,24 @@ void Comment::setDateTime (const OUString& sDateTime)
// if overflow goes into date, I give up
}
-OUString Comment::getAuthor ( const CommentAuthorList& list )
+OUString Comment::getAuthor(const CommentAuthorList& list)
{
const sal_Int32 nId = authorId.toInt32();
for (auto const& author : list.cmAuthorLst)
{
- if(author.id.toInt32() == nId)
+ if (author.id.toInt32() == nId)
return author.name;
}
return "Anonymous";
}
-const Comment& CommentList::getCommentAtIndex (int index)
+const Comment& CommentList::getCommentAtIndex(int index)
{
- if(index >= static_cast<int>(cmLst.size()) || index < 0)
+ if (index >= static_cast<int>(cmLst.size()) || index < 0)
throw css::lang::IllegalArgumentException();
- return cmLst.at(index)
-;
+ return cmLst.at(index);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/namespacemap.cxx b/oox/source/token/namespacemap.cxx
index 26f5739b00fa..11e7c9f0e45f 100644
--- a/oox/source/token/namespacemap.cxx
+++ b/oox/source/token/namespacemap.cxx
@@ -19,8 +19,8 @@
#include <oox/token/namespacemap.hxx>
-namespace oox {
-
+namespace oox
+{
NamespaceMap::NamespaceMap()
{
maTransitionalNamespaceMap = std::map<sal_Int32, OUString>{
@@ -31,7 +31,6 @@ NamespaceMap::NamespaceMap()
#include <namespaces-strictnames.inc>
};
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/propertynames.cxx b/oox/source/token/propertynames.cxx
index c286431817b3..dc0d9ed42b53 100644
--- a/oox/source/token/propertynames.cxx
+++ b/oox/source/token/propertynames.cxx
@@ -19,21 +19,20 @@
#include <oox/token/propertynames.hxx>
-namespace oox {
-
+namespace oox
+{
PropertyNameVector::PropertyNameVector()
{
- static const char* sppcPropertyNames[] =
- {
- // include auto-generated C array with property names as C strings
+ static const char* sppcPropertyNames[] = {
+ // include auto-generated C array with property names as C strings
#include <propertynames.inc>
""
};
size_t nArraySize = SAL_N_ELEMENTS(sppcPropertyNames) - 1;
- reserve( nArraySize );
- for( size_t nIndex = 0; nIndex < nArraySize; ++nIndex )
- push_back( OUString::createFromAscii( sppcPropertyNames[ nIndex ] ) );
+ reserve(nArraySize);
+ for (size_t nIndex = 0; nIndex < nArraySize; ++nIndex)
+ push_back(OUString::createFromAscii(sppcPropertyNames[nIndex]));
}
} // namespace oox