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>
This commit is contained in:
Philipp Hofer
2020-11-19 19:22:02 +01:00
committed by Christian Lohmaier
parent de80fdc206
commit c4ab5393e1
26 changed files with 159 additions and 202 deletions
+5 -5
View File
@@ -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
+6 -6
View File
@@ -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
+6 -6
View File
@@ -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
+5 -5
View File
@@ -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
+6 -7
View File
@@ -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
+5 -6
View File
@@ -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
+5 -8
View File
@@ -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
+6 -7
View File
@@ -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
+10 -10
View File
@@ -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
+5 -5
View File
@@ -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;
-1
View File
@@ -16,7 +16,6 @@
class TestVbaEncryption : public CppUnit::TestFixture
{
public:
#if 0
// an initial test for the encryption taken from the spec
void testSimple1();
+30 -24
View File
@@ -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();
@@ -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: */
@@ -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
{
if (rAttribs.getBool( XML_builtIn, false ))
return rAttribs.getString( XML_name ).get();
// CT_EmbeddedWAVAudioFile
OUString getEmbeddedWAVAudioFile(const core::Relations& rRelations, const AttributeList& rAttribs)
{
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: */
+3 -4
View File
@@ -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: */
+2 -5
View File
@@ -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: */
@@ -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: */
@@ -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: */
+6 -6
View File
@@ -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
+1 -4
View File
@@ -11,10 +11,7 @@
namespace oox
{
FormulaExportBase::FormulaExportBase()
{
}
FormulaExportBase::FormulaExportBase() {}
} // namespace
+6 -7
View File
@@ -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: */
+4 -5
View File
@@ -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
+8 -10
View File
@@ -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: */
+2 -3
View File
@@ -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: */
+7 -8
View File
@@ -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
-25
View File
@@ -7638,20 +7638,12 @@ oox/inc/drawingml/guidcontext.hxx
oox/inc/drawingml/lineproperties.hxx
oox/inc/drawingml/linepropertiescontext.hxx
oox/inc/drawingml/misccontexts.hxx
oox/inc/drawingml/objectdefaultcontext.hxx
oox/inc/drawingml/scene3dcontext.hxx
oox/inc/drawingml/shape3dproperties.hxx
oox/inc/drawingml/shapepropertiescontext.hxx
oox/inc/drawingml/shapestylecontext.hxx
oox/inc/drawingml/spdefcontext.hxx
oox/inc/drawingml/table/tablebackgroundstylecontext.hxx
oox/inc/drawingml/table/tablecell.hxx
oox/inc/drawingml/table/tablecellcontext.hxx
oox/inc/drawingml/table/tablecontext.hxx
oox/inc/drawingml/table/tablepartstylecontext.hxx
oox/inc/drawingml/table/tableproperties.hxx
oox/inc/drawingml/table/tablerow.hxx
oox/inc/drawingml/table/tablerowcontext.hxx
oox/inc/drawingml/table/tablestyle.hxx
oox/inc/drawingml/table/tablestylecellstylecontext.hxx
oox/inc/drawingml/table/tablestylecontext.hxx
@@ -7669,18 +7661,15 @@ oox/inc/drawingml/texteffectscontext.hxx
oox/inc/drawingml/textfield.hxx
oox/inc/drawingml/textfieldcontext.hxx
oox/inc/drawingml/textfont.hxx
oox/inc/drawingml/textliststyle.hxx
oox/inc/drawingml/textliststylecontext.hxx
oox/inc/drawingml/textparagraph.hxx
oox/inc/drawingml/textparagraphproperties.hxx
oox/inc/drawingml/textparagraphpropertiescontext.hxx
oox/inc/drawingml/textrun.hxx
oox/inc/drawingml/textspacing.hxx
oox/inc/drawingml/themeelementscontext.hxx
oox/inc/drawingml/transform2dcontext.hxx
oox/qa/token/tokenmap-test.cxx
oox/qa/unit/vba_compression.cxx
oox/qa/unit/vba_encryption.cxx
oox/source/core/binarycodec.cxx
oox/source/core/contexthandler.cxx
oox/source/core/contexthandler2.cxx
@@ -7696,7 +7685,6 @@ oox/source/core/relationshandler.cxx
oox/source/core/xmlfilterbase.cxx
oox/source/crypto/AgileEngine.cxx
oox/source/crypto/CryptTools.cxx
oox/source/crypto/DocumentDecryption.cxx
oox/source/crypto/DocumentEncryption.cxx
oox/source/crypto/Standard2007Engine.cxx
oox/source/docprop/docprophandler.cxx
@@ -7754,7 +7742,6 @@ oox/source/drawingml/diagram/diagramlayoutatoms.cxx
oox/source/drawingml/diagram/diagramlayoutatoms.hxx
oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
oox/source/drawingml/diagram/layoutatomvisitors.cxx
oox/source/drawingml/diagram/layoutatomvisitors.hxx
oox/source/drawingml/diagram/layoutnodecontext.cxx
oox/source/drawingml/diagram/layoutnodecontext.hxx
@@ -7763,7 +7750,6 @@ oox/source/drawingml/effectproperties.cxx
oox/source/drawingml/effectproperties.hxx
oox/source/drawingml/effectpropertiescontext.cxx
oox/source/drawingml/effectpropertiescontext.hxx
oox/source/drawingml/embeddedwavaudiofile.cxx
oox/source/drawingml/fillproperties.cxx
oox/source/drawingml/graphicshapecontext.cxx
oox/source/drawingml/guidcontext.cxx
@@ -7788,14 +7774,10 @@ oox/source/drawingml/table/tablecellcontext.cxx
oox/source/drawingml/table/tablecontext.cxx
oox/source/drawingml/table/tablepartstylecontext.cxx
oox/source/drawingml/table/tableproperties.cxx
oox/source/drawingml/table/tablerow.cxx
oox/source/drawingml/table/tablerowcontext.cxx
oox/source/drawingml/table/tablestyle.cxx
oox/source/drawingml/table/tablestylecellstylecontext.cxx
oox/source/drawingml/table/tablestylecontext.cxx
oox/source/drawingml/table/tablestylelist.cxx
oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
oox/source/drawingml/table/tablestylepart.cxx
oox/source/drawingml/table/tablestyletextstylecontext.cxx
oox/source/drawingml/textbody.cxx
oox/source/drawingml/textbodycontext.cxx
@@ -7814,7 +7796,6 @@ oox/source/drawingml/textparagraphproperties.cxx
oox/source/drawingml/textparagraphpropertiescontext.cxx
oox/source/drawingml/textrun.cxx
oox/source/drawingml/textspacingcontext.cxx
oox/source/drawingml/textspacingcontext.hxx
oox/source/drawingml/texttabstoplistcontext.cxx
oox/source/drawingml/texttabstoplistcontext.hxx
oox/source/drawingml/theme.cxx
@@ -7845,7 +7826,6 @@ oox/source/helper/propertyset.cxx
oox/source/helper/storagebase.cxx
oox/source/helper/textinputstream.cxx
oox/source/helper/zipstorage.cxx
oox/source/mathml/export.cxx
oox/source/mathml/import.cxx
oox/source/mathml/importutils.cxx
oox/source/ole/axbinaryreader.cxx
@@ -7863,14 +7843,11 @@ oox/source/ole/vbainputstream.cxx
oox/source/ole/vbamodule.cxx
oox/source/ole/vbaproject.cxx
oox/source/ppt/animationspersist.cxx
oox/source/ppt/animationtypes.cxx
oox/source/ppt/animationtypes.hxx
oox/source/ppt/animvariantcontext.cxx
oox/source/ppt/animvariantcontext.hxx
oox/source/ppt/backgroundproperties.cxx
oox/source/ppt/buildlistcontext.cxx
oox/source/ppt/buildlistcontext.hxx
oox/source/ppt/comments.cxx
oox/source/ppt/commonbehaviorcontext.cxx
oox/source/ppt/commonbehaviorcontext.hxx
oox/source/ppt/commontimenodecontext.cxx
@@ -7909,8 +7886,6 @@ oox/source/shape/ShapeContextHandler.hxx
oox/source/shape/ShapeDrawingFragmentHandler.cxx
oox/source/shape/ShapeDrawingFragmentHandler.hxx
oox/source/shape/ShapeFilterBase.cxx
oox/source/token/namespacemap.cxx
oox/source/token/propertynames.cxx
oox/source/token/relationship.cxx
oox/source/token/tokenmap.cxx
oox/source/vml/vmldrawing.cxx