summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 08:32:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 11:08:48 +0200
commit4b2262ab5b10f334f1984fec84d2978db81c58f1 (patch)
treede56663eba6ed2edf7a26127339dd8563fdf47be /xmloff
parentec1de6895d84fbe4f2d5fb7135a59a918138d970 (diff)
new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx2
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx4
-rw-r--r--xmloff/source/draw/sdpropls.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/forms/layerimport.cxx5
-rw-r--r--xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx2
-rw-r--r--xmloff/source/style/xmlexppr.cxx4
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
11 files changed, 16 insertions, 17 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 70127bed872c..60f8fee23610 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -413,7 +413,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
case XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER:
{
rProperty.maValue >>= nValue;
- if((( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE ))
+ if( ( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE )
{
if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
{
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index ddd913aabcd8..667305fa6902 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -724,8 +724,8 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
const OUString& rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( ( rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
- || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported ) ) )
+ if( rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
+ || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported ) )
{
try
{
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 1cc706787f86..a84cf8caabef 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1271,7 +1271,7 @@ bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
// Some quick tests: Some may rely on the package structure!
sal_Int32 nLen = rURL.getLength();
- if( (nLen > 0 && '/' == rURL[0]) )
+ if( nLen > 0 && '/' == rURL[0] )
// RFC2396 net_path or abs_path
return false;
else if( nLen > 1 && '.' == rURL[0] )
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 6c5506609b61..5e083fe05a43 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -612,12 +612,12 @@ void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, bool bLong, bo
const SdXMLDataStyleNumber* pStyleMember = aSdXMLDataStyleNumbers;
for( sal_uInt8 nIndex = 0; pStyleMember->meNumberStyle != XML_TOKEN_INVALID; nIndex++, pStyleMember++ )
{
- if( (IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
+ if( IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
( ( (pStyleMember->mpText == nullptr) && (rText.isEmpty()) ) ||
- ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) ) )
+ ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) )
{
mnElements[mnIndex++] = nIndex + 1;
return;
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 03bd527f5299..7e1473199aef 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1684,7 +1684,7 @@ void XMLPageExportPropertyMapper::ContextFilter(
}
break;
case CTF_PAGE_TRANSITION_FADECOLOR:
- if( (!(mrExport.getExportFlags() & SvXMLExportFlags::OASIS)) )
+ if( !(mrExport.getExportFlags() & SvXMLExportFlags::OASIS) )
(*property).mnIndex = -1;
else
pTransitionFadeColor = property;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 7c7af84385f1..66b8bf41eab7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -230,8 +230,8 @@ bool ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
bool ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
{
- return ((mnType == rInfo.mnType
- && mpPageMasterInfo == rInfo.mpPageMasterInfo));
+ return mnType == rInfo.mnType
+ && mpPageMasterInfo == rInfo.mpPageMasterInfo;
}
ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf)
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 02e32dca12b6..8a63acc1ca26 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -404,7 +404,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
std::vector< XMLPropertyState > aPropStates;
sal_Int32 nCount = 0;
- if( (!bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape)) )
+ if( !bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape) )
{
aPropStates = GetPropertySetMapper()->Filter( xPropSet );
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 8b366a7fe931..dd1deeb76dfb 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -478,9 +478,8 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP
if ( m_xCurrentPageFormsSupp.is() )
pContext = new OFormImport(*this, *this, _nPrefix, _rLocalName, m_xCurrentPageFormsSupp->getForms() );
}
- else if ( ( _nPrefix == XML_NAMESPACE_XFORMS
- && ( xmloff::token::IsXMLToken( _rLocalName, xmloff::token::XML_MODEL ) ) )
- )
+ else if ( _nPrefix == XML_NAMESPACE_XFORMS
+ && xmloff::token::IsXMLToken( _rLocalName, xmloff::token::XML_MODEL ) )
{
pContext = createXFormsModelContext( m_rImporter, _nPrefix, _rLocalName );
}
diff --git a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
index a232d4a8f709..721aafa2bc1e 100644
--- a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
+++ b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
@@ -45,7 +45,7 @@ bool XMLPercentOrMeasurePropertyHandler::importXML(
Any& rValue,
const SvXMLUnitConverter& rUnitConverter ) const
{
- if( (rStrImpValue.indexOf( '%' ) != -1))
+ if( rStrImpValue.indexOf( '%' ) != -1 )
return false;
sal_Int32 nValue;
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 034eb3e64294..3e9571195719 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -365,7 +365,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
for( i = 0; i < nCount; ++i, ++pStates )
{
- if( (*pStates == PropertyState_DIRECT_VALUE)/* || (bDefault && (*pStates == PropertyState_DEFAULT_VALUE))*/ )
+ if( *pStates == PropertyState_DIRECT_VALUE )
nValueCount++;
}
@@ -385,7 +385,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
i = 0;
while( i < nValueCount )
{
- if( (*pStates == PropertyState_DIRECT_VALUE)/* || (bDefault && (*pStates == PropertyState_DEFAULT_VALUE))*/ )
+ if( *pStates == PropertyState_DIRECT_VALUE )
{
*pAPINames++ = aItr->GetApiName();
aPropIters.push_back( aItr );
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index f64525f48070..b8727681a3da 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1662,7 +1662,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName)));
if (pStyle)
{
- if ((pStyle->PrivateGetKey() > -1)) // don't reset pStyle's bRemoveAfterUse flag
+ if (pStyle->PrivateGetKey() > -1) // don't reset pStyle's bRemoveAfterUse flag
AddCondition(i);
}
}