diff options
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/basobj3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 8 |
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() ); |