basegfx/source/polygon/b2dlinegeometry.cxx                         |   76 +--
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx          |   64 +--
 chart2/source/controller/main/ChartController.cxx                  |    6 
 chart2/source/controller/main/ChartController_Window.cxx           |   12 
 chart2/source/view/charttypes/BarChart.cxx                         |   10 
 cui/source/tabpages/measure.cxx                                    |   96 ++--
 forms/source/component/DatabaseForm.cxx                            |   16 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx            |   11 
 linguistic/source/hyphdsp.cxx                                      |   22 -
 sc/source/filter/excel/excdoc.cxx                                  |   47 +-
 sc/source/ui/view/gridwin4.cxx                                     |   98 ++---
 sd/source/ui/view/drviews7.cxx                                     |   26 -
 sd/source/ui/view/drviewsj.cxx                                     |    6 
 sfx2/source/doc/docfile.cxx                                        |   82 ++--
 svx/source/table/svdotable.cxx                                     |   22 -
 sw/source/core/SwNumberTree/SwNumberTree.cxx                       |   30 -
 sw/source/core/access/accpara.cxx                                  |   10 
 sw/source/core/doc/docdraw.cxx                                     |   10 
 sw/source/core/doc/docnum.cxx                                      |   14 
 sw/source/core/docnode/ndcopy.cxx                                  |    8 
 sw/source/core/docnode/ndnotxt.cxx                                 |   10 
 sw/source/core/docnode/ndsect.cxx                                  |   18 
 sw/source/core/frmedt/feshview.cxx                                 |   16 
 sw/source/core/frmedt/fews.cxx                                     |   10 
 sw/source/core/layout/calcmove.cxx                                 |   16 
 sw/source/core/layout/fly.cxx                                      |   24 -
 sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx  |   46 +-
 sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx |   38 -
 ucb/source/cacher/contentresultsetwrapper.cxx                      |    8 
 ucb/source/ucp/gio/gio_content.cxx                                 |   28 -
 vcl/source/filter/graphicfilter.cxx                                |  194 
++++------
 xmloff/source/draw/shapeexport.cxx                                 |   28 -
 xmloff/source/forms/elementexport.cxx                              |   17 
 xmloff/source/style/styleexp.cxx                                   |   33 -
 xmloff/source/text/txtimp.cxx                                      |   25 -
 xmlsecurity/source/helper/xsecctl.cxx                              |  130 
+++---
 36 files changed, 618 insertions(+), 689 deletions(-)

New commits:
commit 9b79ae1161af42d7a54e34a1dbcf78831acab86d
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Jul 19 14:42:16 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Jul 19 19:11:16 2025 +0200

    loplugin:blockblock
    
    found with a modified copy of this plugin
    
    Change-Id: Ib2ca97c7479abdf1a375e2700f9c947e1101f0e4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188065
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx 
b/basegfx/source/polygon/b2dlinegeometry.cxx
index a6a88c557ee8..1071ff859c0b 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -417,27 +417,25 @@ namespace basegfx
                 }
 
                 // create upper edge.
+                if(bCutA)
                 {
-                    if(bCutA)
-                    {
-                        // calculate cut point and add
-                        aCutPoint = rEdge.getStartPoint() + (aPerpendStartA * 
fCutA);
-                        aBezierPolygon.append(aCutPoint);
-                    }
-                    else
-                    {
-                        // create scaled bezier segment
-                        const B2DPoint aStart(rEdge.getStartPoint() + 
aPerpendStartA);
-                        const B2DPoint aEnd(rEdge.getEndPoint() + 
aPerpendEndA);
-                        const B2DVector aEdge(aEnd - aStart);
-                        const double fLength(aEdge.getLength());
-                        const double fScale(bIsEdgeLengthZero ? 1.0 : fLength 
/ fEdgeLength);
-                        const B2DVector fRelNext(rEdge.getControlPointA() - 
rEdge.getStartPoint());
-                        const B2DVector fRelPrev(rEdge.getControlPointB() - 
rEdge.getEndPoint());
-
-                        aBezierPolygon.append(aStart);
-                        aBezierPolygon.appendBezierSegment(aStart + (fRelNext 
* fScale), aEnd + (fRelPrev * fScale), aEnd);
-                    }
+                    // calculate cut point and add
+                    aCutPoint = rEdge.getStartPoint() + (aPerpendStartA * 
fCutA);
+                    aBezierPolygon.append(aCutPoint);
+                }
+                else
+                {
+                    // create scaled bezier segment
+                    const B2DPoint aStart(rEdge.getStartPoint() + 
aPerpendStartA);
+                    const B2DPoint aEnd(rEdge.getEndPoint() + aPerpendEndA);
+                    const B2DVector aEdge(aEnd - aStart);
+                    const double fLength(aEdge.getLength());
+                    const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / 
fEdgeLength);
+                    const B2DVector fRelNext(rEdge.getControlPointA() - 
rEdge.getStartPoint());
+                    const B2DVector fRelPrev(rEdge.getControlPointB() - 
rEdge.getEndPoint());
+
+                    aBezierPolygon.append(aStart);
+                    aBezierPolygon.appendBezierSegment(aStart + (fRelNext * 
fScale), aEnd + (fRelPrev * fScale), aEnd);
                 }
 
                 // create right edge
@@ -480,27 +478,25 @@ namespace basegfx
                 }
 
                 // create lower edge.
+                if(bCutB)
                 {
-                    if(bCutB)
-                    {
-                        // calculate cut point and add
-                        aCutPoint = rEdge.getEndPoint() + (aPerpendEndB * 
fCutB);
-                        aBezierPolygon.append(aCutPoint);
-                    }
-                    else
-                    {
-                        // create scaled bezier segment
-                        const B2DPoint aStart(rEdge.getEndPoint() + 
aPerpendEndB);
-                        const B2DPoint aEnd(rEdge.getStartPoint() + 
aPerpendStartB);
-                        const B2DVector aEdge(aEnd - aStart);
-                        const double fLength(aEdge.getLength());
-                        const double fScale(bIsEdgeLengthZero ? 1.0 : fLength 
/ fEdgeLength);
-                        const B2DVector fRelNext(rEdge.getControlPointB() - 
rEdge.getEndPoint());
-                        const B2DVector fRelPrev(rEdge.getControlPointA() - 
rEdge.getStartPoint());
-
-                        aBezierPolygon.append(aStart);
-                        aBezierPolygon.appendBezierSegment(aStart + (fRelNext 
* fScale), aEnd + (fRelPrev * fScale), aEnd);
-                    }
+                    // calculate cut point and add
+                    aCutPoint = rEdge.getEndPoint() + (aPerpendEndB * fCutB);
+                    aBezierPolygon.append(aCutPoint);
+                }
+                else
+                {
+                    // create scaled bezier segment
+                    const B2DPoint aStart(rEdge.getEndPoint() + aPerpendEndB);
+                    const B2DPoint aEnd(rEdge.getStartPoint() + 
aPerpendStartB);
+                    const B2DVector aEdge(aEnd - aStart);
+                    const double fLength(aEdge.getLength());
+                    const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / 
fEdgeLength);
+                    const B2DVector fRelNext(rEdge.getControlPointB() - 
rEdge.getEndPoint());
+                    const B2DVector fRelPrev(rEdge.getControlPointA() - 
rEdge.getStartPoint());
+
+                    aBezierPolygon.append(aStart);
+                    aBezierPolygon.appendBezierSegment(aStart + (fRelNext * 
fScale), aEnd + (fRelPrev * fScale), aEnd);
                 }
 
                 // close
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx 
b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 4c51fb0b8a81..2b13ce025de8 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -273,41 +273,39 @@ void ObjectPropertiesDialogParameter::init( const 
rtl::Reference<::chart::ChartM
     }
 
      //create gui name for this object
