summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 11:21:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 11:23:34 +0200
commit9348b322a5c230dfcc2231661b73e480b130fcd9 (patch)
tree2c81a97d6f54229c87c5e2a37c73935ffc2527ac /xmloff
parent5bcd18461b8cb63b477dbb74025374b4c963161a (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 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/SchXMLExport.cxx4
-rw-r--r--xmloff/source/draw/xexptran.cxx7
-rw-r--r--xmloff/source/style/chrlohdl.cxx5
-rw-r--r--xmloff/source/text/txtparae.cxx8
4 files changed, 7 insertions, 17 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 56d32ee8e1a9..35f4a3ffd0be 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -678,9 +678,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque
return true;
}
}
- if( xDataSequence->getData().getLength() )
- return true;
- return false;
+ return xDataSequence->getData().getLength();
}
typedef vector< OUString > tStringVector;
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 23b489ddf8e2..250a5b0064e6 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -73,12 +73,9 @@ bool Imp_IsOnUnitChar(const OUString& rStr, const sal_Int32 nPos)
{
sal_Unicode aChar(rStr[nPos]);
- if(('a' <= aChar && 'z' >= aChar)
+ return ('a' <= aChar && 'z' >= aChar)
|| ('A' <= aChar && 'Z' >= aChar)
- || '%' == aChar
- )
- return true;
- return false;
+ || '%' == aChar;
}
double Imp_GetDoubleChar(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen,
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index ceef4c0a6b48..d10f8a8990c8 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -241,10 +241,7 @@ bool XMLCharScriptHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue
// For non-ISO language it does not make sense to write *:script if
// *:language is not written either, does it? It's all in
// *:rfc-language-tag
- if (aLanguage.isEmpty() || rStrExpValue.isEmpty())
- return false;
-
- return true;
+ return !aLanguage.isEmpty() && !rStrExpValue.isEmpty();
}
XMLCharCountryHdl::~XMLCharCountryHdl()
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index f2db593d0f74..eff5a4e74587 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -167,11 +167,9 @@ namespace
if(!xShape.is())
return false;
Reference<XServiceInfo> xServiceInfo(xTxtContent, UNO_QUERY);
- if(xServiceInfo->supportsService("com.sun.star.text.TextFrame") ||
- xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject") ||
- xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject") )
- return false;
- return true;
+ return !xServiceInfo->supportsService("com.sun.star.text.TextFrame") &&
+ !xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject") &&
+ !xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject");
};
class BoundFrames