summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 15:34:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 18:54:44 +0200
commitc90da566ed1026a70217ac8a52a90e5df5c3026e (patch)
tree2726d4fa022bc82918e6513b0a1fd213a7ac5cc4 /xmloff
parent4bef6511332073fbe3899fa2003caf88d9f2ac49 (diff)
loplugin:returnconstant in xmloff
Change-Id: Ia837a93ae817df282096abb80efcbd6922867b25 Reviewed-on: https://gerrit.libreoffice.org/58335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/styleexp.cxx3
-rw-r--r--xmloff/source/transform/ChartOOoTContext.cxx6
-rw-r--r--xmloff/source/transform/EventOOoTContext.cxx6
-rw-r--r--xmloff/source/transform/TransformerBase.cxx11
-rw-r--r--xmloff/source/transform/TransformerBase.hxx2
5 files changed, 13 insertions, 15 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index fa8ff9c8a46a..40334fc30be1 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -381,7 +381,7 @@ bool XMLStyleExport::exportStyle(
return true;
}
-bool XMLStyleExport::exportDefaultStyle(
+void XMLStyleExport::exportDefaultStyle(
const Reference< XPropertySet >& xPropSet,
const OUString& rXMLFamily,
const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper )
@@ -404,7 +404,6 @@ bool XMLStyleExport::exportDefaultStyle(
rPropMapper->exportXML( GetExport(), aPropStates,
SvXmlExportFlags::IGN_WS );
}
- return true;
}
void XMLStyleExport::exportStyleFamily(
diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx
index 86d3e4841c7f..b6de37a48d46 100644
--- a/xmloff/source/transform/ChartOOoTContext.cxx
+++ b/xmloff/source/transform/ChartOOoTContext.cxx
@@ -101,9 +101,9 @@ void XMLChartOOoTransformerContext::StartElement(
OUString aAttrValue( rAttrValue );
sal_uInt16 nValPrefix =
static_cast<sal_uInt16>((*aIter).second.m_nParam1);
- if( GetTransformer().AddNamespacePrefix( aAttrValue,
- nValPrefix ) )
- pMutableAttrList->SetValueByIndex( i, aAttrValue );
+ GetTransformer().AddNamespacePrefix( aAttrValue,
+ nValPrefix );
+ pMutableAttrList->SetValueByIndex( i, aAttrValue );
}
break;
case XML_ATACTION_REMOVE:
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 7b0af9b7fd8b..bc9b70b3019f 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -170,9 +170,9 @@ void XMLEventOOoTransformerContext::StartElement(
OUString aAttrValue( rAttrValue );
sal_uInt16 nValPrefix =
static_cast<sal_uInt16>((*aIter).second.m_nParam1);
- if( GetTransformer().AddNamespacePrefix( aAttrValue,
- nValPrefix ) )
- pMutableAttrList->SetValueByIndex( i, aAttrValue );
+ GetTransformer().AddNamespacePrefix( aAttrValue,
+ nValPrefix );
+ pMutableAttrList->SetValueByIndex( i, aAttrValue );
}
break;
case XML_ATACTION_MACRO_LOCATION:
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index fd0f3ea903e6..148230a179b1 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -633,8 +633,8 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList(
static_cast<sal_uInt16>(
bRename ? (*aIter).second.m_nParam2
: (*aIter).second.m_nParam1);
- if( AddNamespacePrefix( aAttrValue, nValPrefix ) )
- pMutableAttrList->SetValueByIndex( i, aAttrValue );
+ AddNamespacePrefix( aAttrValue, nValPrefix );
+ pMutableAttrList->SetValueByIndex( i, aAttrValue );
}
break;
case XML_ATACTION_ADD_APP_NAMESPACE_PREFIX:
@@ -646,8 +646,8 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList(
nValPrefix = XML_NAMESPACE_OOOC;
else if( IsXMLToken( GetClass(), XML_TEXT ) )
nValPrefix = XML_NAMESPACE_OOOW;
- if( AddNamespacePrefix( aAttrValue, nValPrefix ) )
- pMutableAttrList->SetValueByIndex( i, aAttrValue );
+ AddNamespacePrefix( aAttrValue, nValPrefix );
+ pMutableAttrList->SetValueByIndex( i, aAttrValue );
}
break;
case XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX:
@@ -1200,11 +1200,10 @@ bool XMLTransformerBase::NegPercent( OUString& rValue )
return bRet;
}
-bool XMLTransformerBase::AddNamespacePrefix( OUString& rName,
+void XMLTransformerBase::AddNamespacePrefix( OUString& rName,
sal_uInt16 nPrefix ) const
{
rName = GetNamespaceMap().GetQNameByKey( nPrefix, rName, false );
- return true;
}
bool XMLTransformerBase::RemoveNamespacePrefix( OUString& rName,
diff --git a/xmloff/source/transform/TransformerBase.hxx b/xmloff/source/transform/TransformerBase.hxx
index 429d27a06fd4..7aded1f949d1 100644
--- a/xmloff/source/transform/TransformerBase.hxx
+++ b/xmloff/source/transform/TransformerBase.hxx
@@ -138,7 +138,7 @@ public:
static bool DecodeStyleName( OUString& rName );
static bool NegPercent( OUString& rValue );
- bool AddNamespacePrefix( OUString& rName,
+ void AddNamespacePrefix( OUString& rName,
sal_uInt16 nPrefix ) const;
bool RemoveNamespacePrefix( OUString& rName,
sal_uInt16 nPrefixOnly=0xffffU ) const;