+    if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_AXIS )
     {
-        if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_AXIS )
-        {
-            m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, 
xChartModel );
-        }
-        else if( !m_bAffectsMultipleObjects && ( m_eObjectType == 
OBJECTTYPE_GRID || m_eObjectType == OBJECTTYPE_SUBGRID ) )
-        {
-            m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, 
xChartModel );
-        }
-        else if( !m_bAffectsMultipleObjects && m_eObjectType == 
OBJECTTYPE_TITLE )
-        {
-            m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, 
xChartModel );
-        }
-        else
+        m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, 
xChartModel );
+    }
+    else if( !m_bAffectsMultipleObjects && ( m_eObjectType == OBJECTTYPE_GRID 
|| m_eObjectType == OBJECTTYPE_SUBGRID ) )
+    {
+        m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, 
xChartModel );
+    }
+    else if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_TITLE )
+    {
+        m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, 
xChartModel );
+    }
+    else
+    {
+        switch( m_eObjectType )
         {
-            switch( m_eObjectType )
-            {
-                case OBJECTTYPE_DATA_POINT:
-                case OBJECTTYPE_DATA_LABEL:
-                case OBJECTTYPE_DATA_LABELS:
-                case OBJECTTYPE_DATA_ERRORS_X:
-                case OBJECTTYPE_DATA_ERRORS_Y:
-                case OBJECTTYPE_DATA_ERRORS_Z:
-                case OBJECTTYPE_DATA_AVERAGE_LINE:
-                case OBJECTTYPE_DATA_CURVE:
-                case OBJECTTYPE_DATA_CURVE_EQUATION:
-                    if( m_bAffectsMultipleObjects )
-                        m_aLocalizedName = 
ObjectNameProvider::getName_ObjectForAllSeries( m_eObjectType );
-                    else
-                        m_aLocalizedName = 
ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, 
m_xChartDocument );
-                    break;
-                default:
-                    m_aLocalizedName = 
ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects);
-                    break;
-            }
+            case OBJECTTYPE_DATA_POINT:
+            case OBJECTTYPE_DATA_LABEL:
+            case OBJECTTYPE_DATA_LABELS:
+            case OBJECTTYPE_DATA_ERRORS_X:
+            case OBJECTTYPE_DATA_ERRORS_Y:
+            case OBJECTTYPE_DATA_ERRORS_Z:
+            case OBJECTTYPE_DATA_AVERAGE_LINE:
+            case OBJECTTYPE_DATA_CURVE:
+            case OBJECTTYPE_DATA_CURVE_EQUATION:
+                if( m_bAffectsMultipleObjects )
+                    m_aLocalizedName = 
ObjectNameProvider::getName_ObjectForAllSeries( m_eObjectType );
+                else
+                    m_aLocalizedName = 
ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, 
m_xChartDocument );
+                break;
+            default:
+                m_aLocalizedName = 
ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects);
+                break;
         }
     }
 }
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 7e801b4e79e8..bcdeb40bc2bd 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -479,10 +479,8 @@ void SAL_CALL ChartController::modeChanged( const 
util::ModeChangeEvent& rEvent
                 GetDrawModelWrapper();
                 if(m_pDrawModelWrapper)
                 {
-                    {
-                        if( m_pDrawViewWrapper )
-                            m_pDrawViewWrapper->ReInit();
-                    }
+                    if( m_pDrawViewWrapper )
+                        m_pDrawViewWrapper->ReInit();
 
                     //reselect object
                     if( m_aSelection.hasSelection() )
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index a7c315ba3231..99b5b97ddeff 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1294,16 +1294,14 @@ bool ChartController::execute_KeyInput( const KeyEvent& 
rKEvt )
     if( bReturn )
         return bReturn;
 
+    if( pDrawViewWrapper->IsTextEdit() )
     {
-        if( pDrawViewWrapper->IsTextEdit() )
+        if( pDrawViewWrapper->KeyInput(rKEvt, pChartWindow) )
         {
-            if( pDrawViewWrapper->KeyInput(rKEvt, pChartWindow) )
+            bReturn = true;
+            if( nCode == KEY_ESCAPE )
             {
-                bReturn = true;
-                if( nCode == KEY_ESCAPE )
-                {
-                    EndTextEdit();
-                }
+                EndTextEdit();
             }
         }
     }
diff --git a/chart2/source/view/charttypes/BarChart.cxx 
b/chart2/source/view/charttypes/BarChart.cxx
index 38a497707d22..f3c4b9eada38 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -957,13 +957,11 @@ void BarChart::doXSlot(
 
                 double fLowerBarDepth = fLogicBarDepth;
                 double fUpperBarDepth = fLogicBarDepth;
+                if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && 
fCompleteHeight!=0.0 )
                 {
-                    if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && 
fCompleteHeight!=0.0 )
-                    {
-                        double fOuterBarDepth = fLogicBarDepth * 
fTopHeight/(fabs(fCompleteHeight));
-                        fLowerBarDepth = (fBaseValue < fUpperYValue) ? 
fabs(fLogicBarDepth) : fabs(fOuterBarDepth);
-                        fUpperBarDepth = (fBaseValue < fUpperYValue) ? 
fabs(fOuterBarDepth) : fabs(fLogicBarDepth);
-                    }
+                    double fOuterBarDepth = fLogicBarDepth * 
fTopHeight/(fabs(fCompleteHeight));
+                    fLowerBarDepth = (fBaseValue < fUpperYValue) ? 
fabs(fLogicBarDepth) : fabs(fOuterBarDepth);
+                    fUpperBarDepth = (fBaseValue < fUpperYValue) ? 
fabs(fOuterBarDepth) : fabs(fLogicBarDepth);
                 }
 
                 awt::Point aScreenPosition2D = 
getLabelScreenPositionAndAlignment(
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 427c6a00c391..b589e0f09636 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -255,65 +255,63 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
     {
         css::drawing::MeasureTextVertPos eVPos =
                     rAttrs->Get( SDRATTR_MEASURETEXTVPOS ).GetValue();
+        if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != 
SfxItemState::INVALID )
         {
-            if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != 
SfxItemState::INVALID )
+            css::drawing::MeasureTextHorzPos eHPos =
+                        rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue();
+            RectPoint eRP = RectPoint::MM;
+            switch( eVPos )
             {
-                css::drawing::MeasureTextHorzPos eHPos =
-                            rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue();
-                RectPoint eRP = RectPoint::MM;
-                switch( eVPos )
+            case css::drawing::MeasureTextVertPos_EAST:
+                switch( eHPos )
                 {
-                case css::drawing::MeasureTextVertPos_EAST:
-                    switch( eHPos )
-                    {
-                    case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP 
= RectPoint::LT; break;
-                    case css::drawing::MeasureTextHorzPos_INSIDE:         eRP 
= RectPoint::MT; break;
-                    case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP 
= RectPoint::RT; break;
-                    case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MT; break;
-                    default: break;
-                    }
-                    break;
-                case css::drawing::MeasureTextVertPos_CENTERED:
-                case css::drawing::MeasureTextVertPos_AUTO:
-                    switch( eHPos )
-                    {
-                    case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP 
= RectPoint::LM; break;
-                    case css::drawing::MeasureTextHorzPos_INSIDE:         eRP 
= RectPoint::MM; break;
-                    case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP 
= RectPoint::RM; break;
-                    case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MM; break;
-                    default: break;
-                    }
-                    break;
-                case css::drawing::MeasureTextVertPos_WEST:
-                    switch( eHPos )
-                    {
-                    case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP 
= RectPoint::LB; break;
-                    case css::drawing::MeasureTextHorzPos_INSIDE:         eRP 
= RectPoint::MB; break;
-                    case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP 
= RectPoint::RB; break;
-                    case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MB; break;
-                    default: break;
-                    }
-                    break;
-                 default: ;//prevent warning
+                case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP = 
RectPoint::LT; break;
+                case css::drawing::MeasureTextHorzPos_INSIDE:         eRP = 
RectPoint::MT; break;
+                case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP = 
RectPoint::RT; break;
+                case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MT; break;
+                default: break;
                 }
-
-                CTL_STATE nState = CTL_STATE::NONE;
-
-                if (eHPos == css::drawing::MeasureTextHorzPos_AUTO)
+                break;
+            case css::drawing::MeasureTextVertPos_CENTERED:
+            case css::drawing::MeasureTextVertPos_AUTO:
+                switch( eHPos )
                 {
-                    m_xTsbAutoPosH->set_state( TRISTATE_TRUE );
-                    nState = CTL_STATE::NOHORZ;
+                case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP = 
RectPoint::LM; break;
+                case css::drawing::MeasureTextHorzPos_INSIDE:         eRP = 
RectPoint::MM; break;
+                case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP = 
RectPoint::RM; break;
+                case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MM; break;
+                default: break;
                 }
-
-                if (eVPos == css::drawing::MeasureTextVertPos_AUTO)
+                break;
+            case css::drawing::MeasureTextVertPos_WEST:
+                switch( eHPos )
                 {
-                    m_xTsbAutoPosV->set_state( TRISTATE_TRUE );
-                    nState |= CTL_STATE::NOVERT;
+                case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:    eRP = 
RectPoint::LB; break;
+                case css::drawing::MeasureTextHorzPos_INSIDE:         eRP = 
RectPoint::MB; break;
+                case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE:   eRP = 
RectPoint::RB; break;
+                case css::drawing::MeasureTextHorzPos_AUTO:          eRP = 
RectPoint::MB; break;
+                default: break;
                 }
+                break;
+             default: ;//prevent warning
+            }
+
+            CTL_STATE nState = CTL_STATE::NONE;
 
-                m_aCtlPosition.SetState(nState);
-                m_aCtlPosition.SetActualRP(eRP);
+            if (eHPos == css::drawing::MeasureTextHorzPos_AUTO)
+            {
+                m_xTsbAutoPosH->set_state( TRISTATE_TRUE );
+                nState = CTL_STATE::NOHORZ;
             }
+
+            if (eVPos == css::drawing::MeasureTextVertPos_AUTO)
+            {
+                m_xTsbAutoPosV->set_state( TRISTATE_TRUE );
+                nState |= CTL_STATE::NOVERT;
+            }
+
+            m_aCtlPosition.SetState(nState);
+            m_aCtlPosition.SetActualRP(eRP);
         }
     }
     else
diff --git a/forms/source/component/DatabaseForm.cxx 
b/forms/source/component/DatabaseForm.cxx
index 999bc986bf07..8591c5f28e45 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2923,16 +2923,14 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, 
const Reference< XInteraction
         // reloading...
 
     EventObject aEvent(static_cast<XWeak*>(this));
