summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-24 17:25:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 17:25:05 +0100
commit76b114f849645f42311c0553b3320532bb26049c (patch)
treeaa1ac2dc1a6306fb840b54f76f5a9cbe050de39b /oox
parent8865a555afa6aa33614a90167cb07b5fafa8b8ed (diff)
implicitboolconversion: warn about implicit conversion of call args to bool
...to be able to find problems like 6e0bdf04add338b7d5b29fc7b3fc9f08cfd5e96f "sal_Bool arg of SetUseImagesInMenus was abused to squeeze '2' through it" earlier when converting occurrences of sal_Bool to bool. Restricting this check to function call arguments avoids too much noise while hopefully still catching all the relevant problems. (This check partially overlaps the pointertobool check, so implicit conversions from pointers to bool call arguments will now generate two loplugin warnings, but that's harmless.) Change-Id: I0b03b1d1615aaf8bc18e7a84c56fff3ef9903508
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 0c35c4582ccf..aa4c92a62f3e 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -579,7 +579,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
}
if ( rProps.GetOpt( ESCHER_Prop_fNoFillHitTest, nValue ) )
- impl_AddBool( pAttrList, XML_detectmouseclick, nValue );
+ impl_AddBool( pAttrList, XML_detectmouseclick, nValue != 0 );
if (rProps.GetOpt(ESCHER_Prop_fillOpacity, nValue))
// Partly undo the transformation at the end of EscherPropertyContainer::CreateFillProperties(): VML opacity is 0..1.
@@ -777,7 +777,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
case ESCHER_Prop_fNoLineDrawDash:
{
// See DffPropertyReader::ApplyLineAttributes().
- impl_AddBool( m_pShapeAttrList, XML_stroked, it->nPropValue & 8 );
+ impl_AddBool( m_pShapeAttrList, XML_stroked, (it->nPropValue & 8) != 0 );
bAlreadyWritten[ESCHER_Prop_fNoLineDrawDash] = true;
}
break;