summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/attrib.cxx2
-rw-r--r--sc/source/core/data/column.cxx2
-rw-r--r--sc/source/core/data/dptabres.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx8
-rw-r--r--sc/source/core/tool/interpr3.cxx6
-rw-r--r--sc/source/core/tool/rangeseq.cxx4
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx4
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx5
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx8
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx34
-rw-r--r--sc/source/ui/view/cellsh2.cxx6
-rw-r--r--sc/source/ui/view/cellsh3.cxx10
-rw-r--r--sc/source/ui/view/editsh.cxx4
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx4
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx4
25 files changed, 61 insertions, 62 deletions
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index dbfcd9e039cc..9adee79936d9 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -977,7 +977,7 @@ bool ScPageScaleToItem::operator==( const SfxPoolItem& rCmp ) const
{
assert(SfxPoolItem::operator==(rCmp));
const ScPageScaleToItem& rPageCmp = static_cast< const ScPageScaleToItem& >( rCmp );
- return ((mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight)) ? true : false;
+ return (mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight);
}
namespace {
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 8b6ede97051f..d76837410805 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -803,7 +803,7 @@ bool ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
// AttrArray only looks for merged cells
- return pAttrArray ? pAttrArray->TestInsertCol(nStartRow, nEndRow) : true;
+ return pAttrArray == nullptr || pAttrArray->TestInsertCol(nStartRow, nEndRow);
}
bool ScColumn::TestInsertRow( SCROW nStartRow, SCSIZE nSize ) const
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 5f0560924b7f..146bbf400d06 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -2390,7 +2390,7 @@ void ScDPDataMember::UpdateRunningTotals(
// consistency.
bool bInnerNoDetails = bRefDimInCol ? HasHiddenDetails() :
- ( bRefDimInRow ? rRowParent.HasHiddenDetails() : true );
+ ( !bRefDimInRow || rRowParent.HasHiddenDetails() );
if ( bInnerNoDetails )
{
pSelectDim = NULL;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 08d258ccec30..bef793eb5415 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -117,7 +117,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
inline bool StrCmp( const OUString* pStr1, const OUString* pStr2 )
{
- return ( pStr1 ? ( pStr2 && ( *pStr1 == *pStr2 ) ) : ( pStr2 ? false : true ) );
+ return ( pStr1 ? ( pStr2 && ( *pStr1 == *pStr2 ) ) : ( pStr2 == nullptr ) );
}
inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 3821480769a4..1ad51200dda1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -2485,11 +2485,11 @@ public:
if (mvSubArguments.size() != 2)
throw Unhandled();
bool bArgument1_NeedNested =
- (mvSubArguments[0]->GetFormulaToken()->GetType()
- == formula::svSingleVectorRef) ? false : true;
+ mvSubArguments[0]->GetFormulaToken()->GetType()
+ != formula::svSingleVectorRef;
bool bArgument2_NeedNested =
- (mvSubArguments[1]->GetFormulaToken()->GetType()
- == formula::svSingleVectorRef) ? false : true;
+ mvSubArguments[1]->GetFormulaToken()->GetType()
+ != formula::svSingleVectorRef;
ss << "(";
ss << mpCodeGen->
Gen2(mvSubArguments[0]
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 9218f53f5267..47ac91e2e35b 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -1551,7 +1551,7 @@ void ScInterpreter::ScNormDist( int nMinParamCount )
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, nMinParamCount, 4 ) )
return;
- bool bCumulative = nParamCount == 4 ? GetBool() : true;
+ bool bCumulative = nParamCount != 4 || GetBool();
double sigma = GetDouble(); // standard deviation
double mue = GetDouble(); // mean
double x = GetDouble(); // x
@@ -1571,7 +1571,7 @@ void ScInterpreter::ScLogNormDist( int nMinParamCount ) //expanded, see #i100119
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, nMinParamCount, 4 ) )
return;
- bool bCumulative = nParamCount == 4 ? GetBool() : true; // cumulative
+ bool bCumulative = nParamCount != 4 || GetBool(); // cumulative
double sigma = nParamCount >= 3 ? GetDouble() : 1.0; // standard deviation
double mue = nParamCount >= 2 ? GetDouble() : 0.0; // mean
double x = GetDouble(); // x
@@ -1781,7 +1781,7 @@ void ScInterpreter::ScPoissonDist()
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- bool bCumulative = (nParamCount == 3 ? GetBool() : true); // default cumulative
+ bool bCumulative = nParamCount != 3 || GetBool(); // default cumulative
double lambda = GetDouble(); // Mean
double x = ::rtl::math::approxFloor(GetDouble()); // discrete distribution
if (lambda < 0.0 || x < 0.0)
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index 8875d346a74b..834e10ce8d3b 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -311,7 +311,7 @@ bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix,
{
double fVal = pMatrix->GetDouble( nCol, nRow );
if (bDataTypes && pMatrix->IsBoolean( nCol, nRow ))
- pColAry[nCol] <<= (fVal ? true : false);
+ pColAry[nCol] <<= fVal != 0.0;
else
pColAry[nCol] <<= fVal;
}
@@ -394,7 +394,7 @@ ScMatrixRef ScSequenceToMatrix::CreateMixedMatrix( const com::sun::star::uno::An
if (ScApiTypeConversion::ConvertAnyToDouble( fVal, eClass, pColArr[nCol]))
{
if (eClass == uno::TypeClass_BOOLEAN)
- xMatrix->PutBoolean( (fVal ? true : false),
+ xMatrix->PutBoolean( fVal != 0.0,
static_cast<SCSIZE>(nCol),
static_cast<SCSIZE>(nRow) );
else
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 2af837e14e0a..9b316c477d24 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -738,7 +738,7 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
{
double fVal = 0.0;
sal_uInt32 nIndex = 0;
- bool bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : true;
+ bool bIsNum = !bLen || GetFormatter().IsNumberFormat( sText, nIndex, fVal );
OUString* pText;
(bIsNum) ? pText = NULL : pText = &sText;
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 62c2beada3a2..fe045567bfd0 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1154,7 +1154,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
SfxItemSet aItemSet = pCaption->GetMergedItemSet();
meTVA = pCaption->GetTextVerticalAdjust();
meTHA = pCaption->GetTextHorizontalAdjust();
- mbAutoScale = pCaption->GetFitToSize() ? true : false;
+ mbAutoScale = pCaption->GetFitToSize() != SDRTEXTFIT_NONE;
mbLocked = pCaption->IsMoveProtect() || pCaption->IsResizeProtect();
// AutoFill style would change if Postit.cxx object creation values are changed
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index ef683fecf0c6..3d166cb1a89d 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1167,12 +1167,12 @@ XclImpDocProtectBuffer::XclImpDocProtectBuffer( const XclImpRoot& rRoot ) :
void XclImpDocProtectBuffer::ReadDocProtect( XclImpStream& rStrm )
{
- mbDocProtect = rStrm.ReaduInt16() ? true : false;
+ mbDocProtect = rStrm.ReaduInt16() != 0;
}
void XclImpDocProtectBuffer::ReadWinProtect( XclImpStream& rStrm )
{
- mbWinProtect = rStrm.ReaduInt16() ? true : false;
+ mbWinProtect = rStrm.ReaduInt16() != 0;
}
void XclImpDocProtectBuffer::ReadPasswordHash( XclImpStream& rStrm )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 9566050e976f..f5dd784bc22e 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2416,7 +2416,7 @@ void ScPosWnd::DoEnter()
SfxViewFrame* pViewFrm = pViewSh->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
+ SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
else
{
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;
}
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index fa876ba2bccc..4ae99df8007a 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -29,10 +29,10 @@ ScNameCreateDlg::ScNameCreateDlg( vcl::Window * pParent, sal_uInt16 nFlags )
get(m_pLeftBox, "left");
get(m_pBottomBox, "bottom");
get(m_pRightBox, "right");
- m_pTopBox->Check ( (nFlags & NAME_TOP) ? true : false );
- m_pLeftBox->Check ( (nFlags & NAME_LEFT) ? true : false );
- m_pBottomBox->Check( (nFlags & NAME_BOTTOM)? true : false );
- m_pRightBox->Check ( (nFlags & NAME_RIGHT) ? true : false );
+ m_pTopBox->Check ( (nFlags & NAME_TOP) != 0 );
+ m_pLeftBox->Check ( (nFlags & NAME_LEFT) != 0 );
+ m_pBottomBox->Check( (nFlags & NAME_BOTTOM) != 0 );
+ m_pRightBox->Check ( (nFlags & NAME_RIGHT) != 0 );
}
sal_uInt16 ScNameCreateDlg::GetFlags() const
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2af8c1a7ee48..48266e7594fb 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2126,7 +2126,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
{
// default for no model is TRUE
ScDrawLayer* pModel = rDoc.GetDrawLayer();
- bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : true;
+ bool bOpenInDesign = pModel == nullptr || pModel->GetOpenInDesignMode();
ScUnoHelpFunctions::SetBoolInAny( aRet, bOpenInDesign );
}
else if ( aString == SC_UNO_AUTOCONTFOC )
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 57cabd928ca7..f47c1c0d4c63 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4848,7 +4848,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex
if( (thisAddress.StartRow == thisAddress.EndRow && thisAddress.EndRow == aOutlineAddress.EndRow ) ||
(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
{
- bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:true;
+ bool bColumn = thisAddress.StartRow != thisAddress.EndRow;
ScDocument& rDoc = getDocumentFromRange( mxRange );
ScOutlineTable* pOutlineTable = rDoc.GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), true);
const ScOutlineArray& rOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 0999e22c0574..2d7639f2e95a 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -905,7 +905,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -915,7 +915,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_DESCRIPTIVE_STATISTICS_DIALOG:
@@ -924,7 +924,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_ANALYSIS_OF_VARIANCE_DIALOG:
@@ -933,7 +933,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_CORRELATION_DIALOG:
@@ -942,7 +942,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_COVARIANCE_DIALOG:
@@ -951,7 +951,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_EXPONENTIAL_SMOOTHING_DIALOG:
@@ -960,7 +960,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_MOVING_AVERAGE_DIALOG:
@@ -969,7 +969,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case SID_TTEST_DIALOG:
@@ -978,7 +978,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -988,7 +988,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -998,7 +998,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -1008,7 +1008,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -1889,7 +1889,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
case FID_ADD_NAME:
@@ -1898,7 +1898,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -2050,7 +2050,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -2699,7 +2699,7 @@ void ScCellShell::ExecuteDataPilotDialog()
sal_uInt16 nId = ScPivotLayoutWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
}
@@ -2718,7 +2718,7 @@ void ScCellShell::ExecuteXMLSourceDialog()
sal_uInt16 nId = ScXMLSourceDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrame->GetChildWindow(nId);
- pScMod->SetRefDialog(nId, pWnd ? false : true);
+ pScMod->SetRefDialog(nId, pWnd == nullptr);
}
void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 2cc7924ee54e..974c9a1eddc6 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -559,7 +559,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
}
break;
@@ -580,7 +580,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
}
break;
@@ -686,7 +686,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 716a15d77ad1..295ed340f94e 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -300,7 +300,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
rReq.Ignore();
}
break;
@@ -311,7 +311,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -375,7 +375,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -385,7 +385,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -395,7 +395,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 21194f6c51ab..763157ff21bf 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -720,8 +720,8 @@ void ScEditShell::GetState( SfxItemSet& rSet )
{
OUString aStatusVal;
LanguageType nLang = LANGUAGE_NONE;
- bool bIsLookUpWord = pActiveView ?
- GetStatusValueForThesaurusFromContext(aStatusVal, nLang, *pActiveView) : false;
+ bool bIsLookUpWord = pActiveView &&
+ GetStatusValueForThesaurusFromContext(aStatusVal, nLang, *pActiveView);
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus context menu entry if there is nothing to look up
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 1ee8f4e1ab10..b0db92dc355b 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -946,7 +946,7 @@ bool ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
bool bRet = false;
// #i3875# *Hack*
- bool bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? true : false;
+ bool bMod1Locked = (aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1) != 0;
aViewData.SetSelCtrlMouseClick( rMEvt.IsMod1() || bMod1Locked );
if ( pSelEngine )
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index ee2bbab0c035..e4f1b71d91ff 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -138,7 +138,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
sal_uInt16 nId = ScPrintAreasDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
@@ -894,7 +894,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
sal_uInt16 nId = ScHighlightChgDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : true );
+ pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 0f95a53ae448..fe2dbadffb51 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -246,7 +246,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
if ( pThisFrame->KnowsChildWindow( nId ) )
{
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- rSet.Put( SfxBoolItem( nWhich, pWnd ? true : false ) );
+ rSet.Put( SfxBoolItem( nWhich, pWnd != nullptr ) );
}
else
rSet.DisableItem( nWhich );
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 354184943304..3108c34a9774 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -95,7 +95,7 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialog* pDialog)
SfxViewFrame* pViewFrm = GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
+ SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
else if( nSlotId == FID_ADD_NAME )
{
@@ -105,7 +105,7 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialog* pDialog)
SfxViewFrame* pViewFrm = GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
+ SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
}
else
{