+    // only if there is no approve listener we can post the event at this time
+    // otherwise see approveRowsetChange
+    // the approval is done by the aggregate
+    if (!m_aRowSetApproveListeners.getLength())
     {
-        // only if there is no approve listener we can post the event at this 
time
-        // otherwise see approveRowsetChange
-        // the approval is done by the aggregate
-        if (!m_aRowSetApproveListeners.getLength())
-        {
-            aGuard.clear();
-            m_aLoadListeners.notifyEach( &XLoadListener::reloading, aEvent);
-            aGuard.reset();
-        }
+        aGuard.clear();
+        m_aLoadListeners.notifyEach( &XLoadListener::reloading, aEvent);
+        aGuard.reset();
     }
 
     bool bSuccess = true;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 01d0b05ac201..f7d6ea9c72f3 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -836,12 +836,11 @@ bool ToolbarLayoutManager::dockToolbar( 
std::u16string_view rResourceURL, ui::Do
                     ::Size aSize;
 
                     SolarMutexGuard aGuard;
-                    {
-                        if (pToolBox)
-                            aSize = pToolBox->CalcWindowSizePixel( 1, 
ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) );
-                        else if (pWindow)
-                            aSize = pWindow->GetSizePixel();
-                    }
+
+                    if (pToolBox)
+                        aSize = pToolBox->CalcWindowSizePixel( 1, 
ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) );
+                    else if (pWindow)
+                        aSize = pWindow->GetSizePixel();
 
                     ::Point aPixelPos;
                     awt::Point aDockPos;
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index eaf49579339a..d04c3a9b668b 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -126,20 +126,18 @@ rtl::Reference< HyphenatedWord >  
HyphenatorDispatcher::buildHyphWord(
         return nullptr;
 
 #if OSL_DEBUG_LEVEL > 0
+    if (std::u16string_view(aTmp) != rOrigWord)
     {
-        if (std::u16string_view(aTmp) != rOrigWord)
+        // both words should only differ by a having a trailing '.'
+        // character or not...
+        std::u16string_view aShorter(aTmp), aLonger(rOrigWord);
+        if (aTmp.getLength() > rOrigWord.getLength())
+            std::swap(aShorter, aLonger);
+        sal_Int32 nS = aShorter.size();
+        sal_Int32 nL = aLonger.size();
+        if (nS > 0 && nL > 0)
         {
-            // both words should only differ by a having a trailing '.'
-            // character or not...
-            std::u16string_view aShorter(aTmp), aLonger(rOrigWord);
-            if (aTmp.getLength() > rOrigWord.getLength())
-                std::swap(aShorter, aLonger);
-            sal_Int32 nS = aShorter.size();
-            sal_Int32 nL = aLonger.size();
-            if (nS > 0 && nL > 0)
-            {
-                assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && 
"HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
-            }
+            assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && 
"HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
         }
     }
 #endif
diff --git a/sc/source/filter/excel/excdoc.cxx 
b/sc/source/filter/excel/excdoc.cxx
index 00f23be6e292..d11d68d18987 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -1223,35 +1223,34 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
                 }
             }
 
-            { // export <extLst>
-                if (rModel.mxExtensionList)
-                {
-                    // put <extLst>, it has no attributes
-                    rStrm.GetCurrentStream()->startElement(XML_extLst);
-
-                    // export uri attribute of <ext> element
-                    for (auto& uriValue : rModel.mxExtensionList->vExtension)
-                    {
-                        // export <ext> with uri attribute.
-                        rStrm.GetCurrentStream()->startElement(XML_ext, 
XML_uri, uriValue);
+            // export <extLst>
+            if (rModel.mxExtensionList)
+            {
+                // put <extLst>, it has no attributes
+                rStrm.GetCurrentStream()->startElement(XML_extLst);
 
-                    /*
-                        TODO: export child elements of <ext>. We should export 
"any element in any namespace", which seems challenging.
+                // export uri attribute of <ext> element
+                for (auto& uriValue : rModel.mxExtensionList->vExtension)
+                {
+                    // export <ext> with uri attribute.
+                    rStrm.GetCurrentStream()->startElement(XML_ext, XML_uri, 
uriValue);
 
-                        <extLst>
-                            <ext>
-                                (Any element in any namespace)
-                            </ext>
-                        </extLst>
-                    */
+                /*
+                    TODO: export child elements of <ext>. We should export 
"any element in any namespace", which seems challenging.
 
-                        // put </ext>
-                        rStrm.GetCurrentStream()->endElement(XML_ext);
-                    }
+                    <extLst>
+                        <ext>
+                            (Any element in any namespace)
+                        </ext>
+                    </extLst>
+                */
 
-                    // put </extLst>
-                    rStrm.GetCurrentStream()->endElement(XML_extLst);
+                    // put </ext>
+                    rStrm.GetCurrentStream()->endElement(XML_ext);
                 }
+
+                // put </extLst>
+                rStrm.GetCurrentStream()->endElement(XML_extLst);
             }
 
             // put </connection>
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 6fbdeb8cb021..b7b32e2c63a1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -819,32 +819,30 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
     OutputDevice* pContentDev = &rDevice;   // device for document content, 
used by overlay manager
     SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with 
SdrPaintWindow directly
 
+    // init redraw
+    if (pCurTabViewShell)
     {
-        // init redraw
-        if (pCurTabViewShell)
+        MapMode aCurrentMapMode(pContentDev->GetMapMode());
+        pContentDev->SetMapMode(aDrawMode);
+        SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+
+        if(pDrawView)
         {
-            MapMode aCurrentMapMode(pContentDev->GetMapMode());
-            pContentDev->SetMapMode(aDrawMode);
-            SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+            // #i74769# Use new BeginDrawLayers() interface
+            vcl::Region aDrawingRegion(aDrawingRectLogic);
+            pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, 
aDrawingRegion);
+            OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no 
SdrPaintWindow (!)");
 
-            if(pDrawView)
+            if (!bIsTiledRendering)
             {
-                // #i74769# Use new BeginDrawLayers() interface
-                vcl::Region aDrawingRegion(aDrawingRectLogic);
-                pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, 
aDrawingRegion);
-                OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no 
SdrPaintWindow (!)");
-
-                if (!bIsTiledRendering)
-                {
-                    // #i74769# get target device from SdrPaintWindow, this 
may be the prerender
-                    // device now, too.
-                    pContentDev = 
&(pTargetPaintWindow->GetTargetOutputDevice());
-                    aOutputData.SetContentDevice(pContentDev);
-                }
+                // #i74769# get target device from SdrPaintWindow, this may be 
the prerender
+                // device now, too.
+                pContentDev = &(pTargetPaintWindow->GetTargetOutputDevice());
+                aOutputData.SetContentDevice(pContentDev);
             }
-
-            pContentDev->SetMapMode(aCurrentMapMode);
         }
+
+        pContentDev->SetMapMode(aCurrentMapMode);
     }
 
     // app-background / document edge (area) (Pixel)
@@ -1059,44 +1057,42 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
         }
     }
 
+    // end redraw
+    if (pCurTabViewShell)
     {
-        // end redraw
-        if (pCurTabViewShell)
+        MapMode aCurrentMapMode(pContentDev->GetMapMode());
+        pContentDev->SetMapMode(aDrawMode);
+
+        if (bIsTiledRendering)
         {
-            MapMode aCurrentMapMode(pContentDev->GetMapMode());
-            pContentDev->SetMapMode(aDrawMode);
+            Point aOrigin = aOriginalMode.GetOrigin();
+            if (bLayoutRTL)
+                aOrigin.setX(-aOrigin.getX()
+                             + o3tl::toTwips(aOutputData.nScrX + 
aOutputData.GetScrW(), o3tl::Length::px));
+            else
+                aOrigin.AdjustX(o3tl::toTwips(aOutputData.nScrX, 
o3tl::Length::px));
 
-            if (bIsTiledRendering)
-            {
-                Point aOrigin = aOriginalMode.GetOrigin();
-                if (bLayoutRTL)
-                    aOrigin.setX(-aOrigin.getX()
-                                 + o3tl::toTwips(aOutputData.nScrX + 
aOutputData.GetScrW(), o3tl::Length::px));
-                else
-                    aOrigin.AdjustX(o3tl::toTwips(aOutputData.nScrX, 
o3tl::Length::px));
-
-                aOrigin.AdjustY(o3tl::toTwips(aOutputData.nScrY, 
o3tl::Length::px));
-                aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, 
o3tl::Length::mm100);
-                // keep into account the zoom factor
-                aOrigin = aOrigin.scale(
-                    aDrawMode.GetScaleX().GetDenominator(), 
aDrawMode.GetScaleX().GetNumerator(),
-                    aDrawMode.GetScaleY().GetDenominator(), 
aDrawMode.GetScaleY().GetNumerator());
-
-                MapMode aNew = rDevice.GetMapMode();
-                aNew.SetOrigin(aOrigin);
-                rDevice.SetMapMode(aNew);
-            }
+            aOrigin.AdjustY(o3tl::toTwips(aOutputData.nScrY, 
o3tl::Length::px));
+            aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, 
o3tl::Length::mm100);
+            // keep into account the zoom factor
+            aOrigin = aOrigin.scale(
+                aDrawMode.GetScaleX().GetDenominator(), 
aDrawMode.GetScaleX().GetNumerator(),
+                aDrawMode.GetScaleY().GetDenominator(), 
aDrawMode.GetScaleY().GetNumerator());
 
