teach unnecessaryparen loplugin about identifiers

Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 1427692..80f3da0 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -573,7 +573,7 @@ namespace basegfx
                    {
                        // if fDistance >= fLength decrement with multiple of fLength
                        sal_uInt32 nCount(sal_uInt32(fDistance / fLength));
                        fDistance -= (double)(nCount) * fLength;
                        fDistance -= (double)nCount * fLength;
                    }
                    else
                    {
@@ -2444,10 +2444,10 @@ namespace basegfx
                const double fRelativeY((rCandidate.getY() - rOriginal.getMinY()) / rOriginal.getHeight());
                const double fOneMinusRelativeX(1.0 - fRelativeX);
                const double fOneMinusRelativeY(1.0 - fRelativeY);
                const double fNewX((fOneMinusRelativeY) * ((fOneMinusRelativeX) * rTopLeft.getX() + fRelativeX * rTopRight.getX()) +
                    fRelativeY * ((fOneMinusRelativeX) * rBottomLeft.getX() + fRelativeX * rBottomRight.getX()));
                const double fNewY((fOneMinusRelativeX) * ((fOneMinusRelativeY) * rTopLeft.getY() + fRelativeY * rBottomLeft.getY()) +
                    fRelativeX * ((fOneMinusRelativeY) * rTopRight.getY() + fRelativeY * rBottomRight.getY()));
                const double fNewX(fOneMinusRelativeY * (fOneMinusRelativeX * rTopLeft.getX() + fRelativeX * rTopRight.getX()) +
                    fRelativeY * (fOneMinusRelativeX * rBottomLeft.getX() + fRelativeX * rBottomRight.getX()));
                const double fNewY(fOneMinusRelativeX * (fOneMinusRelativeY * rTopLeft.getY() + fRelativeY * rBottomLeft.getY()) +
                    fRelativeX * (fOneMinusRelativeY * rTopRight.getY() + fRelativeY * rBottomRight.getY()));

                return B2DPoint(fNewX, fNewY);
            }
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index c147df8..04408de 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -267,12 +267,12 @@ namespace basegfx

            for(a = nLoopVerInit; a < nLoopVerLimit; a++)
            {
                const double fVer(fVerStart + ((double)(a) * fVerDiffPerStep));
                const double fVer(fVerStart + ((double)a * fVerDiffPerStep));
                B3DPolygon aNew;

                for(b = 0; b < nLoopHorLimit; b++)
                {
                    const double fHor(fHorStart + ((double)(b) * fHorDiffPerStep));
                    const double fHor(fHorStart + ((double)b * fHorDiffPerStep));
                    aNew.append(getPointFromCartesian(fHor, fVer));
                }

@@ -283,7 +283,7 @@ namespace basegfx
            // create vertical half-rings
            for(a = 0; a < nLoopHorLimit; a++)
            {
                const double fHor(fHorStart + ((double)(a) * fHorDiffPerStep));
                const double fHor(fHorStart + ((double)a * fHorDiffPerStep));
                B3DPolygon aNew;

                if(bVerFromTop)
@@ -293,7 +293,7 @@ namespace basegfx

                for(b = nLoopVerInit; b < nLoopVerLimit; b++)
                {
                    const double fVer(fVerStart + ((double)(b) * fVerDiffPerStep));
                    const double fVer(fVerStart + ((double)b * fVerDiffPerStep));
                    aNew.append(getPointFromCartesian(fHor, fVer));
                }

diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index 859ed47..951cdbd 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -101,7 +101,7 @@ namespace basegfx
                                aCurrentEntry->incrementRasterConversionLineEntry3D(nStep, *this);
                            }

                            aCurrentLine.push_back(&(*(aCurrentEntry)));
                            aCurrentLine.push_back(&(*aCurrentEntry));
                        }
                    }

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 6038dad..47903f7 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -4027,7 +4027,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
    }
    p = refParams->Get( i );

    if( p->GetType() == SbxERROR && ( i ) )
    if( p->GetType() == SbxERROR && i )
    {
        // if there's a parameter missing, it can be OPTIONAL
        bool bOpt = false;
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 8c7760b..8a65276 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -96,7 +96,7 @@ start:
                    SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
                }
                else
                    nRes = (sal_Int16) (tstVal);
                    nRes = (sal_Int16) tstVal;
                break;
            }
        case SbxSALINT64:
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index db0f250..9c906f6 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.cxx
@@ -76,7 +76,7 @@ start:
        case SbxCURRENCY:
        {
            sal_Int64  tstVal = p->nInt64 / CURRENCY_FACTOR;
            nRes = (sal_Int32) (tstVal);
            nRes = (sal_Int32) tstVal;
            if( tstVal < SbxMINLNG || SbxMAXLNG < tstVal )  SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
            if( SbxMAXLNG < tstVal ) nRes = SbxMAXLNG;
            if( tstVal < SbxMINLNG ) nRes = SbxMINLNG;
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index b4af996..8b7f777 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -215,7 +215,7 @@ void DataEditor::notifySystemWindow(
    if ( pParent && pParent->IsSystemWindow())
    {
        SystemWindow* pSystemWindow = static_cast< SystemWindow* >( pParent );
        rMemFunc( pSystemWindow->GetTaskPaneList(),( pToRegister ));
        rMemFunc( pSystemWindow->GetTaskPaneList(), pToRegister );
    }
}

diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index b32609d..3dbfa18 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -196,7 +196,7 @@ void DragMethod_RotateDiagram::CreateOverlayGeometry(sdr::overlay::OverlayManage
    else
    {
        ThreeDHelper::adaptRadAnglesForRightAngledAxes( fResultX, fResultY );
        aCurrentTransform.shearXY(fResultY,-(fResultX));
        aCurrentTransform.shearXY(fResultY,-fResultX);
    }

    if(m_aWireframePolyPolygon.count() && m_pScene)
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 77aba16..9529e4e 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -513,7 +513,7 @@ void SAL_CALL ChartModel::load(
                Sequence< uno::Any > aStorageArgs( 2 );
                aStorageArgs[0] <<= aMDHelper.Stream;
                // todo: check if stream is read-only
                aStorageArgs[1] <<= (embed::ElementModes::READ); //WRITE | embed::ElementModes::NOCREATE);
                aStorageArgs[1] <<= embed::ElementModes::READ; //WRITE | embed::ElementModes::NOCREATE);

                xStorage.set( xStorageFact->createInstanceWithArguments( aStorageArgs ),
                    uno::UNO_QUERY_THROW );
@@ -524,7 +524,7 @@ void SAL_CALL ChartModel::load(
                // convert XInputStream to XStorage via the storage factory
                Sequence< uno::Any > aStorageArgs( 2 );
                aStorageArgs[0] <<= aMDHelper.InputStream;
                aStorageArgs[1] <<= (embed::ElementModes::READ);
                aStorageArgs[1] <<= embed::ElementModes::READ;

                xStorage.set( xStorageFact->createInstanceWithArguments( aStorageArgs ),
                    uno::UNO_QUERY_THROW );
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 1cb6196d..08b9d5a 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -690,10 +690,10 @@ void BarChart::createShapes()
                                double fHeight = fCompleteHeight-fLowerYValue;
                                if(!bPositive)
                                    fHeight = fCompleteHeight-fUpperYValue;
                                fLogicBarWidth = fLogicBaseWidth*fHeight/(fCompleteHeight);
                                fLogicBarWidth = fLogicBaseWidth*fHeight/fCompleteHeight;
                                if(fLogicBarWidth<=0.0)
                                    fLogicBarWidth=fLogicBaseWidth;
                                fLogicBarDepth = fLogicBarDepth*fHeight/(fCompleteHeight);
                                fLogicBarDepth = fLogicBarDepth*fHeight/fCompleteHeight;
                                if(fLogicBarDepth<=0.0)
                                    fLogicBarDepth*=-1.0;
                            }
@@ -833,7 +833,7 @@ void BarChart::createShapes()
                            {
                                if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && fCompleteHeight!=0.0 )
                                {
                                    double fOuterBarDepth = fLogicBarDepth * (fTopHeight)/(fabs(fCompleteHeight));
                                    double fOuterBarDepth = fLogicBarDepth * fTopHeight/(fabs(fCompleteHeight));
                                    fLowerBarDepth = (fBaseValue < fUpperYValue) ? fabs(fLogicBarDepth) : fabs(fOuterBarDepth);
                                    fUpperBarDepth = (fBaseValue < fUpperYValue) ? fabs(fOuterBarDepth) : fabs(fLogicBarDepth);
                                }
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 58f6254..ff26c60 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -271,7 +271,7 @@ uno::Any createPolyPolygon_Cone( double fHeight, double fRadius, double fTopHeig
    double r1= 0.0, r2 = fRadius;
    if(bTopless)
        // #i63212# fHeight may be negative, fTopHeight is always positive -> use fabs(fHeight)
        r1 = fRadius * (fTopHeight)/(fabs(fHeight)+fTopHeight);
        r1 = fRadius * fTopHeight/(fabs(fHeight)+fTopHeight);

    nVerticalSegmentCount=1;
    drawing::PolyPolygonShape3D aPP;
@@ -478,7 +478,7 @@ uno::Reference<drawing::XShape>
    aBottomP3.PositionZ += fDepth;
    aBottomP4.PositionZ += fDepth;

    const double fTopFactor = (fTopHeight)/(fabs(fHeight)+fTopHeight);
    const double fTopFactor = fTopHeight/(fabs(fHeight)+fTopHeight);
    drawing::Position3D aTopP1( rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ - fDepth*fTopFactor/2.0  );
    if(bRotateZ)
    {
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index a29c661..a8ac2ba 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -1238,8 +1238,8 @@ void InterfaceType::dumpMethods(FileStream & out)
                bool isConst;
                bool isRef;
                if (j->direction
                    == (unoidl::InterfaceTypeEntity::Method::Parameter::
                        DIRECTION_IN)) {
                    == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
                {
                    isConst = passByReference(j->type);
                    isRef = isConst;
                } else {
@@ -1510,13 +1510,11 @@ void InterfaceType::dumpCppuMethods(FileStream & out, sal_uInt32 & index)
                    << m << "].pTypeName = sParamType" << m << ".pData;\n"
                    << indent() << "aParameters[" << m << "].bIn = "
                    << ((param.direction
                         == (unoidl::InterfaceTypeEntity::Method::Parameter::
                             DIRECTION_OUT))
                         == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_OUT)
                        ? "sal_False" : "sal_True")
                    << ";\n" << indent() << "aParameters[" << m << "].bOut = "
                    << ((param.direction
                         == (unoidl::InterfaceTypeEntity::Method::Parameter::
                             DIRECTION_IN))
                         == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
                        ? "sal_False" : "sal_True")
                    << ";\n";
                ++m;
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 2da2e5f..1092557 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -1937,11 +1937,9 @@ void handleInterfaceType(
            for (const unoidl::InterfaceTypeEntity::Method::Parameter& param : method.parameters)
            {
                bool in = param.direction
                    != (unoidl::InterfaceTypeEntity::Method::Parameter::
                        DIRECTION_OUT);
                    != unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_OUT;
                bool out = param.direction
                    != (unoidl::InterfaceTypeEntity::Method::Parameter::
                        DIRECTION_IN);
                    != unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN;
                PolymorphicUnoType polymorphicUnoType;
                SpecialType specialType = desc.addParameter(
                    param.type, out, true, &polymorphicUnoType);
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 9702a9d..61afcdc 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -126,7 +126,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_
    if( nBytesToRead )
    {
        sal_Int8* pData = &(*maData.begin());
        sal_Int8* pCursor = &((pData)[mnCursor]);
        sal_Int8* pCursor = &(pData[mnCursor]);
        memcpy( static_cast<void*>(aData.getArray()), static_cast<void*>(pCursor), nBytesToRead );

        mnCursor += nBytesToRead;
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 77cb6bb..85be138 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -9,6 +9,8 @@

bool foo(int);

enum class EFoo { Bar };

int main()
{
    int x = 1;
@@ -17,6 +19,19 @@ int main()
    if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if statement [loplugin:unnecessaryparen]}}

    foo((1)); // expected-error {{parentheses immediately inside single-arg call [loplugin:unnecessaryparen]}}

    int y = (x); // expected-error {{unnecessary parentheses around identifier [loplugin:unnecessaryparen]}}
    (void)y;

    // lots of our code uses this style, which I'm loathe to bulk-fix as yet
    EFoo foo = EFoo::Bar;
    switch (foo) {
        case (EFoo::Bar): break;
    }

    // lots of our code uses this style, which I'm loathe to bulk-fix as yet
    int z = (y) ? 1 : 0;
    (void)z;
};

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index 55dac95..40faa88 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -56,16 +56,50 @@ public:
    bool VisitWhileStmt(const WhileStmt *);
    bool VisitSwitchStmt(const SwitchStmt *);
    bool VisitCallExpr(const CallExpr *);
    bool TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *);
    bool TraverseCaseStmt(CaseStmt *);
    bool TraverseConditionalOperator(ConditionalOperator *);
private:
    void VisitSomeStmt(const Stmt *parent, const Expr* cond, StringRef stmtName);
    Expr* insideCaseStmt = nullptr;
    Expr* insideConditionalOperator = nullptr;
};

bool UnnecessaryParen::TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *)
{
    // for some reason, the parentheses in an expression like "sizeof(x)" actually show up
    // in the AST, so just ignore that part of the AST
    return true;
}

bool UnnecessaryParen::TraverseCaseStmt(CaseStmt * caseStmt)
{
    auto old = insideCaseStmt;
    insideCaseStmt = caseStmt->getLHS()->IgnoreImpCasts();
    bool ret = RecursiveASTVisitor::TraverseCaseStmt(caseStmt);
    insideCaseStmt = old;
    return ret;
}

bool UnnecessaryParen::TraverseConditionalOperator(ConditionalOperator * conditionalOperator)
{
    auto old = insideConditionalOperator;
    insideConditionalOperator = conditionalOperator->getCond()->IgnoreImpCasts();
    bool ret = RecursiveASTVisitor::TraverseConditionalOperator(conditionalOperator);
    insideConditionalOperator = old;
    return ret;
}

bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
{
    if (ignoreLocation(parenExpr))
        return true;
    if (parenExpr->getLocStart().isMacroID())
        return true;
    if (insideCaseStmt && parenExpr == insideCaseStmt)
        return true;
    if (insideConditionalOperator && parenExpr == insideConditionalOperator)
        return true;

    auto subParenExpr = dyn_cast<ParenExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
    if (subParenExpr) {
@@ -76,6 +110,24 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
            parenExpr->getLocStart())
            << parenExpr->getSourceRange();
    }

    auto declRefExpr = dyn_cast<DeclRefExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
    if (declRefExpr) {
        if (declRefExpr->getLocStart().isMacroID())
            return true;

        // hack for BAD_CAST macro
        SourceManager& SM = compiler.getSourceManager();
        const char *p1 = SM.getCharacterData( declRefExpr->getLocStart().getLocWithOffset(-10) );
        const char *p2 = SM.getCharacterData( declRefExpr->getLocStart() );
        if ( std::string(p1, p2 - p1).find("BAD_CAST") != std::string::npos )
            return true;

        report(
            DiagnosticsEngine::Warning, "unnecessary parentheses around identifier",
            parenExpr->getLocStart())
            << parenExpr->getSourceRange();
    }
    return true;
}

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index f4a84d7..7673fad 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -183,7 +183,7 @@ void lcl_CalDate(sal_Int32 _nJulianDate,sal_Int32 _nJulianTime,css::util::DateTi
        double d_s = _nJulianTime / 1000.0;
        double d_m = d_s / 60.0;
        double d_h  = d_m / 60.0;
        _rDateTime.Hours = (sal_uInt16) (d_h);
        _rDateTime.Hours = (sal_uInt16) d_h;
        _rDateTime.Minutes = (sal_uInt16) d_m;
        _rDateTime.Seconds = static_cast<sal_uInt16>(( d_m - (double) _rDateTime.Minutes ) * 60.0);
    }
@@ -871,7 +871,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
                if ( m_aScales[i-1] )
                    d = (nValue / pow(10.0,(int)m_aScales[i-1]));
                else
                    d = (double)(nValue);
                    d = (double)nValue;
            }
            else
            {
@@ -1857,7 +1857,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
                            if ( m_aScales[i] )
                                nValue = (sal_Int64)(d * pow(10.0,(int)m_aScales[i]));
                            else
                                nValue = (sal_Int64)(d);
                                nValue = (sal_Int64)d;
                            if (static_cast<size_t>(nLen) > sizeof(nValue))
                                return false;
                            memcpy(pData,&nValue,nLen);
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index 8c15a6f..dd68c04 100644
--- a/cppu/source/uno/constr.hxx
+++ b/cppu/source/uno/constr.hxx
@@ -42,7 +42,7 @@ inline void _defaultConstructStruct(
        defaultConstructStruct( pMem, pTypeDescr->pBaseTypeDescription );
    }

    typelib_TypeDescriptionReference ** ppTypeRefs = (pTypeDescr)->ppTypeRefs;
    typelib_TypeDescriptionReference ** ppTypeRefs = pTypeDescr->ppTypeRefs;
    sal_Int32 * pMemberOffsets = pTypeDescr->pMemberOffsets;
    sal_Int32 nDescr = pTypeDescr->nMembers;

diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 548594a..44c3d21 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1177,7 +1177,7 @@ IMPL_LINK_NOARG(ColorPickerDialog, ColorFieldControlModifydl, ColorFieldControl&
        break;
    }

    update_color(UpdateFlags::All & ~(UpdateFlags::ColorChooser));
    update_color(UpdateFlags::All & ~UpdateFlags::ColorChooser);
}

IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderControlModifyHdl, ColorSliderControl&, void)
@@ -1205,7 +1205,7 @@ IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderControlModifyHdl, ColorSliderContr
        break;
    }

    update_color(UpdateFlags::All & ~(UpdateFlags::ColorSlider));
    update_color(UpdateFlags::All & ~UpdateFlags::ColorSlider);
}

IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)
@@ -1215,52 +1215,52 @@ IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)
    if (&rEdit == mpMFRed)
    {
        setColorComponent( ColorComponent::Red, ((double)mpMFRed->GetValue()) / 255.0 );
        n = UpdateFlags::All & ~(UpdateFlags::RGB);
        n = UpdateFlags::All & ~UpdateFlags::RGB;
    }
    else if (&rEdit == mpMFGreen)
    {
        setColorComponent( ColorComponent::Green, ((double)mpMFGreen->GetValue()) / 255.0 );
        n = UpdateFlags::All & ~(UpdateFlags::RGB);
        n = UpdateFlags::All & ~UpdateFlags::RGB;
    }
    else if (&rEdit == mpMFBlue)
    {
        setColorComponent( ColorComponent::Blue, ((double)mpMFBlue->GetValue()) / 255.0 );
        n = UpdateFlags::All & ~(UpdateFlags::RGB);
        n = UpdateFlags::All & ~UpdateFlags::RGB;
    }
    else if (&rEdit == mpMFHue)
    {
        setColorComponent( ColorComponent::Hue, (double)mpMFHue->GetValue() );
        n = UpdateFlags::All & ~(UpdateFlags::HSB);
        n = UpdateFlags::All & ~UpdateFlags::HSB;
    }
    else if (&rEdit == mpMFSaturation)
    {
        setColorComponent( ColorComponent::Saturation, ((double)mpMFSaturation->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::HSB);
        n = UpdateFlags::All & ~UpdateFlags::HSB;
    }
    else if (&rEdit == mpMFBrightness)
    {
        setColorComponent( ColorComponent::Brightness, ((double)mpMFBrightness->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::HSB);
        n = UpdateFlags::All & ~UpdateFlags::HSB;
    }
    else if (&rEdit == mpMFCyan)
    {
        setColorComponent( ColorComponent::Cyan, ((double)mpMFCyan->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::CMYK);
        n = UpdateFlags::All & ~UpdateFlags::CMYK;
    }
    else if (&rEdit == mpMFMagenta)
    {
        setColorComponent( ColorComponent::Magenta, ((double)mpMFMagenta->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::CMYK);
        n = UpdateFlags::All & ~UpdateFlags::CMYK;
    }
    else if (&rEdit == mpMFYellow)
    {
        setColorComponent( ColorComponent::Yellow, ((double)mpMFYellow->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::CMYK);
        n = UpdateFlags::All & ~UpdateFlags::CMYK;
    }
    else if (&rEdit == mpMFKey)
    {
        setColorComponent( ColorComponent::Key, ((double)mpMFKey->GetValue()) / 100.0 );
        n = UpdateFlags::All & ~(UpdateFlags::CMYK);
        n = UpdateFlags::All & ~UpdateFlags::CMYK;
    }
    else if (&rEdit == mpEDHex)
    {
@@ -1278,7 +1278,7 @@ IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)

                RGBtoHSV( mdRed, mdGreen, mdBlue, mdHue, mdSat, mdBri );
                RGBtoCMYK( mdRed, mdGreen, mdBlue, mdCyan, mdMagenta, mdYellow, mdKey );
                n = UpdateFlags::All & ~(UpdateFlags::Hex);
                n = UpdateFlags::All & ~UpdateFlags::Hex;
            }
        }
    }
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index eb86a66..fe3f1dd 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -257,7 +257,7 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme)
{
    //if rScheme is empty or unknown the default behaviour is like it where HTTP
    bool bFTP = rScheme.startsWith(sFTPScheme);
    bool bInternet = !(bFTP);
    bool bInternet = !bFTP;

    //update protocol button selection:
    m_pRbtLinktypFTP->Check(bFTP);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 4a65279..a67c458 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -386,7 +386,7 @@ void OptionsUserData::SetNumericValue( sal_uInt8 nNumVal )
    if (HasNumericValue()  &&  (GetNumericValue() != nNumVal))
    {
        nVal &= 0xffffff00;
        nVal |= (nNumVal);
        nVal |= nNumVal;
        nVal |= (sal_uLong)1 << 11; // mark as modified
    }
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 9532e54..ef7070e 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -390,8 +390,8 @@ void SAL_CALL OApplicationController::disposing()
                    // add to recent document list
                    if ( aURL.GetProtocol() == INetProtocol::File )
                        Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
                                                              (pFilter) ? pFilter->GetMimeType() : OUString(),
                                                              (pFilter) ? pFilter->GetServiceName() : OUString() );
                                                              pFilter ? pFilter->GetMimeType() : OUString(),
                                                              pFilter ? pFilter->GetServiceName() : OUString() );
                }
            }

diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 45b514e..1e8cc8d 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -297,9 +297,9 @@ void ODatabaseExport::insertValueIntoColumn()
        if(pField)
        {
            sal_Int32 nNewPos = m_bIsAutoIncrement ? m_nColumnPos+1 : m_nColumnPos;
            OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumns.size()),"m_vColumns: Illegal index for vector");
            OSL_ENSURE(nNewPos < static_cast<sal_Int32>(m_vColumns.size()),"m_vColumns: Illegal index for vector");

            if ( (nNewPos) < static_cast<sal_Int32>(m_vColumns.size() ) )
            if ( nNewPos < static_cast<sal_Int32>(m_vColumns.size() ) )
            {
                sal_Int32 nPos = m_vColumns[nNewPos].first;
                if ( nPos != COLUMN_POSITION_NOT_FOUND )
@@ -556,7 +556,7 @@ void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfo
        Reference< XNumberFormats >         xFormats = xSupplier->getNumberFormats();
        TColumnVector::const_iterator aIter = _pList->begin();
        TColumnVector::const_iterator aEnd = _pList->end();
        for(sal_Int32 i= 0;aIter != aEnd && (i) < static_cast<sal_Int32>(m_vNumberFormat.size()) && (i) < static_cast<sal_Int32>(m_vColumnSize.size()) ;++aIter,++i)
        for(sal_Int32 i= 0;aIter != aEnd && i < static_cast<sal_Int32>(m_vNumberFormat.size()) && i < static_cast<sal_Int32>(m_vColumnSize.size()) ;++aIter,++i)
        {
            sal_Int32 nDataType;
            sal_Int32 nLength(0),nScale(0);
@@ -761,8 +761,8 @@ void ODatabaseExport::adjustFormat()
    if ( !m_sTextToken.isEmpty() )
    {
        sal_Int32 nNewPos = m_bIsAutoIncrement ? m_nColumnPos+1 : m_nColumnPos;
        OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumns.size()),"Illegal index for vector");
        if ( (nNewPos) < static_cast<sal_Int32>(m_vColumns.size()) )
        OSL_ENSURE(nNewPos < static_cast<sal_Int32>(m_vColumns.size()),"Illegal index for vector");
        if ( nNewPos < static_cast<sal_Int32>(m_vColumns.size()) )
        {
            sal_Int32 nColPos = m_vColumns[nNewPos].first;
            if( nColPos != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND))
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 5eb1e369..7ad2eda 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1512,7 +1512,7 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn
        ColumnMoved(pEntry->GetColumnId(),false);
    }

    if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
    if ( pEntry->GetFunctionType() & FKT_AGGREGATE )
    {
        OUString sFunctionName = pEntry->GetFunction();
        if ( GetFunctionName(sal_uInt32(-1),sFunctionName) )
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 1f7647c..f2a3300 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1400,7 +1400,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
    bool bNew = false;
    try
    {
        bNew = ( _bSaveAs )
        bNew =  _bSaveAs
            || ( !xElements->hasByName( m_sName ) );

        Reference<XPropertySet> xQuery;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index d50df34..2c06788 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2174,8 +2174,8 @@ void Desktop::OpenClients()

        if ( !bDisableRecovery &&
            (
                ( bExistsRecoveryData ) || // => crash with files    => recovery
                ( bCrashed            )    // => crash without files => error report
                bExistsRecoveryData || // => crash with files    => recovery
                bCrashed               // => crash without files => error report
            )
           )
        {
diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx
index 4105dd8..83055dd 100644
--- a/editeng/source/editeng/eeobj.cxx
+++ b/editeng/source/editeng/eeobj.cxx
@@ -71,7 +71,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
    else
    {
        datatransfer::UnsupportedFlavorException aException;
        throw( aException );
        throw aException;
    }

    return aAny;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4862863..b836e18 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4338,7 +4338,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, 
    ComplexTextLayoutFlags nLayoutMode = pOutDev->GetLayoutMode();

    // We always use the left position for DrawText()
    nLayoutMode &= ~(ComplexTextLayoutFlags::BiDiRtl);
    nLayoutMode &= ~ComplexTextLayoutFlags::BiDiRtl;

    if ( !bCTL && !bR2L)
    {
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 56cdfe8..80b45f4 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -592,7 +592,7 @@ SvxNumRule::SvxNumRule( SvxNumRuleFlags nFeatures,
            }
            else
            {
                aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * (i) );
                aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * i );
            }
        }
        else
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 690b54a..aa1a478 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -884,7 +884,7 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
            short nTemp = (short)nProp;
            nDiff = nTemp * 20;
            if(!bCoreInTwip)
                nDiff = (short)convertTwipToMm100((long)(nDiff));
                nDiff = (short)convertTwipToMm100((long)nDiff);
        }
        break;
        case MapUnit::Map100thMM:
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 121641c..830cd0a 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -349,9 +349,9 @@ Reference< XNameAccess > const & BibliographyLoader::GetDataColumns() const
        xResultSetProps->setPropertyValue("CommandType", aCommandType);
        Any aTableName; aTableName <<= aBibDesc.sTableOrQuery;
        xResultSetProps->setPropertyValue("Command", aTableName);
        Any aResultSetType; aResultSetType <<= (sal_Int32)(ResultSetType::SCROLL_INSENSITIVE);
        Any aResultSetType; aResultSetType <<= (sal_Int32)ResultSetType::SCROLL_INSENSITIVE;
        xResultSetProps->setPropertyValue("ResultSetType", aResultSetType);
        Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)(ResultSetConcurrency::UPDATABLE);
        Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)ResultSetConcurrency::UPDATABLE;
        xResultSetProps->setPropertyValue("ResultSetConcurrency", aResultSetCurrency);

        bool bSuccess = false;
diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx
index 1d19389..02ddd0e 100644
--- a/extensions/source/logging/loggerconfig.cxx
+++ b/extensions/source/logging/loggerconfig.cxx
@@ -187,7 +187,7 @@ namespace logging
                    pSetting->Value = xServiceSettingsNode->getByName( *pSettingNames );

                    if ( _pSettingTranslation )
                        (_pSettingTranslation)( _rxLogger, pSetting->Name, pSetting->Value );
                        _pSettingTranslation( _rxLogger, pSetting->Name, pSetting->Value );
                }
            }

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b3d4511..fefcf11 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -865,7 +865,7 @@ namespace pcr
            case PROPERTY_ID_TABSTOP:
                // BORDER and TABSTOP are normalized (see impl_normalizePropertyValue_nothrow)
                // to not allow VOID values
                pProperty->Attributes &= ~( PropertyAttribute::MAYBEVOID );
                pProperty->Attributes &= ~PropertyAttribute::MAYBEVOID;
                break;

            case PROPERTY_ID_LISTSOURCE:
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 5a68e8b..b78f8e4 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -374,7 +374,7 @@ namespace pcr

                if ( ( nThumbPos + nVisibleSize + 1 ) < (long)( nLastSelPos + 3 ) )
                    GetVScroll()->DoScrollAction(ScrollType::LineDown);
                else if((nThumbPos+nVisibleSize+1) >= (nFirstVisible))
                else if((nThumbPos+nVisibleSize+1) >= nFirstVisible)
                    GetVScroll()->DoScrollAction(ScrollType::LineUp);
            }
        }
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index eb3121f..b9d9bdf 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -971,12 +971,10 @@ void FilterCache::impl_validateAndOptimize()

    if (
        (
            (bSomeTypesShouldExist) &&
            (m_lTypes.empty())
            bSomeTypesShouldExist && m_lTypes.empty()
        ) ||
        (
            (bAllFiltersShouldExist) &&
            (m_lFilters.empty())
            bAllFiltersShouldExist && m_lFilters.empty()
        )
       )
    {
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 8a72266..c841f72 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -379,7 +379,7 @@ sal_uInt32 CGM::ImplGetBitmapColor( bool bDirect )
    else
    {
        sal_uInt32 nIndex = ImplGetUI( pElement->nColorIndexPrecision );
        nTmp = pElement->aColorTable[ (sal_uInt8)( nIndex ) ] ;
        nTmp = pElement->aColorTable[ (sal_uInt8)nIndex ] ;
    }
    return nTmp;
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 423b5d0..c79056f 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -321,7 +321,7 @@ sal_uInt32 EscherPropertyContainer::ImplGetColor( const sal_uInt32 nSOColor, boo
    if ( bSwap )
    {
        sal_uInt32 nColor = nSOColor & 0xff00;      // green
        nColor |= (sal_uInt8)( nSOColor ) << 16;    // red
        nColor |= (sal_uInt8)  nSOColor << 16;    // red
        nColor |= (sal_uInt8)( nSOColor >> 16 );    // blue
        return nColor;
    }
@@ -1942,9 +1942,9 @@ bool EscherPropertyContainer::CreatePolygonProperties(
            sal_uInt8* pSegmentBuf = new sal_uInt8[ nSegmentBufSize ];

            sal_uInt8* pPtr = pVerticesBuf;
            *pPtr++ = (sal_uInt8)( nTotalPoints );                    // Little endian
            *pPtr++ = (sal_uInt8)  nTotalPoints;                    // Little endian
            *pPtr++ = (sal_uInt8)( nTotalPoints >> 8 );
            *pPtr++ = (sal_uInt8)( nTotalPoints );
            *pPtr++ = (sal_uInt8)  nTotalPoints;
            *pPtr++ = (sal_uInt8)( nTotalPoints >> 8 );
            *pPtr++ = (sal_uInt8)0xf0;
            *pPtr++ = (sal_uInt8)0xff;
@@ -5313,7 +5313,7 @@ void EscherEx::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& 
sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor )
{
    sal_uInt32 nColor = nSOColor & 0xff00;          // Green
    nColor |= (sal_uInt8)( nSOColor ) << 16;        // Red
    nColor |= (sal_uInt8)  nSOColor << 16;        // Red
    nColor |= (sal_uInt8)( nSOColor >> 16 );        // Blue
    return nColor;
}
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 8ad5d92..9cf01a09 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -48,7 +48,7 @@ sal_uInt32 BGRToRGB(sal_uInt32 nColor)
{
    sal_uInt8
        r(static_cast<sal_uInt8>(nColor&0xFF)),
        g(static_cast<sal_uInt8>(((nColor)>>8)&0xFF)),
        g(static_cast<sal_uInt8>((nColor>>8)&0xFF)),
        b(static_cast<sal_uInt8>((nColor>>16)&0xFF)),
        t(static_cast<sal_uInt8>((nColor>>24)&0xFF));
    nColor = (t<<24) + (r<<16) + (g<<8) + b;
diff --git a/filter/source/svg/units.cxx b/filter/source/svg/units.cxx
index 84b82e6..f602971 100644
--- a/filter/source/svg/units.cxx
+++ b/filter/source/svg/units.cxx
@@ -101,7 +101,7 @@ double convLength( const OUString& sValue, const State& rState, char dir )
        //  Begin grammar
        (
            //parse font-size keywords (ie: xx-large, medium )
            ( +(alpha_p) >> !(str_p("-") >> +alpha_p) )[assign_a(sVal)]
            ( +alpha_p >> !(str_p("-") >> +alpha_p) )[assign_a(sVal)]
                >> str_p("")[assign_a(eUnit,SVG_LENGTH_FONT_SIZE)] |
            //take the first part and ignore the units
            ( +(anychar_p -
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index b090426..ed13cb1 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -458,10 +458,7 @@ AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(bool bWriteAcces

    //create copy of our readonly-cache, if write access is forced ... but
    //not still possible!
    if (
        (bWriteAccessRequested) &&
        (!m_pWriteCache       )
       )
    if ( bWriteAccessRequested && !m_pWriteCache )
    {
        m_pWriteCache = new AcceleratorCache(m_aReadCache);
    }
@@ -730,7 +727,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
        if (pPreferredKey != lKeys.end ())
        {
            css::uno::Any& rAny = lPreferredOnes[i];
            rAny <<= *(pPreferredKey);
            rAny <<= *pPreferredKey;
        }
    }

@@ -1333,10 +1330,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(bool bPreferred,
    {
        //create copy of our readonly-cache, if write access is forced ... but
        //not still possible!
        if (
            (bWriteAccessRequested) &&
            (!m_pPrimaryWriteCache       )
            )
        if ( bWriteAccessRequested && !m_pPrimaryWriteCache )
        {
            m_pPrimaryWriteCache = new AcceleratorCache(m_aPrimaryReadCache);
        }
@@ -1353,10 +1347,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(bool bPreferred,
    {
        //create copy of our readonly-cache, if write access is forced ... but
        //not still possible!
        if (
            (bWriteAccessRequested) &&
            (!m_pSecondaryWriteCache       )
            )
        if ( bWriteAccessRequested && !m_pSecondaryWriteCache )
        {
            m_pSecondaryWriteCache = new AcceleratorCache(m_aSecondaryReadCache);
        }
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 13034b7..f1126d7 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -365,7 +365,7 @@ void PresetHandler::connectToResource(      PresetHandler::EConfigType          
    // b) inside user layer we can (SOFT mode!) but sometimes we should not (HARD mode!)
    //    create new empty structures. We should preferr using of any existing structure.
    sal_Int32 eShareMode = (css::embed::ElementModes::READ      | css::embed::ElementModes::NOCREATE);
    sal_Int32 eUserMode  = (css::embed::ElementModes::READWRITE                                     );
    sal_Int32 eUserMode  = css::embed::ElementModes::READWRITE;

    OUStringBuffer sRelPathBuf(1024);
    OUString       sRelPathShare;
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 38cb7f3..7302507 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -401,10 +401,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void)
    else if (bTerminateApp)
        bSuccess = implts_terminateApplication();

    if (
        ( ! bSuccess             ) &&
        (   bControllerSuspended )
       )
    if ( ! bSuccess &&  bControllerSuspended )
    {
        css::uno::Reference< css::frame::XController > xController = xCloseFrame->getController();
        if (xController.is())
@@ -596,10 +593,7 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig
            //     a simple XWindow using the toolkit only .-(
            SolarMutexGuard aSolarLock;
            VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
            if (
                (pWindow                  ) &&
                (pWindow->IsSystemWindow())
               )
            if ( pWindow && pWindow->IsSystemWindow() )
                return xTarget;
        }

diff --git a/framework/source/fwe/interaction/preventduplicateinteraction.cxx b/framework/source/fwe/interaction/preventduplicateinteraction.cxx
index a019094..910c089 100644
--- a/framework/source/fwe/interaction/preventduplicateinteraction.cxx
+++ b/framework/source/fwe/interaction/preventduplicateinteraction.cxx
@@ -103,10 +103,7 @@ void SAL_CALL PreventDuplicateInteraction::handle(const css::uno::Reference< css
    aLock.clear();
    // <- SAFE

    if (
        (bHandleIt    ) &&
        (xHandler.is())
       )
    if ( bHandleIt && xHandler.is() )
    {
        xHandler->handle(xRequest);
    }
@@ -158,10 +155,7 @@ sal_Bool SAL_CALL PreventDuplicateInteraction::handleInteractionRequest( const c
    aLock.clear();
    // <- SAFE

    if (
        (bHandleIt    ) &&
        (xHandler.is())
       )
    if ( bHandleIt && xHandler.is() )
    {
        return xHandler->handleInteractionRequest(xRequest);
    }
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 30e3290..6081082 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -211,12 +211,9 @@ OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::

        VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
        // check for system window is necessary to guarantee correct pointer cast!
        if (
            (pWindow                  ) &&
            (pWindow->IsSystemWindow())
           )
        if ( pWindow && pWindow->IsSystemWindow() )
        {
            WindowStateMask const nMask = WindowStateMask::All & ~(WindowStateMask::Minimized);
            WindowStateMask const nMask = WindowStateMask::All & ~WindowStateMask::Minimized;
            sWindowState = OStringToOUString(
                            static_cast<SystemWindow*>(pWindow.get())->GetWindowState(nMask),
                            RTL_TEXTENCODING_UTF8);
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index ea81200..c6d916a 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -164,10 +164,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
    SolarMutexGuard aSolarGuard;

    VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
    if (
        ( pWindow                                 ) &&
        ( pWindow->GetType() == WindowType::WORKWINDOW )
       )
    if ( pWindow && pWindow->GetType() == WindowType::WORKWINDOW )
    {
        WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
        pWorkWindow->SetApplicationID( sApplicationID );
@@ -281,10 +278,7 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
    SolarMutexGuard aSolarGuard;

    VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
    if (
        ( pWindow                                 ) &&
        ( pWindow->GetType() == WindowType::WORKWINDOW )
       )
    if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
    {
        WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
        pWorkWindow->SetIcon( (sal_uInt16)nIcon );
@@ -315,10 +309,7 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
    SolarMutexGuard aSolarGuard;

    VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
    if (
        ( pWindow                                 ) &&
        ( pWindow->GetType() == WindowType::WORKWINDOW )
       )
    if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
    {
        WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
        pWorkWindow->SetText( sTitle );
diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx
index 2f2b21b..54ddce6 100644
--- a/framework/source/inc/pattern/window.hxx
+++ b/framework/source/inc/pattern/window.hxx
@@ -54,10 +54,7 @@ static bool isTopWindow(const css::uno::Reference< css::awt::XWindow >& xWindow)
        // a simple XWindow using the toolkit only .-(
        SolarMutexGuard aSolarGuard;
        VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
        if (
            (pWindow                  ) &&
            (pWindow->IsSystemWindow())
           )
        if ( pWindow && pWindow->IsSystemWindow() )
            return true;
    }

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c6fd863..0bff7d4 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1286,10 +1286,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded()
            // They will be used as "last chance" if there is no visible frame pointing to the same model.
            // Safe the result but continue with current loop might be looking for other visible frames.
            bool bIsHidden = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false);
            if (
                (   bIsHidden       ) &&
                ( ! xHiddenTask.is())
               )
            if ( bIsHidden && ! xHiddenTask.is() )
            {
                xHiddenTask = xTask;
                xTask.clear ();
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 3a9fdfd..7823738 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1154,10 +1154,7 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems)
    // operation. On the other side a crash reasoned by an invalid stl iterator
    // will have the same effect .-)

    if (
        (m_rCacheLock > 0            ) &&
        (bLockForAddRemoveVectorItems)
       )
    if ( (m_rCacheLock > 0) && bLockForAddRemoveVectorItems )
    {
        OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.");
        throw css::uno::RuntimeException(
@@ -1483,10 +1480,7 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams)
    /* SAFE */ {
    osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
    m_eJob = E_NO_JOB;
    if (
        (bAllowAutoSaveReactivation) &&
        (bWasAutoSaveActive        )
       )
    if ( bAllowAutoSaveReactivation && bWasAutoSaveActive )
    {
        m_eJob |= AutoRecovery::E_AUTO_SAVE;

diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index e962248..090c109 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -271,10 +271,7 @@ sal_Bool SAL_CALL Desktop::terminate()
    bool bTerminate = false;
    try
    {
        if(
            ( bAskQuickStart      ) &&
            ( xQuickLauncher.is() )
          )
        if( bAskQuickStart && xQuickLauncher.is() )
        {
            xQuickLauncher->queryTermination( aEvent );
            lCalledTerminationListener.push_back( xQuickLauncher );
@@ -334,10 +331,7 @@ sal_Bool SAL_CALL Desktop::terminate()
            Scheduler::ProcessEventsToIdle();
        }

        if(
            ( bAskQuickStart      ) &&
            ( xQuickLauncher.is() )
          )
        if( bAskQuickStart && xQuickLauncher.is() )
        {
            xQuickLauncher->notifyTermination( aEvent );
        }
@@ -1724,10 +1718,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
            // Use it in case it was allowed from outside only.
            bool                                       bSuspended = false;
            css::uno::Reference< css::frame::XController > xController( xFrame->getController(), css::uno::UNO_QUERY );
            if (
                ( bAllowUI         ) &&
                ( xController.is() )
               )
            if ( bAllowUI && xController.is() )
            {
                bSuspended = xController->suspend( true );
                if ( ! bSuspended )
@@ -1760,10 +1751,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
                    // It can happen that XController.suspend() returned true ... but a registered close listener
                    // throwed these veto exception. Then the controller has to be reactivated. Otherwise
                    // these document doesn't work any more.
                    if (
                        (bSuspended      ) &&
                        (xController.is())
                       )
                    if ( bSuspended && xController.is())
                        xController->suspend(false);
                }

diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a4e21ae..76dddca 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1528,10 +1528,7 @@ sal_Bool SAL_CALL Frame::setComponent(const css::uno::Reference< css::awt::XWind

    // A new component window doesn't know anything about current active/focus states.
    // Set this information on it!
    if (
        (bHadFocus            ) &&
        (xComponentWindow.is())
       )
    if ( bHadFocus && xComponentWindow.is() )
    {
        xComponentWindow->setFocus();
    }
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 675f222..eea0b5e 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4056,8 +4056,8 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
                         rotate += PI;

                     for( i = 0 ; i < 3 ; i++){
                         r_pt[i].x = (int)(pt[i].x * cos(-(rotate)) - pt[i].y * sin(-(rotate)));
                         r_pt[i].y = (int)(pt[i].y * cos(-(rotate)) + pt[i].x * sin(-(rotate)));
                         r_pt[i].x = (int)(pt[i].x * cos(-rotate) - pt[i].y * sin(-rotate));
                         r_pt[i].y = (int)(pt[i].y * cos(-rotate) + pt[i].x * sin(-rotate));
                     }

                     /* 4 - Calculation of reflex angle */
@@ -4358,7 +4358,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)

                    if ((drawobj->u.freeform.npt > 2) &&
                        (static_cast<size_t>(drawobj->u.freeform.npt) <
                         ((::std::numeric_limits<int>::max)() / sizeof(double))))
                         (::std::numeric_limits<int>::max() / sizeof(double))))
                    {
                              int n, i;
                              n = drawobj->u.freeform.npt;
diff --git a/i18nlangtag/source/isolang/inunx.cxx b/i18nlangtag/source/isolang/inunx.cxx
index 46b5e5b..40e601d 100644
--- a/i18nlangtag/source/isolang/inunx.cxx
+++ b/i18nlangtag/source/isolang/inunx.cxx
@@ -105,7 +105,7 @@ static void getPlatformSystemLanguageImpl( LanguageType& rSystemLanguage,
#endif
            }
#else   /* MACOSX */
            OString aUnxLang( (pGetLangFromEnv)() );
            OString aUnxLang( pGetLangFromEnv() );
            nLang = MsLangId::convertUnxByteStringToLanguage( aUnxLang );
            OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
            rSystemLanguage = nLang;
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 4a349d4..2a344cf 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1194,7 +1194,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale  )
        sal_Int16 LCBreakIteratorRuleCount = 0;
        sal_Unicode **LCBreakIteratorRulesArray = func(LCBreakIteratorRuleCount);
        Sequence< OUString > seq(LCBreakIteratorRuleCount);
        for(int i = 0; i < (LCBreakIteratorRuleCount); i++) {
        for(int i = 0; i < LCBreakIteratorRuleCount; i++) {
            OUString  elem(LCBreakIteratorRulesArray[i]);
            seq[i] = elem;
        }
@@ -1216,7 +1216,7 @@ LocaleDataImpl::getReservedWord( const Locale& rLocale  )
        sal_Int16 LCReservedWordsCount = 0;
        sal_Unicode **LCReservedWordsArray = func(LCReservedWordsCount);
        Sequence< OUString > seq(LCReservedWordsCount);
        for(int i = 0; i < (LCReservedWordsCount); i++) {
        for(int i = 0; i < LCReservedWordsCount; i++) {
            OUString  elem(LCReservedWordsArray[i]);
            seq[i] = elem;
        }
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index eccc208..7b54781 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -281,7 +281,7 @@ TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 sType
        }
    }
    r.realloc(n);
    return (r);
    return r;
}


diff --git a/include/comphelper/newarray.hxx b/include/comphelper/newarray.hxx
index a28bff7..a904f7d 100644
--- a/include/comphelper/newarray.hxx
+++ b/include/comphelper/newarray.hxx
@@ -29,7 +29,7 @@ namespace comphelper {
template<typename T> T *
newArray_null(size_t const n) throw()
{
    if (((::std::numeric_limits<size_t>::max)() / sizeof(T)) <= n) {
    if ((::std::numeric_limits<size_t>::max() / sizeof(T)) <= n) {
        return 0;
    }
    return new (::std::nothrow) T[n];
diff --git a/include/cppcanvas/color.hxx b/include/cppcanvas/color.hxx
index 678e431..0a5477c 100644
--- a/include/cppcanvas/color.hxx
+++ b/include/cppcanvas/color.hxx
@@ -66,12 +66,12 @@ namespace cppcanvas

    inline Color::IntSRGBA makeColor( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha )
    {
        return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|(nAlpha);
        return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|nAlpha;
    }

    inline sal_Int32 makeColorARGB( sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
    {
        return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|(nBlue);
        return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|nBlue;
    }

}
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 20f9857..bfcf055 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -101,7 +101,7 @@ public:
    static bool isNumericType( sal_Int32 nType )
    {
        return ((nType & nCharClassNumericType) != 0) &&
            ((nType & ~(nCharClassNumericTypeMask)) == 0);
            ((nType & ~nCharClassNumericTypeMask) == 0);
    }

    /// whether type is pure alphanumeric or not, e.g. return of getStringType
@@ -117,7 +117,7 @@ public:
    static bool isLetterType( sal_Int32 nType )
    {
        return ((nType & nCharClassLetterType) != 0) &&
            ((nType & ~(nCharClassLetterTypeMask)) == 0);
            ((nType & ~nCharClassLetterTypeMask) == 0);
    }

    /// whether type is pure letternumeric or not, e.g. return of getStringType
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index c484fea..0849b1a 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1679,7 +1679,7 @@ static const GdkRGBA& getDarkColor(int nViewId, LOKDocViewPrivate& priv)
        {
            const std::string& rName = rValue.second.get<std::string>("name");
            guint32 nColor = rValue.second.get<guint32>("color");
            GdkRGBA aColor{((double)((guint8)((nColor)>>16)))/255, ((double)((guint8)(((guint16)(nColor)) >> 8)))/255, ((double)((guint8)(nColor)))/255, 0};
            GdkRGBA aColor{((double)((guint8)(nColor>>16)))/255, ((double)((guint8)(((guint16)nColor) >> 8)))/255, ((double)((guint8)nColor))/255, 0};
            auto itAuthorViews = g_aAuthorViews.find(rName);
            if (itAuthorViews != g_aAuthorViews.end())
                aColorMap[itAuthorViews->second] = aColor;
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 2296b24..836722c 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -736,7 +736,7 @@ OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * p
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
    sal_Int32 tlen = aTerm.getLength();
    if ((pCC) && (tlen))
    if (pCC && tlen)
    {
        OUString bTemp = aTerm.copy(0,1);
        if (tlen > 1)
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 3ea0757..e271689 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -563,7 +563,7 @@ OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pC
OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
    sal_Int32 tlen = aTerm.getLength();
    if ((pCC) && (tlen))
    if (pCC && tlen)
    {
        OUString bTemp = aTerm.copy(0,1);
        if (tlen > 1)
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 860d8f1..bf9016d 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -607,7 +607,7 @@ bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, LanguageTyp
CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
{
        sal_Int32 tlen = aTerm.getLength();
        if ((pCC) && (tlen))
        if (pCC && tlen)
        {
            sal_Int32 nc = 0;
            for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
diff --git a/lotuswordpro/source/filter/lwpfribframe.cxx b/lotuswordpro/source/filter/lwpfribframe.cxx
index 5cbeb31..06a71791 100644
--- a/lotuswordpro/source/filter/lwpfribframe.cxx
+++ b/lotuswordpro/source/filter/lwpfribframe.cxx
@@ -115,7 +115,7 @@ void LwpFribFrame::RegisterStyle(LwpFoundry* pFoundry)
            else
            {
                XFParaStyle* pParaStyle = new XFParaStyle;
                *pParaStyle = *(pOldStyle);
                *pParaStyle = *pOldStyle;
                XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
                m_StyleName = pXFStyleManager->AddStyle(pParaStyle).m_pStyle->GetStyleName();
            }
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index d14ea31..2be4631 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -88,7 +88,7 @@ void LwpFribTable::RegisterNewStyle()
        else
        {
            XFParaStyle* pParaStyle = new XFParaStyle;
            *pParaStyle = *(pOldStyle);
            *pParaStyle = *pOldStyle;
            XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
            m_StyleName = pXFStyleManager->AddStyle(pParaStyle).m_pStyle->GetStyleName();
        }
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx
index aa6ef46..818d0f3 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -163,7 +163,7 @@ void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyVa
            connProps["userName"] = sql::ConnectPropertyVal(user_str);
            connProps["password"] = sql::ConnectPropertyVal(pass_str);
            connProps["schema"] = sql::ConnectPropertyVal(schema_str);
            connProps["port"] = sql::ConnectPropertyVal((int)(nPort));
            connProps["port"] = sql::ConnectPropertyVal((int)nPort);
            if (unixSocketPassed) {
                sql::SQLString socket_str = rtl::OUStringToOString(sUnixSocket, m_settings.encoding).getStr();
                connProps["socket"] = socket_str;
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx
index 4bd32f4..1e4c06a 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -66,7 +66,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeLis
                if (aMceState.empty() || aMceState.back() != MCE_STATE::Started)
                    return false;

                OUString aRequires = rAttribs.getString( (XML_Requires ), "none" );
                OUString aRequires = rAttribs.getString( XML_Requires, "none" );

                // At this point we can't access namespaces as the correct xml filter
                // is long gone. For now let's decide depending on a list of supported
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index b8fd28e..7621ed6 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -173,7 +173,7 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
        sal_Int32 nPhClr = maBackgroundColor.isUsed() ?
            maBackgroundColor.getColor( rFilterBase.getGraphicHelper() ) : API_RGB_TRANSPARENT;

        oox::drawingml::ShapePropertyIds aPropertyIds = (oox::drawingml::ShapePropertyInfo::DEFAULT).mrPropertyIds;
        oox::drawingml::ShapePropertyIds aPropertyIds = oox::drawingml::ShapePropertyInfo::DEFAULT.mrPropertyIds;
        aPropertyIds[oox::drawingml::ShapeProperty::FillGradient] = PROP_FillGradientName;
        oox::drawingml::ShapePropertyInfo aPropInfo( aPropertyIds, true, false, true, false );
        oox::drawingml::ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper(), aPropInfo );
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 8a45454..157887d 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -185,7 +185,7 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg)
        RegError ret = RegError::NO_ERROR;
        if (pReg->release() == 0)
        {
            delete(pReg);
            delete pReg;
            hReg = nullptr;
        }
        else
@@ -217,7 +217,7 @@ static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg,
        {
            if (!registryName->length)
            {
                delete(pReg);
                delete pReg;
                hReg = nullptr;
            }
        }
@@ -383,7 +383,7 @@ RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry)
    if (hRegistry)
    {
        ORegistry* pReg = static_cast<ORegistry*>(hRegistry);
        delete(pReg);
        delete pReg;
        return RegError::NO_ERROR;
    } else
    {
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 32d81f7..0a3b665 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -515,7 +515,7 @@ namespace rptui
                // determine whether the new focus window is part of an (currently invisible) condition
                const vcl::Window* pConditionCandidate = pGetFocusWindow->GetParent();
                const vcl::Window* pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : nullptr;
                while   (   ( pPlaygroundCandidate )
                while   (     pPlaygroundCandidate
                        &&  ( pPlaygroundCandidate != this )
                        &&  ( pPlaygroundCandidate != m_pConditionPlayground )
                        )
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 41ef1ef..c26ef0b 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -294,7 +294,7 @@ int dooptions(int argc, char** argv)
        cerror( "Too many file arguments.  Usage: cpp [input [output]]",
                NULLST);
    }
    return (j);                     /* Return new argc              */
    return j;                     /* Return new argc              */
}

int readoptions(char* filename, char*** pfargv)
@@ -358,7 +358,7 @@ int readoptions(char* filename, char*** pfargv)
    fclose(fp);
    back=dooptions(fargc+1,pfa);

    return (back);
    return back;
}

/*
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index d9d6710..41584c2 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -201,7 +201,7 @@ FileHandle_Impl::Allocator::~Allocator()
void FileHandle_Impl::Allocator::allocate(sal_uInt8 **ppBuffer, size_t *pnSize)
{
    SAL_WARN_IF((!ppBuffer) || (!pnSize), "sal.osl", "FileHandle_Impl::Allocator::allocate(): contract violation");
    if ((ppBuffer) && (pnSize))
    if (ppBuffer && pnSize)
    {
        *ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
        *pnSize = m_bufsiz;
@@ -322,7 +322,7 @@ oslFileError FileHandle_Impl::setSize(sal_uInt64 uSize)
        if (write(m_fd, "", (size_t)1) == -1)
        {
            /* Failure. Restore saved position */
            (void) lseek(m_fd, (off_t)(nCurPos), SEEK_SET);
            (void) lseek(m_fd, (off_t)nCurPos, SEEK_SET);
            return result;
        }

diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 882652b..a0b16d5 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1147,9 +1147,9 @@ SAL_CALL rtl_machdep_alloc (
#endif

#if defined(SAL_UNX)
    addr = mmap (nullptr, (size_t)(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
    addr = mmap (nullptr, (size_t)size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
#elif defined(SAL_W32)
    addr = VirtualAlloc (nullptr, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
    addr = VirtualAlloc (nullptr, (SIZE_T)size, MEM_COMMIT, PAGE_READWRITE);
#endif /* (SAL_UNX || SAL_W32) */

    if (addr != MAP_FAILED)
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index f310559..d2c5fc5 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -893,7 +893,7 @@ rtl_cache_activate (
        QUEUE_INSERT_TAIL_NAMED(&(g_cache_list.m_cache_head), cache, cache_);
        RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
    }
    return (cache);
    return cache;
}

/** rtl_cache_deactivate()
@@ -1165,7 +1165,7 @@ SAL_CALL rtl_cache_alloc (
                cache->m_cpu_stats.m_alloc += 1;
                RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));

                return (obj);
                return obj;
            }

            prev = cache->m_cpu_prev;
@@ -1205,7 +1205,7 @@ SAL_CALL rtl_cache_alloc (
            obj = nullptr;
        }
    }
    return (obj);
    return obj;
}

/** rtl_cache_free()
@@ -1326,7 +1326,7 @@ rtl_cache_wsupdate_wait (unsigned int seconds)
        timespec wakeup;

        gettimeofday(&now, nullptr);
        wakeup.tv_sec  = now.tv_sec + (seconds);
        wakeup.tv_sec  = now.tv_sec + seconds;
        wakeup.tv_nsec = now.tv_usec * 1000;

        (void) pthread_cond_timedwait (
diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx
index 3168c96..360ade3b 100644
--- a/sal/rtl/random.cxx
+++ b/sal/rtl/random.cxx
@@ -101,7 +101,7 @@ static double data (RandomData_Impl *pImpl)
              ((double)(pImpl->m_nY) / 30269.0) +
              ((double)(pImpl->m_nZ) / 30307.0)   );

    random -= ((double)((sal_uInt32)(random)));
    random -= ((double)((sal_uInt32)random));
    return random;
}

diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx
index f9cae77..ab798d8 100644
--- a/sal/textenc/tcvtutf7.cxx
+++ b/sal/textenc/tcvtutf7.cxx
@@ -275,7 +275,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
            while ( (pDestBuf < pEndDestBuf) && (nBufferBits >= 16) )
            {
                nBitBufferTemp = nBitBuffer >> (32-16);
                *pDestBuf = (sal_Unicode)((nBitBufferTemp) & 0xFFFF);
                *pDestBuf = (sal_Unicode)(nBitBufferTemp & 0xFFFF);
                pDestBuf++;
                nBitBuffer <<= 16;
                nBufferBits -= 16;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 93e75ed..b8c5db3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2521,7 +2521,7 @@ void ScDocument::MergeNumberFormatter(ScDocument* pSrcDoc)
    if (pOtherFormatter && pOtherFormatter != pThisFormatter)
    {
        SvNumberFormatterIndexTable* pExchangeList =
                 pThisFormatter->MergeFormatter(*(pOtherFormatter));
                 pThisFormatter->MergeFormatter(*pOtherFormatter);
        if (!pExchangeList->empty())
            pFormatExchangeList = pExchangeList;
    }
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index c882115..0bbe0c7 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -859,13 +859,13 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
    SvtSecurityOptions aSecOpt;
    bool bCtrlClickHappened = (nScClickMouseModifier & KEY_MOD1);
    bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
    if( bCtrlClickHappened && !( bCtrlClickSecOption ) )
    if( bCtrlClickHappened && ! bCtrlClickSecOption )
    {
        // return since ctrl+click happened when the
        // ctrl+click security option was disabled, link should not open
        return;
    }
    else if( !( bCtrlClickHappened ) && bCtrlClickSecOption )
    else if( ! bCtrlClickHappened && bCtrlClickSecOption )
    {
        // ctrl+click did not happen; only click happened maybe with some
        // other key combo. and security option is set, so return
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index cb9421e..5d567b5 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2058,12 +2058,12 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeTrackMsgInfo )

const SCROW ScChangeTrack::nContentRowsPerSlot = InitContentRowsPerSlot();
const SCSIZE ScChangeTrack::nContentSlots =
    (MAXROWCOUNT) / InitContentRowsPerSlot() + 2;
    MAXROWCOUNT / InitContentRowsPerSlot() + 2;

SCROW ScChangeTrack::InitContentRowsPerSlot()
{
    const SCSIZE nMaxSlots = 0xffe0 / sizeof( ScChangeActionContent* ) - 2;
    SCROW nRowsPerSlot = (MAXROWCOUNT) / nMaxSlots;
    SCROW nRowsPerSlot = MAXROWCOUNT / nMaxSlots;
    if ( nRowsPerSlot * nMaxSlots < sal::static_int_cast<SCSIZE>(MAXROWCOUNT) )
        ++nRowsPerSlot;
    return nRowsPerSlot;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 59730d7..3566581 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2210,7 +2210,7 @@ void ScInterpreter::ScCell()
            }
            else if( aInfoType == "ADDRESS" )
            {   // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
                ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? (ScRefFlags::ADDR_ABS) : (ScRefFlags::ADDR_ABS_3D);
                ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? ScRefFlags::ADDR_ABS : ScRefFlags::ADDR_ABS_3D;
                OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention()));
                PushString(aStr);
            }
@@ -8795,7 +8795,7 @@ void ScInterpreter::ScSearch()
            if (!bBool)
                PushNoValue();
            else
                PushDouble((double)(nPos) + 1);
                PushDouble((double)nPos + 1);
        }
    }
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 4631003..48e9c18 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -219,7 +219,7 @@ static ScRefFlags lcl_NextFlags( ScRefFlags nOld )
{
    const ScRefFlags Mask_ABS = (ScRefFlags::COL_ABS | ScRefFlags::ROW_ABS | ScRefFlags::TAB_ABS);
    ScRefFlags nNew = nOld & Mask_ABS;
    nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)(nNew) - 1 ) & Mask_ABS; // weiterzaehlen
    nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)nNew - 1 ) & Mask_ABS; // weiterzaehlen

    if (!(nOld & ScRefFlags::TAB_3D))
        nNew &= ~ScRefFlags::TAB_ABS; // not 3D -> never absolute!
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 9b23712..fd0ce59 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -766,7 +766,7 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
            {
                if( fVal < 0 )      fVal = 0;
                if( fVal >= 501 )   fVal = 500;
                nFlags |= (nNewFlags | (sal_uInt16)(fVal) << 7);
                nFlags |= (nNewFlags | (sal_uInt16)fVal << 7);
            }
            // normal condition
            else
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 790fc82..106c19e 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -426,8 +426,8 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
            return;
        }

        eType = ( pIndexToType )( nOc );
        eOc = ( pIndexToToken)( nOc );
        eType = pIndexToType( nOc );
        eOc   = pIndexToToken( nOc );
        if( eOc == ocNoName )
            pExtName = GetAddInName( nOc );

diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 1a6ad39..66b8876 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1776,7 +1776,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
    {
        SCROW nEnd = static_cast<SCROW>(pColData->Row);
        nValue1 = pColData->Value;
        if ((nStart <= nEnd) && (nValue1))
        if ((nStart <= nEnd) && nValue1)
        {
            ScPatternAttr aScPattern(pDoc->GetPool());
            if ((nValue1 & atBold) == atBold)
@@ -1800,7 +1800,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
    {
        SCROW nEnd = static_cast<SCROW>(pColData->Row);
        nValue1 = pColData->Value;
        if ((nStart <= nEnd) && (nValue1))
        if ((nStart <= nEnd) && nValue1)
        {
            ScPatternAttr aScPattern(pDoc->GetPool());
            sal_uInt16 HorJustify = (nValue1 & 0x000F);
@@ -2072,7 +2072,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
    {
        SCROW nEnd = static_cast<SCROW>(pColData->Row);
        nValue1 = pColData->Value;
        if ((nStart <= nEnd) && (nValue1))
        if ((nStart <= nEnd) && nValue1)
        {
            sal_uLong  nKey    = 0;
            sal_uInt16 nFormat = (nValue1 & 0x00FF);
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dd0576f..2872bed 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2875,7 +2875,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
        positions (e.g. if source and destination range overlaps).*/

    rDoc.CopyFromClip(
        aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~(InsertDeleteFlags::OBJECTS),
        aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS,
        pUndoDoc, pClipDoc.get(), true, false, bIncludeFiltered);

    // skipped rows and merged cells don't mix
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index c62b497..5d4444d 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -800,7 +800,7 @@ void ScUndoCut::DoChange( const bool bUndo )
    }

    ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
    if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
    if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/   pDocShell->PostPaint( aExtendedRange, PaintPartFlags::Grid, nExtFlags );

    if ( !bUndo )                               //   draw redo after updating row heights
@@ -1787,7 +1787,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
    pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );

    ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
    if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
    if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/   pDocShell->PostPaint( aWorkRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );

    ShowTable( aWorkRange.aStart.Tab() );
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3aa7e90..95f466a 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -168,7 +168,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
    }

    ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
    if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
    if ( !( pViewShell && pViewShell->AdjustRowHeight(
                                aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/   pDocShell->PostPaint( aRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );

@@ -418,7 +418,7 @@ void ScUndoSelectionAttr::DoChange( const bool bUndo )
    }

    ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
    if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
    if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/   pDocShell->PostPaint( aEffRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );

    ShowTable( aRange );
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 3720338..c1a19e9 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1883,7 +1883,7 @@ void ScUndoDataForm::DoChange( const bool bUndo )
            nPaint |= PaintPartFlags::Left;
            aDrawRange.aEnd.SetRow(MAXROW);
        }
/*A*/   if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
/*A*/   if (pViewShell && pViewShell->AdjustBlockHeight(false))
        {
            aDrawRange.aStart.SetCol(0);
            aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 730142d..e08dda7 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2492,7 +2492,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
                                    pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
                            nOldFormat = rDoc.GetFormatTable()->
                                    GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
                            rAny <<= (sal_Int32)( nOldFormat );
                            rAny <<= (sal_Int32)nOldFormat;
                        }
                        break;
                    case ATTR_INDENT:
@@ -8647,7 +8647,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
            sal_uInt16 nWidth = rDoc.GetOriginalWidth( nCol, nTab );
            //  property is 1/100mm, column width is twips
            nWidth = (sal_uInt16) TwipsToHMM(nWidth);
            rAny <<= (sal_Int32)( nWidth );
            rAny <<= (sal_Int32)nWidth;
        }
        else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
        {
@@ -8793,7 +8793,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
            sal_uInt16 nHeight = rDoc.GetOriginalHeight( nRow, nTab );
            //  property is 1/100mm, row height is twips
            nHeight = (sal_uInt16) TwipsToHMM(nHeight);
            rAny <<= (sal_Int32)( nHeight );
            rAny <<= (sal_Int32)nHeight;
        }
        else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
        {
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b5d889b..ec7c3bb 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2370,7 +2370,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
        if (pModelObj)
            aOldSize = pModelObj->getDocumentSize();

        aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)(MAXTILEDROW)));
        aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)MAXTILEDROW));

        Size aNewSize(0, 0);
        if (pModelObj)
@@ -2497,7 +2497,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
        if (pModelObj)
            aOldSize = pModelObj->getDocumentSize();

        aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)(MAXCOL)));
        aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)MAXCOL));

        Size aNewSize(0, 0);
        if (pModelObj)
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index ff7ec29..88cba74 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -171,8 +171,8 @@ ScTabView::~ScTabView()
                    ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
                    for (int k = 0; k < 4; ++k)
                    {
                        if (rOtherViewData.HasEditView((ScSplitPos)(k)))
                            pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)(k));
                        if (rOtherViewData.HasEditView((ScSplitPos)k))
                            pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)k);
                    }
                };

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index ae0247b..66af780 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1505,7 +1505,7 @@ void ScViewData::ResetEditView()
        {
            if (bEditActive[i])
            {
                lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)(i));
                lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)i);
                pEngine = pEditView[i]->GetEditEngine();
                pEngine->RemoveView(pEditView[i]);
                pEditView[i]->SetOutputArea( tools::Rectangle() );
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 45b96b5..93707db 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -1071,7 +1071,7 @@ double GetDuration( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, doub
    double          t;

    for( t = 1.0 ; t < fNumOfCoups ; t++ )
        fDur += ( t + nDiff ) * ( fCoup ) / pow( fYield, t + nDiff );
        fDur += ( t + nDiff ) * fCoup / pow( fYield, t + nDiff );

    fDur += ( fNumOfCoups + nDiff ) * ( fCoup + f100 ) / pow( fYield, fNumOfCoups + nDiff );

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index e28162b..6553984 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2268,7 +2268,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, 
            pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
        }

            ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect(rRect);
            pObj->AdjustToMaxRect(rRect);

        pObj->SetUserCall(this);

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 5cb6a87..bd19a80 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -230,8 +230,8 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_

    bool bNeedsSSSlideInfoAtom = !bVisible
                                || ( mnDiaMode == 2 )
                                || ( bIsSound )
                                || ( bStopSound )
                                || bIsSound
                                || bStopSound
                                || ( eFe != css::presentation::FadeEffect_NONE );
    if ( bNeedsSSSlideInfoAtom )
    {
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 09f0c8b..4c07402 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -2044,7 +2044,7 @@ bool AnimationExporter::getColorAny( const Any& rAny, const sal_Int16 nColorSpac
    {
        rA = (sal_uInt8)( nColor >> 16 );
        rB = (sal_uInt8)( nColor >> 8 );
        rC = (sal_uInt8)( nColor );
        rC = (sal_uInt8) nColor;
    }
    else if ( rAny >>= aHSL )   // HSL
    {
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e069146..5795a33 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1343,7 +1343,7 @@ void PowerPointExport::WriteAnimationNode( const FSHelperPtr& pFS, const Referen
    }

    if( pMethod ) {
        (this->*(pMethod))( pFS, rXNode, xmlNodeType, bMainSeqChild );
        (this->*pMethod)( pFS, rXNode, xmlNodeType, bMainSeqChild );
        return;
    }

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 5594d12..f105358 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -416,7 +416,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe
    {
        sal_uInt32 nSOColor = *( o3tl::doAccess<sal_uInt32>(mAny) );
        mnCharColor = nSOColor & 0xff00ff00;                            // green and hibyte
        mnCharColor |= (sal_uInt8)( nSOColor ) << 16;                   // red and blue is switched
        mnCharColor |= (sal_uInt8)  nSOColor << 16;                   // red and blue is switched
        mnCharColor |= (sal_uInt8)( nSOColor >> 16 );
    }
    meCharColor = ePropState;
@@ -864,7 +864,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
                    {
                        sal_uInt32 nSOColor = *o3tl::doAccess<sal_uInt32>(pPropValue[i].Value);
                        nBulletColor = nSOColor & 0xff00ff00;                       // green and hibyte
                        nBulletColor |= (sal_uInt8)( nSOColor ) << 16;              // red
                        nBulletColor |= (sal_uInt8)  nSOColor << 16;              // red
                        nBulletColor |= (sal_uInt8)( nSOColor >> 16 ) | 0xfe000000; // blue
                    }
                    else if ( aPropName == "BulletRelSize" )
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 0e268a95..4a0aadfd 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -689,7 +689,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
    {
        double fValue = 0.0;
        rValue >>= fValue;
        long nValue = (long)(fValue);
        long nValue = (long)fValue;
        mpMetric->SetValue( nValue );
        updateMenu();
    }
@@ -1651,7 +1651,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
        }
        else
        {
            mpCBXDuration->SetValue( (fDuration)*100.0 );
            mpCBXDuration->SetValue( fDuration*100.0 );
        }
    }

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 2d362cb..6598d82 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -675,7 +675,7 @@ void CustomAnimationPane::updateControls()

        if( bHasSpeed )
        {
            mpCBXDuration->SetValue( (fDuration)*100.0 );
            mpCBXDuration->SetValue( fDuration*100.0 );
        }

        mpPBPropertyMore->Enable();
@@ -1826,7 +1826,7 @@ void CustomAnimationPane::onAdd()
        pDescriptor = *static_cast< CustomAnimationPresetPtr* >( pEntryData );

    const double fDuration = pDescriptor->getDuration();
    mpCBXDuration->SetValue( (fDuration)*100.0 );
    mpCBXDuration->SetValue( fDuration*100.0 );
    bool bHasSpeed = pDescriptor->getDuration() > 0.001;
    mpCBXDuration->Enable( bHasSpeed );
    mpFTDuration->Enable( bHasSpeed );
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index dacf464..13f0db4 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -858,7 +858,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
        rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
    }

    return (bFound);
    return bFound;
}

// If object is marked return true else return false.
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index acfd3a18..987af60 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -328,7 +328,7 @@ void TableValueSet::Resize()

        if( !m_bModal )
        {
            WinBits nStyle = GetStyle() & ~(WB_VSCROLL);
            WinBits nStyle = GetStyle() & ~WB_VSCROLL;
            if( nRowCount > nVisibleRowCount )
            {
                nStyle |= WB_VSCROLL;
@@ -758,7 +758,7 @@ void TableDesignWidget::FillDesignPreviewControl()
        sal_Int32 nRows = (nCount+2)/3;
        m_pValueSet->SetColCount(nCols);
        m_pValueSet->SetLineCount(nRows);
        WinBits nStyle = m_pValueSet->GetStyle() & ~(WB_VSCROLL);
        WinBits nStyle = m_pValueSet->GetStyle() & ~WB_VSCROLL;
        m_pValueSet->SetStyle(nStyle);
        Size aSize(m_pValueSet->GetOptimalSize());
        aSize.Width() += (10 * nCols);
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 7e4e6f1..e17bf18 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -428,7 +428,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
    pPage->SetLayoutName(pExample->GetLayoutName());

    // insert (page)
    mrDoc.InsertPage(pPage, (sal_uInt16)(nTarget) * 2 + 1);
    mrDoc.InsertPage(pPage, (sal_uInt16)nTarget * 2 + 1);
    if( isRecordingUndo() )
        AddUndo(mrDoc.GetSdrUndoFactory().CreateUndoNewPage(*pPage));

@@ -467,7 +467,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
    pNotesPage->SetPageKind(PageKind::Notes);

    // insert (notes page)
    mrDoc.InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2);
    mrDoc.InsertPage(pNotesPage, (sal_uInt16)nTarget * 2 + 2);
    if( isRecordingUndo() )
        AddUndo(mrDoc.GetSdrUndoFactory().CreateUndoNewPage(*pNotesPage));

@@ -1631,7 +1631,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void)
            const float fImageRatio  = (float)aImageSize.Height() / (float)aImageSize.Width();
            aImageSize.Width() = (long)( fImageRatio * fImageHeight );
        }
        aImageSize.Height() = (long)( fImageHeight );
        aImageSize.Height() = (long)fImageHeight;

        Point aImagePos( pInfo->mrStartPos );
        aImagePos.X() += aOutSize.Width() - aImageSize.Width() - aOffset.Width() ;
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index c8ea1ec..d0821cb 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -491,7 +491,7 @@ void OptimizerDialog::UpdateControlStatesPage2()
        aResolutionText = OUString::number( nImageResolution );

    setControlProperty( "RadioButton0Pg1", "State", Any( (sal_Int16)( !bJPEGCompression ) ) );
    setControlProperty( "RadioButton1Pg1", "State", Any( (sal_Int16)( bJPEGCompression ) ) );
    setControlProperty( "RadioButton1Pg1", "State", Any( (sal_Int16) bJPEGCompression ) );
    setControlProperty( "FixedText1Pg1", "Enabled", Any( bJPEGCompression ) );
    setControlProperty( "FormattedField0Pg1", "Enabled", Any( bJPEGCompression ) );
    setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( (double)nJPEGQuality ) );
