summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-30 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-31 08:25:07 +0200
commitc9253818ec8252169c20450b41878be459568d95 (patch)
tree1f271151725042f33c3c8aa3988343bcd7f89e12 /writerfilter
parent242a796a71e29a1d8cdc4dd71d2465b898db32ab (diff)
loplugin:oncevar
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx4
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx7
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx12
-rw-r--r--writerfilter/source/rtftok/rtfdispatchsymbol.cxx4
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
6 files changed, 16 insertions, 17 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 9bd4993fc588..6a79f2318055 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2919,7 +2919,7 @@ void DomainMapper::lcl_endSectionGroup()
// style, so force a dummy paragraph.
lcl_startParagraphGroup();
lcl_startCharacterGroup();
- sal_uInt8 sBreak[] = { 0xd };
+ sal_uInt8 const sBreak[] = { 0xd };
lcl_text(sBreak, 1);
lcl_endCharacterGroup();
lcl_endParagraphGroup();
@@ -3006,7 +3006,7 @@ void DomainMapper::lcl_startShape(uno::Reference<drawing::XShape> const& xShape)
{
m_pImpl->clearDeferredBreak(PAGE_BREAK);
lcl_startCharacterGroup();
- sal_uInt8 sBreak[] = { 0xd };
+ sal_uInt8 const sBreak[] = { 0xd };
lcl_text(sBreak, 1);
lcl_endCharacterGroup();
lcl_endParagraphGroup();
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 37e48daf0c80..2f3a0b4e3893 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1157,7 +1157,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
aBorderLine.LineDistance = 0;
}
- PropertyIds aBorderProps[4] =
+ PropertyIds const aBorderProps[] =
{
PROP_LEFT_BORDER,
PROP_RIGHT_BORDER,
@@ -1165,7 +1165,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
PROP_BOTTOM_BORDER
};
- for(PropertyIds & rBorderProp : aBorderProps)
+ for(PropertyIds const & rBorderProp : aBorderProps)
xGraphicObjectProperties->setPropertyValue(getPropertyName(rBorderProp), uno::makeAny(aBorderLine));
// setting graphic object shadow proerties
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 6d044ae5d5c3..47f5dae1999b 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -295,13 +295,12 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
// nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_FOLLOW, m_nXChFollow));
- const int nIds = 5;
- PropertyIds aReadIds[nIds] =
+ PropertyIds const aReadIds[] =
{
PROP_ADJUST, PROP_INDENT_AT, PROP_FIRST_LINE_INDENT,
- PROP_FIRST_LINE_OFFSET, PROP_LEFT_MARGIN
+ PROP_FIRST_LINE_OFFSET, PROP_LEFT_MARGIN
};
- for(PropertyIds & rReadId : aReadIds) {
+ for(PropertyIds const & rReadId : aReadIds) {
boost::optional<PropertyMap::Property> aProp = getProperty(rReadId);
if (aProp)
aNumberingProperties.push_back(
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 77e30bf386e2..165299318016 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -712,12 +712,12 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS
xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY);
if (xRelationshipAccess.is())
{
- OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
- OUString sChartTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/chart");
- OUString sFootersType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
- OUString sFootersTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/footer");
- OUString sHeaderType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
- OUString sHeaderTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/header");
+ OUString const sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
+ OUString const sChartTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/chart");
+ OUString const sFootersType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
+ OUString const sFootersTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/footer");
+ OUString const sHeaderType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
+ OUString const sHeaderTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/header");
bool bFound = false;
bool bHeaderFooterFound = false;
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index 19040d06fd74..1e9bb1f8942b 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -332,7 +332,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
checkFirstRun();
if (bColumns)
{
- sal_uInt8 sBreak[] = { 0xe };
+ sal_uInt8 const sBreak[] = { 0xe };
Mapper().startCharacterGroup();
Mapper().text(sBreak, 1);
Mapper().endCharacterGroup();
@@ -381,7 +381,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
{
checkFirstRun();
checkNeedPap();
- sal_uInt8 sBreak[] = { 0xc };
+ sal_uInt8 const sBreak[] = { 0xc };
Mapper().text(sBreak, 1);
if (!m_bNeedPap)
{
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a7bd7ebfcf1a..edfc2accb964 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -549,7 +549,7 @@ void RTFDocumentImpl::runProps()
void RTFDocumentImpl::runBreak()
{
- sal_uInt8 sBreak[] = { 0xd };
+ sal_uInt8 const sBreak[] = { 0xd };
Mapper().text(sBreak, 1);
m_bNeedCr = false;
}