-            SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+            MapMode aNew = rDevice.GetMapMode();
+            aNew.SetOrigin(aOrigin);
+            rDevice.SetMapMode(aNew);
+        }
 
-            if(pDrawView)
-            {
-                // #i74769# work with SdrPaintWindow directly
-                pDrawView->EndDrawLayers(*pTargetPaintWindow, true);
-            }
+        SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
 
-            pContentDev->SetMapMode(aCurrentMapMode);
+        if(pDrawView)
+        {
+            // #i74769# work with SdrPaintWindow directly
+            pDrawView->EndDrawLayers(*pTargetPaintWindow, true);
         }
+
+        pContentDev->SetMapMode(aCurrentMapMode);
     }
 
     // in place editing - lok case
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 902c9d5e431f..1590032dfaed 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1491,23 +1491,21 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
     bool bDisableEditHyperlink = ShouldDisableEditHyperlink();
 
     //highlight selected custom shape
+    if(HasCurrentFunction())
     {
-        if(HasCurrentFunction())
-        {
-            rtl::Reference< FuPoor > xFunc( GetCurrentFunction() );
-            FuConstructCustomShape* pShapeFunc = dynamic_cast< 
FuConstructCustomShape* >( xFunc.get() );
+        rtl::Reference< FuPoor > xFunc( GetCurrentFunction() );
+        FuConstructCustomShape* pShapeFunc = dynamic_cast< 
FuConstructCustomShape* >( xFunc.get() );
 
-            static const sal_uInt16 nCSTbArray[] = { SID_DRAWTBX_CS_BASIC, 
SID_DRAWTBX_CS_SYMBOL,
-                                                     SID_DRAWTBX_CS_ARROW, 
SID_DRAWTBX_CS_FLOWCHART,
-                                                     SID_DRAWTBX_CS_CALLOUT, 
SID_DRAWTBX_CS_STAR };
+        static const sal_uInt16 nCSTbArray[] = { SID_DRAWTBX_CS_BASIC, 
SID_DRAWTBX_CS_SYMBOL,
+                                                 SID_DRAWTBX_CS_ARROW, 
SID_DRAWTBX_CS_FLOWCHART,
+                                                 SID_DRAWTBX_CS_CALLOUT, 
SID_DRAWTBX_CS_STAR };
 
-            const sal_uInt16 nCurrentSId = GetCurrentFunction()->GetSlotID();
-            for (sal_uInt16 i : nCSTbArray)
-            {
-                rSet.ClearItem( i ); // Why is this necessary?
-                rSet.Put( SfxStringItem( i, nCurrentSId == i && pShapeFunc
-                                         ? pShapeFunc->GetShapeType() : 
OUString() ) );
-            }
+        const sal_uInt16 nCurrentSId = GetCurrentFunction()->GetSlotID();
+        for (sal_uInt16 i : nCSTbArray)
+        {
+            rSet.ClearItem( i ); // Why is this necessary?
+            rSet.Put( SfxStringItem( i, nCurrentSId == i && pShapeFunc
+                                     ? pShapeFunc->GetShapeType() : OUString() 
) );
         }
     }
 
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 934a4e475d21..1cfa0f16bc5f 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -211,10 +211,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
                     ::tools::Long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA 
).GetValue();
                     ::tools::Long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA 
).GetValue();
                     ::tools::Long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA 
).GetValue();
-                    {
-                        if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 )
-                            bDisable = false;
-                    }
+                    if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 )
+                        bDisable = false;
                 }
                 if( bDisable )
                     rSet.DisableItem( SID_CONNECTION_NEW_ROUTING );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4a1c6cc07256..87d23df72e40 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -4245,58 +4245,56 @@ bool SfxMedium::SignDocumentContentUsingCertificate(
                 throw uno::RuntimeException();
         }
 
+        if (xMetaInf.is())
         {
-            if (xMetaInf.is())
-            {
-                // ODF.
-                uno::Reference< io::XStream > xStream;
-                if (GetFilter() && GetFilter()->IsOwnFormat())
-                    
xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(),
 embed::ElementModes::READWRITE), uno::UNO_SET_THROW);
-
-                bool bSuccess = xModelSigner->SignModelWithCertificate(
-                    xModel, rSigningContext, GetZipStorageToSign_Impl(), 
xStream);
+            // ODF.
+            uno::Reference< io::XStream > xStream;
+            if (GetFilter() && GetFilter()->IsOwnFormat())
+                
xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(),
 embed::ElementModes::READWRITE), uno::UNO_SET_THROW);
 
-                if (bSuccess)
-                {
-                    uno::Reference< embed::XTransactedObject > xTransact( 
xMetaInf, uno::UNO_QUERY_THROW );
-                    xTransact->commit();
-                    xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW );
-                    xTransact->commit();
+            bool bSuccess = xModelSigner->SignModelWithCertificate(
+                xModel, rSigningContext, GetZipStorageToSign_Impl(), xStream);
 
-                    // the temporary file has been written, commit it to the 
original file
-                    Commit();
-                    bChanges = true;
-                }
-            }
-            else if (xWriteableZipStor.is())
+            if (bSuccess)
             {
-                // OOXML.
-                uno::Reference<io::XStream> xStream;
+                uno::Reference< embed::XTransactedObject > xTransact( 
xMetaInf, uno::UNO_QUERY_THROW );
+                xTransact->commit();
+                xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW );
+                xTransact->commit();
 
-                    // We need read-write to be able to add the signature 
relation.
-                bool bSuccess = xModelSigner->SignModelWithCertificate(
-                    xModel, rSigningContext, 
GetZipStorageToSign_Impl(/*bReadOnly=*/false), xStream);
+                // the temporary file has been written, commit it to the 
original file
+                Commit();
+                bChanges = true;
+            }
+        }
+        else if (xWriteableZipStor.is())
+        {
+            // OOXML.
+            uno::Reference<io::XStream> xStream;
 
-                if (bSuccess)
-                {
-                    uno::Reference<embed::XTransactedObject> 
xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW);
-                    xTransact->commit();
+                // We need read-write to be able to add the signature relation.
+            bool bSuccess = xModelSigner->SignModelWithCertificate(
+                xModel, rSigningContext, 
GetZipStorageToSign_Impl(/*bReadOnly=*/false), xStream);
 
-                    // the temporary file has been written, commit it to the 
original file
-                    Commit();
-                    bChanges = true;
-                }
-            }
-            else
+            if (bSuccess)
             {
-                // Something not ZIP based: e.g. PDF.
-                std::unique_ptr<SvStream> 
pStream(utl::UcbStreamHelper::CreateStream(GetName(), StreamMode::READ | 
StreamMode::WRITE));
-                uno::Reference<io::XStream> xStream(new 
utl::OStreamWrapper(*pStream));
-                if (xModelSigner->SignModelWithCertificate(
-                        xModel, rSigningContext, 
uno::Reference<embed::XStorage>(), xStream))
-                    bChanges = true;
+                uno::Reference<embed::XTransactedObject> 
xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW);
+                xTransact->commit();
+
+                // the temporary file has been written, commit it to the 
original file
+                Commit();
+                bChanges = true;
             }
         }
+        else
+        {
+            // Something not ZIP based: e.g. PDF.
+            std::unique_ptr<SvStream> 
pStream(utl::UcbStreamHelper::CreateStream(GetName(), StreamMode::READ | 
StreamMode::WRITE));
+            uno::Reference<io::XStream> xStream(new 
utl::OStreamWrapper(*pStream));
+            if (xModelSigner->SignModelWithCertificate(
+                    xModel, rSigningContext, 
uno::Reference<embed::XStorage>(), xStream))
+                bChanges = true;
+        }
     }
     catch ( const uno::Exception& )
     {
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 974b06c30219..f39b33662b00 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1717,19 +1717,17 @@ EEAnchorMode SdrTableObj::GetOutlinerViewAnchorMode() 
const
     {
         SdrTextVertAdjust eV=xCell->GetTextVerticalAdjust();
 
+        if (eV==SDRTEXTVERTADJUST_TOP)
         {
-            if (eV==SDRTEXTVERTADJUST_TOP)
-            {
-                eRet=EEAnchorMode::TopLeft;
-            }
-            else if (eV==SDRTEXTVERTADJUST_BOTTOM)
-            {
-                eRet=EEAnchorMode::BottomLeft;
-            }
-            else
-            {
-                eRet=EEAnchorMode::VCenterLeft;
-            }
+            eRet=EEAnchorMode::TopLeft;
+        }
+        else if (eV==SDRTEXTVERTADJUST_BOTTOM)
+        {
+            eRet=EEAnchorMode::BottomLeft;
+        }
+        else
+        {
+            eRet=EEAnchorMode::VCenterLeft;
         }
     }
     return eRet;
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx 
b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 423a12bf582e..b45daf55bff8 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -996,27 +996,25 @@ void SwNumberTreeNode::SetLastValid
         }
     }
 
