summaryrefslogtreecommitdiff
path: root/lotuswordpro
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 /lotuswordpro
parent6425f7ff616f9aaad8b4e279385ed3f5ab65bfe2 (diff)
Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpdivinfo.hxx4
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx30
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx6
-rw-r--r--lotuswordpro/source/filter/lwptblcell.hxx6
-rw-r--r--lotuswordpro/source/filter/lwptoc.cxx4
-rw-r--r--lotuswordpro/source/filter/lwptoc.hxx4
-rw-r--r--lotuswordpro/source/filter/lwptools.hxx4
7 files changed, 29 insertions, 29 deletions
diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx
index f99d8079ffed..cb073d76a3c4 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.hxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.hxx
@@ -139,7 +139,7 @@ private:
inline bool LwpDivInfo::HasContents()
{
- return (m_nFlags & DI_HASCONTENTS) ? sal_True : sal_False;
+ return (m_nFlags & DI_HASCONTENTS) ? true : false;
}
inline bool LwpDivInfo::IsOleDivision()
@@ -152,7 +152,7 @@ inline bool LwpDivInfo::IsOleDivision()
inline bool LwpDivInfo::IsScrollable()
{
- return (m_nFlags & DI_SCROLLABLE) ? sal_True : sal_False;
+ return (m_nFlags & DI_SCROLLABLE) ? true : false;
}
inline bool LwpDivInfo::IsGotoable()
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 14036a2717c3..cc37eb468bed 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -109,7 +109,7 @@ void LwpVirtualLayout::Read()
bool LwpVirtualLayout::MarginsSameAsParent()
{
- return m_nAttributes2 & STYLE2_MARGINSSAMEASPARENT ? sal_True : sal_False;
+ return m_nAttributes2 & STYLE2_MARGINSSAMEASPARENT ? true : false;
}
/**
@@ -218,7 +218,7 @@ bool LwpVirtualLayout::HasProtection()
*/
bool LwpVirtualLayout::IsComplex()
{
- return m_nAttributes & STYLE_COMPLEX ? sal_True : sal_False;
+ return m_nAttributes & STYLE_COMPLEX ? true : false;
}
/**
@@ -1054,7 +1054,7 @@ bool LwpMiddleLayout::IsSizeRightToContainer()
else if (m_BasedOnStyle.obj().is())
{
LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(m_BasedOnStyle.obj().get());
- return pLayout ? pLayout->IsSizeRightToContainer() : sal_False;
+ return pLayout ? pLayout->IsSizeRightToContainer() : false;
}
else
return false;
@@ -1073,7 +1073,7 @@ bool LwpMiddleLayout::IsSizeRightToContent()
else if (m_BasedOnStyle.obj().is())
{
LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(m_BasedOnStyle.obj().get());
- return pLayout ? pLayout->IsSizeRightToContent() : sal_False;
+ return pLayout ? pLayout->IsSizeRightToContent() : false;
}
else
return false;
@@ -1161,12 +1161,12 @@ bool LwpMiddleLayout::IsAutoGrow()
return m_nDirection &
((LAY_AUTOGROW << SHIFT_UP) | (LAY_AUTOGROW << SHIFT_DOWN) |
(LAY_AUTOGROW << SHIFT_RIGHT) | (LAY_AUTOGROW << SHIFT_LEFT))
- ? sal_True : sal_False;
+ ? true : false;
}
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- return pLay ? pLay->IsAutoGrow() : sal_False;
+ return pLay ? pLay->IsAutoGrow() : false;
}
return LwpVirtualLayout::IsAutoGrow();
}
@@ -1179,12 +1179,12 @@ bool LwpMiddleLayout::IsAutoGrowDown()
{
if(m_nOverrideFlag & OVER_SIZE)
{
- return m_nDirection & (LAY_AUTOGROW << SHIFT_DOWN) ? sal_True : sal_False;
+ return m_nDirection & (LAY_AUTOGROW << SHIFT_DOWN) ? true : false;
}
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- return pLay ? pLay->IsAutoGrowDown() : sal_False;
+ return pLay ? pLay->IsAutoGrowDown() : false;
}
return LwpVirtualLayout::IsAutoGrowDown();
}
@@ -1197,12 +1197,12 @@ bool LwpMiddleLayout::IsAutoGrowUp()
{
if(m_nOverrideFlag & OVER_SIZE)
{
- return m_nDirection & (LAY_AUTOGROW << SHIFT_UP) ? sal_True : sal_False;
+ return m_nDirection & (LAY_AUTOGROW << SHIFT_UP) ? true : false;
}
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- return pLay ? pLay->IsAutoGrowUp() : sal_False;
+ return pLay ? pLay->IsAutoGrowUp() : false;
}
return LwpVirtualLayout::IsAutoGrowUp();
}
@@ -1215,7 +1215,7 @@ bool LwpMiddleLayout::IsAutoGrowLeft()
{
if(m_nOverrideFlag & OVER_SIZE)
{
- return m_nDirection & (LAY_AUTOGROW << SHIFT_LEFT) ? sal_True : sal_False;
+ return m_nDirection & (LAY_AUTOGROW << SHIFT_LEFT) ? true : false;
}
else if( !m_BasedOnStyle.IsNull() )
{
@@ -1234,12 +1234,12 @@ bool LwpMiddleLayout::IsAutoGrowRight()
{
if(m_nOverrideFlag & OVER_SIZE)
{
- return m_nDirection & (LAY_AUTOGROW << SHIFT_RIGHT) ? sal_True : sal_False;
+ return m_nDirection & (LAY_AUTOGROW << SHIFT_RIGHT) ? true : false;
}
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- return pLay ? pLay->IsAutoGrowRight() : sal_False;
+ return pLay ? pLay->IsAutoGrowRight() : false;
}
return LwpVirtualLayout::IsAutoGrowRight();
}
@@ -1316,7 +1316,7 @@ bool LwpMiddleLayout::IsProtected()
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- bProtected = pLay ? pLay->IsProtected() : sal_False;
+ bProtected = pLay ? pLay->IsProtected() : false;
}
else
bProtected = LwpVirtualLayout::IsProtected();
@@ -1442,7 +1442,7 @@ bool LwpMiddleLayout::GetUsePrinterSettings()
else if( !m_BasedOnStyle.IsNull() )
{
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() );
- return pLay ? pLay->GetUsePrinterSettings() : sal_False;
+ return pLay ? pLay->GetUsePrinterSettings() : false;
}
return false;
}
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 50d7e9b641b3..d1c2e5f7189f 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -174,8 +174,8 @@ void LwpPara::Read()
const int DISK_SIMPLE = 1;
const int DISK_NOTIFY = 2;
- Simple = (Flag & DISK_SIMPLE) ? sal_True : sal_False;
- Notify = (Flag & DISK_NOTIFY) ? sal_True : sal_False;
+ Simple = (Flag & DISK_SIMPLE) ? true : false;
+ Notify = (Flag & DISK_NOTIFY) ? true : false;
}
if(!Simple)
@@ -613,7 +613,7 @@ void LwpPara::RegisterStyle()
* higher than our current level.
*/
// restart based on Outline level?
- if (pNumbering && bLesser && (bHeading ? pNumbering->IsHeading() : sal_True))
+ if (pNumbering && bLesser && (bHeading ? pNumbering->IsHeading() : true))
{
if (nFoundLevel != 0xffff)
{
diff --git a/lotuswordpro/source/filter/lwptblcell.hxx b/lotuswordpro/source/filter/lwptblcell.hxx
index 8c72b4e4c6fa..ed66cf744858 100644
--- a/lotuswordpro/source/filter/lwptblcell.hxx
+++ b/lotuswordpro/source/filter/lwptblcell.hxx
@@ -290,19 +290,19 @@ LwpRowColumnQualifier::LwpRowColumnQualifier()
inline bool
LwpRowColumnQualifier::IsAfter()
{
- return cFlags & REF_AFTER ? sal_True : sal_False;
+ return cFlags & REF_AFTER ? true : false;
}
inline bool
LwpRowColumnQualifier::IsBad()
{
- return cFlags & REF_BAD ? sal_True : sal_False;
+ return cFlags & REF_BAD ? true : false;
}
inline bool
LwpRowColumnQualifier::IsAbsolute()
{
- return cFlags & REF_ABSOLUTE ? sal_True : sal_False;
+ return cFlags & REF_ABSOLUTE ? true : false;
}
/**
* @brief
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 2020e9350cb7..e209557bedb9 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -337,7 +337,7 @@ void LwpTocSuperLayout::AddSourceStyle(XFIndex* pToc, LwpTocLevelData * pLevel,
bool LwpTocSuperLayout::GetRightAlignPageNumber(sal_uInt16 index)
{
if (index < MAX_LEVELS)
- return (m_nFlags[index] & TS_RIGHTALIGN) ? sal_True : sal_False;
+ return (m_nFlags[index] & TS_RIGHTALIGN) ? true : false;
return false;
}
/**
@@ -348,7 +348,7 @@ bool LwpTocSuperLayout::GetRightAlignPageNumber(sal_uInt16 index)
bool LwpTocSuperLayout::GetUsePageNumber(sal_uInt16 index)
{
if (index < MAX_LEVELS)
- return (m_nFlags[index] & TS_PAGENUMBER) ? sal_True : sal_False;
+ return (m_nFlags[index] & TS_PAGENUMBER) ? true : false;
return false;
}
/**
diff --git a/lotuswordpro/source/filter/lwptoc.hxx b/lotuswordpro/source/filter/lwptoc.hxx
index 83031433a79c..84a859dcdbcb 100644
--- a/lotuswordpro/source/filter/lwptoc.hxx
+++ b/lotuswordpro/source/filter/lwptoc.hxx
@@ -153,9 +153,9 @@ public:
void RegisterStyle() SAL_OVERRIDE;
virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
inline sal_uInt16 GetLevel(){return m_nLevel;}
- inline bool GetUseText(){ return (m_nFlags & USETEXT) ? sal_True : sal_False;}
+ inline bool GetUseText(){ return (m_nFlags & USETEXT) ? true : false;}
inline OUString GetSearchStyle(){return m_SearchName.str();}
- inline bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) ? sal_True : sal_False;}
+ inline bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) ? true : false;}
private:
virtual ~LwpTocLevelData();
diff --git a/lotuswordpro/source/filter/lwptools.hxx b/lotuswordpro/source/filter/lwptools.hxx
index f240214ed02a..584b418cba5a 100644
--- a/lotuswordpro/source/filter/lwptools.hxx
+++ b/lotuswordpro/source/filter/lwptools.hxx
@@ -135,11 +135,11 @@ inline sal_Int32 LwpTools::ConvertToUnits(const double& fInch)
}
inline bool LwpTools::IsOddNumber(sal_uInt16& nNumber)
{
- return (nNumber%2)? sal_True : sal_False;
+ return (nNumber%2)? true : false;
}
inline bool LwpTools::IsEvenNumber(sal_uInt16& nNumber)
{
- return (nNumber%2)? sal_False : sal_True;
+ return (nNumber%2)? false : true;
}
class BadSeek : public std::runtime_error