diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-02 15:42:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-05 12:47:48 +0200 |
commit | 4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch) | |
tree | b059d288339a68aa4c3901f1100e99b04d05a23d /xmloff | |
parent | b4107411900f5bb4c215e2d9db09fc2b2b82939b (diff) |
simplify ternary conditions "xxx ? yyy : false"
Look for code like:
xxx ? yyy : false;
Which can be simplified to:
xxx && yyy
Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/PageMasterPropHdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlimppr.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextNumRuleInfo.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/xforms/XFormsSubmissionContext.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx index 715aab239b0e..ac2e7bebf691 100644 --- a/xmloff/source/style/PageMasterPropHdl.cxx +++ b/xmloff/source/style/PageMasterPropHdl.cxx @@ -48,7 +48,7 @@ XMLPMPropHdl_PageStyleLayout::~XMLPMPropHdl_PageStyleLayout() bool XMLPMPropHdl_PageStyleLayout::equals( const Any& rAny1, const Any& rAny2 ) const { style::PageStyleLayout eLayout1, eLayout2; - return ((rAny1 >>= eLayout1) && (rAny2 >>= eLayout2)) ? (eLayout1 == eLayout2) : false; + return (rAny1 >>= eLayout1) && (rAny2 >>= eLayout2) && (eLayout1 == eLayout2); } bool XMLPMPropHdl_PageStyleLayout::importXML( diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 87a37a5a2c33..118ad7c62633 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -560,7 +560,7 @@ struct PropertyPairLessFunctor : { bool operator()( const PropertyPair& a, const PropertyPair& b ) const { - return (*a.first < *b.first ? true : false); + return (*a.first < *b.first); } }; diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx index ca7d984c681a..9dc4e7112070 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.cxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx @@ -121,7 +121,7 @@ void XMLTextNumRuleInfo::Set( hasPropertyByName( msNumberingIsOutline ) ) { xNumRulesProps->getPropertyValue( msNumberingIsOutline ) >>= bIsOutline; - bSuppressListStyle = bIsOutline ? true : false; + bSuppressListStyle = bIsOutline; } } } diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index a0bc479ee798..2c2c84dd22ee 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -92,7 +92,7 @@ Any toBool( const OUString& rValue ) bool bValue(false); if (::sax::Converter::convertBool( bValue, rValue )) { - aValue <<= ( bValue ? true : false ); + aValue <<= bValue; } return aValue; } |