+    if (IsContinuous())
     {
-        if (IsContinuous())
-        {
-            tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
+        tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
 
-            if (aIt != mChildren.end())
-                ++aIt;
-            else
-                aIt = mChildren.begin();
+        if (aIt != mChildren.end())
+            ++aIt;
+        else
+            aIt = mChildren.begin();
 
-            while (aIt != mChildren.end())
-            {
-                (*aIt)->InvalidateTree();
+        while (aIt != mChildren.end())
+        {
+            (*aIt)->InvalidateTree();
 
-                ++aIt;
-            }
+            ++aIt;
+        }
 
-            if (mpParent)
-            {
-                mpParent->SetLastValid(mpParent->GetIterator(this), 
bValidating);
-            }
+        if (mpParent)
+        {
+            mpParent->SetLastValid(mpParent->GetIterator(this), bValidating);
         }
     }
 }
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 53e4de7548cf..b5f56036a88f 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1485,13 +1485,11 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
     // as run attributes.
     //    SwXTextCursor::GetCursorAttr( *pPaM, aSet, sal_True, sal_True );
     // get character attributes from automatic paragraph style and merge these 
into <aSet>
+    if ( pTextNode->HasSwAttrSet() )
     {
-        if ( pTextNode->HasSwAttrSet() )
-        {
-            SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> 
aAutomaticParaStyleCharAttrs( pPaM->GetDoc().GetAttrPool());
-            aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), 
false );
-            aSet.Put( aAutomaticParaStyleCharAttrs );
-        }
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> 
aAutomaticParaStyleCharAttrs( pPaM->GetDoc().GetAttrPool());
+        aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), false 
);
+        aSet.Put( aAutomaticParaStyleCharAttrs );
     }
     // get character attributes at <pPaM> and merge these into <aSet>
     {
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index e2a6665e3b8d..bd3515895d8d 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -674,13 +674,11 @@ namespace docfunc
                             
dynamic_cast<SwAnchoredDrawObject*>(pDrawContact->GetAnchoredObj( pObj ));
 
                         // error handling
+                        if ( !pAnchoredDrawObj )
                         {
-                            if ( !pAnchoredDrawObj )
-                            {
-                                OSL_FAIL( "<docfunc::AllDrawObjsOnPage() - 
missing anchored draw object" );
-                                bAllDrawObjsOnPage = false;
-                                break;
-                            }
+                            OSL_FAIL( "<docfunc::AllDrawObjsOnPage() - missing 
anchored draw object" );
+                            bAllDrawObjsOnPage = false;
+                            break;
                         }
 
                         if ( pAnchoredDrawObj->NotYetPositioned() )
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index cc9a3e68b433..edecdcf5b256 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1517,14 +1517,12 @@ static bool lcl_IsNumOk( sal_uInt8 nSrchNum, sal_uInt8& 
rLower, sal_uInt8& rUppe
             "<lcl_IsNumOk(..)> - misusage of method" );
 
     bool bRet = false;
-    {
-        if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber )
-            bRet = true;
-        else if( nNumber > rLower )
-            rLower = nNumber;
-        else if( nNumber < rUpper )
-            rUpper = nNumber;
-    }
+    if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber )
+        bRet = true;
+    else if( nNumber > rLower )
+        rLower = nNumber;
+    else if( nNumber < rUpper )
+        rUpper = nNumber;
     return bRet;
 }
 
diff --git a/sw/source/core/docnode/ndcopy.cxx 
b/sw/source/core/docnode/ndcopy.cxx
index bab097258a71..d2ab6a0d427f 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -246,11 +246,9 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc& rDoc, const 
SwNodeIndex& rIdx ) const
     // In which array are we? Nodes? UndoNodes?
     SwNodes& rNds = const_cast<SwNodes&>(GetNodes());
 
-    {
-        if( rIdx < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
-            rIdx >= rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() )
-            return nullptr;
-    }
+    if( rIdx < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
+        rIdx >= rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() )
+        return nullptr;
 
     // Copy the TableFrameFormat
     UIName sTableName( GetTable().GetFrameFormat()->GetName() );
diff --git a/sw/source/core/docnode/ndnotxt.cxx 
b/sw/source/core/docnode/ndnotxt.cxx
index 0e2980ba530e..b7e388a23305 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -114,13 +114,11 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
         {
             double nGrfDPIx = 0.0;
             double nGrfDPIy = 0.0;
+            if ( !bPixelGrf && m_bPixelContour )
             {
-                if ( !bPixelGrf && m_bPixelContour )
-                {
-                    basegfx::B2DSize aDPI = GetGraphic().GetPPI();
-                    nGrfDPIx = aDPI.getWidth();
-                    nGrfDPIy = aDPI.getHeight();
-                }
+                basegfx::B2DSize aDPI = GetGraphic().GetPPI();
+                nGrfDPIx = aDPI.getWidth();
+                nGrfDPIy = aDPI.getHeight();
             }
             OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap,
                         "scale factor for pixel unsupported" );
diff --git a/sw/source/core/docnode/ndsect.cxx 
b/sw/source/core/docnode/ndsect.cxx
index 0f3e2e680860..8c1cebb6f4aa 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -637,19 +637,17 @@ void SwDoc::UpdateSection( size_t const nPos, 
SwSectionData & rNewData,
     // Test if the whole Content Section (Document/TableBox/Fly) should be 
hidden,
     // which we're currently not able to do.
     const SwNodeIndex* pIdx = nullptr;
+    if (rNewData.IsHidden())
     {
-        if (rNewData.IsHidden())
+        pIdx = pFormat->GetContent().GetContentIdx();
+        if (pIdx)
         {
-            pIdx = pFormat->GetContent().GetContentIdx();
-            if (pIdx)
+            const SwSectionNode* pSectNd =
+                pIdx->GetNode().GetSectionNode();
+            if (pSectNd)
             {
-                const SwSectionNode* pSectNd =
-                    pIdx->GetNode().GetSectionNode();
-                if (pSectNd)
-                {
-                    ::lcl_CheckEmptyLayFrame( rNewData,
-                                *pSectNd, *pSectNd->EndOfSectionNode() );
-                }
+                ::lcl_CheckEmptyLayFrame( rNewData,
+                            *pSectNd, *pSectNd->EndOfSectionNode() );
             }
         }
     }
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index ab0f8185f753..da3f89930b5b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1382,18 +1382,16 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& 
rPt, bool *pSelectFrameInste
             // Do not select object in background which is overlapping this 
text
             // at the given position.
             bool bObjInBackground( false );
+            if ( pObj->GetLayer() == rIDDMA.GetHellId() )
             {
-                if ( pObj->GetLayer() == rIDDMA.GetHellId() )
+                if (const SwContact* pContact = ::GetUserCall( pObj ))
                 {
-                    if (const SwContact* pContact = ::GetUserCall( pObj ))
+                    const SwAnchoredObject* pAnchoredObj = 
pContact->GetAnchoredObj( pObj );
+                    const SwFrameFormat* pFormat = 
pAnchoredObj->GetFrameFormat();
+                    const SwFormatSurround& rSurround = pFormat->GetSurround();
+                    if ( rSurround.GetSurround() == 
css::text::WrapTextMode_THROUGH )
                     {
-                        const SwAnchoredObject* pAnchoredObj = 
pContact->GetAnchoredObj( pObj );
-                        const SwFrameFormat* pFormat = 
pAnchoredObj->GetFrameFormat();
-                        const SwFormatSurround& rSurround = 
pFormat->GetSurround();
-                        if ( rSurround.GetSurround() == 
css::text::WrapTextMode_THROUGH )
-                        {
-                            bObjInBackground = true;
-                        }
+                        bObjInBackground = true;
                     }
                 }
             }
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 90d93f5a1004..27c38dbf44b4 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -1113,12 +1113,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
                 }
             }
             // only use 90% of height for character bound
-            {
-                if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() )
-                    _orRect.Width( (_orRect.Width()*9)/10 );
-                else
-                    _orRect.Height( (_orRect.Height()*9)/10 );
-            }
+            if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() )
+                _orRect.Width( (_orRect.Width()*9)/10 );
+            else
+                _orRect.Height( (_orRect.Height()*9)/10 );
         }
 
         const SwTwips nBaseOfstForFly = ( pFrame->IsTextFrame() && pFly ) ?
diff --git a/sw/source/core/layout/calcmove.cxx 
b/sw/source/core/layout/calcmove.cxx
index 717f5f73ae8f..a7a9ddc244ad 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1754,16 +1754,14 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
         }
 
         // - loop prevention
+        if ( (aOldFrame_StopFormat == getFrameArea() || aOldFrame_StopFormat2 
== getFrameArea() ) &&
+             (aOldPrt_StopFormat == getFramePrintArea() || aOldPrt_StopFormat2 
== getFramePrintArea()))
         {
-            if ( (aOldFrame_StopFormat == getFrameArea() || 
aOldFrame_StopFormat2 == getFrameArea() ) &&
-                 (aOldPrt_StopFormat == getFramePrintArea() || 
aOldPrt_StopFormat2 == getFramePrintArea()))
-            {
-                ++nConsecutiveFormatsWithoutChange;
-            }
-            else
-            {
-                nConsecutiveFormatsWithoutChange = 0;
-            }
+            ++nConsecutiveFormatsWithoutChange;
+        }
+        else
+        {
+            nConsecutiveFormatsWithoutChange = 0;
         }
 
         // Yet again an invalid value? Repeat from the start...
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 2f6974ba39c7..5c5b0fa2afef 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2622,22 +2622,20 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize )
     // object, assure that the new size fits into the current clipping area
     // of the fly frame
     Size aAdjustedNewSize( aNewSize );