@@ -593,7 +593,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
    else
    {
        setControlProperty( "RadioButton0Pg4", "State", Any( (sal_Int16)( !bSaveAs ) ) );
        setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16)( bSaveAs ) ) );
        setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16) bSaveAs ) );
    }
    setControlProperty( "ComboBox0Pg4", "Enabled", Any( false ) );

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index d0890d8..c1aceedb 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -178,8 +178,8 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh )

    if ( aURL.GetProtocol() == INetProtocol::File )
        Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
                                                                 (pFilter) ? pFilter->GetMimeType() : OUString(),
                                                                 (pFilter) ? pFilter->GetServiceName() : OUString() );
                                                                 pFilter ? pFilter->GetMimeType() : OUString(),
                                                                 pFilter ? pFilter->GetServiceName() : OUString() );
}

SfxPickList::SfxPickList(sal_uInt32 nAllowedMenuSize)
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 11f5bb9..8abb7c3 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -618,7 +618,7 @@ void SfxRequest::Done_Impl
                    // play it safe; repair the wrong flags
                    OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" );
                    SfxSlot *pSlot = const_cast<SfxSlot*>(pImpl->pSlot);
                    pSlot->nFlags &= ~(SfxSlotMode::RECORDPERITEM);
                    pSlot->nFlags &= ~SfxSlotMode::RECORDPERITEM;
                    pSlot->nFlags &=  SfxSlotMode::RECORDPERSET;
                }

diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 83f25c6..7f105c9 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -203,7 +203,7 @@ void TemplateLocalView::showRegion(TemplateContainerItem *pItem)
    mnCurRegionId = pItem->mnRegionId+1;
    maCurRegionName = pItem->maTitle;

    insertItems((pItem)->maTemplates);
    insertItems(pItem->maTemplates);

    maOpenRegionHdl.Call(nullptr);
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 77f4b8b..4d5bcee 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -812,10 +812,8 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
    // get the filename by dialog ...
    // create the file dialog
    sal_Int16  aDialogMode = bAllowOptions
        ? (css::ui::dialogs::TemplateDescription::
           FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS)
        : (css::ui::dialogs::TemplateDescription::
           FILESAVE_AUTOEXTENSION_PASSWORD);
        ? css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS
        : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
    FileDialogFlags aDialogFlags = FileDialogFlags::NONE;

    if( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) )
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 5c3f71f..db7a7d1 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2058,8 +2058,8 @@ void SfxObjectShell::AddToRecentlyUsedList()
    {
        std::shared_ptr<const SfxFilter> pOrgFilter = pMedium->GetOrigFilter();
        Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
                                              (pOrgFilter) ? pOrgFilter->GetMimeType() : OUString(),
                                              (pOrgFilter) ? pOrgFilter->GetServiceName() : OUString() );
                                              pOrgFilter ? pOrgFilter->GetMimeType() : OUString(),
                                              pOrgFilter ? pOrgFilter->GetServiceName() : OUString() );
    }
}

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a202a82..d4a42faf 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -728,9 +728,9 @@ IMPL_LINK(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, v
    {
        TemplateSearchViewItem *pSrchItem = static_cast<TemplateSearchViewItem*>(pItem);

        if (!mpLocalView->removeTemplate((pSrchItem)->mnAssocId, pSrchItem->mnRegionId))
        if (!mpLocalView->removeTemplate(pSrchItem->mnAssocId, pSrchItem->mnRegionId))
        {
            aDeletedTemplate = (pSrchItem)->maTitle;
            aDeletedTemplate = pSrchItem->maTitle;
        }
    }
    else
@@ -738,9 +738,9 @@ IMPL_LINK(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, v
        TemplateViewItem *pViewItem = static_cast<TemplateViewItem*>(pItem);
        sal_uInt16 nRegionItemId = mpLocalView->getRegionId(pViewItem->mnRegionId);

        if (!mpLocalView->removeTemplate((pViewItem)->mnDocId + 1, nRegionItemId))//mnId w.r.t. region is mnDocId + 1;
        if (!mpLocalView->removeTemplate(pViewItem->mnDocId + 1, nRegionItemId))//mnId w.r.t. region is mnDocId + 1;
        {
            aDeletedTemplate = (pItem)->maTitle;
            aDeletedTemplate = pItem->maTitle;
        }
    }

diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index bede742..7910618 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -705,7 +705,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch(   const
            if ( sTargetFrameName == "_beamer" )
            {
                SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame();
                if ( eSearchFlags & ( frame::FrameSearchFlag::CREATE ))
                if ( eSearchFlags & frame::FrameSearchFlag::CREATE )
                    pFrame->SetChildWindow( SID_BROWSER, true );
                SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
                Reference < frame::XFrame > xFrame;
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 819015f..2ed0271 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -681,7 +681,7 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
            bOpenString=true;
            nTextStart = rRet.getLength();
        }
        else if ((nRecord != CHAR) && (bOpenString))
        else if ((nRecord != CHAR) && bOpenString)
        {
            bOpenString=false;
            if ((rRet.getLength() - nTextStart) > 1)
@@ -2889,7 +2889,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel,
        nPostSup = nPostlSup = 0;
        int nOriglen=rRet.getLength()-rTextStart;
        rRet += " {";  // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n"
        if ((!bSilent) && ((nOriglen) > 1))
        if ((!bSilent) && (nOriglen > 1))
            rRet += "\"";
        bRet = HandleRecords( nLevel+1, nSelector, nVariation );
        if (!bSilent)
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5ecf54b..2d45f0b 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1196,7 +1196,7 @@ SmNode *SmParser::DoSubSup(TG nActiveGroup, SmNode *pGivenNode)
        else
            pSNode.reset(DoTerm(true));

        aSubNodes[nIndex] = (pENode) ? pENode.release() : pSNode.release();
        aSubNodes[nIndex] = pENode ? pENode.release() : pSNode.release();
    }

    pNode->SetSubNodes(aSubNodes);
diff --git a/store/source/storcach.hxx b/store/source/storcach.hxx
index 0a16fd8..65b79e1a 100644
--- a/store/source/storcach.hxx
+++ b/store/source/storcach.hxx
@@ -55,7 +55,7 @@ class PageCache :

    static int hash_Impl(sal_uInt32 a, size_t s, size_t q, size_t m)
    {
        return static_cast<int>((((a) + ((a) >> (s)) + ((a) >> ((s) << 1))) >> (q)) & (m));
        return static_cast<int>(((a + (a >> s) + (a >> (s << 1))) >> q) & m);
    }
    int hash_index_Impl (sal_uInt32 nOffset)
    {
diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx
index 1b5e227..30264e0 100644
--- a/store/source/stortree.cxx
+++ b/store/source/stortree.cxx
@@ -79,7 +79,7 @@ sal_uInt16 OStoreBTreeNodeData::find (const T& t) const
            l = m + 1;
    }

    sal_uInt16 const k = ((sal_uInt16)(r));
    sal_uInt16 const k = ((sal_uInt16)r);
    if ((k < capacityCount()) && (t.m_aKey < m_pData[k].m_aKey))
        return k - 1;
    else
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 62b1ea3..d59872f 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -946,7 +946,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
            break;
        }
        if( n & 1 )
            nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
            nSize += ( *pWh1 - *(pWh1-1) ) + 1;
    }
    bool bEqual = *pWh1 == *pWh2; // Also check for 0

