From 76b114f849645f42311c0553b3320532bb26049c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 24 Feb 2014 17:25:05 +0100 Subject: 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 --- svx/source/table/tablecontroller.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 431251cb8769..d70e92f644fe 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2745,10 +2745,10 @@ void lcl_MergeCommonBorderAttr(LinesState& rLinesState, const SvxBoxItem& rCellB { // current cell is inside the selection - lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetTop(), BOX_LINE_TOP, VALID_TOP, nCellFlags & CELL_TOP); - lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetBottom(), BOX_LINE_BOTTOM, VALID_BOTTOM, nCellFlags & CELL_BOTTOM); - lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetLeft(), BOX_LINE_LEFT, VALID_LEFT, nCellFlags & CELL_LEFT); - lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetRight(), BOX_LINE_RIGHT, VALID_RIGHT, nCellFlags & CELL_RIGHT); + lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetTop(), BOX_LINE_TOP, VALID_TOP, (nCellFlags & CELL_TOP) != 0); + lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetBottom(), BOX_LINE_BOTTOM, VALID_BOTTOM, (nCellFlags & CELL_BOTTOM) != 0); + lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetLeft(), BOX_LINE_LEFT, VALID_LEFT, (nCellFlags & CELL_LEFT) != 0); + lcl_MergeBorderOrInnerLine(rLinesState, rCellBoxItem.GetRight(), BOX_LINE_RIGHT, VALID_RIGHT, (nCellFlags & CELL_RIGHT) != 0); lcl_MergeDistance(rLinesState, BOX_LINE_TOP, rCellBoxItem.GetDistance(BOX_LINE_TOP)); lcl_MergeDistance(rLinesState, BOX_LINE_BOTTOM, rCellBoxItem.GetDistance(BOX_LINE_BOTTOM)); -- cgit