+    if (dynamic_cast<SwFlyAtContentFrame*>(this))
     {
-        if (dynamic_cast<SwFlyAtContentFrame*>(this))
+        auto pLower = dynamic_cast<SwNoTextFrame*>(Lower());
+        if ( pLower && pLower->GetNode()->GetOLENode() )
         {
-            auto pLower = dynamic_cast<SwNoTextFrame*>(Lower());
-            if ( pLower && pLower->GetNode()->GetOLENode() )
+            SwRect aClipRect;
+            ::CalcClipRect( GetVirtDrawObj(), aClipRect, false );
+            if ( aAdjustedNewSize.Width() > aClipRect.Width() )
             {
-                SwRect aClipRect;
-                ::CalcClipRect( GetVirtDrawObj(), aClipRect, false );
-                if ( aAdjustedNewSize.Width() > aClipRect.Width() )
-                {
-                    aAdjustedNewSize.setWidth( aClipRect.Width() );
-                }
-                if ( aAdjustedNewSize.Height() > aClipRect.Height() )
-                {
-                    aAdjustedNewSize.setWidth( aClipRect.Height() );
-                }
+                aAdjustedNewSize.setWidth( aClipRect.Width() );
+            }
+            if ( aAdjustedNewSize.Height() > aClipRect.Height() )
+            {
+                aAdjustedNewSize.setWidth( aClipRect.Height() );
             }
         }
     }
diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
index 4a44cc109e36..888b59fd2d0c 100644
--- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
@@ -95,36 +95,34 @@ void SwAsCharAnchoredObjectPosition::CalcPosition()
     const SvxLRSpaceItem& rLRSpace = rFrameFormat.GetLRSpace();
     const SvxULSpaceItem& rULSpace = rFrameFormat.GetULSpace();
     SwTwips nLRSpaceLeft, nLRSpaceRight, nULSpaceUpper, nULSpaceLower;
+    if ( rAnchorFrame.IsVertical() )
     {
-        if ( rAnchorFrame.IsVertical() )
+        // Seems to be easier to do it all the horizontal way
+        // So, from now on think horizontal.
+        rAnchorFrame.SwitchVerticalToHorizontal( aObjBoundRect );
+        rAnchorFrame.SwitchVerticalToHorizontal( aAnchorPos );
+
+        // convert the spacing values
+        nLRSpaceLeft = rULSpace.GetUpper();
+        nLRSpaceRight = rULSpace.GetLower();
+        nULSpaceUpper = rLRSpace.ResolveRight({});
+        nULSpaceLower = rLRSpace.ResolveLeft({});
+    }
+    else
+    {
+        if ( rAnchorFrame.IsRightToLeft() )
         {
-            // Seems to be easier to do it all the horizontal way
-            // So, from now on think horizontal.
-            rAnchorFrame.SwitchVerticalToHorizontal( aObjBoundRect );
-            rAnchorFrame.SwitchVerticalToHorizontal( aAnchorPos );
-
-            // convert the spacing values
-            nLRSpaceLeft = rULSpace.GetUpper();
-            nLRSpaceRight = rULSpace.GetLower();
-            nULSpaceUpper = rLRSpace.ResolveRight({});
-            nULSpaceLower = rLRSpace.ResolveLeft({});
+            nLRSpaceLeft = rLRSpace.ResolveRight({});
+            nLRSpaceRight = rLRSpace.ResolveLeft({});
         }
         else
         {
-            if ( rAnchorFrame.IsRightToLeft() )
-            {
-                nLRSpaceLeft = rLRSpace.ResolveRight({});
-                nLRSpaceRight = rLRSpace.ResolveLeft({});
-            }
-            else
-            {
-                nLRSpaceLeft = rLRSpace.ResolveLeft({});
-                nLRSpaceRight = rLRSpace.ResolveRight({});
-            }
-
-            nULSpaceUpper = rULSpace.GetUpper();
-            nULSpaceLower = rULSpace.GetLower();
+            nLRSpaceLeft = rLRSpace.ResolveLeft({});
+            nLRSpaceRight = rLRSpace.ResolveRight({});
         }
+
+        nULSpaceUpper = rULSpace.GetUpper();
+        nULSpaceLower = rULSpace.GetLower();
     }
 
     // consider left and upper spacing by adjusting anchor position.
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 9ffb25400fd7..df5066ed13cd 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -495,27 +495,25 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
         // This frame is used in the following instead of the 'real' anchor
         // frame <rAnchorTextFrame> for the 'vertical' position in all cases.
         const SwLayoutFrame* pUpperOfOrientFrame = nullptr;
+        // #i28701# - As long as the anchor frame is on the
+        // same page as <pOrientFrame> and the vertical position isn't aligned
+        // automatic at the anchor character or the top of the line of the
+        // anchor character, the anchor frame determines the vertical position.
+        // Split fly follows: always let the anchor char frame determine the 
vertical position.
+        // This gives us a vertical cut position between the master and the 
follow.
+        if ( &rAnchorTextFrame == pOrientFrame ||
+             ( rAnchorTextFrame.FindPageFrame() == 
pOrientFrame->FindPageFrame() &&
+               aVert.GetVertOrient() == text::VertOrientation::NONE &&
+               aVert.GetRelationOrient() != text::RelOrientation::CHAR &&
+               aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE && 
!bFollowSplitFly ) )
         {
-            // #i28701# - As long as the anchor frame is on the
-            // same page as <pOrientFrame> and the vertical position isn't 
aligned
-            // automatic at the anchor character or the top of the line of the
-            // anchor character, the anchor frame determines the vertical 
position.
-            // Split fly follows: always let the anchor char frame determine 
the vertical position.
-            // This gives us a vertical cut position between the master and 
the follow.
-            if ( &rAnchorTextFrame == pOrientFrame ||
-                 ( rAnchorTextFrame.FindPageFrame() == 
pOrientFrame->FindPageFrame() &&
-                   aVert.GetVertOrient() == text::VertOrientation::NONE &&
-                   aVert.GetRelationOrient() != text::RelOrientation::CHAR &&
-                   aVert.GetRelationOrient() != 
text::RelOrientation::TEXT_LINE && !bFollowSplitFly ) )
-            {
-                pUpperOfOrientFrame = rAnchorTextFrame.GetUpper();
-                pAnchorFrameForVertPos = &rAnchorTextFrame;
-            }
-            else
-            {
-                pUpperOfOrientFrame = pOrientFrame->GetUpper();
-                pAnchorFrameForVertPos = pOrientFrame;
-            }
+            pUpperOfOrientFrame = rAnchorTextFrame.GetUpper();
+            pAnchorFrameForVertPos = &rAnchorTextFrame;
+        }
+        else
+        {
+            pUpperOfOrientFrame = pOrientFrame->GetUpper();
+            pAnchorFrameForVertPos = pOrientFrame;
         }
 
         // ignore one-column sections.
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx 
b/ucb/source/cacher/contentresultsetwrapper.cxx
index 1766bc601b05..27649eb728c7 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -472,12 +472,10 @@ void SAL_CALL 
ContentResultSetWrapper::addVetoableChangeListener( const OUString
         return;
 
     impl_init_xPropertySetOrigin(aGuard);
+    if( !m_xPropertySetOrigin.is() )
     {
-        if( !m_xPropertySetOrigin.is() )
-        {
-            OSL_FAIL( "broadcaster was disposed already" );
-            return;
-        }
+        OSL_FAIL( "broadcaster was disposed already" );
+        return;
     }
     try
     {
diff --git a/ucb/source/ucp/gio/gio_content.cxx 
b/ucb/source/ucp/gio/gio_content.cxx
index 7a5b910a073e..bd4a40777c80 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -342,22 +342,22 @@ void MountOperation::Completed(GObject *source, 
GAsyncResult *res, gpointer user
 GError *MountOperation::Mount(GFile *pFile)
 {
     g_file_mount_enclosing_volume(pFile, G_MOUNT_MOUNT_NONE, mpAuthentication, 
nullptr, MountOperation::Completed, this);
+
+    //HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter,
+    // GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to
+    // GdkThreadsLeave unlock the SolarMutex down to zero at the end of
+    // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to
+    // the original value again:
+    if (comphelper::SolarMutex::get()->IsCurrentThread())
     {
-        //HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter,
-        // GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to
-        // GdkThreadsLeave unlock the SolarMutex down to zero at the end of
-        // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to
-        // the original value again:
-        if (comphelper::SolarMutex::get()->IsCurrentThread())
-        {
-            SolarMutexReleaser rel;
-            g_main_loop_run(mpLoop);
-        }
-        else
-        {
-            g_main_loop_run(mpLoop);
-        }
+        SolarMutexReleaser rel;
+        g_main_loop_run(mpLoop);
     }
+    else
+    {
+        g_main_loop_run(mpLoop);
+    }
+
     return mpError;
 }
 
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 563e6b63d485..9db38b9e571e 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1381,106 +1381,104 @@ ErrCode GraphicFilter::ImportGraphic(Graphic& 
rGraphic, std::u16string_view rPat
     }
 
     // read graphic
+    if (aFilterName.equalsIgnoreAsciiCase(IMP_GIF))
     {
-        if (aFilterName.equalsIgnoreAsciiCase(IMP_GIF))
-        {
-            nStatus = readGIF(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PNG))
-        {
-            nStatus = readPNG(rIStream, rGraphic, eLinkType, aGraphicContent);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_JPEG))
-        {
-            nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || 
aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ))
-        {
-            nStatus = readSVG(rIStream, rGraphic, eLinkType, aGraphicContent);
-        }
-        else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) )
-        {
-            nStatus = readXBM(rIStream, rGraphic);
-        }
-        else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) )
-        {
-            nStatus = readXPM(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_BMP))
-        {
-            nStatus = readBMP(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVMETAFILE))
-        {
-            nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, 
aFilterName);
-        }
-        else if( aFilterName.equalsIgnoreAsciiCase(IMP_MOV))
-        {
-            nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, 
aFilterName);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_WMF) || 
aFilterName.equalsIgnoreAsciiCase(IMP_WMZ))
-        {
-            nStatus = readWMF(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_EMF) || 
aFilterName.equalsIgnoreAsciiCase(IMP_EMZ))
-        {
-            nStatus = readEMF(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PDF))
-        {
-            nStatus = readPDF(rIStream, rGraphic, eLinkType, nPageIndex, 
xInteractionHandler, aGraphicContent);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_TIFF) )
-        {
-            nStatus = readTIFF(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_TGA) )
-        {
-            nStatus = readTGA(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PICT))
-        {
-            nStatus = readPICT(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_MET))
-        {
-            nStatus = readMET(rIStream, rGraphic, eLinkType);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_RAS))
-        {
-            nStatus = readRAS(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCX))
-        {
-            nStatus = readPCX(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_EPS))
-        {
-            nStatus = readEPS(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PSD))
-        {
-            nStatus = readPSD(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCD))
-        {
-            nStatus = readPCD(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_PBM))
-        {
-            nStatus = readPBM(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_DXF))
-        {
-            nStatus = readDXF(rIStream, rGraphic);
-        }
-        else if (aFilterName.equalsIgnoreAsciiCase(IMP_WEBP))
-        {
-            nStatus = readWEBP(rIStream, rGraphic, eLinkType);
-        }
-        else
-            nStatus = ERRCODE_GRFILTER_FILTERERROR;
+        nStatus = readGIF(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PNG))
+    {
+        nStatus = readPNG(rIStream, rGraphic, eLinkType, aGraphicContent);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_JPEG))
+    {
+        nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || 
aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ))
+    {
+        nStatus = readSVG(rIStream, rGraphic, eLinkType, aGraphicContent);
+    }
+    else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) )
+    {
+        nStatus = readXBM(rIStream, rGraphic);
+    }
+    else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) )
+    {
+        nStatus = readXPM(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_BMP))
+    {
+        nStatus = readBMP(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVMETAFILE))
+    {
+        nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, 
aFilterName);
+    }
+    else if( aFilterName.equalsIgnoreAsciiCase(IMP_MOV))
+    {
+        nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, 
aFilterName);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_WMF) || 
aFilterName.equalsIgnoreAsciiCase(IMP_WMZ))
+    {
+        nStatus = readWMF(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_EMF) || 
aFilterName.equalsIgnoreAsciiCase(IMP_EMZ))
+    {
+        nStatus = readEMF(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PDF))
+    {
+        nStatus = readPDF(rIStream, rGraphic, eLinkType, nPageIndex, 
xInteractionHandler, aGraphicContent);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_TIFF) )
+    {
+        nStatus = readTIFF(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_TGA) )
+    {
+        nStatus = readTGA(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PICT))
+    {
+        nStatus = readPICT(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_MET))
+    {
+        nStatus = readMET(rIStream, rGraphic, eLinkType);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_RAS))
+    {
+        nStatus = readRAS(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCX))
+    {
+        nStatus = readPCX(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_EPS))
+    {
+        nStatus = readEPS(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PSD))
+    {
+        nStatus = readPSD(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCD))
+    {
+        nStatus = readPCD(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_PBM))
+    {
+        nStatus = readPBM(rIStream, rGraphic);
+    }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_DXF))
+    {
+        nStatus = readDXF(rIStream, rGraphic);
     }
