From 60467763e32833232394e05642338f60346c0d53 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 24 Apr 2015 12:33:01 +0200 Subject: loplugin:simplifybool Change-Id: Ib656d2da786511687fbcf3f0ef39094ef211eb97 --- sc/source/ui/dbgui/imoptdlg.cxx | 2 +- sc/source/ui/dbgui/scuiimoptdlg.cxx | 5 ++--- sc/source/ui/dbgui/validate.cxx | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'sc/source/ui/dbgui') diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index 13c348fdd0fe..ce2ae0bfa3fd 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -58,7 +58,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr ) if ( nTokenCount == 4 ) { // compatibility with old options string: "Save as shown" as 4th token, numeric - bSaveAsShown = (rStr.getToken( 3, ',' ).toInt32() ? true : false); + bSaveAsShown = rStr.getToken( 3, ',' ).toInt32() != 0; bQuoteAllText = true; // use old default then } else diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 98ee9d90c898..4079b60c39cc 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -209,9 +209,8 @@ ScImportOptionsDlg::ScImportOptionsDlg( m_pCbQuoteAll->Check( false ); m_pCbFormulas->Show(); ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current()); - bool bFormulas = (pViewSh ? - pViewSh->GetViewData().GetOptions().GetOption( VOPT_FORMULAS) : - false); + bool bFormulas = pViewSh && + pViewSh->GetViewData().GetOptions().GetOption( VOPT_FORMULAS); m_pCbFormulas->Check( bFormulas ); } else diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 605e3ea2d929..af21095d6c1e 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -812,7 +812,7 @@ bool ScValidationDlg::EnterRefStatus() if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL; - SC_MOD()->SetRefDialog( nId, pWnd ? false : true ); + SC_MOD()->SetRefDialog( nId, pWnd == nullptr ); return true; } -- cgit