diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 17:25:05 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 17:25:05 +0100 |
commit | 76b114f849645f42311c0553b3320532bb26049c (patch) | |
tree | aa1ac2dc1a6306fb840b54f76f5a9cbe050de39b /chart2 | |
parent | Add two saveas icons for sifr theme. (diff) | |
download | core-76b114f849645f42311c0553b3320532bb26049c.tar.gz core-76b114f849645f42311c0553b3320532bb26049c.zip |
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 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/tp_RangeChooser.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 720e70d9037e..cc2ed797ff14 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -249,9 +249,9 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls() bool RangeChooserTabPage::isValid() { OUString aRange( m_pED_Range->GetText()); - sal_Bool bFirstCellAsLabel = ( m_pCB_FirstColumnAsLabel->IsChecked() && !m_pRB_Columns->IsChecked() ) + bool bFirstCellAsLabel = ( m_pCB_FirstColumnAsLabel->IsChecked() && !m_pRB_Columns->IsChecked() ) || ( m_pCB_FirstRowAsLabel->IsChecked() && !m_pRB_Rows->IsChecked() ); - sal_Bool bHasCategories = ( m_pCB_FirstColumnAsLabel->IsChecked() && m_pRB_Columns->IsChecked() ) + bool bHasCategories = ( m_pCB_FirstColumnAsLabel->IsChecked() && m_pRB_Columns->IsChecked() ) || ( m_pCB_FirstRowAsLabel->IsChecked() && m_pRB_Rows->IsChecked() ); bool bIsValid = ( aRange.isEmpty() ) || m_rDialogModel.getRangeSelectionHelper()->verifyArguments( |