More loplugin:simplifybool

Change-Id: I91848b0a5a5110ca557375d8c432832033237249
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index cf399d5..aa3b2ed 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -82,7 +82,7 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
            bNumOffsetEqual = false;
        }

        if (bNumOffsetEqual == false)
        if (!bNumOffsetEqual)
            return false;

        return static_cast<const SwFmtPageDesc&>(rItem1).GetPageDesc() == static_cast<const SwFmtPageDesc&>(rItem2).GetPageDesc();
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 5bf4baa..25705e22 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1212,7 +1212,7 @@ bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
                }
            }

            if ( false == bRet )
            if ( !bRet )
                break;
        }
    }
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 3ae5e3b..9a54ec9 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1286,7 +1286,7 @@ SwCntntNode* SwNodes::GoNext(SwNodeIndex *pIdx) const

    SwNodeIndex aTmp(*pIdx, +1);
    SwNode* pNd = 0;
    while( aTmp < Count()-1 && false == ( pNd = &aTmp.GetNode())->IsCntntNode() )
    while( aTmp < Count()-1 && !( pNd = &aTmp.GetNode())->IsCntntNode() )
        ++aTmp;

    if( aTmp == Count()-1 )
@@ -1303,7 +1303,7 @@ SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) const

    SwNodeIndex aTmp( *pIdx, -1 );
    SwNode* pNd = 0;
    while( aTmp.GetIndex() && false == ( pNd = &aTmp.GetNode())->IsCntntNode() )
    while( aTmp.GetIndex() && !( pNd = &aTmp.GetNode())->IsCntntNode() )
        --aTmp;

    if( !aTmp.GetIndex() )
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index ee3b3c8..c4e1ab4 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -179,7 +179,7 @@ bool SwEditShell::SelectionHasNumber() const
                        {
                            bResult = false;
                        }
                        if (bResult==false) {
                        if (!bResult) {
                            break;
                        }
                    }