+    else if (aFilterName.equalsIgnoreAsciiCase(IMP_WEBP))
+    {
+        nStatus = readWEBP(rIStream, rGraphic, eLinkType);
+    }
+    else
+        nStatus = ERRCODE_GRFILTER_FILTERERROR;
 
     if (nStatus == ERRCODE_NONE && eLinkType != GfxLinkType::NONE && !bLinkSet)
     {
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index d488832f9db8..00f65adc7c76 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -678,22 +678,20 @@ void XMLShapeExport::exportShape(const uno::Reference< 
drawing::XShape >& xShape
        Note: Writer documents in OpenOffice.org file format doesn't contain
              any names for shapes, except for group shapes.
     */
-    {
-        if ( ( GetExport().GetModelType() != 
SvtModuleOptions::EFactory::WRITER &&
-               GetExport().GetModelType() != 
SvtModuleOptions::EFactory::WRITERWEB &&
-               GetExport().GetModelType() != 
SvtModuleOptions::EFactory::WRITERGLOBAL ) ||
-             ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) ||
-             aShapeInfo.meShapeType == XmlShapeType::DrawGroupShape ||
-             ( aShapeInfo.meShapeType == XmlShapeType::DrawCustomShape &&
-               aShapeInfo.xCustomShapeReplacement.is() ) )
+    if ( ( GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITER &&
+           GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITERWEB 
&&
+           GetExport().GetModelType() != 
SvtModuleOptions::EFactory::WRITERGLOBAL ) ||
+         ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) ||
+         aShapeInfo.meShapeType == XmlShapeType::DrawGroupShape ||
+         ( aShapeInfo.meShapeType == XmlShapeType::DrawCustomShape &&
+           aShapeInfo.xCustomShapeReplacement.is() ) )
+    {
+        uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY );
+        if( xNamed.is() )
         {
-            uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY 
);
-            if( xNamed.is() )
-            {
-                const OUString aName( xNamed->getName() );
-                if( !aName.isEmpty() )
-                    mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName 
);
-            }
+            const OUString aName( xNamed->getName() );
+            if( !aName.isEmpty() )
+                mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName );
         }
     }
 
