summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-23 18:30:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-23 18:39:07 +0200
commit22401181774dfb3882e7ad0335f1267d7885ff48 (patch)
treecc31d4ef17eef1e76458e47cef8675458c8719ea /sc
parent6425f7ff616f9aaad8b4e279385ed3f5ab65bfe2 (diff)
Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/attrib.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-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.cxx30
-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/tabvwsh3.cxx4
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx4
11 files changed, 33 insertions, 33 deletions
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 047bd1dc9ea8..dbfcd9e039cc 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)) ? 1 : 0;
+ return ((mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight)) ? true : false;
}
namespace {
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index bbc73c94126e..9566050e976f 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 : sal_True );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
}
else
{
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 5d52c71d4957..605e3ea2d929 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 : sal_True );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
return true;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2c84022e5c96..2af8c1a7ee48 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() : sal_True;
+ bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : true;
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 d371e949bf75..57cabd928ca7 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:sal_True;
+ bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:true;
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 2fb91e4df0d8..0999e22c0574 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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -915,7 +915,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -988,7 +988,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -998,7 +998,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -1008,7 +1008,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -1889,7 +1889,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -2050,7 +2050,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 6e5bf8889827..2cc7924ee54e 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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
}
break;
@@ -580,7 +580,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
}
break;
@@ -686,7 +686,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index a30253474e15..716a15d77ad1 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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -375,7 +375,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -385,7 +385,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
@@ -395,7 +395,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 2cfa8262190d..ee2bbab0c035 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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
break;
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index b7ae58282bbf..0f95a53ae448 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 ? sal_True : false ) );
+ rSet.Put( SfxBoolItem( nWhich, pWnd ? true : false ) );
}
else
rSet.DisableItem( nWhich );
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index bc5cff707733..354184943304 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 : sal_True );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
}
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 : sal_True );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : true );
}
else
{