diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:35:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:31 +0200 |
commit | ba15d30e8d0bf74de621df9744a47fb768782a2e (patch) | |
tree | 248d6a975657a306af1208243482c208fe1315b3 /xmloff | |
parent | b919eeaa2f59cd36b87f80b8922d32c23e09b764 (diff) |
loplugin:simplifybool
Change-Id: I4a7ba9192956941f05e68ae8df3263d609a7c4dc
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/meta/xmlmetae.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/WordWrapPropertyHdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtlists.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/transform/Oasis2OOo.cxx | 4 |
5 files changed, 8 insertions, 10 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 73e89045c66f..c8dc20cade86 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -526,7 +526,7 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( { // draw:polygon or draw:polyline inside group context pContext = new SdXMLPolygonShapeContext( rImport, p_nPrefix, rLocalName, xAttrList, rShapes, - rTokenMap.Get(p_nPrefix, rLocalName) == XML_TOK_GROUP_POLYGON ? true : false, bTemporaryShape ); + rTokenMap.Get(p_nPrefix, rLocalName) == XML_TOK_GROUP_POLYGON, bTemporaryShape ); break; } case XML_TOK_GROUP_PATH: diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 63093896a604..77ece02ecceb 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -443,7 +443,7 @@ SvXMLMetaExport::startElement(const OUString & i_rName, // finally, start the element // #i107240# no whitespace here, because the DOM may already contain // whitespace, which is not cleared when loading and thus accumulates. - mrExport.StartElement(i_rName, (m_level > 1) ? false : true); + mrExport.StartElement(i_rName, m_level <= 1); ++m_level; } diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index aa2205dd6cb3..fa99c664f3f9 100644 --- a/xmloff/source/style/WordWrapPropertyHdl.cxx +++ b/xmloff/source/style/WordWrapPropertyHdl.cxx @@ -64,10 +64,10 @@ bool XMLWordWrapPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValu if( nUPD == 300 ) { if( ( nBuildId > 0 ) && (nBuildId < 9316 ) ) - bValue = bValue ? false : true; // treat OOo 3.0 beta1 as OOo 2.x + bValue = !bValue; // treat OOo 3.0 beta1 as OOo 2.x } else if( ( nUPD == 680 ) || ( nUPD >= 640 && nUPD <= 645 ) ) - bValue = bValue ? false : true; + bValue = !bValue; } rValue <<= bValue; } diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 95b207ac147f..5c2e13969593 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -327,9 +327,7 @@ void XMLTextListsHelper::PopListFromStack() bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString& sListId ) const { - return mpListStack != 0 - ? sListId == mpListStack->back().second - : false; + return mpListStack != 0 && sListId == mpListStack->back().second; } OUString @@ -472,7 +470,7 @@ XMLTextListsHelper::MakeNumRule( } } - bool bSetDefaults(io_pSetDefaults ? *io_pSetDefaults : false); + bool bSetDefaults(io_pSetDefaults && *io_pSetDefaults); if ( !xNumRules.is() ) { // If no style name has been specified for this style and for any diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 56bc8c6ceecc..028b3ce1d3d3 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1654,8 +1654,8 @@ XMLTransformerContext *Oasis2OOoTransformer::CreateUserDefinedContext( { const XMLTransformerContext *pCurrent = GetCurrentContext(); return new XMLControlOASISTransformerContext( *this, rQName, - pCurrent ? pCurrent->HasQName( XML_NAMESPACE_FORM, - XML_FORM ) : false ); + pCurrent && pCurrent->HasQName( XML_NAMESPACE_FORM, + XML_FORM ) ); } case XML_ETACTION_FORM_PROPERTY: return new XMLFormPropOASISTransformerContext( *this, rQName, |