summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /editeng
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/rtf/svxrtf.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index fc7f689111c9..0c9e494357d1 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -916,7 +916,7 @@ namespace accessibility
IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
{
- return (pValues[a].Name < pValues[b].Name) ? true : false;
+ return pValues[a].Name < pValues[b].Name;
}
};
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 69c3e753b8fb..08f0b7968876 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -306,7 +306,7 @@ bool Outliner::IsParaIsNumberingRestart( sal_Int32 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::IsParaIsNumberingRestart - Paragraph not found!" );
- return pPara ? pPara->IsParaIsNumberingRestart() : false;
+ return pPara && pPara->IsParaIsNumberingRestart();
}
void Outliner::SetParaIsNumberingRestart( sal_Int32 nPara, bool bParaIsNumberingRestart )
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 0b9ee1624584..0746aa3847e3 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -1215,7 +1215,7 @@ void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos )
void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode,
const SvxNodeIdx &rNewNode)
{
- bool bSameEndAsStart = (pSttNd == pEndNd) ? true : false;
+ bool bSameEndAsStart = (pSttNd == pEndNd);
if (GetSttNodeIdx() == rOldNode.GetIdx())
{