@@ -218,7 +218,7 @@ bool SwEditShell::SelectionHasBullet() const
                    {
                        bResult = pTxtNd->HasBullet();

                        if (bResult==false) {
                        if (!bResult) {
                            break;
                        }
                    }
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 2cfd85b..a816029 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -190,7 +190,7 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwPageDesc *pPgDsc ) :

    // create and insert body area if it is not a blank page
    SwDoc *pDoc = pFmt->GetDoc();
    if ( false == (bEmptyPage = (pFmt == pDoc->GetEmptyPageFmt())) )
    if ( !(bEmptyPage = (pFmt == pDoc->GetEmptyPageFmt())) )
    {
        bEmptyPage = false;
        Calc();                     // so that the PrtArea is correct
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 14dfb43..1ed7fa0 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1581,7 +1581,7 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect )
            for ( size_t i = 0; i < pRegion->size(); ++i )
            {
                const SwRect &rTmp = (*pRegion)[i];
                if ( false == (bStop = rTmp.IsOver( VisArea() )) )
                if ( !(bStop = rTmp.IsOver( VisArea() )) )
                    break;
            }
            if ( bStop )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f45fc10..595cae2 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2691,7 +2691,7 @@ static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const
    const SvxBoxItemLine* pBrd = aBorders;

    bool bExportDistanceFromPageEdge = false;
    if ( rOptions.bCheckDistanceSize == true && boxHasLineLargerThan31(rBox) == true )
    if ( rOptions.bCheckDistanceSize && boxHasLineLargerThan31(rBox) )
    {
        // The distance is larger than '31'. This cannot be exported as 'distance from text'.
        // Instead - it should be exported as 'distance from page edge'.
@@ -5461,7 +5461,7 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmF
    if ( pBottom || pTop || pLeft || pRight )
    {
        bool bExportDistanceFromPageEdge = false;
        if ( boxHasLineLargerThan31(rBox) == true )
        if ( boxHasLineLargerThan31(rBox) )
        {
            // The distance is larger than '31'. This cannot be exported as 'distance from text'.
            // Instead - it should be exported as 'distance from page edge'.
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index d787258..1d5aacb 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2946,7 +2946,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
         A special case for converting some inline form controls to form fields
         when in winword 8+ mode
        */
        if ((bUseEscher == true) && (eType == sw::Frame::eFormControl))
        if (bUseEscher && (eType == sw::Frame::eFormControl))
        {
            if ( m_rWW8Export.MiserableFormFieldExportHack( rFrmFmt ) )
                return ;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 8249a06..7bf2a38 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -642,7 +642,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
                if (bStartAttr)
                {
                    ImportSprm(aRes.pMemPos, aRes.nSprmId);
                    if (!bDoingSymbol && bSymbol == true)
                    if (!bDoingSymbol && bSymbol)
                    {
                        bDoingSymbol = true;
                        nStartReplace = nTxtStart;
@@ -652,7 +652,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
                else
                {
                    EndSprm( aRes.nSprmId );
                    if (bSymbol == false && bDoingSymbol)
                    if (!bSymbol && bDoingSymbol)
                    {
                        bDoingSymbol = false;
                        OUStringBuffer sTemp;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 85922e7..14ef17bb 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2561,11 +2561,11 @@ void SwWW8ImplReader::EndSpecial()
        StopTable();
        maApos.pop_back();
        --nInTable;
        if (maApos[nInTable] == true)
        if (maApos[nInTable])
            StopApo();
    }

    if (maApos[0] == true)
    if (maApos[0])
        StopApo();

    OSL_ENSURE(!nInTable, "unclosed table!");
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 97865c5..6c04df2 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2246,10 +2246,10 @@ void WW8TabDesc::CalcDefaults()
        so the default mapping forward wont't work. So map it (and
        contiguous invalid cells backwards to the last valid cell instead.
        */
        if (i && pR->bExist[i-1] == false)
        if (i && !pR->bExist[i-1])
        {
            sal_uInt16 k=i-1;
            while (k && pR->bExist[k] == false)
            while (k && !pR->bExist[k])
                k--;
            for (sal_uInt16 n=k+1;n<i;n++)
                pR->nTransCell[n] = pR->nTransCell[k];
@@ -2338,7 +2338,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem)
        }
    }

    if (bSetMinHeight == true)
    if (bSetMinHeight)
    {
        // minimize Fontsize to minimize height growth of the header/footer
        // set font size to 1 point to minimize y-growth of Hd/Ft
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index f4781a7..9ac0f0e 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4677,7 +4677,7 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData, bool bVer67)
{
    (void) bVer67; // unused in non-debug
    OSL_ENSURE(bVer67 == false, "Impossible");
    OSL_ENSURE(!bVer67, "Impossible");
    sal_uInt32 nFore = msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData));
    rpData+=4;
    sal_uInt32 nBack = msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData));
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 63847a4..1db1ec8 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -777,7 +777,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept )
    ListBoxEntries_t aRedlines;

    // don't activate
    OSL_ENSURE( bInhibitActivate == false,
    OSL_ENSURE( !bInhibitActivate,
                "recursive call of CallAcceptReject?");
    bInhibitActivate = true;

diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index ccc39a4..8ed2185 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -709,7 +709,7 @@ bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
        const size_t nCnt = pList->GetObjCount();

        for (size_t i = 0; i < nCnt; ++i)
            if ((bRet = HasOnlyObj(pList->GetObj(i), eObjInventor)) == false)
            if (!(bRet = HasOnlyObj(pList->GetObj(i), eObjInventor)))
                break;
    }
    else if (eObjInventor == pSdrObj->GetObjInventor())
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 1b9aa58..c4ad0d1 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -96,7 +96,7 @@ void NumFormatListBox::Init(short nFormatType, bool bUsrFmts)
    else
        eCurLanguage = SvtSysLocale().GetLanguageTag().getLanguageType();

    if (bUsrFmts == false)
    if (!bUsrFmts)
    {
        pOwnFormatter = new SvNumberFormatter(comphelper::getProcessComponentContext(), eCurLanguage);
    }