summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-24 12:24:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-24 12:36:18 +0200
commitd39b9c29d53932a55e963caceb5721353815e765 (patch)
tree1bb24710ff80b05810ae8fca80acfaf1aac1a41b /basctl/source
parent2f6497b0b7c2b93e15a6140c58d0fffe57603d05 (diff)
loplugin:simplifybool
Change-Id: I4811afde43947a51938c3b67c7f35dab473f0b08
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/basidesh.cxx4
-rw-r--r--basctl/source/basicide/basobj3.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx8
3 files changed, 7 insertions, 7 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 0f234ee41347..dce1ea4b680a 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -615,7 +615,7 @@ void Shell::CheckWindows()
void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy )
{
- bool bChangeCurWindow = pCurWin ? false : true;
+ bool bChangeCurWindow = pCurWin == nullptr;
std::vector<BaseWindow*> aDeleteVec;
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
{
@@ -640,7 +640,7 @@ void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLib
void Shell::UpdateWindows()
{
// remove all windows that may not be displayed
- bool bChangeCurWindow = pCurWin ? false : true;
+ bool bChangeCurWindow = pCurWin == nullptr;
if ( !m_aCurLibName.isEmpty() )
{
std::vector<BaseWindow*> aDeleteVec;
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 87f5790e2765..df25cbbfcb6e 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -76,7 +76,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
aMacroName = aStdMacroText;
aMacroName += OUString::number( nMacro );
// test whether existing...
- bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? false : true;
+ bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) == nullptr;
nMacro++;
}
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 0f70973e74c1..be4c92593604 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -403,7 +403,7 @@ void MacroChooser::CheckButtons()
if (nMode != Recording)
{
// Run...
- bool bEnable = pMethod ? true : false;
+ bool bEnable = pMethod != nullptr;
if (nMode != ChooseOnly && StarBASIC::IsRunning())
bEnable = false;
EnableButton(*m_pRunButton, bEnable);
@@ -412,10 +412,10 @@ void MacroChooser::CheckButtons()
// organising still possible?
// Assign...
- EnableButton(*m_pAssignButton, pMethod ? true : false);
+ EnableButton(*m_pAssignButton, pMethod != nullptr);
// Edit...
- EnableButton(*m_pEditButton, pMacroEntry ? true : false);
+ EnableButton(*m_pEditButton, pMacroEntry != nullptr);
// Organizer...
EnableButton(*m_pOrganizeButton, !StarBASIC::IsRunning() && nMode == All);
@@ -425,7 +425,7 @@ void MacroChooser::CheckButtons()
bool bShare = ( aDesc.GetLocation() == LIBRARY_LOCATION_SHARE );
EnableButton(*m_pDelButton, !StarBASIC::IsRunning() && nMode == All && !bProtected && !bReadOnly && !bShare);
bool bPrev = bNewDelIsDel;
- bNewDelIsDel = pMethod ? true : false;
+ bNewDelIsDel = pMethod != nullptr;
if (bPrev != bNewDelIsDel && nMode == All)
{
OUString aBtnText( bNewDelIsDel ? IDEResId(RID_STR_BTNDEL).toString() : IDEResId(RID_STR_BTNNEW).toString() );