@@ -1012,7 +1012,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
            break;
        }
        if( n & 1 )
            nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
            nSize += ( *pWh1 - *(pWh1-1) ) + 1;
    }
    bool bEqual = *pWh1 == *pWh2; // Also test for 0

@@ -1222,7 +1222,7 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet )
            break;
        }
        if( n & 1 )
            nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
            nSize += ( *pWh1 - *(pWh1-1) ) + 1;
    }
    bool bEqual = *pWh1 == *pWh2; // Also check for 0

@@ -1315,7 +1315,7 @@ sal_uInt16 SfxItemSet::GetWhichByPos( sal_uInt16 nPos ) const
    {
        n = ( *(pPtr+1) - *pPtr ) + 1;
        if( nPos < n )
            return *(pPtr)+nPos;
            return *pPtr + nPos;
        nPos = nPos - n;
        pPtr += 2;
    }
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index d2829f7..2f10ef1 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -524,7 +524,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
        {
            OSL_FAIL( "SFX_ITEMPOOL_TAG_STARTPOOL_5" ); /*! s.u. */
            /*! Set error code and evaluate! */
            (rStream).SetError(SVSTREAM_FILEFORMAT_ERROR);
            rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
            pImpl->bStreaming = false;
            return rStream;
        }
@@ -550,7 +550,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
        {
            OSL_FAIL( "SFX_ITEMPOOL_TAG_TRICK4OLD" ); /*! s.u. */
            /*! Set error code and evaluate! */
            (rStream).SetError(SVSTREAM_FILEFORMAT_ERROR);
            rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
            pImpl->bStreaming = false;
            return rStream;
        }
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index efb1555..bef4075 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -705,12 +705,12 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const OUString& aProperty
        else if (aPropertyName == PROPERTYNAME_DECIMALS)
        {
            pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
            aRet <<= (sal_Int16)( nDecimals );
            aRet <<= (sal_Int16) nDecimals;
        }
        else if (aPropertyName == PROPERTYNAME_LEADING)
        {
            pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
            aRet <<= (sal_Int16)( nLeading );
            aRet <<= (sal_Int16) nLeading;
        }
        else if (aPropertyName == PROPERTYNAME_NEGRED)
        {
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index d022a2b..ddf0f99 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -480,7 +480,7 @@ bool ImpSvNumberInputScan::StringContainsWord( const OUString& rWhat,
        if ((nType & (KCharacterType::UPPER | KCharacterType::LOWER | KCharacterType::DIGIT)) != 0)
            return false;   // Alpha or numeric is not word gap.

        if ((nType & (KCharacterType::LETTER)) != 0)
        if (nType & KCharacterType::LETTER)
            return true;    // Letter other than alpha is new word. (Is it?)

        return true;        // Catch all remaining as gap until we know better.
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 0eaecb4..0acbf91 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -384,7 +384,7 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool b
        }
        else
        {
            nEntryFlags &= ~( SvxIconViewFlags::SELECTED);
            nEntryFlags &= ~SvxIconViewFlags::SELECTED;
            pEntry->AssignFlags( nEntryFlags );
            nSelectionCount--;
            CallSelectHandler();
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index d8687ab..541f90e 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -354,7 +354,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
    {
        if(aBitmapWidth == 1)
        {
            fRevScaleX = 1.0 / (double)( aUnrotatedWidth );
            fRevScaleX = 1.0 / (double) aUnrotatedWidth;
            for ( long x = 0; x < aUnrotatedWidth ; x++)
            {
                pMapIX[x] = 0;
@@ -364,7 +364,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
        }
        else
        {
            fRevScaleX = (double) aBitmapWidth / (double)( aUnrotatedWidth);
            fRevScaleX = (double) aBitmapWidth / (double)aUnrotatedWidth;
            fTmp = (double)aBitmapWidth / 2.0;

            pMapIX[ 0 ] = (long)fTmp;
@@ -393,7 +393,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
    {
        if(aBitmapHeight == 1)
        {
            fRevScaleY = 1.0 / (double)( aUnrotatedHeight);
            fRevScaleY = 1.0 / (double)aUnrotatedHeight;
            for (long y = 0; y < aUnrotatedHeight; ++y)
            {
                pMapIY[y] = 0;
@@ -403,7 +403,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
        }
        else
        {
            fRevScaleY = (double) aBitmapHeight / (double)( aUnrotatedHeight);
            fRevScaleY = (double) aBitmapHeight / (double)aUnrotatedHeight;
            fTmp = (double)aBitmapHeight / 2.0;

            pMapIY[ 0 ] = (long)fTmp;
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 863d8c1..9073fe0 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -285,13 +285,13 @@ void DropTargetHelper::ImplEndDrag()

sal_Int8 DropTargetHelper::AcceptDrop( const AcceptDropEvent& )
{
    return( DNDConstants::ACTION_NONE );
    return DNDConstants::ACTION_NONE;
}


sal_Int8 DropTargetHelper::ExecuteDrop( const ExecuteDropEvent& )
{
    return( DNDConstants::ACTION_NONE );
    return DNDConstants::ACTION_NONE;
}


diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index c84e790..d897bbb 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -375,7 +375,7 @@ void EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( OUString
    }
    else
    {
        rParameter += OUString::number( ( nPara ) );
        rParameter += OUString::number( nPara );
    }
}

@@ -1815,8 +1815,8 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen

                    for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( rSrcPt + 1 < nCoordSize ); i++ )
                    {
                        GetParameter ( fWR, seqCoordinates[ (sal_uInt16)( rSrcPt ) ].First, true, false );
                        GetParameter ( fHR, seqCoordinates[ (sal_uInt16)( rSrcPt ) ].Second, false, true );
                        GetParameter ( fWR, seqCoordinates[ (sal_uInt16)rSrcPt ].First, true, false );
                        GetParameter ( fHR, seqCoordinates[ (sal_uInt16)rSrcPt ].Second, false, true );

                        GetParameter ( fStartAngle, seqCoordinates[ (sal_uInt16)( rSrcPt + 1) ].First, false, false );
                        GetParameter ( fSwingAngle, seqCoordinates[ (sal_uInt16)( rSrcPt + 1 ) ].Second, false, false );
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index d57304b..6c17a9c 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -1352,7 +1352,7 @@ long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight )
    long lDragPos = GetDragPos() + lNullPix;
ADD_DEBUG_TEXT("lDragPos: ", OUString::number(lDragPos))
     bool bHoriRows = bHorz && mxRulerImpl->bIsTableRows;
    if((bLeft || (bHoriRows)) && lDragPos < nMaxLeft)
    if((bLeft || bHoriRows) && lDragPos < nMaxLeft)
        lDragPos = nMaxLeft;
    else if((bRight||bHoriRows) && lDragPos > nMaxRight)
        lDragPos = nMaxRight;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index c17f7a0a..169ec37 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2338,7 +2338,7 @@ BitmapEx SdrCropHdl::GetBitmapForHandle( const BitmapEx& rBitmap, int nSize )
        default: break;
    }

    tools::Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset,  nY * (nPixelSize)), Size(nPixelSize, nPixelSize) );
    tools::Rectangle aSourceRect( Point( nX * nPixelSize + nOffset,  nY * nPixelSize), Size(nPixelSize, nPixelSize) );

    BitmapEx aRetval(rBitmap);
    aRetval.Crop(aSourceRect);
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index a68dccb..87d1fb2 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1717,7 +1717,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
            }
            if (nOptions & SdrSearchOptions::BEFOREMARK)
            {
                if ((pMarkList)!=nullptr)
                if (pMarkList!=nullptr)
                {
                    if ((*pMarkList).FindObject(pObj)!=SAL_MAX_SIZE)
                    {
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 79abd6a..69f347c 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -79,7 +79,7 @@ SvxPopupWindowListBox::SvxPopupWindowListBox(sal_uInt16 nSlotId, const OUString&
    DBG_ASSERT( nSlotId == GetId(), "id mismatch" );
    get(m_pListBox, "treeview");
    WinBits nBits(m_pListBox->GetStyle());
    nBits &= ~(WB_SIMPLEMODE);
    nBits &= ~WB_SIMPLEMODE;
    m_pListBox->SetStyle(nBits);
    Size aSize(LogicToPixel(Size(100, 85), MapUnit::MapAppFont));
    m_pListBox->set_width_request(aSize.Width());
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index e71df58..92ba35b7 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -937,7 +937,7 @@ bool XLineDashItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
                return false;

            XDash aXDash = GetDashValue();
            aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(nVal)));
            aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)nVal));

            if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
                aXDash.SetDots(1);
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index bdcc310..18fc177 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -702,7 +702,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
            if( !bRet && pDoc->GetDocumentSettingManager().get( DocumentSettingId::PROTECT_FORM ) )
            {
                // Form protection case
                bRet = ( pA == nullptr ) || ( pB == nullptr ) || ( bAtStartA ) || ( bAtStartB );
                bRet = ( pA == nullptr ) || ( pB == nullptr ) || bAtStartA || bAtStartB;
            }
        }
    }
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 3401152..2012dfc 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -78,12 +78,12 @@ namespace
        const sal_Int32 nCntIdx)
    {
        for(int nb = 0; nb < 2; ++nb)
            if(&((pPam)->GetBound(bool(nb)).nNode.GetNode()) == pOldNode)
            if(&(pPam->GetBound(bool(nb)).nNode.GetNode()) == pOldNode)
            {
                (pPam)->GetBound(bool(nb)).nNode = rNewPos.nNode;
                (pPam)->GetBound(bool(nb)).nContent.Assign(
                pPam->GetBound(bool(nb)).nNode = rNewPos.nNode;
                pPam->GetBound(bool(nb)).nContent.Assign(
                    const_cast<SwIndexReg*>(rNewPos.nContent.GetIdxReg()),
                    nCntIdx + (pPam)->GetBound(bool(nb)).nContent.GetIndex());
                    nCntIdx + pPam->GetBound(bool(nb)).nContent.GetIndex());
            }
    }
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 23fe864..c98d06e 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1193,7 +1193,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
                // provided by the anchored object, use parameter <pOldBoundRect>.
                const tools::Rectangle& aOldObjRect = pAnchoredDrawObj->GetLastObjRect()
                                               ? *(pAnchoredDrawObj->GetLastObjRect())
                                               : *(pOldBoundRect);
                                               : *pOldBoundRect;
                // #i79400#
                // always invalidate object rectangle inclusive spaces
                pAnchoredDrawObj->InvalidateObjRectWithSpaces();
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 9d450f9..fded8b5 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -177,7 +177,7 @@ bool SwObjPosOscillationControl::OscillationDetected()
              aObjPosIter != maObjPositions.end();
              ++aObjPosIter )
        {
            if ( *(pNewObjPos) == *(*aObjPosIter) )
            if ( *pNewObjPos == *(*aObjPosIter) )
            {
                // position already occurred -> oscillation
                bOscillationDetected = true;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index c4e7897a..acfa8f7 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3174,7 +3174,7 @@ bool SwFlyFrameFormat::IsBackgroundTransparent() const
    else
    {
        const GraphicObject *pTmpGrf = aBackground.GetGraphicObject();
        if ( (pTmpGrf) &&
        if ( pTmpGrf &&
             (pTmpGrf->GetAttr().GetTransparency() != 0)
           )
        {
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 9e65bfa..a1b14d9 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1945,7 +1945,7 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
                                 0;

                nUpper += bCommonBorder ?
                          rAttrs.GetBottomLine( *(pFrame) ) :
                          rAttrs.GetBottomLine( *pFrame ) :
                          rAttrs.CalcBottomLine();

            }
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 9819e41..2543ea1 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -283,7 +283,7 @@ bool SwOszControl::ChkOsz()
              aObjPosIter != maObjPositions.end();
              ++aObjPosIter )
        {
            if ( *(pNewObjPos) == *(*aObjPosIter) )
            if ( *pNewObjPos == *(*aObjPosIter) )
            {
                // position already occurred -> oscillation
                bOscillationDetected = true;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 13ff438..f058859 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2016,7 +2016,7 @@ void SwBorderAttrs::CalcJoinedWithPrev( const SwFrame& _rFrame,
             pPrevFrame->GetAttrSet()->GetParaConnectBorder().GetValue()
           )
        {
            m_bJoinedWithPrev = JoinWithCmp( _rFrame, *(pPrevFrame) );
            m_bJoinedWithPrev = JoinWithCmp( _rFrame, *pPrevFrame );
        }
    }

@@ -2048,7 +2048,7 @@ void SwBorderAttrs::CalcJoinedWithNext( const SwFrame& _rFrame )
             _rFrame.GetAttrSet()->GetParaConnectBorder().GetValue()
           )
        {
            m_bJoinedWithNext = JoinWithCmp( _rFrame, *(pNextFrame) );
            m_bJoinedWithNext = JoinWithCmp( _rFrame, *pNextFrame );
        }
    }

diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
index f238de1..56c8780 100644
--- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
+++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
@@ -71,7 +71,7 @@ bool SwMovedFwdFramesByObjPos::DoesRowContainMovedFwdFrame( const SwRowFrame& _r
    NodeMapIter aIter = maMovedFwdFrames.begin();
    for ( ; aIter != maMovedFwdFrames.end(); ++aIter )
    {
        const NodeMapEntry& rEntry = *(aIter);
        const NodeMapEntry& rEntry = *aIter;
        if ( rEntry.second >= nPageNumOfRow )
        {
            SwIterator<SwTextFrame,SwTextNode> aFrameIter( *rEntry.first );
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 99455bb..3ec0d99 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -206,11 +206,11 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,

    OSL_ENSURE( _pAnchorFrame || _rAnchoredObj.GetAnchorFrame(),
            "<SwObjectFormatter::FormatObj(..)> - missing anchor frame" );
    SwFrame& rAnchorFrame = _pAnchorFrame ? *(_pAnchorFrame) : *(_rAnchoredObj.AnchorFrame());
    SwFrame& rAnchorFrame = _pAnchorFrame ? *_pAnchorFrame : *(_rAnchoredObj.AnchorFrame());

    OSL_ENSURE( _pPageFrame || rAnchorFrame.FindPageFrame(),
            "<SwObjectFormatter::FormatObj(..)> - missing page frame" );
    const SwPageFrame& rPageFrame = _pPageFrame ? *(_pPageFrame) : *(rAnchorFrame.FindPageFrame());
    const SwPageFrame& rPageFrame = _pPageFrame ? *_pPageFrame : *(rAnchorFrame.FindPageFrame());

    // create corresponding object formatter
    SwObjectFormatter* pObjFormatter =
diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
index 214fe56..a3396e6 100644
--- a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
+++ b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
@@ -36,7 +36,7 @@ void SwObjsMarkedAsTmpConsiderWrapInfluence::Insert( SwAnchoredObject& _rAnchore
    std::vector< SwAnchoredObject* >::const_iterator aIter = maObjsTmpConsiderWrapInfl.begin();
    for ( ; aIter != maObjsTmpConsiderWrapInfl.end(); ++aIter )
    {
        const SwAnchoredObject* pAnchoredObj = *(aIter);
        const SwAnchoredObject* pAnchoredObj = *aIter;
        if ( pAnchoredObj == &_rAnchoredObj )
        {
            bAlreadyInserted = true;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 515e0d5..7d9e1d4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3992,7 +3992,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const
                {
                    const GraphicObject *pTmpGrf =
                            pBackgrdBrush->GetGraphicObject();
                    if ( (pTmpGrf) &&
                    if ( pTmpGrf &&
                         (pTmpGrf->GetAttr().GetTransparency() != 0)
                       )
                    {
@@ -5510,8 +5510,8 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
        {
            const SwFrame* pDirRefFrame = IsCellFrame() ? FindTabFrame() : this;
            SwRectFnSet aRectFnSet(pDirRefFrame);
            ::lcl_PaintLeftRightLine ( true, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
            ::lcl_PaintLeftRightLine ( false, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
            ::lcl_PaintLeftRightLine ( true, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
            ::lcl_PaintLeftRightLine ( false, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
            if ( !IsContentFrame() || rAttrs.GetTopLine( *(this) ) )
            {
                // -
@@ -5522,11 +5522,11 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
                    SwBorderAttrAccess aAccess( SwFrame::GetCache(),
                                                pCellFrameForTopBorderAttrs );
                    const SwBorderAttrs &rTopAttrs = *aAccess.Get();
                    ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rTopAttrs, aRectFnSet.FnRect(), gProp);
                    ::lcl_PaintTopBottomLine( true, *(this), *pPage, aRect, rRect, rTopAttrs, aRectFnSet.FnRect(), gProp);
                }
                else
                {
                    ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp );
                    ::lcl_PaintTopBottomLine( true, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp );
                }
            }
            if ( !IsContentFrame() || rAttrs.GetBottomLine( *(this) ) )
@@ -5539,11 +5539,11 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
                    SwBorderAttrAccess aAccess( SwFrame::GetCache(),
                                                pCellFrameForBottomBorderAttrs );
                    const SwBorderAttrs &rBottomAttrs = *aAccess.Get();
                    ::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rBottomAttrs, aRectFnSet.FnRect(), gProp);
                    ::lcl_PaintTopBottomLine(false, *(this), *pPage, aRect, rRect, rBottomAttrs, aRectFnSet.FnRect(), gProp);
                }
                else
                {
                    ::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
                    ::lcl_PaintTopBottomLine(false, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
                }
            }
        }
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 63a85fa..d7215c7 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3383,7 +3383,7 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
            if ( pFirstRow && pFirstRow->IsInFollowFlowRow() &&
                 SwLayouter::DoesRowContainMovedFwdFrame(
                                            *(pFirstRow->GetFormat()->GetDoc()),
                                            *(pFirstRow) ) )
                                            *pFirstRow ) )
            {
                return false;
            }
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 39cfecd..df11d81 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -377,7 +377,7 @@ void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxWidth )
{
    nMaxWidth -= rInf.X();
    SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
    std::unique_ptr<SwFont> pTmpFnt( new SwFont( *rInf.GetFont() ) );
    pTmpFnt->SetProportion( 100 );
    pBracket->nAscent = 0;
    pBracket->nHeight = 0;
@@ -387,7 +387,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
        SwFontScript nActualScr = pTmpFnt->GetActual();
        if( SW_SCRIPTS > pBracket->nPreScript )
            pTmpFnt->SetActual( pBracket->nPreScript );
        SwFontSave aSave( rInf, pTmpFnt );
        SwFontSave aSave( rInf, pTmpFnt.get() );
        SwPosSize aSize = rInf.GetTextSize( aStr );
        pBracket->nAscent = rInf.GetAscent();
        pBracket->nHeight = aSize.Height();
@@ -411,7 +411,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
        OUString aStr( pBracket->cPost );
        if( SW_SCRIPTS > pBracket->nPostScript )
            pTmpFnt->SetActual( pBracket->nPostScript );
        SwFontSave aSave( rInf, pTmpFnt );
        SwFontSave aSave( rInf, pTmpFnt.get() );
        SwPosSize aSize = rInf.GetTextSize( aStr );
        const sal_uInt16 nTmpAsc = rInf.GetAscent();
        if( nTmpAsc > pBracket->nAscent )
@@ -435,7 +435,6 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
    else
        pBracket->nPostWidth = 0;
    nMaxWidth += rInf.X();
    delete(pTmpFnt);
}

// calculates the number of blanks in each line and
@@ -2232,7 +2231,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
        }
        return pTmp;
    }
    delete (pCreate);
    delete pCreate;
    return pRest;
}

diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 32bb6b2..e304e10 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -572,7 +572,7 @@ OUString SwTOXPara::GetURL() const

            SwDoc* pDoc = const_cast<SwDoc*>( pTextNd->GetDoc() );
            ::sw::mark::IMark const * const pMark = pDoc->getIDocumentMarkAccess()->getMarkForTextNode(
                                *(pTextNd),
                                *pTextNd,
                                IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK);
            aText = "#" + pMark->GetName();
        }
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ce5c84f..ade444d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1822,7 +1822,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
                    "<SwTextNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" );
            if ( nAttrStartIdx < nTextStartIdx
                 || ( pEndIdx != nullptr
                      && *(pEndIdx) > nEnd ) )
                      && *pEndIdx > nEnd ) )
            {
                continue;
            }
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index fe3e050..fb7f05f 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -374,7 +374,7 @@ SwpHints::TryInsertNesting( SwTextNode & rNode, SwTextAttrNesting & rNewHint )
        {
            const sal_uInt16 nOtherWhich( pOther->Which() );
            const sal_Int32 nOtherStart( pOther->GetStart() );
            const sal_Int32 nOtherEnd  ( *(pOther)->GetEnd()   );
            const sal_Int32 nOtherEnd  ( *pOther->GetEnd()   );
            if (isOverlap(nNewStart, nNewEnd, nOtherStart, nOtherEnd ))
            {
                switch (splitPolicy(nNewWhich, nOtherWhich))
@@ -1517,9 +1517,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )

                        sal_Int32* const pEnd(pAttr->GetEnd());
                        assert(pEnd != nullptr);
                        if (m_Text[ *(pEnd) - 1 ] != CH_TXT_ATR_INPUTFIELDEND)
                        if (m_Text[ *pEnd - 1 ] != CH_TXT_ATR_INPUTFIELDEND)
                        {
                            SwIndex aIdx( this, *(pEnd) );
                            SwIndex aIdx( this, *pEnd );
                            InsertText( OUString(CH_TXT_ATR_INPUTFIELDEND), aIdx, nInsertFlags );
                            bInputFieldEndCharInserted = true;
                            *pEnd = *pEnd + 1;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 8193930..5c048c4 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1948,7 +1948,7 @@ SwUnoCursorHelper::GetPropertyStates(
                                rPaM, *pSetParent, true, false );
                    }

                    pStates[i] = ( (pSetParent)->Count() )
                    pStates[i] = ( pSetParent->Count() )
                        ? rPropSet.getPropertyState( *pEntry, *pSetParent )
                        : beans::PropertyState_DEFAULT_VALUE;
                }
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 5df85d2..ce721dc 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -341,7 +341,7 @@ void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam,
        for(SwPaM& rCurrent : rPam.GetRingContainer())
        {
            if (rCurrent.HasMark() &&
                ( (bTableMode) ||
                ( bTableMode ||
                  (*rCurrent.GetPoint() != *rCurrent.GetMark()) ))
            {
                pDoc->getIDocumentContentOperations().InsertItemSet(rCurrent, rSet, nFlags);
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index b2d7679..cff01e1 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -355,7 +355,7 @@ void SwXTextPortion::GetPropertyValue(
            default:
                beans::PropertyState eTemp;
                bool bDone = SwUnoCursorHelper::getCursorPropertyValue(
                                    rEntry, *pUnoCursor, &(rVal), eTemp );
                                    rEntry, *pUnoCursor, &rVal, eTemp );
                if(!bDone)
                {
                    if(!pSet)
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index cc56970..0cc1ac4 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -587,7 +587,7 @@ void SwPagePreviewLayout::CalcPreviewPages()
            PreviewPage* pPreviewPage = new PreviewPage;
            Point aCurrAccOffset = aCurrPaintOffset -
                           Point( (mnPaintStartCol-nCurrCol) * mnColWidth, 0 );
            CalcPreviewDataForPage( *(pPage), aCurrAccOffset, pPreviewPage );
            CalcPreviewDataForPage( *pPage, aCurrAccOffset, pPreviewPage );
            pPreviewPage->bVisible = false;
            maPreviewPages.push_back( pPreviewPage );
            // continue with next page and next column
@@ -614,7 +614,7 @@ void SwPagePreviewLayout::CalcPreviewPages()

            // calculate data of visible page
            PreviewPage* pPreviewPage = new PreviewPage;
            CalcPreviewDataForPage( *(pPage), aCurrPaintOffset, pPreviewPage );
            CalcPreviewDataForPage( *pPage, aCurrPaintOffset, pPreviewPage );
            pPreviewPage->bVisible = true;
            maPreviewPages.push_back( pPreviewPage );
        }
@@ -622,7 +622,7 @@ void SwPagePreviewLayout::CalcPreviewPages()
        {
            // calculate data of unvisible page needed for accessibility
            PreviewPage* pPreviewPage = new PreviewPage;
            CalcPreviewDataForPage( *(pPage), aCurrPaintOffset, pPreviewPage );
            CalcPreviewDataForPage( *pPage, aCurrPaintOffset, pPreviewPage );
            pPreviewPage->bVisible = false;
            maPreviewPages.push_back( pPreviewPage );
        }
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index d79278d..ee5e4af 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -757,7 +757,7 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrameFormat* pFrameFormat)
void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft)
{
    bool bSwapInPage = false;
    if (!(sdrObj)->GetPage())
    if (!sdrObj->GetPage())
    {
        if (SdrModel* pModel = m_pImpl->m_rExport.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
        {
@@ -775,7 +775,7 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat

    const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient();
    const SwFormatVertOrient& rVertOri = rFrameFormat.GetVertOrient();
    m_pImpl->m_rExport.VMLExporter().AddSdrObject(*(sdrObj),
    m_pImpl->m_rExport.VMLExporter().AddSdrObject(*sdrObj,
            rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(),
            rHoriOri.GetRelationOrient(),
            rVertOri.GetRelationOrient(), (&rNdTopLeft), true);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 248f354..5218eaa 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1816,7 +1816,7 @@ bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt,
    {
        IMark* pMark = ( pMarkAccess->getAllMarksBegin() + i )->get();

        if ( IDocumentMarkAccess::GetType( *(pMark) ) == IDocumentMarkAccess::MarkType::ANNOTATIONMARK )
        if ( IDocumentMarkAccess::GetType( *pMark ) == IDocumentMarkAccess::MarkType::ANNOTATIONMARK )
        {
            continue;
        }
@@ -2792,7 +2792,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
            // Check if these attributes are for the last character in the paragraph
            // - which means the paragraph marker. If a paragraph has 7 characters,
            // then properties on character 8 are for the paragraph marker
            if( (endPos) && (startPos == *endPos ) && (*endPos == rNode.GetText().getLength()) )
            if( endPos && (startPos == *endPos ) && (*endPos == rNode.GetText().getLength()) )
            {
                SAL_INFO( "sw.ww8", startPos << "startPos == endPos" << *endPos);
                sal_uInt16 nWhich = pHt->GetAttr().Which();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ab83079..311ba44 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1596,7 +1596,7 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
        // write reference string including length+1
        sal_uInt32 nStrLen( pLinkStr->getLength() + 1 );
        SwWW8Writer::WriteLong( rStrm, nStrLen );
        SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
        SwWW8Writer::WriteString16( rStrm, *pLinkStr, false );
        // write additional two NULL Bytes
        SwWW8Writer::WriteLong( rStrm, 0 );
        // write length of hyperlink data
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 9565b70..ed17ef7 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2759,7 +2759,7 @@ SwFrameFormat *SwWW8ImplReader::AddAutoAnchor(SwFrameFormat *pFormat)
     *
     * Leave to later and set the correct location then.
     */
    if ((pFormat) && (pFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR))
    if (pFormat && (pFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR))
    {
        m_xAnchorStck->AddAnchor(*m_pPaM->GetPoint(), pFormat);
    }
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index bc2a99a..fcaa981 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -171,7 +171,7 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
        }
    }

    rItem.eAlign          = (SwEnvAlign) (nOrient);
    rItem.eAlign          = (SwEnvAlign)nOrient;
    rItem.bPrintFromAbove = m_pTopButton->IsChecked();
    rItem.lShiftRight     = static_cast< sal_Int32 >(GetFieldVal(*m_pRightField));
    rItem.lShiftDown      = static_cast< sal_Int32 >(GetFieldVal(*m_pDownField ));
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index aac4788..b9ff4bb 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -428,8 +428,8 @@ void SwLabFormatPage::ChangeMinMax()
    m_pWidthField->SetMin(nMinSize, FUNIT_CM);
    m_pHeightField->SetMin(nMinSize, FUNIT_CM);

    m_pWidthField->SetMax((long) 100 * (lHDist), FUNIT_TWIP);
    m_pHeightField->SetMax((long) 100 * (lVDist), FUNIT_TWIP);
    m_pWidthField->SetMax((long) 100 * lHDist, FUNIT_TWIP);
    m_pHeightField->SetMax((long) 100 * lVDist, FUNIT_TWIP);

    m_pLeftField->SetMax((long) 100 * (lMax - nCols * lHDist), FUNIT_TWIP);
    m_pUpperField->SetMax((long) 100 * (lMax - nRows * lVDist), FUNIT_TWIP);
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index bba5a31b..a6184d4 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -346,7 +346,7 @@ style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacing( float _lineSpace, sa
            aLineSpacing.Mode = style::LineSpacingMode::PROP;
            aLineSpacing.Height = PERCENT150;
        }
        else if( _lineSpace == ( sal_Int16 )( ( CHARACTER_INDENT_FACTOR ) * 2 ) )
        else if( _lineSpace == ( sal_Int16 )( CHARACTER_INDENT_FACTOR * 2 ) )
        {
            aLineSpacing.Mode = style::LineSpacingMode::PROP;
            aLineSpacing.Height = PERCENT200;
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index cfe3b86..f40255c 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -197,7 +197,7 @@ void SAL_CALL SwVbaRows::Delete(  )
void SAL_CALL SwVbaRows::SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle )
{
    uno::Reference< word::XColumns > xColumns( new SwVbaColumns( getParent(), mxContext, mxTextTable, mxTextTable->getColumns() ) );
    sal_Int32 nIndent = (sal_Int32)( LeftIndent );
    sal_Int32 nIndent = (sal_Int32) LeftIndent;
    switch( RulerStyle )
    {
        case word::WdRulerStyle::wdAdjustFirstColumn:
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 22c3845..df4c347 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -619,7 +619,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
               nPage = 1;
            if( nPage > nLastPage )
               nPage = nLastPage;
            xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
            xPageCursor->jumpToPage( ( sal_Int16 )nPage );
            break;
        }
        case word::WdGoToItem::wdGoToSection:
@@ -647,7 +647,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
               }
            }
            if( nPage != 0 )
                xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
                xPageCursor->jumpToPage( ( sal_Int16 )nPage );
            else
                throw uno::RuntimeException("Not implemented" );
            break;
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 6186323..9117bb6 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -114,7 +114,7 @@ void SwDrawTextShell::Init()
        nCtrl |= EEControlBits::ONLINESPELLING|EEControlBits::ALLOWBIGOBJS;
    }
    else
        nCtrl &= ~(EEControlBits::ONLINESPELLING);
        nCtrl &= ~EEControlBits::ONLINESPELLING;

    pOutliner->SetControlWord(nCtrl);
    pOLV->ShowCursor();
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 3347c1a..b39292e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -406,7 +406,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
        rSh.SetRowsToRepeat( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );

    if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem))
        rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue());
        rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>(pItem)->GetValue());

    if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ))
        rSh.SetTableName( *pFormat, static_cast<const SfxStringItem*>(pItem)->GetValue() );
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index d6323a8..4ede6d7 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -225,7 +225,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
    }

    if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem))
        rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue());
        rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>(pItem)->GetValue());

    if( SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) )
        rSh.SetRowSplit(*static_cast<const SwFormatRowSplit*>(pItem));
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 1380694..56575bd 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -212,7 +212,7 @@ void ResizeFrameCols(SwFormatCol& rCol,
        lcl_Scale(nNewWishWidth, nScale);
        lcl_Scale(nWishDiff, nScale);
    }
    rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
    rCol.SetWishWidth( (sal_uInt16)nNewWishWidth );

    if( nLeftDelta >= 2 || nLeftDelta <= -2)
        rArr.front().SetWishWidth(rArr.front().GetWishWidth() + (sal_uInt16)nWishDiff);
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 2f59695..41163c5 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -243,7 +243,7 @@ long SwWrtShell::DelRight()

    const SwTableNode * pWasInTableNd = nullptr;

    switch( nSelection & ~(SelectionType::Ornament) )
    switch( nSelection & ~SelectionType::Ornament )
    {
    case SelectionType::PostIt:
    case SelectionType::Text:
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 42c33c0..673551c 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1084,7 +1084,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
        RuntimeException aException;
        aException.Message = "createPeer: no model!";
        aException.Context = static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this));
        throw( aException );
        throw aException;
    }

    if( !getPeer().is() )
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 160ceea..f73c155 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -470,7 +470,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL, 
        for ( size_t i = 0; i < nCount; ++i )
        {
            OUString* pFile = pFiles->at( i );
            pRet[i] = *( pFile );
            pRet[i] = *pFile;
            delete pFile;
        }
        pFiles->clear();
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index 9f9fbae..a09bcea 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -62,7 +62,7 @@ namespace cmis
        {
            ResultListEntry* back = maResults.back( );
            maResults.pop_back( );
            delete( back );
            delete back;
        }
    }

diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 7910d16..98d3886 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -137,12 +137,10 @@ void checkAttributes(rtl::Reference< TypeManager > const & manager,
                        (unoidl::AccumulationBasedServiceEntity::Property::
                         Attributes(
                             ((i->bound
                               ? (unoidl::AccumulationBasedServiceEntity::
                                  Property::ATTRIBUTE_BOUND)
                               ? unoidl::AccumulationBasedServiceEntity::Property::ATTRIBUTE_BOUND
                               : 0)
                              | (i->readOnly
                                 ? (unoidl::AccumulationBasedServiceEntity::
                                    Property::ATTRIBUTE_READ_ONLY)
                                 ? unoidl::AccumulationBasedServiceEntity::Property::ATTRIBUTE_READ_ONLY
                                 : 0)))),
                        std::vector< OUString >());
                }
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index ed81e8d..b14890f 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -241,7 +241,7 @@ namespace DOM
        OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8);
        std::shared_ptr<xmlChar const> const pValue(
            xmlGetProp(m_aNodePtr, reinterpret_cast<xmlChar const *>(o1.getStr())), xmlFree);
        OUString const ret( (pValue)
        OUString const ret( pValue
            ?   OUString(reinterpret_cast<sal_Char const*>(pValue.get()),
                        strlen(reinterpret_cast<char const*>(pValue.get())),
                        RTL_TEXTENCODING_UTF8)
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 175b25a..2be2992 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -195,7 +195,7 @@ public:
#endif
    bool                    IsOverrideRedirect() const;
    bool                    IsChildWindow() const { return bool(nStyle_ & (SalFrameStyleFlags::PLUG|SalFrameStyleFlags::SYSTEMCHILD)); }
    bool                    IsSysChildWindow() const { return bool(nStyle_ & (SalFrameStyleFlags::SYSTEMCHILD)); }
    bool                    IsSysChildWindow() const { return bool(nStyle_ & SalFrameStyleFlags::SYSTEMCHILD); }
    bool                    IsFloatGrabWindow() const;
    SalI18N_InputContext* getInputContext() const { return mpInputContext; }
    bool                    isMapped() const { return bMapped_; }
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 6c60a1f..4df0f62 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -334,7 +334,7 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon,

            for (sal_uInt32 i = 0; i <= nPoints; ++i)
            {
                index1 = (i)     % nPoints;
                index1 =  i      % nPoints;
                index2 = (i + 1) % nPoints;

                x1 = aPolygon.getB2DPoint(index1).getX();
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c8e62b9..b93c9f7 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1671,7 +1671,7 @@ bool PushButton::set_property(const OString &rKey, const OUString &rValue)
    if (rKey == "has-default")
    {
        WinBits nBits = GetStyle();
        nBits &= ~(WB_DEFBUTTON);
        nBits &= ~WB_DEFBUTTON;
        if (toBool(rValue))
            nBits |= WB_DEFBUTTON;
        SetStyle(nBits);
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7b30aff..211820a 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -204,7 +204,7 @@ bool Edit::set_property(const OString &rKey, const OUString &rValue)
    else if (rKey == "visibility")
    {
        WinBits nBits = GetStyle();
        nBits &= ~(WB_PASSWORD);
        nBits &= ~WB_PASSWORD;
        if (!toBool(rValue))
            nBits |= WB_PASSWORD;
        SetStyle(nBits);
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 96da400..23f06b7 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -400,7 +400,7 @@ bool FixedText::set_property(const OString &rKey, const OUString &rValue)
    else if (rKey == "ellipsize")
    {
        WinBits nBits = GetStyle();
        nBits &= ~(WB_PATHELLIPSIS);
        nBits &= ~WB_PATHELLIPSIS;
        if (rValue != "none")
        {
            SAL_WARN_IF(rValue != "end", "vcl.layout", "Only endellipsis support for now");
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index e53e606..e993471 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -756,7 +756,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& 
        if (UmbWdt<R->ChrXP) {
            BoxRest=R->ChrXP-UmbWdt;                   // so much should be crushed
            for (i=2;i<=nChars;i++) {                  // first character position remains!
                Line[i]-=(i-1)*(BoxRest) /(nChars-1);
                Line[i]-=(i-1)*BoxRest /(nChars-1);
            }
            R->ChrXP=UmbWdt;
            Line[nChars+1]=UmbWdt;
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index e66716e..58cd9f3 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -188,7 +188,7 @@ static sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset)
#define Int32FromMOTA(a) (a)
#else
static sal_uInt16 Int16FromMOTA(sal_uInt16 a) {
  return (sal_uInt16) (((sal_uInt8)((a) >> 8)) | ((sal_uInt8)(a) << 8));
  return (sal_uInt16) (((sal_uInt8)(a >> 8)) | ((sal_uInt8)a << 8));
}
static sal_uInt32 Int32FromMOTA(sal_uInt32 a) {
  return ((a>>24)&0xFF) | (((a>>8)&0xFF00) | ((a&0xFF00)<<8) | ((a&0xFF)<<24));
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index cbd30a0..cb4f3d3 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -45,7 +45,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
    pTagName[0] = (char)(nTableTag >> 24);
    pTagName[1] = (char)(nTableTag >> 16);
    pTagName[2] = (char)(nTableTag >>  8);
    pTagName[3] = (char)(nTableTag);
    pTagName[3] = (char)nTableTag;
    pTagName[4] = 0;

    sal_uLong nLength = 0;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index dd4baa36..ac9dec1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10380,7 +10380,7 @@ void PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject )
    */

    aLine.append( "/Length " );
    aLine.append( (sal_Int32)(nSize) );
    aLine.append( (sal_Int32)nSize );
    aLine.append( "\n" );
    if( bFlateFilter )
        aLine.append( "/Filter/FlateDecode\n" );
@@ -13519,7 +13519,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa

    // if control is a hidden signature, do not convert coordinates since we
    // need /Rect [ 0 0 0 0 ]
    if ( ! ( ( rControl.getType() == PDFWriter::Signature ) && ( sigHidden ) ) )
    if ( ! ( ( rControl.getType() == PDFWriter::Signature ) && sigHidden ) )
    {
        // convert to default user space now, since the mapmode may change
        // note: create default appearances before m_aRect gets transformed
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index b358fa0..d64341f 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1213,7 +1213,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, 
                                            aMtfMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
                                            aPaintVDev->SetMapMode( aMtfMap );
                                        }
                                        else if( ( MetaActionType::PUSH == nType ) || ( MetaActionType::POP ) == nType )
                                        else if( ( MetaActionType::PUSH == nType ) || MetaActionType::POP == nType )
                                        {
                                            pCurrAct->Execute( aMapVDev.get() );
                                            pCurrAct->Execute( aPaintVDev.get() );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 864a3d9..56e6da7 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -555,7 +555,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
        aPoly.Rotate( aCenter, nAngle );

        // adapt colour accordingly
        const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) );
        const long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
        nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
        nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
        nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
@@ -883,7 +883,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
        aPoly.Rotate( aCenter, nAngle );

        // adapt colour accordingly
        const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) );
        const long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
        nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
        nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
        nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index ba9208d..580a6c3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1731,8 +1731,8 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
        {
            std::unique_ptr<long[]> const pCaretXArray(new long[2 * aStr.getLength()]);
            /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(), 0, aStr.getLength() );
            long lc_x1 = pCaretXArray[2*(nMnemonicPos)];
            long lc_x2 = pCaretXArray[2*(nMnemonicPos)+1];
            long lc_x1 = pCaretXArray[2*nMnemonicPos];
            long lc_x2 = pCaretXArray[2*nMnemonicPos+1];
            nMnemonicWidth = rTargetDevice.LogicWidthToDeviceCoordinate( std::abs(lc_x1 - lc_x2) );

            Point aTempPos = rTargetDevice.LogicToPixel( aPos );
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 91dfec3..e4e21d4 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -677,7 +677,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
        return;

    if( ( rTransparenceGradient.GetStartColor() == aBlack && rTransparenceGradient.GetEndColor() == aBlack ) ||
        ( mnDrawMode & ( DrawModeFlags::NoTransparency ) ) )
        ( mnDrawMode & DrawModeFlags::NoTransparency ) )
    {
        const_cast<GDIMetaFile&>(rMtf).WindStart();
        const_cast<GDIMetaFile&>(rMtf).Play( this, rPos, rSize );
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index 8829ab1..cee8929 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -321,7 +321,7 @@ sal_uInt16 Window::getDefaultAccessibleRole() const

        case WindowType::PATTERNFIELD:
        case WindowType::CALCINPUTLINE:
        case WindowType::EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
        case WindowType::EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? accessibility::AccessibleRole::PASSWORD_TEXT : accessibility::AccessibleRole::TEXT; break;

        case WindowType::PATTERNBOX:
        case WindowType::NUMERICBOX:
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 515078b..2fc2ae2 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -598,7 +598,7 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, ImplPaintFlags nPaintFlag
        return;
    }

    nPaintFlags = mpWindowImpl->mnPaintFlags & ~(ImplPaintFlags::Paint);
    nPaintFlags = mpWindowImpl->mnPaintFlags & ~ImplPaintFlags::Paint;

    PaintHelper aHelper(this, nPaintFlags);

diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 0366202..c911a90 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -146,7 +146,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
            if ( (nFlags & SelectionEngineFlags::DRG_ENAB) && bSelAtPoint )
            {
                nFlags |= SelectionEngineFlags::WAIT_UPEVT;
                nFlags &= ~(SelectionEngineFlags::IN_SEL);
                nFlags &= ~SelectionEngineFlags::IN_SEL;
                pWin->ReleaseMouse();
                return true;  // wait for STARTDRAG-Command-Event
            }
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f1f59c8..5c9567f 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -848,7 +848,7 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
                // #94144# allow Minimize again, should be masked out when read from configuration
                // 91625 - ignore Minimize
                if ( !(nValidMask&WindowStateMask::Minimized) )
                    aState.mnState &= ~(WindowStateState::Minimized);
                    aState.mnState &= ~WindowStateState::Minimized;
                rData.SetState( aState.mnState );
            }
            rData.SetMask( nValidMask );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index c76de72..c7fe44f 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1171,7 +1171,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
    mbScroll          = (nStyle & WB_SCROLL) != 0;
    mnWinStyle        = nStyle;

    DockingWindow::ImplInit( pParent, nStyle & ~(WB_BORDER) );
    DockingWindow::ImplInit( pParent, nStyle & ~WB_BORDER );

    // dockingwindow's ImplInit removes some bits, so restore them here to allow keyboard handling for toolbars
    ImplGetWindowImpl()->mnStyle |= WB_TABSTOP|WB_NODIALOGCONTROL; // always set WB_TABSTOP for ToolBars
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 56359ba..0583466 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1482,7 +1482,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
    else if (rKey == "resizable")
    {
        WinBits nBits = GetStyle();
        nBits &= ~(WB_SIZEABLE);
        nBits &= ~WB_SIZEABLE;
        if (toBool(rValue))
            nBits |= WB_SIZEABLE;
        SetStyle(nBits);
@@ -1534,7 +1534,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
    else if (rKey == "wrap")
    {
        WinBits nBits = GetStyle();
        nBits &= ~(WB_WORDBREAK);
        nBits &= ~WB_WORDBREAK;
        if (toBool(rValue))
            nBits |= WB_WORDBREAK;
        SetStyle(nBits);
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index facbcef..b73c504 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2506,7 +2506,7 @@ Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const
    Pixel b = (Pixel)SALCOLOR_BLUE( nSalColor );

    if( SALCOLORREVERSE == eRGBMode_ )
        return (b << 16) | (g << 8) | (r);
        return (b << 16) | (g << 8) | r;

    if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
        return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_);
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 5d8174d..3124725 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -160,7 +160,7 @@ namespace

    double toRadian(int nDegree10th)
    {
        return (3600 - (nDegree10th)) * M_PI / 1800.0;
        return (3600 - nDegree10th) * M_PI / 1800.0;
    }
}

diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index e269c76..cbe1ecb 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -3364,7 +3364,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
            {
                FloatWinPopupFlags nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
                pSVData->maWinData.mpFirstFloat->SetPopupModeFlags(
                                        nMode & ~(FloatWinPopupFlags::NoAppFocusClose));
                                        nMode & ~FloatWinPopupFlags::NoAppFocusClose);
            }
            return nRet;
        }
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 802d3c3..0e2e572d 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1245,7 +1245,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
    if( bDecoHandling )
    {
        gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
        if( nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION) )
        if( nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
            lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, false );
    }
}
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index d2dbd5b..36f7f2e 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -2307,9 +2307,9 @@ static tools::Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen,

    if ( !interiorFocus )
    {
        pixmapRect.Move( -(focusWidth), -(focusWidth) );
        pixmapRect.SetSize( Size( pixmapRect.GetWidth() + (2*(focusWidth)),
                                  pixmapRect.GetHeight() + (2*(focusWidth)) ) );
        pixmapRect.Move( -focusWidth, -focusWidth );
        pixmapRect.SetSize( Size( pixmapRect.GetWidth() + (2*focusWidth),
                                  pixmapRect.GetHeight() + (2*focusWidth) ) );
    }

    return pixmapRect;
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index 626b7ea..7ffbffb 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -541,7 +541,7 @@ GtkPrintDialog::impl_initCustomTab()
            pCurParent = pCurTabPage;
            aCustomTabs.push_back(std::make_pair(pCurTabPage, aText));
        }
        else if (aCtrlType == "Subgroup" && (pCurParent /*|| bOnJobPageValue*/))
        else if (aCtrlType == "Subgroup")
        {
            bIgnoreSubgroup = bIgnore;
            if (bIgnore)
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index c86039c..1470a06 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -597,7 +597,7 @@ void grindFunc( OutputDevice&                       rTarget,
    fprintf( stdout,
             "Duration: %d ms (%d repetitions)\tOperation: %s\tSetup: %s\n",
             (int)(osl_getGlobalTimer() - nStartTime),
             (int)(nTurns),
             (int)nTurns,
             iter->first,
             pMsg );
}
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index 9fec626..8c7c335 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -217,7 +217,7 @@ const OUString ThemeTable::getFontNameForTheme(const Id id) const
    {
         std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_latin);
             if (Iter != tmpThemeFontMap.end())
                  return (Iter)->second;
                  return Iter->second;
             return OUString();
        }
    case NS_ooxml::LN_Value_ST_Theme_majorBidi:
@@ -225,7 +225,7 @@ const OUString ThemeTable::getFontNameForTheme(const Id id) const
        {
             std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_cs);
             if (Iter != tmpThemeFontMap.end())
                 return (Iter)->second;
                 return Iter->second;
             return OUString();
        }
    case NS_ooxml::LN_Value_ST_Theme_majorEastAsia:
@@ -233,7 +233,7 @@ const OUString ThemeTable::getFontNameForTheme(const Id id) const
        {
             std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_ea);
             if (Iter != tmpThemeFontMap.end())
                 return (Iter)->second;
                 return Iter->second;
             return OUString();
        }
    default:
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index c3e4477..b864966f 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -832,7 +832,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
{
    numBytesRead = 0;

    if (numBytes == 0 || numBytes > (std::numeric_limits<unsigned long>::max)()/2)
    if (numBytes == 0 || numBytes > std::numeric_limits<unsigned long>::max()/2)
        return nullptr;

    if (mpImpl->mpReadBuffer)
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 60f8fee..5e5a707 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -406,7 +406,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
                {
                    // convert from 100th degrees to degrees (double)
                    rProperty.maValue >>= nValue;
                    double fVal = (double)(nValue) / 100.0;
                    double fVal = (double)nValue / 100.0;
                    ::sax::Converter::convertDouble( sValueBuffer, fVal );
                }
                break;