diff --git a/xmloff/source/forms/elementexport.cxx 
b/xmloff/source/forms/elementexport.cxx
index 74150a1fda46..53370d3b47ed 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1691,20 +1691,17 @@ namespace xmloff
         if ( FormCellBindingHelper::livesInSpreadsheetDocument( m_xProps ) )
         {
             FormCellBindingHelper aHelper( m_xProps, nullptr );
+
+            if ( FormCellBindingHelper::isCellBinding( 
aHelper.getCurrentBinding( ) ) )
             {
-                if ( FormCellBindingHelper::isCellBinding( 
aHelper.getCurrentBinding( ) ) )
-                {
-                    m_nIncludeBindings |= BAFlags::LinkedCell;
-                    if ( m_nClassId == FormComponentType::LISTBOX )
-                        m_nIncludeBindings |= BAFlags::ListLinkingType;
-                }
+                m_nIncludeBindings |= BAFlags::LinkedCell;
+                if ( m_nClassId == FormComponentType::LISTBOX )
+                    m_nIncludeBindings |= BAFlags::ListLinkingType;
             }
 
             // is it a list-like control which uses a calc cell range as list 
source?
-            {
-                if ( FormCellBindingHelper::isCellRangeListSource( 
aHelper.getCurrentListSource( ) ) )
-                    m_nIncludeBindings |= BAFlags::ListCellRange;
-            }
+            if ( FormCellBindingHelper::isCellRangeListSource( 
aHelper.getCurrentListSource( ) ) )
+                m_nIncludeBindings |= BAFlags::ListCellRange;
         }
 
         // is control bound to XForms?
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 5f129061318d..5c086c4dd5d0 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -317,25 +317,24 @@ bool XMLStyleExport::exportStyle(
                 {
                     // Written OpenDocument file format doesn't fit to the 
created text document (#i69627#)
                     bool bSuppressListStyle( false );
+
+                    if ( !GetExport().writeOutlineStyleAsNormalListStyle() )
                     {
-                        if ( !GetExport().writeOutlineStyleAsNormalListStyle() 
)
+                        Reference< XChapterNumberingSupplier > xCNSupplier
+                            (GetExport().GetModel(), UNO_QUERY);
+
+                        if (xCNSupplier.is())
                         {
-                            Reference< XChapterNumberingSupplier > xCNSupplier
-                                (GetExport().GetModel(), UNO_QUERY);
-
-                            if (xCNSupplier.is())
-                            {
-                                Reference< XIndexReplace > xNumRule
-                                    ( xCNSupplier->getChapterNumberingRules() 
);
-                                assert(xNumRule.is());
-
-                                Reference< XPropertySet > xNumRulePropSet
-                                    (xNumRule, UNO_QUERY);
-                                OUString sOutlineName;
-                                xNumRulePropSet->getPropertyValue(u"Name"_ustr)
-                                    >>= sOutlineName;
-                                bSuppressListStyle = sListName == sOutlineName;
-                            }
+                            Reference< XIndexReplace > xNumRule
+                                ( xCNSupplier->getChapterNumberingRules() );
+                            assert(xNumRule.is());
+
+                            Reference< XPropertySet > xNumRulePropSet
+                                (xNumRule, UNO_QUERY);
+                            OUString sOutlineName;
+                            xNumRulePropSet->getPropertyValue(u"Name"_ustr)
+                                >>= sOutlineName;
+                            bSuppressListStyle = sListName == sOutlineName;
                         }
                     }
 
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 3357c3e66527..d79d3fc1c4d6 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1535,21 +1535,20 @@ void XMLTextImportHelper::SetOutlineStyles( bool 
bSetEmptyLevels )
         return;
 
     bool bChooseLastOne( false );
+
+    if ( GetXMLImport().IsTextDocInOOoFileFormat() )
     {
-        if ( GetXMLImport().IsTextDocInOOoFileFormat() )
-        {
-            bChooseLastOne = true;
-        }
-        else
+        bChooseLastOne = true;
+    }
+    else
+    {
+        sal_Int32 nUPD( 0 );
+        sal_Int32 nBuild( 0 );
+        if ( GetXMLImport().getBuildIds( nUPD, nBuild ) )
         {
-            sal_Int32 nUPD( 0 );
-            sal_Int32 nBuild( 0 );
-            if ( GetXMLImport().getBuildIds( nUPD, nBuild ) )
-            {
-                // check explicitly on certain versions
-                bChooseLastOne = ( nUPD == 641 ) || ( nUPD == 645 ) ||  // 
prior OOo 2.0
-                                 ( nUPD == 680 && nBuild <= 9073 ); // OOo 2.0 
- OOo 2.0.4
-            }
+            // check explicitly on certain versions
+            bChooseLastOne = ( nUPD == 641 ) || ( nUPD == 645 ) ||  // prior 
OOo 2.0
+                             ( nUPD == 680 && nBuild <= 9073 ); // OOo 2.0 - 
OOo 2.0.4
         }
     }
 
diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index d83f0726ca51..bda9fa0ef1b3 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -723,89 +723,87 @@ void XSecController::exportSignature(
         xDocumentHandler->startElement(
             u"KeyInfo"_ustr,
             css::uno::Reference< css::xml::sax::XAttributeList > (new 
comphelper::AttributeList()));
+        // GPG or X509 key?
+        if (!signatureInfo.ouGpgCertificate.isEmpty())
         {
-            // GPG or X509 key?
-            if (!signatureInfo.ouGpgCertificate.isEmpty())
+            pAttributeList = new comphelper::AttributeList();
+            pAttributeList->AddAttribute(u"xmlns:loext"_ustr, NS_LOEXT);
+            /* Write PGPData element */
+            xDocumentHandler->startElement(
+                u"PGPData"_ustr,
+                pAttributeList);
             {
-                pAttributeList = new comphelper::AttributeList();
-                pAttributeList->AddAttribute(u"xmlns:loext"_ustr, NS_LOEXT);
-                /* Write PGPData element */
+                /* Write keyid element */
                 xDocumentHandler->startElement(
-                    u"PGPData"_ustr,
-                    pAttributeList);
+                    u"PGPKeyID"_ustr,
+                    css::uno::Reference< css::xml::sax::XAttributeList > (new 
comphelper::AttributeList()));
+                xDocumentHandler->characters(signatureInfo.ouGpgKeyID);
+                xDocumentHandler->endElement( u"PGPKeyID"_ustr );
+
+                /* Write PGPKeyPacket element */
+                if (!signatureInfo.ouGpgCertificate.isEmpty())
                 {
-                    /* Write keyid element */
                     xDocumentHandler->startElement(
-                        u"PGPKeyID"_ustr,
+                        u"PGPKeyPacket"_ustr,
                         css::uno::Reference< css::xml::sax::XAttributeList > 
(new comphelper::AttributeList()));
-                    xDocumentHandler->characters(signatureInfo.ouGpgKeyID);
-                    xDocumentHandler->endElement( u"PGPKeyID"_ustr );
-
-                    /* Write PGPKeyPacket element */
-                    if (!signatureInfo.ouGpgCertificate.isEmpty())
-                    {
-                        xDocumentHandler->startElement(
-                            u"PGPKeyPacket"_ustr,
-                            css::uno::Reference< css::xml::sax::XAttributeList 
> (new comphelper::AttributeList()));
-                        xDocumentHandler->characters( 
signatureInfo.ouGpgCertificate );
-                        xDocumentHandler->endElement( u"PGPKeyPacket"_ustr );
-                    }
-
-                    /* Write PGPOwner element */
-                    xDocumentHandler->startElement(
-                        u"loext:PGPOwner"_ustr,
-                        css::uno::Reference< css::xml::sax::XAttributeList 
>(new comphelper::AttributeList()));
-                    xDocumentHandler->characters( signatureInfo.ouGpgOwner );
-                    xDocumentHandler->endElement( u"loext:PGPOwner"_ustr );
+                    xDocumentHandler->characters( 
signatureInfo.ouGpgCertificate );
+                    xDocumentHandler->endElement( u"PGPKeyPacket"_ustr );
                 }
-                xDocumentHandler->endElement( u"PGPData"_ustr );
+
+                /* Write PGPOwner element */
+                xDocumentHandler->startElement(
+                    u"loext:PGPOwner"_ustr,
+                    css::uno::Reference< css::xml::sax::XAttributeList >(new 
comphelper::AttributeList()));
+                xDocumentHandler->characters( signatureInfo.ouGpgOwner );
+                xDocumentHandler->endElement( u"loext:PGPOwner"_ustr );
             }
-            else
+            xDocumentHandler->endElement( u"PGPData"_ustr );
+        }
+        else
+        {
+            assert(signatureInfo.GetSigningCertificate());
+            for (auto const& rData : signatureInfo.X509Datas)
             {
-                assert(signatureInfo.GetSigningCertificate());
-                for (auto const& rData : signatureInfo.X509Datas)
+                /* Write X509Data element */
+                xDocumentHandler->startElement(
+                    u"X509Data"_ustr,
+                    css::uno::Reference< css::xml::sax::XAttributeList > (new 
comphelper::AttributeList()));
                 {
-                    /* Write X509Data element */
-                    xDocumentHandler->startElement(
-                        u"X509Data"_ustr,
-                        css::uno::Reference< css::xml::sax::XAttributeList > 
(new comphelper::AttributeList()));
+                    for (auto const& it : rData)
                     {
-                        for (auto const& it : rData)
+                        /* Write X509IssuerSerial element */
+                        xDocumentHandler->startElement(
+                            u"X509IssuerSerial"_ustr,
+                            css::uno::Reference< css::xml::sax::XAttributeList 
> (new comphelper::AttributeList()));
+                        {
+                            /* Write X509IssuerName element */
+                            xDocumentHandler->startElement(
+                                u"X509IssuerName"_ustr,
+                                css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
+                            xDocumentHandler->characters(it.X509IssuerName);
+                            xDocumentHandler->endElement( 
u"X509IssuerName"_ustr );
+
+                            /* Write X509SerialNumber element */
+                            xDocumentHandler->startElement(
+                                u"X509SerialNumber"_ustr,
+                                css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
+                            xDocumentHandler->characters(it.X509SerialNumber);
+                            xDocumentHandler->endElement( 
u"X509SerialNumber"_ustr );
+                        }
+                        xDocumentHandler->endElement( u"X509IssuerSerial"_ustr 
);
+
+                        /* Write X509Certificate element */
+                        if (!it.X509Certificate.isEmpty())
                         {
-                            /* Write X509IssuerSerial element */
                             xDocumentHandler->startElement(
-                                u"X509IssuerSerial"_ustr,
+                                u"X509Certificate"_ustr,
                                 css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
-                            {
-                                /* Write X509IssuerName element */
-                                xDocumentHandler->startElement(
-                                    u"X509IssuerName"_ustr,
-                                    css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
-                                
xDocumentHandler->characters(it.X509IssuerName);
-                                xDocumentHandler->endElement( 
u"X509IssuerName"_ustr );
-
-                                /* Write X509SerialNumber element */
-                                xDocumentHandler->startElement(
-                                    u"X509SerialNumber"_ustr,
-                                    css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
-                                
xDocumentHandler->characters(it.X509SerialNumber);
-                                xDocumentHandler->endElement( 
u"X509SerialNumber"_ustr );
-                            }
-                            xDocumentHandler->endElement( 
u"X509IssuerSerial"_ustr );
-
-                            /* Write X509Certificate element */
-                            if (!it.X509Certificate.isEmpty())
-                            {
-                                xDocumentHandler->startElement(
-                                    u"X509Certificate"_ustr,
-                                    css::uno::Reference< 
css::xml::sax::XAttributeList > (new comphelper::AttributeList()));
-                                
xDocumentHandler->characters(it.X509Certificate);
-                                xDocumentHandler->endElement( 
u"X509Certificate"_ustr );
-                            }
+                            xDocumentHandler->characters(it.X509Certificate);
+                            xDocumentHandler->endElement( 
u"X509Certificate"_ustr );
                         }
                     }
-                    xDocumentHandler->endElement( u"X509Data"_ustr );
                 }
+                xDocumentHandler->endElement( u"X509Data"_ustr );
             }
         }
         xDocumentHandler->endElement( u"KeyInfo"_ustr );

Reply via email to