[Libreoffice-commits] core.git: basctl/source chart2/source compilerplugins/clang cppuhelper/source cppu/source cui/source editeng/source embeddedobj/source filter/source forms/source framework/source idlc/source include/o3tl include/osl include/sax io/source lotuswordpro/source oox/source sal/rtl sc/inc sc/source sd/source sfx2/source sot/source starmath/source stoc/source svl/source svtools/source svx/source sw/inc sw/source toolkit/source tools/source ucbhelper/source ucb/source UnoControls/source unotools/source vcl/source writerfilter/source xmlhelp/source xmloff/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Sep 4 08:53:05 UTC 2017


 UnoControls/source/controls/framecontrol.cxx                             |    2 
 basctl/source/dlged/dlgedobj.cxx                                         |    2 
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx                |    2 
 chart2/source/controller/dialogs/res_ErrorBar.cxx                        |    4 
 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx |    4 
 chart2/source/view/main/ChartView.cxx                                    |    2 
 compilerplugins/clang/test/unnecessaryparen.cxx                          |    3 
 compilerplugins/clang/unnecessaryparen.cxx                               |   20 +++-
 cppu/source/typelib/static_types.cxx                                     |    2 
 cppu/source/typelib/typelib.cxx                                          |    2 
 cppu/source/uno/assign.hxx                                               |    2 
 cppuhelper/source/propshlp.cxx                                           |    2 
 cui/source/dialogs/hangulhanjadlg.cxx                                    |    2 
 cui/source/options/optchart.cxx                                          |    4 
 editeng/source/items/paraitem.cxx                                        |    2 
 editeng/source/xml/xmltxtexp.cxx                                         |    2 
 embeddedobj/source/msole/olepersist.cxx                                  |    6 -
 filter/source/graphicfilter/icgm/class4.cxx                              |    2 
 filter/source/graphicfilter/icgm/class7.cxx                              |    8 -
 forms/source/component/imgprod.cxx                                       |    4 
 framework/source/fwe/classes/actiontriggercontainer.cxx                  |    6 -
 framework/source/fwe/classes/actiontriggerpropertyset.cxx                |    6 -
 framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx       |    8 -
 framework/source/fwe/classes/rootactiontriggercontainer.cxx              |   10 +-
 framework/source/fwe/helper/propertysetcontainer.cxx                     |    8 -
 framework/source/fwi/uielement/rootitemcontainer.cxx                     |    4 
 framework/source/helper/uiconfigelementwrapperbase.cxx                   |    2 
 framework/source/helper/uielementwrapperbase.cxx                         |    2 
 framework/source/layoutmanager/layoutmanager.cxx                         |    6 -
 framework/source/layoutmanager/toolbarlayoutmanager.cxx                  |    6 -
 framework/source/tabwin/tabwindow.cxx                                    |    2 
 framework/source/uielement/controlmenucontroller.cxx                     |    4 
 framework/source/uielement/fontmenucontroller.cxx                        |    4 
 framework/source/uielement/fontsizemenucontroller.cxx                    |    4 
 framework/source/uielement/langselectionmenucontroller.cxx               |    4 
 framework/source/uielement/toolbarsmenucontroller.cxx                    |    4 
 framework/source/uielement/toolbarwrapper.cxx                            |    2 
 idlc/source/astdump.cxx                                                  |    2 
 include/o3tl/enumrange.hxx                                               |    2 
 include/osl/file.hxx                                                     |    2 
 include/sax/fastattribs.hxx                                              |    2 
 io/source/stm/odata.cxx                                                  |   16 +--
 io/source/stm/omark.cxx                                                  |    8 -
 io/source/stm/opipe.cxx                                                  |    6 -
 lotuswordpro/source/filter/lwpcolor.cxx                                  |    4 
 lotuswordpro/source/filter/lwplayout.cxx                                 |    2 
 oox/source/ole/vbainputstream.cxx                                        |    2 
 sal/rtl/cipher.cxx                                                       |    4 
 sc/inc/queryparam.hxx                                                    |    4 
 sc/source/core/data/bcaslot.cxx                                          |    2 
 sc/source/core/data/documen5.cxx                                         |    2 
 sc/source/core/data/document.cxx                                         |   14 +--
 sc/source/core/data/olinetab.cxx                                         |    2 
 sc/source/core/data/table4.cxx                                           |    2 
 sc/source/filter/excel/xerecord.cxx                                      |    2 
 sc/source/filter/oox/formulaparser.cxx                                   |    2 
 sc/source/ui/docshell/docsh.cxx                                          |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                                   |    6 -
 sc/source/ui/navipi/content.cxx                                          |    2 
 sc/source/ui/unoobj/afmtuno.cxx                                          |    2 
 sc/source/ui/unoobj/chart2uno.cxx                                        |    2 
 sc/source/ui/unoobj/styleuno.cxx                                         |    4 
 sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx               |    2 
 sd/source/ui/app/sdmod2.cxx                                              |    2 
 sd/source/ui/dlg/dlgchar.cxx                                             |    2 
 sfx2/source/dialog/securitypage.cxx                                      |    2 
 sfx2/source/view/sfxbasecontroller.cxx                                   |    2 
 sot/source/sdstor/ucbstorage.cxx                                         |    2 
 starmath/source/edit.cxx                                                 |    4 
 stoc/source/corereflection/criface.cxx                                   |    4 
 stoc/source/defaultregistry/defaultregistry.cxx                          |    6 -
 stoc/source/invocation/invocation.cxx                                    |   26 +++---
 svl/source/items/cintitem.cxx                                            |    2 
 svl/source/items/custritm.cxx                                            |    2 
 svl/source/items/intitem.cxx                                             |    2 
 svl/source/items/slstitm.cxx                                             |    2 
 svl/source/items/visitem.cxx                                             |    2 
 svtools/source/misc/imap.cxx                                             |    6 -
 svtools/source/uno/unoiface.cxx                                          |   26 +++---
 svx/source/accessibility/AccessibleEmptyEditSource.cxx                   |    4 
 svx/source/accessibility/GraphCtlAccessibleContext.cxx                   |    2 
 svx/source/engine3d/obj3d.cxx                                            |    2 
 svx/source/sdr/attribute/sdrformtextattribute.cxx                        |   20 ++--
 svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx                    |   10 +-
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx                |    2 
 svx/source/sdr/contact/viewcontactofsdrrectobj.cxx                       |    2 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx                    |    2 
 svx/source/svdraw/svdotext.cxx                                           |    2 
 svx/source/unodraw/unomod.cxx                                            |    2 
 sw/inc/crsrsh.hxx                                                        |    2 
 sw/inc/ndhints.hxx                                                       |    2 
 sw/inc/txtatr.hxx                                                        |    2 
 sw/inc/txtflcnt.hxx                                                      |    2 
 sw/inc/viewsh.hxx                                                        |    2 
 sw/source/core/access/accmap.cxx                                         |   14 +--
 sw/source/core/access/acctable.cxx                                       |    2 
 sw/source/core/doc/docbm.cxx                                             |    2 
 sw/source/core/doc/docfld.cxx                                            |    4 
 sw/source/core/draw/dview.cxx                                            |    2 
 sw/source/core/layout/calcmove.cxx                                       |    2 
 sw/source/core/layout/frmtool.cxx                                        |    4 
 sw/source/core/layout/layact.cxx                                         |    6 -
 sw/source/core/layout/objectformatter.cxx                                |    2 
 sw/source/core/layout/paintfrm.cxx                                       |    4 
 sw/source/core/layout/tabfrm.cxx                                         |    4 
 sw/source/core/layout/trvlfrm.cxx                                        |    8 -
 sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx        |    2 
 sw/source/core/text/frmform.cxx                                          |    2 
 sw/source/core/undo/rolbck.cxx                                           |    4 
 sw/source/core/undo/unattr.cxx                                           |    2 
 sw/source/filter/ww8/wrtw8esh.cxx                                        |    4 
 sw/source/filter/ww8/ww8atr.cxx                                          |    2 
 sw/source/filter/ww8/ww8par6.cxx                                         |    4 
 sw/source/filter/ww8/ww8scan.cxx                                         |    4 
 sw/source/uibase/docvw/PostItMgr.cxx                                     |    2 
 sw/source/uibase/docvw/SidebarTxtControlAcc.cxx                          |    2 
 sw/source/uibase/shells/langhelper.cxx                                   |    4 
 sw/source/uibase/uno/unotxdoc.cxx                                        |    2 
 toolkit/source/awt/vclxbitmap.cxx                                        |    8 -
 toolkit/source/awt/vclxcontainer.cxx                                     |    4 
 toolkit/source/awt/vclxdevice.cxx                                        |    8 -
 toolkit/source/awt/vclxfont.cxx                                          |    8 -
 toolkit/source/awt/vclxgraphics.cxx                                      |    6 -
 toolkit/source/awt/vclxmenu.cxx                                          |   20 ++--
 toolkit/source/awt/vclxregion.cxx                                        |    6 -
 toolkit/source/awt/vclxsystemdependentwindow.cxx                         |    2 
 toolkit/source/awt/vclxwindows.cxx                                       |   41 ++++------
 toolkit/source/controls/dialogcontrol.cxx                                |    3 
 toolkit/source/controls/stdtabcontroller.cxx                             |    6 -
 toolkit/source/controls/stdtabcontrollermodel.cxx                        |    8 -
 toolkit/source/controls/tkscrollbar.cxx                                  |    4 
 toolkit/source/controls/unocontrolcontainer.cxx                          |    6 -
 toolkit/source/controls/unocontrols.cxx                                  |   28 +++---
 toolkit/source/helper/listenermultiplexer.cxx                            |    4 
 tools/source/datetime/tdate.cxx                                          |    4 
 ucb/source/cacher/cachedcontentresultset.cxx                             |   10 +-
 ucb/source/cacher/cachedcontentresultsetstub.cxx                         |    6 -
 ucb/source/cacher/cacheddynamicresultset.cxx                             |    6 -
 ucb/source/cacher/cacheddynamicresultsetstub.cxx                         |    6 -
 ucb/source/cacher/contentresultsetwrapper.cxx                            |   14 +--
 ucb/source/cacher/dynamicresultsetwrapper.cxx                            |   10 +-
 ucb/source/core/ucb.cxx                                                  |   20 ++--
 ucb/source/ucp/cmis/cmis_provider.cxx                                    |    6 -
 ucb/source/ucp/cmis/std_inputstream.cxx                                  |    4 
 ucb/source/ucp/cmis/std_outputstream.cxx                                 |    2 
 ucb/source/ucp/file/bc.cxx                                               |   20 ++--
 ucb/source/ucp/file/filcmd.cxx                                           |    2 
 ucb/source/ucp/file/filid.cxx                                            |    4 
 ucb/source/ucp/file/filinpstr.cxx                                        |    6 -
 ucb/source/ucp/file/filstr.cxx                                           |    2 
 ucb/source/ucp/file/filtask.cxx                                          |    2 
 ucb/source/ucp/file/prov.cxx                                             |    2 
 ucb/source/ucp/ftp/ftpcontent.cxx                                        |   12 +-
 ucb/source/ucp/ftp/ftpcontentidentifier.cxx                              |    4 
 ucb/source/ucp/ftp/ftpcontentprovider.cxx                                |    6 -
 ucb/source/ucp/ftp/ftpresultsetbase.cxx                                  |   14 +--
 ucb/source/ucp/gio/gio_provider.cxx                                      |    6 -
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx                         |    8 -
 ucb/source/ucp/hierarchy/hierarchyprovider.cxx                           |    8 -
 ucb/source/ucp/package/pkgprovider.cxx                                   |    6 -
 ucb/source/ucp/tdoc/tdoc_provider.cxx                                    |    8 -
 ucb/source/ucp/webdav-neon/webdavprovider.cxx                            |    6 -
 ucbhelper/source/client/content.cxx                                      |    4 
 ucbhelper/source/provider/contentinfo.cxx                                |    8 -
 ucbhelper/source/provider/propertyvalueset.cxx                           |    6 -
 ucbhelper/source/provider/providerhelper.cxx                             |    6 -
 ucbhelper/source/provider/resultset.cxx                                  |   22 ++---
 ucbhelper/source/provider/resultsethelper.cxx                            |    8 -
 ucbhelper/source/provider/resultsetmetadata.cxx                          |    4 
 unotools/source/config/securityoptions.cxx                               |    4 
 unotools/source/ucbhelper/ucblockbytes.hxx                               |    6 -
 vcl/source/app/dndhelp.cxx                                               |    8 -
 vcl/source/app/unohelp2.cxx                                              |    2 
 vcl/source/edit/textview.cxx                                             |    2 
 vcl/source/window/menu.cxx                                               |    2 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx                          |    6 -
 xmlhelp/source/cxxhelp/provider/inputstream.cxx                          |    4 
 xmlhelp/source/cxxhelp/provider/provider.cxx                             |   12 +-
 xmlhelp/source/cxxhelp/provider/resultsetbase.cxx                        |   14 +--
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx                         |    4 
 xmloff/source/draw/ximpshap.cxx                                          |    2 
 181 files changed, 501 insertions(+), 486 deletions(-)

New commits:
commit 7aa7f4d9e4294959748bccf9e763154740251635
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Sep 4 08:53:38 2017 +0200

    loplugin:unnecessaryparen include c++ casts
    
    Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb
    Reviewed-on: https://gerrit.libreoffice.org/41874
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 5d6ad23db8a9..e9b314179ac1 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -55,7 +55,7 @@ enum PropertyHandle  // values represent index in PropertyArray
 FrameControl::FrameControl( const Reference< XComponentContext >& rxContext)
     : BaseControl                   ( rxContext                                     )
     , OBroadcastHelper              ( m_aMutex                                      )
-    , OPropertySetHelper            ( *(static_cast< OBroadcastHelper * >(this))    )
+    , OPropertySetHelper            ( *static_cast< OBroadcastHelper * >(this)      )
     , m_aConnectionPointContainer   ( new OConnectionPointContainerHelper(m_aMutex) )
 {
 }
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 21f88e3bc335..2023db8cde43 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -902,7 +902,7 @@ SdrObject* DlgEdObj::getFullDragClone() const
     // no need to really add the clone for dragging, it's a temporary
     // object
     SdrObject* pObj = new SdrUnoObj(OUString());
-    *pObj = *(static_cast<const SdrUnoObj*>(this));
+    *pObj = *static_cast<const SdrUnoObj*>(this);
 
     return pObj;
 }
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 1a48ef5125ca..b815a4a72177 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -549,7 +549,7 @@ void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
         {
             bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
             static_cast<SchAxisLabelTabPage&>(rPage).ShowStaggeringControls( bShowStaggeringControls );
-            ( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
+            dynamic_cast< SchAxisLabelTabPage& >( rPage ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
             break;
         }
 
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index c3ddea101128..9a0c7ff53fee 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -582,7 +582,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
     m_bRangePosUnique = ( aState != SfxItemState::DONTCARE );
     if( aState == SfxItemState::SET )
     {
-        OUString sRangePositive = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue();
+        OUString sRangePositive = static_cast< const SfxStringItem * >( pPoolItem )->GetValue();
         m_pEdRangePositive->SetText( sRangePositive );
     }
 
@@ -590,7 +590,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
     m_bRangeNegUnique = ( aState != SfxItemState::DONTCARE );
     if( aState == SfxItemState::SET )
     {
-        OUString sRangeNegative = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue();
+        OUString sRangeNegative = static_cast< const SfxStringItem * >( pPoolItem )->GetValue();
         m_pEdRangeNegative->SetText( sRangeNegative );
         if( m_eErrorKind == SvxChartKindError::Range &&
             !sRangeNegative.isEmpty() &&
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index 130f63957250..05378434b198 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -520,8 +520,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
                     ? OUString( "GradientStepCount" )
                     : OUString( "FillGradientStepCount" );
 
-                sal_Int16 nStepCount = ( static_cast< const XGradientStepCountItem & >(
-                            rItemSet.Get( nWhichId ))).GetValue();
+                sal_Int16 nStepCount = static_cast< const XGradientStepCountItem & >(
+                            rItemSet.Get( nWhichId )).GetValue();
 
                 aValue <<= nStepCount;
                 if( aValue != GetPropertySet()->getPropertyValue( aPropName ))
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index dc69bc4aa0b5..50717889acd9 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1557,7 +1557,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( const std::shared_ptr<DrawModelWrap
 
     const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
     if( pItem )
-        nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue());
+        nWritingMode = static_cast< sal_Int16 >(static_cast< const SvxFrameDirectionItem * >( pItem )->GetValue());
     return nWritingMode;
 }
 
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 85be13848b22..1ea22288673e 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -32,6 +32,9 @@ int main()
     // lots of our code uses this style, which I'm loathe to bulk-fix as yet
     int z = (y) ? 1 : 0;
     (void)z;
+
+    int v1 = (static_cast<short>(1)) + 1; // expected-error {{unnecessary parentheses around cast [loplugin:unnecessaryparen]}}
+    (void)v1;
 };
 
 /* 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 1e01c41d5893..7f0e532585c1 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -109,8 +109,10 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
     if (insideConditionalOperator && parenExpr == insideConditionalOperator)
         return true;
 
-    auto subParenExpr = dyn_cast<ParenExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
-    if (subParenExpr) {
+    auto subExpr = parenExpr->getSubExpr()->IgnoreImpCasts();
+
+    if (auto subParenExpr = dyn_cast<ParenExpr>(subExpr))
+    {
         if (subParenExpr->getLocStart().isMacroID())
             return true;
         report(
@@ -119,8 +121,7 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
             << parenExpr->getSourceRange();
     }
 
-    auto declRefExpr = dyn_cast<DeclRefExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
-    if (declRefExpr) {
+    if (auto declRefExpr = dyn_cast<DeclRefExpr>(subExpr)) {
         if (declRefExpr->getLocStart().isMacroID())
             return true;
 
@@ -136,6 +137,17 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
             parenExpr->getLocStart())
             << parenExpr->getSourceRange();
     }
+
+
+    if (auto cxxNamedCastExpr = dyn_cast<CXXNamedCastExpr>(subExpr)) {
+        if (cxxNamedCastExpr->getLocStart().isMacroID())
+            return true;
+        report(
+            DiagnosticsEngine::Warning, "unnecessary parentheses around cast",
+            parenExpr->getLocStart())
+            << parenExpr->getSourceRange();
+    }
+
     return true;
 }
 
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index 1f95dfd93fad..45653b079c45 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -70,7 +70,7 @@ struct AlignSize_Impl
 #endif
 
 // the value of the maximal alignment
-static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&(reinterpret_cast<AlignSize_Impl *>(16))->dDouble) - 16);
+static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
 
 static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
 {
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index ac4e517aaac5..4ef5aaf18ac7 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -74,7 +74,7 @@ struct AlignSize_Impl
 #endif
 
 // the value of the maximal alignment
-static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&(reinterpret_cast<AlignSize_Impl *>(16))->dDouble) - 16);
+static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
 
 static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
 {
diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx
index 59257c44b09a..8ee7010972d2 100644
--- a/cppu/source/uno/assign.hxx
+++ b/cppu/source/uno/assign.hxx
@@ -425,7 +425,7 @@ inline bool _assignData(
                 typelib_TypeDescription * pTD = pSourceTypeDescr;
                 while (pTD && !_type_equals( pTD->pWeakRef, pDestType ))
                 {
-                    pTD = &(reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD))->pBaseTypeDescription->aBase;
+                    pTD = &reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD)->pBaseTypeDescription->aBase;
                 }
                 if (pTD) // is base of dest
                 {
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 9955750ea05e..91e777249f4a 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -238,7 +238,7 @@ css::uno::Sequence< css::uno::Type > OPropertySetHelper::getTypes()
 void OPropertySetHelper::disposing()
 {
     // Create an event with this as sender
-    Reference < XPropertySet  > rSource( (static_cast< XPropertySet *  >(this)) , UNO_QUERY );
+    Reference < XPropertySet  > rSource( static_cast< XPropertySet *  >(this), UNO_QUERY );
     EventObject aEvt;
     aEvt.Source = rSource;
 
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index bdb39041ea75..14ee6ef92616 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1372,7 +1372,7 @@ namespace svx
         rLoseFocusHdl.Call( *this );
         m_pScrollBar->SetThumbPos( m_pScrollBar->GetThumbPos() + ( _bUp? -1 : 1 ) );
 
-        ( static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() ) )->UpdateScrollbar();
+        static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() )->UpdateScrollbar();
     }
 
     SuggestionEdit::SuggestionEdit( vcl::Window* pParent, WinBits nBits )
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 1c8958452dd9..dc74bcaa36cf 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -142,7 +142,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(vcl::Window* pParent, const SfxIt
     const SfxPoolItem* pItem = nullptr;
     if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, false, &pItem ) == SfxItemState::SET )
     {
-        pColorConfig = (static_cast< SvxChartColorTableItem* >(pItem->Clone()) );
+        pColorConfig = static_cast< SvxChartColorTableItem* >(pItem->Clone());
     }
     else
     {
@@ -199,7 +199,7 @@ VclPtr<SfxTabPage> SvxDefaultColorOptPage::Create( vcl::Window* pParent, const S
 bool SvxDefaultColorOptPage::FillItemSet( SfxItemSet* rOutAttrs )
 {
     if( pColorConfig )
-        rOutAttrs->Put( *(static_cast< SfxPoolItem* >(pColorConfig)));
+        rOutAttrs->Put( *static_cast< SfxPoolItem* >(pColorConfig) );
 
     return true;
 }
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 9396ae3a212a..66adce966e62 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -809,7 +809,7 @@ bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
         case MID_STD_TAB:
         {
             const SvxTabStop &rTab = maTabStops.front();
-            rVal <<= (static_cast<sal_Int32>(bConvert ? convertTwipToMm100(rTab.GetTabPos()) : rTab.GetTabPos()));
+            rVal <<= static_cast<sal_Int32>(bConvert ? convertTwipToMm100(rTab.GetTabPos()) : rTab.GetTabPos());
             break;
         }
     }
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 5606863f31db..f3ad19334540 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -272,7 +272,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
     const ESelection& rSel,
     const OUString& rFileName,
     const css::uno::Reference< css::xml::sax::XDocumentHandler > & xHandler)
-:   SvXMLExport( xContext, "", rFileName, xHandler, (static_cast<frame::XModel*>(new SvxSimpleUnoModel())), FUNIT_CM,
+:   SvXMLExport( xContext, "", rFileName, xHandler, static_cast<frame::XModel*>(new SvxSimpleUnoModel()), FUNIT_CM,
     SvXMLExportFlags::OASIS  |  SvXMLExportFlags::AUTOSTYLES  |  SvXMLExportFlags::CONTENT )
 {
         SvxEditEngineSource aEditSource( pEditEngine );
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 35ddeb1b9be6..cff38074655a 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -398,7 +398,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
 
         // write 0xFFFFFFFF at the beginning
         uno::Sequence< sal_Int8 > aData( 4 );
-        *( reinterpret_cast<sal_uInt32*>(aData.getArray()) ) = 0xFFFFFFFF;
+        * reinterpret_cast<sal_uInt32*>(aData.getArray()) = 0xFFFFFFFF;
 
         xTempOutStream->writeBytes( aData );
 
@@ -429,7 +429,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
         xTempOutStream->writeBytes( aData );
 
         // write l-index
-        *( reinterpret_cast<sal_uInt32*>(aData.getArray()) ) = 0xFFFFFFFF;
+        * reinterpret_cast<sal_uInt32*>(aData.getArray()) = 0xFFFFFFFF;
         xTempOutStream->writeBytes( aData );
 
         // write adv. flags
@@ -437,7 +437,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
         xTempOutStream->writeBytes( aData );
 
         // write compression
-        *( reinterpret_cast<sal_uInt32*>(aData.getArray()) ) = 0x0;
+        * reinterpret_cast<sal_uInt32*>(aData.getArray()) = 0x0;
         xTempOutStream->writeBytes( aData );
 
         // get the size
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index d345656a6e5f..68352bb4e293 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -412,7 +412,7 @@ void CGM::ImplDoClass4()
                     if ( mbFigure )
                     {
                         tools::Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ),
-                            Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) );
+                            Size( static_cast< long >( 2 * fRadius ), (long)( 2 * fRadius) ) );
                         tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), PolyStyle::Arc );
                         if ( nSwitch )
                             mpOutAct->RegPolyLine( aPolygon, true );
diff --git a/filter/source/graphicfilter/icgm/class7.cxx b/filter/source/graphicfilter/icgm/class7.cxx
index 116338b870da..cc48285044ed 100644
--- a/filter/source/graphicfilter/icgm/class7.cxx
+++ b/filter/source/graphicfilter/icgm/class7.cxx
@@ -102,10 +102,10 @@ void CGM::ImplDoClass7()
                     case 0x320 : /*AppData - TEXT*/
                     {
                         TextEntry* pTextEntry = new TextEntry;
-                        pTextEntry->nTypeOfText = *(reinterpret_cast<sal_uInt16*>( pAppData ) );
-                        pTextEntry->nRowOrLineNum = *(reinterpret_cast<sal_uInt16*>( pAppData + 2 ) );
-                        pTextEntry->nColumnNum = *(reinterpret_cast<sal_uInt16*>( pAppData + 4 ) );
-                        sal_uInt16 nAttributes = *( reinterpret_cast<sal_uInt16*>( pAppData + 6 ) );
+                        pTextEntry->nTypeOfText = *reinterpret_cast<sal_uInt16*>( pAppData );
+                        pTextEntry->nRowOrLineNum = *reinterpret_cast<sal_uInt16*>( pAppData + 2 );
+                        pTextEntry->nColumnNum = *reinterpret_cast<sal_uInt16*>( pAppData + 4 );
+                        sal_uInt16 nAttributes = *reinterpret_cast<sal_uInt16*>( pAppData + 6 );
                         pTextEntry->nZoneSize = nAttributes & 0xff;
                         pTextEntry->nLineType = ( nAttributes >> 8 ) & 0xf;
                         nAttributes >>= 12;
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 154b4114800c..b40f964a056f 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -173,8 +173,8 @@ ImageProducer::~ImageProducer()
 css::uno::Any ImageProducer::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::lang::XInitialization* >(this)),
-                                        (static_cast< css::awt::XImageProducer* >(this)) );
+                                        static_cast< css::lang::XInitialization* >(this),
+                                        static_cast< css::awt::XImageProducer* >(this) );
     return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
 }
 
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx
index 442ccc85e8fd..5d7ed4ab6639 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -46,9 +46,9 @@ Any SAL_CALL ActionTriggerContainer::queryInterface( const Type& aType )
 {
     Any a = ::cppu::queryInterface(
                 aType ,
-                (static_cast< XMultiServiceFactory* >(this)),
-                (static_cast< XServiceInfo* >(this)),
-                (static_cast< XTypeProvider* >(this)));
+                static_cast< XMultiServiceFactory* >(this),
+                static_cast< XServiceInfo* >(this),
+                static_cast< XTypeProvider* >(this));
 
     if( a.hasValue() )
     {
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index 4ded47739217..94eb09221c02 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -53,7 +53,7 @@ namespace framework
 
 ActionTriggerPropertySet::ActionTriggerPropertySet()
     : OBroadcastHelper         ( m_aMutex )
-    ,   OPropertySetHelper       ( *(static_cast< OBroadcastHelper * >(this)))
+    , OPropertySetHelper       ( *static_cast< OBroadcastHelper * >(this) )
     , OWeakObject              ()
     , m_xBitmap                ( nullptr )
     , m_xActionTriggerContainer( nullptr )
@@ -69,8 +69,8 @@ Any SAL_CALL ActionTriggerPropertySet::queryInterface( const Type& aType )
 {
     Any a = ::cppu::queryInterface(
                 aType,
-                (static_cast< XServiceInfo* >(this)),
-                (static_cast< XTypeProvider* >(this)));
+                static_cast< XServiceInfo* >(this),
+                static_cast< XTypeProvider* >(this));
 
     if( a.hasValue() )
         return a;
diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
index cfeb395b5619..5f6700a68a70 100644
--- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
@@ -47,8 +47,8 @@ namespace framework
 
 ActionTriggerSeparatorPropertySet::ActionTriggerSeparatorPropertySet()
         :   OBroadcastHelper        ( m_aMutex )
-        ,   OPropertySetHelper      ( *(static_cast< OBroadcastHelper * >(this))        )
-        ,   OWeakObject             (                                                   )
+        ,   OPropertySetHelper      ( *static_cast< OBroadcastHelper * >(this) )
+        ,   OWeakObject             ()
         ,   m_nSeparatorType( 0 )
 {
 }
@@ -62,8 +62,8 @@ Any SAL_CALL ActionTriggerSeparatorPropertySet::queryInterface( const Type& aTyp
 {
     Any a = ::cppu::queryInterface(
                 aType,
-                (static_cast< XServiceInfo* >(this)),
-                (static_cast< XTypeProvider* >(this)));
+                static_cast< XServiceInfo* >(this),
+                static_cast< XTypeProvider* >(this));
 
     if( a.hasValue() )
         return a;
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index 327f7bdece81..583ec6dc61ca 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -60,11 +60,11 @@ Any SAL_CALL RootActionTriggerContainer::queryInterface( const Type& aType )
 {
     Any a = ::cppu::queryInterface(
                 aType ,
-                (static_cast< XMultiServiceFactory*   >(this)),
-                (static_cast< XServiceInfo*           >(this)),
-                (static_cast< XUnoTunnel*             >(this)),
-                (static_cast< XTypeProvider*          >(this)),
-                (static_cast< XNamed*                 >(this)));
+                static_cast< XMultiServiceFactory*   >(this),
+                static_cast< XServiceInfo*           >(this),
+                static_cast< XUnoTunnel*             >(this),
+                static_cast< XTypeProvider*          >(this),
+                static_cast< XNamed*                 >(this));
 
     if( a.hasValue() )
     {
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx
index 26d5d80a15cb..9f856691e343 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -59,10 +59,10 @@ Any SAL_CALL PropertySetContainer::queryInterface( const Type& rType )
 {
     Any a = ::cppu::queryInterface(
                 rType ,
-                (static_cast< XIndexContainer* >(this)),
-                (static_cast< XIndexReplace* >(this)),
-                (static_cast< XIndexAccess* >(this)),
-                (static_cast< XElementAccess* >(this)) );
+                static_cast< XIndexContainer* >(this),
+                static_cast< XIndexReplace* >(this),
+                static_cast< XIndexAccess* >(this),
+                static_cast< XElementAccess* >(this) );
 
     if( a.hasValue() )
     {
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 8d9f4f130b5a..5b065a835f3c 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -47,13 +47,13 @@ namespace framework
 
 RootItemContainer::RootItemContainer()
     :   ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex )
-    ,   ::cppu::OPropertySetHelper  ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+    ,   ::cppu::OPropertySetHelper  ( *static_cast< ::cppu::OBroadcastHelper* >(this) )
 {
 }
 
 RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceContainer )
     :   ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex )
-    ,   ::cppu::OPropertySetHelper  ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+    ,   ::cppu::OPropertySetHelper  ( *static_cast< ::cppu::OBroadcastHelper* >(this) )
 {
     // We also have to copy the UIName property
     try
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 4c16ffe18890..19d3cdd251bb 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -60,7 +60,7 @@ namespace framework
 
 UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType )
     :   ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex )
-    ,   ::cppu::OPropertySetHelper  ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+    ,   ::cppu::OPropertySetHelper  ( *static_cast< ::cppu::OBroadcastHelper* >(this) )
     ,   m_nType                     ( nType                                             )
     ,   m_bPersistent               ( true                                          )
     ,   m_bInitialized              ( false                                         )
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 001675e62c48..d0489f6ea0b7 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -45,7 +45,7 @@ namespace framework
 
 UIElementWrapperBase::UIElementWrapperBase( sal_Int16 nType )
     :   ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex )
-    ,   ::cppu::OPropertySetHelper  ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+    ,   ::cppu::OPropertySetHelper  ( *static_cast< ::cppu::OBroadcastHelper* >(this) )
     ,   m_aListenerContainer        ( m_aMutex )
     ,   m_nType                     ( nType                                             )
     ,   m_bInitialized              ( false                                         )
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index a8dca9cc3fce..2012ee2576bb 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -102,7 +102,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_
 
 LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : LayoutManager_Base()
         , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >(m_aMutex)
-        , LayoutManager_PBase( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+        , LayoutManager_PBase( *static_cast< ::cppu::OBroadcastHelper* >(this) )
         , m_xContext( xContext )
         , m_xURLTransformer( URLTransformer::create(xContext) )
         , m_nLockCount( 0 )
@@ -750,7 +750,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( bool bSetVisible )
             pMenuBar = static_cast<MenuBar *>(xInplaceMenuBar->GetMenuBar());
         else
         {
-            MenuBarWrapper* pMenuBarWrapper = (static_cast< MenuBarWrapper* >(xMenuBar.get()) );
+            MenuBarWrapper* pMenuBarWrapper = static_cast< MenuBarWrapper* >(xMenuBar.get());
             pMenuBar = static_cast<MenuBar *>(pMenuBarWrapper->GetMenuBarManager()->GetMenuBar());
         }
 
@@ -1166,7 +1166,7 @@ void LayoutManager::implts_resetInplaceMenuBar()
     if ( m_xContainerWindow.is() )
     {
         SolarMutexGuard aGuard;
-        MenuBarWrapper* pMenuBarWrapper = (static_cast< MenuBarWrapper* >(m_xMenuBar.get()) );
+        MenuBarWrapper* pMenuBarWrapper = static_cast< MenuBarWrapper* >(m_xMenuBar.get());
         SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow );
         if ( pSysWindow )
         {
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 571ed4b5801a..9599f8fecbfc 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -94,9 +94,9 @@ void SAL_CALL ToolbarLayoutManager::release() throw()
 uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType )
 {
     uno::Any a = ::cppu::queryInterface( rType,
-        (static_cast< awt::XDockableWindowListener* >(this)),
-        (static_cast< ui::XUIConfigurationListener* >(this)),
-        (static_cast< awt::XWindowListener* >(this)));
+        static_cast< awt::XDockableWindowListener* >(this),
+        static_cast< ui::XUIConfigurationListener* >(this),
+        static_cast< awt::XWindowListener* >(this));
 
     if ( a.hasValue() )
         return a;
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index bd4216e1c3c4..9070ce850ca8 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -82,7 +82,7 @@ DEFINE_INIT_SERVICE                     (   TabWindow, {} )
 
 TabWindow::TabWindow( const css::uno::Reference< css::uno::XComponentContext >& xContext )
     : ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex )
-    , ::cppu::OPropertySetHelper  ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
+    , ::cppu::OPropertySetHelper  ( *static_cast< ::cppu::OBroadcastHelper* >(this) )
     , m_bInitialized( false )
     , m_bDisposed( false )
     , m_nNextTabID( 1 )
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 24a9279944c9..5357e6955859 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -342,8 +342,8 @@ void SAL_CALL ControlMenuController::updatePopupMenu()
             Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
             if ( xDispatch.is() )
             {
-                xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
-                xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
+                xDispatch->addStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
+                xDispatch->removeStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
                 m_aURLToDispatchMap.emplace( aTargetURL.Complete, xDispatch );
             }
         }
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index c1f64b64e259..4997d6d26464 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -208,8 +208,8 @@ void SAL_CALL FontMenuController::updatePopupMenu()
 
     if ( xDispatch.is() )
     {
-        xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
-        xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
+        xDispatch->addStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
+        xDispatch->removeStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
     }
 }
 
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 53889e0785e4..24ac65d25d86 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -301,8 +301,8 @@ void SAL_CALL FontSizeMenuController::updatePopupMenu()
 
     if ( xDispatch.is() )
     {
-        xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
-        xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
+        xDispatch->addStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
+        xDispatch->removeStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
     }
 
     svt::PopupMenuControllerBase::updatePopupMenu();
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index e659d5edb5de..0938658b5aa1 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -252,8 +252,8 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu()
 
     if ( xDispatch.is() )
     {
-        xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
-        xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
+        xDispatch->addStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
+        xDispatch->removeStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
     }
 
     // TODO: Fill menu with the information retrieved by the status update
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 995fa66d4c7e..e08891f770b9 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -713,8 +713,8 @@ void SAL_CALL ToolbarsMenuController::itemActivated( const css::awt::MenuEvent&
             Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
             if ( xDispatch.is() )
             {
-                xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
-                xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
+                xDispatch->addStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
+                xDispatch->removeStatusListener( static_cast< XStatusListener* >(this), aTargetURL );
             }
         }
         else if ( aCmdVector[i] == CMD_RESTOREVISIBILITY )
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 171c98803d58..1f090b60760d 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -78,7 +78,7 @@ uno::Any SAL_CALL ToolBarWrapper::queryInterface( const uno::Type & rType )
 {
     Any a = ::cppu::queryInterface(
                 rType ,
-                (static_cast< css::ui::XUIFunctionListener* >(this)) );
+                static_cast< css::ui::XUIFunctionListener* >(this) );
 
     if( a.hasValue() )
         return a;
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 5b12b08817a9..34d9a16bf8a6 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -193,7 +193,7 @@ bool AstService::dump(RegistryKey& rKey)
         case NT_service_member:
             if (getNodeType() == NT_singleton) {
                 OSL_ASSERT(superName.isEmpty());
-                superName = (static_cast<AstServiceMember *>(*i))->
+                superName = static_cast<AstServiceMember *>(*i)->
                     getRealService()->getRelativName();
                 break;
             }
diff --git a/include/o3tl/enumrange.hxx b/include/o3tl/enumrange.hxx
index 5d8c369d30dd..9293b6cc912c 100644
--- a/include/o3tl/enumrange.hxx
+++ b/include/o3tl/enumrange.hxx
@@ -77,7 +77,7 @@ typename enumrange<T>::Iterator begin( enumrange<T> )
 template< typename T >
 typename enumrange<T>::Iterator end( enumrange<T> )
 {
-    return typename enumrange<T>::Iterator( (static_cast<int>(T::LAST)) + 1 );
+    return typename enumrange<T>::Iterator( static_cast<int>(T::LAST) + 1 );
 }
 
 }; // namespace o3tl
diff --git a/include/osl/file.hxx b/include/osl/file.hxx
index a3edbc1fe81e..af2ac6a0ce95 100644
--- a/include/osl/file.hxx
+++ b/include/osl/file.hxx
@@ -1591,7 +1591,7 @@ public:
 // private use.
 extern "C" inline void SAL_CALL onDirectoryCreated(void* pData, rtl_uString* aDirectoryUrl)
 {
-    (static_cast<DirectoryCreationObserver*>(pData))->DirectoryCreated(aDirectoryUrl);
+    static_cast<DirectoryCreationObserver*>(pData)->DirectoryCreated(aDirectoryUrl);
 }
 
 /** The directory class object provides a enumeration of DirectoryItems.
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 0a7d8712fb17..75dca6a83f7f 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -106,7 +106,7 @@ public:
                         const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
     {
         assert( dynamic_cast <FastAttributeList *> ( xAttrList.get() ) != nullptr );
-        return ( static_cast <FastAttributeList *> ( xAttrList.get() ) );
+        return static_cast <FastAttributeList *> ( xAttrList.get() );
     }
 
     /// Use for fast iteration and conversion of attributes
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index f8e45e28a0dd..618d52ffa3f7 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -384,7 +384,7 @@ void ODataInputStream::setSuccessor( const Reference < XConnectable > &r )
          if( m_succ.is() ) {
               /// set this instance as the sink !
               m_succ->setPredecessor( Reference< XConnectable > (
-                  (static_cast< XConnectable *  >(this)) ) );
+                  static_cast< XConnectable * >(this) ) );
          }
      }
 }
@@ -402,7 +402,7 @@ void ODataInputStream::setPredecessor( const Reference < XConnectable > &r )
         m_pred = r;
         if( m_pred.is() ) {
             m_pred->setSuccessor( Reference< XConnectable > (
-                (static_cast< XConnectable *  >(this)) ) );
+                static_cast< XConnectable * >(this) ) );
         }
     }
 }
@@ -722,7 +722,7 @@ void ODataOutputStream::setSuccessor( const Reference < XConnectable > &r )
          {
               /// set this instance as the sink !
               m_succ->setPredecessor( Reference < XConnectable > (
-                  (static_cast< XConnectable *  >(this)) ));
+                  static_cast< XConnectable * >(this) ));
          }
      }
 }
@@ -739,7 +739,7 @@ void ODataOutputStream::setPredecessor( const Reference < XConnectable > &r )
         m_pred = r;
         if( m_pred.is() ) {
             m_pred->setSuccessor( Reference< XConnectable > (
-                (static_cast< XConnectable *  >(this)) ));
+                static_cast< XConnectable * >(this) ));
         }
     }
 }
@@ -932,7 +932,7 @@ void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj
 
     if( bWriteObj )
         xPObj->write( Reference< XObjectOutputStream > (
-            (static_cast< XObjectOutputStream *  >(this)) ) );
+            static_cast< XObjectOutputStream *  >(this) ) );
 
     sal_Int32 nObjLen = m_rMarkable->offsetToMark( nObjLenMark ) -4;
     m_rMarkable->jumpToMark( nObjLenMark );
@@ -1021,7 +1021,7 @@ Reference< XInterface > SAL_CALL OObjectOutputStream_CreateInstance(
     SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
 {
     OObjectOutputStream *p = new OObjectOutputStream;
-    return  Reference< XInterface > ( (static_cast< OWeakObject *  >(p)) );
+    return  Reference< XInterface > ( static_cast< OWeakObject *  >(p) );
 }
 
 OUString OObjectOutputStream_getImplementationName()
@@ -1181,7 +1181,7 @@ Reference< XPersistObject >  OObjectInputStream::readObject()
 
                 m_aPersistVector[nId] = xLoadedObj;
                 xLoadedObj->read( Reference< XObjectInputStream >(
-                    (static_cast< XObjectInputStream * >(this)) ) );
+                    static_cast< XObjectInputStream * >(this) ) );
             }
             else
             {
@@ -1303,7 +1303,7 @@ Sequence< OUString > OObjectInputStream::getSupportedServiceNames()
 Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Reference < XComponentContext > & rCtx )
 {
     OObjectInputStream *p = new OObjectInputStream( rCtx );
-    return Reference< XInterface> ( (static_cast< OWeakObject * >(p)) );
+    return Reference< XInterface> ( static_cast< OWeakObject * >(p) );
 }
 
 OUString OObjectInputStream_getImplementationName()
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index cdf1b0924183..4dff49e4c0de 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -289,7 +289,7 @@ void OMarkableOutputStream::setSuccessor( const Reference< XConnectable > &r )
 
          if( m_succ.is() ) {
               m_succ->setPredecessor( Reference < XConnectable > (
-                  (static_cast< XConnectable *  >(this)) ) );
+                  static_cast< XConnectable *  >(this) ) );
          }
      }
 }
@@ -306,7 +306,7 @@ void OMarkableOutputStream::setPredecessor( const Reference< XConnectable > &r )
         m_pred = r;
         if( m_pred.is() ) {
             m_pred->setSuccessor( Reference < XConnectable > (
-                (static_cast< XConnectable *  >(this )) ) );
+                static_cast< XConnectable *  >(this ) ) );
         }
     }
 }
@@ -718,7 +718,7 @@ void OMarkableInputStream::setSuccessor( const Reference< XConnectable > &r )
          if( m_succ.is() ) {
               /// set this instance as the sink !
               m_succ->setPredecessor( Reference< XConnectable > (
-                  (static_cast< XConnectable *  >(this)) ) );
+                  static_cast< XConnectable * >(this) ) );
          }
      }
 }
@@ -736,7 +736,7 @@ void OMarkableInputStream::setPredecessor( const Reference < XConnectable >  &r
         m_pred = r;
         if( m_pred.is() ) {
             m_pred->setSuccessor( Reference< XConnectable > (
-                (static_cast< XConnectable *  >(this)) ) );
+                static_cast< XConnectable * >(this) ) );
         }
     }
 }
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index ccc3214cc8a5..c71954696150 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -299,7 +299,7 @@ void OPipeImpl::setSuccessor( const Reference < XConnectable >  &r )
          if( m_succ.is() )
          {
               m_succ->setPredecessor(
-                  Reference< XConnectable > ( (static_cast< XConnectable *  >(this)) ) );
+                  Reference< XConnectable > ( static_cast< XConnectable * >(this) ) );
          }
      }
 }
@@ -317,7 +317,7 @@ void OPipeImpl::setPredecessor( const Reference < XConnectable > &r )
         m_pred = r;
         if( m_pred.is() ) {
             m_pred->setSuccessor(
-                Reference < XConnectable > ( (static_cast< XConnectable *  >(this)) ) );
+                Reference < XConnectable > ( static_cast< XConnectable * >(this) ) );
         }
     }
 }
@@ -357,7 +357,7 @@ Reference < XInterface > SAL_CALL OPipeImpl_CreateInstance(
 {
     OPipeImpl *p = new OPipeImpl;
 
-    return Reference < XInterface > ( (static_cast< OWeakObject *  >(p)) );
+    return Reference < XInterface > ( static_cast< OWeakObject * >(p) );
 }
 
 
diff --git a/lotuswordpro/source/filter/lwpcolor.cxx b/lotuswordpro/source/filter/lwpcolor.cxx
index 47eb247da16a..1c8857b025df 100644
--- a/lotuswordpro/source/filter/lwpcolor.cxx
+++ b/lotuswordpro/source/filter/lwpcolor.cxx
@@ -66,8 +66,8 @@
 sal_uInt32 LwpColor::To24Color()
 {
     return ((m_nRed >> 8) |
-                (m_nGreen & 0xFF00) |
-                (static_cast<sal_uInt32>((m_nBlue & 0xFF00) << 8)));
+            (m_nGreen & 0xFF00) |
+            static_cast<sal_uInt32>((m_nBlue & 0xFF00) << 8));
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 164e88f144ce..3880d7e8afbf 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -637,7 +637,7 @@ LwpLayoutGeometry* LwpMiddleLayout::Geometry()
 {
     if( !m_LayGeometry.IsNull() )
     {
-        return ( dynamic_cast<LwpLayoutGeometry*> (m_LayGeometry.obj().get()) );
+        return dynamic_cast<LwpLayoutGeometry*> (m_LayGeometry.obj().get());
     }
     else
     {
diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx
index 76b5cd6b49f5..672724f59391 100644
--- a/oox/source/ole/vbainputstream.cxx
+++ b/oox/source/ole/vbainputstream.cxx
@@ -157,7 +157,7 @@ bool VbaInputStream::updateChunk()
                     sal_uInt16 nCopyToken = mpInStrm->readuInt16();
                     nChunkPos = nChunkPos + 2;
                     // update bit count used for offset/length in the token
-                    while( ((static_cast<size_t>(1)) << nBitCount ) < maChunk.size() ) ++nBitCount;
+                    while( ( static_cast<size_t>(1) << nBitCount ) < maChunk.size() ) ++nBitCount;
                     // extract length from lower (16-nBitCount) bits, plus 3
                     sal_uInt16 nLength = extractValue< sal_uInt16 >( nCopyToken, 0, 16 - nBitCount ) + 3;
                     // extract offset from high nBitCount bits, plus 1
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index 38470fbb1326..80e096f5a3a1 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -956,7 +956,7 @@ rtlCipher SAL_CALL rtl_cipher_createBF(rtlCipherMode Mode) SAL_THROW_EXTERN_C()
         pImpl->m_cipher.m_decode    = rtl_cipher_decodeBF;
         pImpl->m_cipher.m_delete    = rtl_cipher_destroyBF;
     }
-    return (static_cast<rtlCipher>(pImpl));
+    return static_cast<rtlCipher>(pImpl);
 }
 
 rtlCipherError SAL_CALL rtl_cipher_initBF(
@@ -1177,7 +1177,7 @@ rtlCipher SAL_CALL rtl_cipher_createARCFOUR(rtlCipherMode Mode)
         pImpl->m_cipher.m_delete    = rtl_cipher_destroyARCFOUR;
     }
 
-    return (static_cast<rtlCipher>(pImpl));
+    return static_cast<rtlCipher>(pImpl);
 }
 
 rtlCipherError SAL_CALL rtl_cipher_initARCFOUR(
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index 3b406bb49bc5..0c704789e004 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -150,8 +150,8 @@ template<typename charT, typename traits>
 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScQueryParam& rParam)
 {
     stream << "{" <<
-        "base=" << *(static_cast<const ScQueryParamBase*>(&rParam)) <<
-        ",table=" << *(static_cast<const ScQueryParamTable*>(&rParam)) <<
+        "base=" << *static_cast<const ScQueryParamBase*>(&rParam) <<
+        ",table=" << *static_cast<const ScQueryParamTable*>(&rParam) <<
         ",destPers=" << (rParam.bDestPers?"YES":"NO") <<
         ",destTab=" << rParam.nDestTab <<
         ",destCol=" << rParam.nDestCol <<
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 0882619f66f3..bdcee982a5c1 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -686,7 +686,7 @@ inline SCSIZE ScBroadcastAreaSlotMachine::ComputeSlotOffset(
         {
             const ScSlotData& rSD = i;
             return rSD.nCumulated +
-                (static_cast<SCSIZE>(nRow - rSD.nStartRow)) / rSD.nSlice +
+                static_cast<SCSIZE>(nRow - rSD.nStartRow) / rSD.nSlice +
                 static_cast<SCSIZE>(nCol) / BCA_SLOT_COLS * nBcaSlotsRow;
         }
     }
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 2424684fb210..5a673f36ab72 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -200,7 +200,7 @@ bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName
 
                 if (IsChart(pObject))
                 {
-                    rName = (static_cast<SdrOle2Obj*>(pObject))->GetPersistName();
+                    rName = static_cast<SdrOle2Obj*>(pObject)->GetPersistName();
                     return true;
                 }
             }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 9079c92d67f6..572374180f33 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1406,7 +1406,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
                 ScAddress( nEndCol, nStartRow+nSize-1, nTabRangeEnd ) ) );
             UpdateBroadcastAreas( URM_INSDEL, ScRange(
                 ScAddress( nStartCol, nStartRow+nSize, nTabRangeStart ),
-                ScAddress( nEndCol, MAXROW, nTabRangeEnd )), 0, -(static_cast<SCROW>(nSize)), 0 );
+                ScAddress( nEndCol, MAXROW, nTabRangeEnd )), 0, -static_cast<SCROW>(nSize), 0 );
         }
         else
             DelBroadcastAreasInRange( ScRange(
@@ -1421,7 +1421,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
     {
         lcl_GetFirstTabRange( nTabRangeStart, nTabRangeEnd, pTabMark, static_cast<SCTAB>(maTabs.size()) );
         aCxt.meMode = URM_INSDEL;
-        aCxt.mnRowDelta = -(static_cast<SCROW>(nSize));
+        aCxt.mnRowDelta = -static_cast<SCROW>(nSize);
         if (bLastRowIncluded)
         {
             // Last row is included, shift a virtually non-existent row in.
@@ -1630,7 +1630,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
     {
         lcl_GetFirstTabRange( nTabRangeStart, nTabRangeEnd, pTabMark, static_cast<SCTAB>(maTabs.size()) );
         aCxt.meMode = URM_INSDEL;
-        aCxt.mnColDelta = -(static_cast<SCCOL>(nSize));
+        aCxt.mnColDelta = -static_cast<SCCOL>(nSize);
         if (bLastColIncluded)
         {
             // Last column is included, shift a virtually non-existent column in.
@@ -2619,7 +2619,7 @@ void ScDocument::CopyBlockFromClip(
     {
         if (maTabs[i] && rMark.GetTableSelect(i) )
         {
-            while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) % (static_cast<SCTAB>(rClipTabs.size()));
+            while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) % static_cast<SCTAB>(rClipTabs.size());
 
             maTabs[i]->CopyFromClip(
                 rCxt, nCol1, nRow1, nCol2, nRow2, nDx, nDy, rClipTabs[nClipTab]);
@@ -2645,7 +2645,7 @@ void ScDocument::CopyBlockFromClip(
                 }
             }
 
-            nClipTab = (nClipTab+1) % (static_cast<SCTAB>(rClipTabs.size()));
+            nClipTab = (nClipTab+1) % static_cast<SCTAB>(rClipTabs.size());
         }
     }
     if (rCxt.getInsertFlag() & InsertDeleteFlags::CONTENTS)
@@ -2655,7 +2655,7 @@ void ScDocument::CopyBlockFromClip(
         {
             if (maTabs[i] && rMark.GetTableSelect(i) )
             {
-                while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) % (static_cast<SCTAB>(rClipTabs.size()));
+                while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) % static_cast<SCTAB>(rClipTabs.size());
                 SCTAB nDz = i - nClipTab;
 
                 //  ranges of consecutive selected tables (in clipboard and dest. doc)
@@ -2703,7 +2703,7 @@ void ScDocument::CopyBlockFromClip(
                     UpdateReference(aRefCxt, rCxt.getUndoDoc(), false);
                 }
 
-                nClipTab = (nClipTab+nFollow+1) % (static_cast<SCTAB>(rClipTabs.size()));
+                nClipTab = (nClipTab+nFollow+1) % static_cast<SCTAB>(rClipTabs.size());
                 i = sal::static_int_cast<SCTAB>( i + nFollow );
             }
         }
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index 808969dcf9c5..97e616837ae8 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -702,7 +702,7 @@ bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize)
         if ( nEntryEnd >= nStartPos )
         {
             if ( nEntryStart > nEndPos ) // Right
-                pEntry->Move(-(static_cast<SCCOLROW>(nSize)));
+                pEntry->Move(-static_cast<SCCOLROW>(nSize));
             else if ( nEntryStart < nStartPos && nEntryEnd >= nEndPos ) // Outside
                 pEntry->SetSize( nEntrySize-nSize );
             else
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 39baf35e20f2..9f1fcc7ef81b 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -215,7 +215,7 @@ double approxDiff( double a, double b )
     // the exponent of the error magnitude and round accordingly.
     const double e = fabs(d - c);
     const double fExp = floor( log10( e));
-    return rtl::math::round( c, -(static_cast<int>(fExp))-1);
+    return rtl::math::round( c, -static_cast<int>(fExp)-1);
 }
 }
 
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index 4d724d77d150..3807ae94258d 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -165,7 +165,7 @@ void XclExpValueRecord<double>::SaveXml( XclExpXmlStream& rStrm )
 
 void XclExpBoolRecord::WriteBody( XclExpStream& rStrm )
 {
-    rStrm << (static_cast< sal_uInt16 >( mbValue ? 1 : 0 ));
+    rStrm << static_cast< sal_uInt16 >( mbValue ? 1 : 0 );
 }
 
 void XclExpBoolRecord::SaveXml( XclExpXmlStream& rStrm )
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index f304cdda2dad..aab7e0927fbd 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -1581,7 +1581,7 @@ bool OoxFormulaParserImpl::importArrayToken( SequenceInputStream& rStrm )
                     appendRawToken( OPCODE_PUSH ) <<= BiffHelper::readString( rStrm, false );
                 break;
                 case BIFF_TOK_ARRAY_BOOL:
-                    appendRawToken( OPCODE_PUSH ) <<= (static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 ));
+                    appendRawToken( OPCODE_PUSH ) <<= static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 );
                 break;
                 case BIFF_TOK_ARRAY_ERROR:
                     appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( rStrm.readuInt8() );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index c6fd2f0ea317..1eea60ecd5d4 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1441,7 +1441,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
                     if ( pSet && SfxItemState::SET ==
                          pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
                     {
-                        OUString aFilterOption = (static_cast<const SfxStringItem*>(pItem))->GetValue();
+                        OUString aFilterOption = static_cast<const SfxStringItem*>(pItem)->GetValue();
                         lcl_parseHtmlFilterOption(aFilterOption, eLang, bDateConvert);
                     }
 
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 2c40bf2fdeae..f5b9720b5d5e 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -581,7 +581,7 @@ IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl, Timer *, void)
                 if ( pAction && ( pAction->GetType() != SC_CAT_DELETE_TABS ) &&
                      ( pAction->IsClickable() || pAction->IsVisible() ) )
                 {
-                    const ScBigRange& rBigRange = ( static_cast< const ScChangeAction* >( pAction ) )->GetBigRange();
+                    const ScBigRange& rBigRange = static_cast< const ScChangeAction* >( pAction )->GetBigRange();
                     if ( rBigRange.IsValid( mpOwnDoc ) )
                     {
                         bool bSetCursor = !m_pLbConflicts->NextSelected( pEntry );
@@ -687,7 +687,7 @@ void ScConflictsDlg::UpdateView()
                     // only display shared top content entries
                     if ( pAction->GetType() == SC_CAT_CONTENT )
                     {
-                        ScChangeActionContent* pNextContent = (dynamic_cast<ScChangeActionContent&>(*pAction)).GetNextContent();
+                        ScChangeActionContent* pNextContent = dynamic_cast<ScChangeActionContent&>(*pAction).GetNextContent();
                         if ( pNextContent && aItr->HasSharedAction( pNextContent->GetActionNumber() ) )
                         {
                             continue;
@@ -708,7 +708,7 @@ void ScConflictsDlg::UpdateView()
                     // only display own top content entries
                     if ( pAction->GetType() == SC_CAT_CONTENT )
                     {
-                        ScChangeActionContent* pNextContent = ( dynamic_cast<ScChangeActionContent&>(*pAction) ).GetNextContent();
+                        ScChangeActionContent* pNextContent = dynamic_cast<ScChangeActionContent&>(*pAction).GetNextContent();
                         if ( pNextContent && aItr->HasOwnAction( pNextContent->GetActionNumber() ) )
                         {
                             continue;
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 7bccbd5931d7..a3df348c16a0 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -174,7 +174,7 @@ OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltT
     case ScContentId::DRAWING:
         {
             SdrObject* pFound = nullptr;
-            ScDocument* pDoc = ( const_cast< ScContentTree* >(this) )->GetSourceDocument();
+            ScDocument* pDoc =  const_cast< ScContentTree* >(this)->GetSourceDocument();
             SdrIterMode eIter = ( nType == ScContentId::DRAWING ) ? SdrIterMode::Flat : SdrIterMode::DeepNoGroups;
             ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
             SfxObjectShell* pShell = pDoc->GetDocumentShell();
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 01c78e5484fd..2d492bc6809d 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -756,7 +756,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const OUString& aPrope
                         const SfxPoolItem* pItem = pData->GetItem(nFieldIndex, ATTR_BORDER);
                         if (pItem)
                         {
-                            SvxBoxItem aOuter(*(static_cast<const SvxBoxItem*>(pItem)));
+                            SvxBoxItem aOuter(*static_cast<const SvxBoxItem*>(pItem));
                             SvxBoxInfoItem aInner(ATTR_BORDER_INNER);
 
                             if (pEntry->nWID == SC_WID_UNO_TBLBORD2)
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 972617d352ab..3cf1ec0a7861 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1437,7 +1437,7 @@ ScChart2DataProvider::createDataSource(
             {
                 sal_Int32 nSource(0);
                 if( aArguments[i].Value >>= nSource )
-                    eSource = (static_cast< chart::ChartDataRowSource >( nSource ));
+                    eSource = static_cast< chart::ChartDataRowSource >( nSource );
             }
             bOrientCol = (eSource == chart::ChartDataRowSource_COLUMNS);
         }
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 96b90f69ac24..e23568887f47 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1307,7 +1307,7 @@ uno::Any ScStyleObj::getPropertyDefault_Impl( const OUString& aPropertyName )
                         const SfxPoolItem* pItem = &pItemSet->Get( ATTR_BORDER );
                         if ( pItem )
                         {
-                            SvxBoxItem aOuter( *( static_cast<const SvxBoxItem*>( pItem ) ) );
+                            SvxBoxItem aOuter( * static_cast<const SvxBoxItem*>( pItem ) );
                             SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
                             if (nWhich == SC_WID_UNO_TBLBORD2)
                                 ScHelperFunctions::AssignTableBorder2ToAny( aAny, aOuter, aInner, true);
@@ -1899,7 +1899,7 @@ uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName )
                             const SfxPoolItem* pItem = &pItemSet->Get( ATTR_BORDER );
                             if ( pItem )
                             {
-                                SvxBoxItem aOuter( *( static_cast<const SvxBoxItem*>( pItem ) ) );
+                                SvxBoxItem aOuter( * static_cast<const SvxBoxItem*>( pItem ) );
                                 SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
                                 if (nWhich == SC_WID_UNO_TBLBORD2)
                                     ScHelperFunctions::AssignTableBorder2ToAny( aAny, aOuter, aInner, true);
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 5ff674ac856e..68588ce25ca9 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -101,7 +101,7 @@ namespace accessibility
 
     SfxBroadcaster& AccessibleOutlineEditSource::GetBroadcaster() const
     {
-        return *( const_cast< AccessibleOutlineEditSource* > (this) );
+        return * const_cast< AccessibleOutlineEditSource* > (this);
     }
 
     bool AccessibleOutlineEditSource::IsValid() const
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 3f025fec1f8d..954c49cf09db 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -209,7 +209,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
                     aUserOptions.GetFirstName(), aUserOptions.GetLastName(), aUserOptions.GetID(),
                     pAuthorField->GetType(), pAuthorField->GetFormat() );
 
-            *(const_cast< SvxAuthorField* >(pAuthorField)) = aAuthorField;
+            *const_cast< SvxAuthorField* >(pAuthorField) = aAuthorField;
         }
         pInfo->SetRepresentation( pAuthorField->GetFormatted() );
 
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
index f60512623f1b..ef409ffe977e 100644
--- a/sd/source/ui/dlg/dlgchar.cxx
+++ b/sd/source/ui/dlg/dlgchar.cxx
@@ -54,7 +54,7 @@ void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
     if (nId == mnCharName)
     {
-        SvxFontListItem aItem(*( static_cast<const SvxFontListItem*>( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
+        SvxFontListItem aItem(* static_cast<const SvxFontListItem*>( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) );
 
         aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
         rPage.PageCreated(aSet);
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index bb6f8b649b85..984527248795 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -59,7 +59,7 @@ namespace
             SfxItemState nState = pDisp->QueryState( _nSlot, pItem );
             bRet = SfxItemState::DEFAULT <= nState;
             if (bRet)
-                _rValue = ( static_cast< const SfxBoolItem* >( pItem ) )->GetValue();
+                _rValue = static_cast< const SfxBoolItem* >( pItem )->GetValue();
         }
         return bRet;
     }
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index f11e73b27dd7..935ba2aaf8c1 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -204,7 +204,7 @@ public:
                             {
                                 ++m_refCount;
                                 Reference< lang::XComponent > xComponent(
-                                    (static_cast< ::cppu::OWeakObject* >(pController)), uno::UNO_QUERY );
+                                    static_cast< ::cppu::OWeakObject* >(pController), uno::UNO_QUERY );
                                 if (xComponent.is())
                                     xComponent->addEventListener(this);
                                 --m_refCount;
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index f67d68666fee..ba6d7ad02d4c 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2425,7 +2425,7 @@ bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl const & rElemen
             pStream = rElement.m_xStream->m_pAntiImpl;
         if ( !pStream )
         {
-            pStream = ( const_cast < UCBStorage* > (this) )->OpenStream( rElement.m_aName, StreamMode::STD_READ, pImp->m_bDirect );
+            pStream = const_cast< UCBStorage* >(this)->OpenStream( rElement.m_aName, StreamMode::STD_READ, pImp->m_bDirect );
             bDeleteStream = true;
         }
 
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 92abbe35f997..fb715793531b 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -692,7 +692,7 @@ void SmEditWindow::LoseFocus()
 bool SmEditWindow::IsAllSelected() const
 {
     bool bRes = false;
-    EditEngine *pEditEngine = (const_cast<SmEditWindow *>(this))->GetEditEngine();
+    EditEngine *pEditEngine = const_cast<SmEditWindow *>(this)->GetEditEngine();
     OSL_ENSURE( pEditView, "NULL pointer" );
     OSL_ENSURE( pEditEngine, "NULL pointer" );
     if (pEditEngine  &&  pEditView)
@@ -832,7 +832,7 @@ void SmEditWindow::SetSelection(const ESelection &rSel)
 
 bool SmEditWindow::IsEmpty() const
 {
-    EditEngine *pEditEngine = (const_cast<SmEditWindow *>(this))->GetEditEngine();
+    EditEngine *pEditEngine = const_cast<SmEditWindow *>(this)->GetEditEngine();
     bool bEmpty = ( pEditEngine && pEditEngine->GetTextLen() == 0 );
     return bEmpty;
 }
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index d5a3a2192d60..680e55083dd4 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -219,13 +219,13 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
         bool bAssign;
         if (pTD->eTypeClass == typelib_TypeClass_ANY)
         {
-            uno_copyAndConvertData( pArg, (const_cast< Any * >(&rValue)),
+            uno_copyAndConvertData( pArg, const_cast< Any * >(&rValue),
                                     pTD, getReflection()->getCpp2Uno().get() );
             bAssign = true;
         }
         else if (typelib_typedescriptionreference_equals( rValue.getValueTypeRef(), pTD->pWeakRef ))
         {
-            uno_copyAndConvertData( pArg, (const_cast< void * >(rValue.getValue()) ),
+            uno_copyAndConvertData( pArg, const_cast< void * >(rValue.getValue()),
                                     pTD, getReflection()->getCpp2Uno().get() );
             bAssign = true;
         }
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index db3e7666c1ba..fb54149dc27d 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -678,7 +678,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
 
             m_state = m_xRegistry->m_state++;
 
-            return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+            return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
         }
     }
     else
@@ -698,7 +698,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
 
                 m_state = m_xRegistry->m_state++;
 
-                return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+                return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
             }
         }
     }
@@ -1237,7 +1237,7 @@ Reference< XRegistryKey > SAL_CALL NestedRegistryImpl::getRootKey(  )
                 defaultKey = m_defaultReg->getRootKey();
             }
 
-            return (static_cast<XRegistryKey*>(new NestedKeyImpl(this, localKey, defaultKey)));
+            return static_cast<XRegistryKey*>(new NestedKeyImpl(this, localKey, defaultKey));
         }
     }
     else
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 64dc24f9dfb1..355da85b9bed 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -236,9 +236,9 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
 {
     // PropertySet implementation
     Any a = ::cppu::queryInterface( aType,
-                                   (static_cast< XInvocation* >(this)),
-                                   (static_cast< XMaterialHolder* >(this)),
-                                   (static_cast< XTypeProvider * >(this))    );
+                                   static_cast< XInvocation* >(this),
+                                   static_cast< XMaterialHolder* >(this),
+                                   static_cast< XTypeProvider * >(this) );
     if( a.hasValue() )
     {
         return a;
@@ -251,50 +251,50 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
         if ((_xDirect.is() && _xENDirect.is()) ||
             (!_xDirect.is() && _xENIntrospection.is()))
         {
-            return makeAny( Reference< XExactName >( (static_cast< XExactName* >(this)) ) );
+            return makeAny( Reference< XExactName >( static_cast< XExactName* >(this) ) );
         }
     }
     else if ( aType == cppu::UnoType<XNameContainer>::get())
     {
         if( _xNameContainer.is() )
-            return makeAny( Reference< XNameContainer >( (static_cast< XNameContainer* >(this)) ) );
+            return makeAny( Reference< XNameContainer >( static_cast< XNameContainer* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XNameReplace>::get())
     {
         if( _xNameReplace.is() )
-            return makeAny( Reference< XNameReplace >( (static_cast< XNameReplace* >(this)) ) );
+            return makeAny( Reference< XNameReplace >( static_cast< XNameReplace* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XNameAccess>::get())
     {
         if( _xNameAccess.is() )
-            return makeAny( Reference< XNameAccess >( (static_cast< XNameAccess* >(this)) ) );
+            return makeAny( Reference< XNameAccess >( static_cast< XNameAccess* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XIndexContainer>::get())
     {
         if (_xIndexContainer.is())
-            return makeAny( Reference< XIndexContainer >( (static_cast< XIndexContainer* >(this)) ) );
+            return makeAny( Reference< XIndexContainer >( static_cast< XIndexContainer* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XIndexReplace>::get())
     {
         if (_xIndexReplace.is())
-            return makeAny( Reference< XIndexReplace >( (static_cast< XIndexReplace* >(this)) ) );
+            return makeAny( Reference< XIndexReplace >( static_cast< XIndexReplace* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XIndexAccess>::get())
     {
         if (_xIndexAccess.is())
-            return makeAny( Reference< XIndexAccess >( (static_cast< XIndexAccess* >(this)) ) );
+            return makeAny( Reference< XIndexAccess >( static_cast< XIndexAccess* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XEnumerationAccess>::get())
     {
         if (_xEnumerationAccess.is())
-            return makeAny( Reference< XEnumerationAccess >( (static_cast< XEnumerationAccess* >(this)) ) );
+            return makeAny( Reference< XEnumerationAccess >( static_cast< XEnumerationAccess* >(this) ) );
     }
     else if ( aType == cppu::UnoType<XElementAccess>::get())
     {
         if (_xElementAccess.is())
         {
             return makeAny( Reference< XElementAccess >(
-                (static_cast< XElementAccess* >((static_cast< XNameContainer* >(this))) ) ) );
+                static_cast< XElementAccess* >(static_cast< XNameContainer* >(this)) ) );
         }
     }
     else if ( aType == cppu::UnoType<XInvocation2>::get())
@@ -304,7 +304,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
         if ( ( _xDirect.is() && _xDirect2.is()) ||
              (!_xDirect.is() && _xIntrospectionAccess.is() ) )
         {
-            return makeAny( Reference< XInvocation2 >( (static_cast< XInvocation2* >(this)) ) );
+            return makeAny( Reference< XInvocation2 >( static_cast< XInvocation2* >(this) ) );
         }
     }
 
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index a74fb1a92529..f38fa524175f 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -26,7 +26,7 @@
 bool CntByteItem::operator ==(const SfxPoolItem & rItem) const
 {
     assert(dynamic_cast<const CntByteItem*>(&rItem) != nullptr);
-    return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue;
+    return m_nValue == static_cast< const CntByteItem * >(&rItem)->m_nValue;
 }
 
 // virtual
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 77b869f2f301..b1324567ecbf 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -31,7 +31,7 @@ bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const
     DBG_ASSERT(dynamic_cast<const CntUnencodedStringItem*>( &rItem ) !=  nullptr,
                "CntUnencodedStringItem::operator ==(): Bad type");
     return m_aValue
-            == (static_cast< const CntUnencodedStringItem * >(&rItem))->
+            == static_cast< const CntUnencodedStringItem * >(&rItem)->
                 m_aValue;
 }
 
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index c5b16df371ed..6fdd060a9676 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -60,7 +60,7 @@ SfxInt16Item::SfxInt16Item(sal_uInt16 which, SvStream & rStream):
 bool SfxInt16Item::operator ==(const SfxPoolItem & rItem) const
 {
     assert(SfxPoolItem::operator==(rItem));
-    return m_nValue == (static_cast< const SfxInt16Item * >(&rItem))->
+    return m_nValue == static_cast< const SfxInt16Item * >(&rItem)->
                         m_nValue;
 }
 
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 81025401e379..c5470a36111a 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -95,7 +95,7 @@ std::vector<OUString>& SfxStringListItem::GetList()
 
 const std::vector<OUString>& SfxStringListItem::GetList () const
 {
-    return (const_cast< SfxStringListItem * >(this))->GetList();
+    return const_cast< SfxStringListItem * >(this)->GetList();
 }
 
 
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index d0e58656ddd3..d35fc6078db2 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -35,7 +35,7 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
 bool SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const
 {
     assert(SfxPoolItem::operator==(rItem));
-    return m_nValue.bVisible == (static_cast< const SfxVisibilityItem * >(&rItem))->
+    return m_nValue.bVisible == static_cast< const SfxVisibilityItem * >(&rItem)->
                         m_nValue.bVisible;
 }
 
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index f22c87ca6240..c0c1bdfa1cc4 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -687,21 +687,21 @@ bool ImageMap::operator==( const ImageMap& rImageMap )
                 {
                     case IMAP_OBJ_RECTANGLE:
                     {
-                        if ( !( static_cast<IMapRectangleObject*>(pObj) )->IsEqual( *static_cast<IMapRectangleObject*>(pEqObj) ) )
+                        if ( ! static_cast<IMapRectangleObject*>(pObj)->IsEqual( *static_cast<IMapRectangleObject*>(pEqObj) ) )
                             bDifferent = true;
                     }
                     break;
 
                     case IMAP_OBJ_CIRCLE:
                     {
-                        if ( !( static_cast<IMapCircleObject*>(pObj) )->IsEqual( *static_cast<IMapCircleObject*>(pEqObj) ) )
+                        if ( ! static_cast<IMapCircleObject*>(pObj)->IsEqual( *static_cast<IMapCircleObject*>(pEqObj) ) )
                             bDifferent = true;
                     }
                     break;
 
                     case IMAP_OBJ_POLYGON:
                     {
-                        if ( !( static_cast<IMapPolygonObject*>(pObj) )->IsEqual( *static_cast<IMapPolygonObject*>(pEqObj) ) )
+                        if ( ! static_cast<IMapPolygonObject*>(pObj)->IsEqual( *static_cast<IMapPolygonObject*>(pEqObj) ) )
                             bDifferent = true;
                     }
                     break;
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 69c413493975..f72207e74133 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -187,10 +187,10 @@ VCLXMultiLineEdit::~VCLXMultiLineEdit()
 css::uno::Any VCLXMultiLineEdit::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::awt::XTextComponent* >(this)),
-                                        (static_cast< css::awt::XTextArea* >(this)),
-                                        (static_cast< css::awt::XTextLayoutConstrains* >(this)),
-                                        (static_cast< css::lang::XTypeProvider* >(this)) );
+                                        static_cast< css::awt::XTextComponent* >(this),
+                                        static_cast< css::awt::XTextArea* >(this),
+                                        static_cast< css::awt::XTextLayoutConstrains* >(this),
+                                        static_cast< css::lang::XTypeProvider* >(this) );
     return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType ));
 }
 
@@ -550,9 +550,9 @@ VCLXFileControl::~VCLXFileControl()
 css::uno::Any VCLXFileControl::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::awt::XTextComponent* >(this)),
-                                        (static_cast< css::awt::XTextLayoutConstrains* >(this)),
-                                        (static_cast< css::lang::XTypeProvider* >(this)) );
+                                        static_cast< css::awt::XTextComponent* >(this),
+                                        static_cast< css::awt::XTextLayoutConstrains* >(this),
+                                        static_cast< css::lang::XTypeProvider* >(this) );
     return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType ));
 }
 
@@ -1648,8 +1648,8 @@ SVTXNumericField::~SVTXNumericField()
 css::uno::Any SVTXNumericField::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::awt::XNumericField* >(this)),
-                                        (static_cast< css::lang::XTypeProvider* >(this)) );
+                                        static_cast< css::awt::XNumericField* >(this),
+                                        static_cast< css::lang::XTypeProvider* >(this) );
     return (aRet.hasValue() ? aRet : SVTXFormattedField::queryInterface( rType ));
 }
 
@@ -1815,8 +1815,8 @@ SVTXCurrencyField::~SVTXCurrencyField()
 css::uno::Any SVTXCurrencyField::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::awt::XCurrencyField* >(this)),
-                                        (static_cast< css::lang::XTypeProvider* >(this)) );
+                                        static_cast< css::awt::XCurrencyField* >(this),
+                                        static_cast< css::lang::XTypeProvider* >(this) );
     return (aRet.hasValue() ? aRet : SVTXFormattedField::queryInterface( rType ));
 }
 
@@ -2103,8 +2103,8 @@ void VCLXProgressBar::ImplUpdateValue()
 css::uno::Any VCLXProgressBar::queryInterface( const css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        (static_cast< css::awt::XProgressBar* >(this)),
-                                        (static_cast< css::lang::XTypeProvider* >(this)) );
+                                        static_cast< css::awt::XProgressBar* >(this),
+                                        static_cast< css::lang::XTypeProvider* >(this) );
     return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType ));
 }
 
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 59643e33f8d9..6cbd41f35ce0 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -84,7 +84,7 @@ namespace accessibility
         SvxViewForwarder*       GetViewForwarder() override { return this; }
         SvxEditSource*          Clone() const override { return nullptr; }
         void                    UpdateData() override {}
-        SfxBroadcaster&         GetBroadcaster() const override { return *(const_cast<AccessibleEmptyEditSource_Impl*>(this)); }
+        SfxBroadcaster&         GetBroadcaster() const override { return *const_cast<AccessibleEmptyEditSource_Impl*>(this); }
 
         // SvxTextForwarder
         sal_Int32          GetParagraphCount() const override { return 1; }
@@ -297,7 +297,7 @@ namespace accessibility
 
     SfxBroadcaster& AccessibleEmptyEditSource::GetBroadcaster() const
     {
-        return *(const_cast<AccessibleEmptyEditSource*>(this));
+        return *const_cast<AccessibleEmptyEditSource*>(this);
     }
 
     void AccessibleEmptyEditSource::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 318733beae70..3020c2cbf4de 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -130,7 +130,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessible(
         else
         {
             // create a new one and remember in our internal map
-            Reference< XShape > xShape( Reference< XShape >::query( (const_cast<SdrObject*>(pObj))->getUnoShape() ) );
+            Reference< XShape > xShape( Reference< XShape >::query( const_cast<SdrObject*>(pObj)->getUnoShape() ) );
 
             AccessibleShapeInfo aShapeInfo (xShape,mxParent);
             // Create accessible object that corresponds to the descriptor's shape.
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index cff0d5a706d1..f550d1dae7ff 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -424,7 +424,7 @@ void E3dObject::NbcMove(const Size& rSize)
 
 SdrObjList* E3dObject::GetSubList() const
 {
-    return &(const_cast< E3dObjList& >(maSubList));
+    return &const_cast< E3dObjList& >(maSubList);
 }
 
 void E3dObject::RecalcSnapRect()
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index ebce0221edfe..4118b3cdad90 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -82,11 +82,11 @@ namespace
 
         if(bShadow)
         {
-            nRetval = (sal_uInt8)(((static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
+            nRetval = (sal_uInt8)((static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue() * 255) / 100);
         }
         else
         {
-            nRetval = (sal_uInt8)(((static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue() * 255) / 100);
+            nRetval = (sal_uInt8)((static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE)).GetValue() * 255) / 100);
         }
 
         return nRetval;
@@ -98,18 +98,18 @@ namespace
 
         if(bShadow)
         {
-            const Color aShadowColor((static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+            const Color aShadowColor(static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue());
             aColorAttribute = aShadowColor.getBColor();
         }
         else
         {
-            const Color aLineColor((static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
+            const Color aLineColor(static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR)).GetColorValue());
             aColorAttribute = aLineColor.getBColor();
         }
 
-        const sal_uInt32 nLineWidth = (static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH))).GetValue();
-        const css::drawing::LineJoint eLineJoint = (static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT))).GetValue();
-        const css::drawing::LineCap eLineCap = (static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP))).GetValue();
+        const sal_uInt32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
+        const css::drawing::LineJoint eLineJoint = static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT)).GetValue();
+        const css::drawing::LineCap eLineCap = static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP)).GetValue();
 
         return drawinglayer::attribute::LineAttribute(
             aColorAttribute,
@@ -120,17 +120,17 @@ namespace
 
     drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
     {
-        const css::drawing::LineStyle eLineStyle = (static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE))).GetValue();
+        const css::drawing::LineStyle eLineStyle = static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue();
         double fFullDotDashLen(0.0);
         ::std::vector< double > aDotDashArray;
 
         if(css::drawing::LineStyle_DASH == eLineStyle)
         {
-            const XDash& rDash = (static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH))).GetDashValue();
+            const XDash& rDash = static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH)).GetDashValue();
 
             if(rDash.GetDots() || rDash.GetDashes())
             {
-                const sal_uInt32 nLineWidth = (static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+                const sal_uInt32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
                 fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, (double)nLineWidth);
             }
         }
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index cc6f93b366b8..cb4912053bfc 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -109,9 +109,9 @@ namespace sdr
                 // for SC, the caption object may have a specialized shadow. The usual object shadow is off
                 // and a specialized shadow gets created here (see old paint)
                 const XColorItem& rShadColItem = static_cast<const XColorItem&>(rItemSet.Get(SDRATTR_SHADOWCOLOR));
-                const sal_uInt16 nShadowTransparence((static_cast<const SdrPercentItem&>(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
+                const sal_uInt16 nShadowTransparence(static_cast<const SdrPercentItem&>(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue());
                 const Color aShadowColor(rShadColItem.GetColorValue());
-                const drawing::FillStyle eShadowStyle = (static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE))).GetValue();
+                const drawing::FillStyle eShadowStyle = static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE)).GetValue();
 
                 // Create own ItemSet and modify as needed
                 // Always hide lines for special calc shadow
@@ -121,7 +121,7 @@ namespace sdr
                 if(drawing::FillStyle_HATCH == eShadowStyle)
                 {
                     // #41666# Hatch color is set hard to shadow color
-                    XHatch aHatch = (static_cast<const XFillHatchItem&>(rItemSet.Get(XATTR_FILLHATCH))).GetHatchValue();
+                    XHatch aHatch = static_cast<const XFillHatchItem&>(rItemSet.Get(XATTR_FILLHATCH)).GetHatchValue();
                     aHatch.SetColor(aShadowColor);
                     aSet.Put(XFillHatchItem(OUString(),aHatch));
                 }
@@ -145,8 +145,8 @@ namespace sdr
                 if(!aFill.isDefault() && 1.0 != aFill.getTransparence())
                 {
                     // add shadow offset to object matrix
-                    const sal_uInt32 nXDist((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWXDIST))).GetValue());
-                    const sal_uInt32 nYDist((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
+                    const sal_uInt32 nXDist(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWXDIST)).GetValue());
+                    const sal_uInt32 nYDist(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWYDIST)).GetValue());
 
                     if(nXDist || nYDist)
                     {
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index f13dc1eafe42..03c46280c4d0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -215,7 +215,7 @@ namespace sdr
                     }
 
                     // check if SdrTextWordWrapItem is set
-                    bWordWrap = (static_cast<const SdrOnOffItem&>(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue();
+                    bWordWrap = static_cast<const SdrOnOffItem&>(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP)).GetValue();
                 }
 
                 // create primitive
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 13742d358c17..f3d50c23a125 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -66,7 +66,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV
         aObjectRange.getMinX(), aObjectRange.getMinY()));
 
     // calculate corner radius
-    sal_uInt32 nCornerRadius((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue());
+    sal_uInt32 nCornerRadius(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_ECKENRADIUS)).GetValue());
     double fCornerRadiusX;
     double fCornerRadiusY;
     drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 5bf633790323..b59a45d5f72d 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -190,7 +190,7 @@ OutputDevice* PagePrimitiveExtractor::TryToGetOutputDevice() const { return mrVi
 drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
 {
     drawinglayer::primitive2d::Primitive2DContainer xRetval;
-    const SdrPageObj& rPageObject((static_cast< ViewContactOfPageObj& >(GetViewContact())).GetPageObj());
+    const SdrPageObj& rPageObject(static_cast< ViewContactOfPageObj& >(GetViewContact()).GetPageObj());
     const SdrPage* pPage = rPageObject.GetReferencedPage();
     const svtools::ColorConfig aColorConfig;
 
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index c2805ef47b2b..50a95fe97875 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -2121,7 +2121,7 @@ SdrText* SdrTextObj::getText( sal_Int32 nIndex ) const
     if( nIndex == 0 )
     {
         if( mpText == nullptr )
-            const_cast< SdrTextObj* >(this)->mpText = new SdrText( *(const_cast< SdrTextObj* >(this)) );
+            const_cast< SdrTextObj* >(this)->mpText = new SdrText( *const_cast< SdrTextObj* >(this) );
         return mpText;
     }
     else
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 3de01ff87b20..bcd80e1a6412 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -159,7 +159,7 @@ bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* pSdr
     else if( pPage )
         aEvent.Source = const_cast<SdrPage*>(pPage)->getUnoPage();
     else
-        aEvent.Source = (const_cast<SdrModel*>(pDoc))->getUnoModel();
+        aEvent.Source = const_cast<SdrModel*>(pDoc)->getUnoModel();
 
     return true;
 }
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 1d5b495dde7b..efc5402e5cf1 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -625,7 +625,7 @@ public:
     */
     SwShellCursor* getShellCursor( bool bBlock );
     const SwShellCursor* getShellCursor( bool bBlock ) const
-        { return (const_cast<SwCursorShell*>(this))->getShellCursor( bBlock ); }
+        { return const_cast<SwCursorShell*>(this)->getShellCursor( bBlock ); }
 
     bool IsBlockMode() const { return nullptr != m_pBlockCursor; }
 
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 6cc69c272c41..77aebc67d2be 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -114,7 +114,7 @@ private:
     {
         if ( m_bCalcHiddenParaField )
         {
-            (const_cast<SwpHints*>(this))->CalcHiddenParaField();
+            const_cast<SwpHints*>(this)->CalcHiddenParaField();
         }
         return m_bHasHiddenParaField;
     }
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index ebd11b1cdfde..3dea8e696ba6 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -89,7 +89,7 @@ public:
 
           SwCharFormat* GetCharFormat();
     const SwCharFormat* GetCharFormat() const
-            { return (const_cast<SwTextRuby*>(this))->GetCharFormat(); }
+            { return const_cast<SwTextRuby*>(this)->GetCharFormat(); }
 };
 
 inline const SwTextNode& SwTextRuby::GetTextNode() const
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
index e7177fda7d1f..ed44abe4533a 100644
--- a/sw/inc/txtflcnt.hxx
+++ b/sw/inc/txtflcnt.hxx
@@ -50,7 +50,7 @@ inline SwFlyInContentFrame *SwTextFlyCnt::GetFlyFrame( const SwFrame *pCurrFrame
 
 inline const SwFlyInContentFrame *SwTextFlyCnt::GetFlyFrame( const SwFrame *pCurrFrame ) const
 {
-    return (const_cast<SwTextFlyCnt*>(this))->GetFlyFrame_( pCurrFrame );
+    return const_cast<SwTextFlyCnt*>(this)->GetFlyFrame_( pCurrFrame );
 }
 
 #endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index f88f70c0579a..4a52059a5141 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -561,7 +561,7 @@ public:
     const BitmapEx& GetReplacementBitmap(bool bIsErrorState);
     void DeleteReplacementBitmaps();
 
-    const SwPostItMgr* GetPostItMgr() const { return (const_cast<SwViewShell*>(this))->GetPostItMgr(); }
+    const SwPostItMgr* GetPostItMgr() const { return const_cast<SwViewShell*>(this)->GetPostItMgr(); }
     SwPostItMgr* GetPostItMgr();
 
     /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 3ca56245b1b0..3d0dd877409e 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1132,7 +1132,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
             {
                 uno::Reference < XAccessible > xAcc( (*aIter).second );
                 if( xAcc.is() )
-                    (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->SetState( AccessibleStateType::SELECTED );
+                    static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->SetState( AccessibleStateType::SELECTED );
 
                 ++aIter;
             }
@@ -1156,7 +1156,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
                 {
                     uno::Reference < XAccessible > xAcc( (*aIter).second );
                     if(xAcc.is())
-                        (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+                        static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED );
 
                     ++aIter;
                     continue;
@@ -1218,7 +1218,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
                                         {
                                             uno::Reference < XAccessible > xAcc( (*aIter).second );
                                             if(xAcc.is())
-                                                (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+                                                static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED );
                                         }
                                     }
                                 }
@@ -1235,7 +1235,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
                             {
                                 uno::Reference < XAccessible > xAcc( (*aIter).second );
                                 if(xAcc.is())
-                                    (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+                                    static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED );
                             }
                             --nNumShapes;
                             ++pShape;
@@ -1263,7 +1263,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
 
                 if(xAcc.is())
                 {
-                    SwAccessibleFrameBase *pAccFrame = (static_cast< SwAccessibleFrameBase * >(xAcc.get()));
+                    SwAccessibleFrameBase *pAccFrame = static_cast< SwAccessibleFrameBase * >(xAcc.get());
                     bool bFrameChanged = pAccFrame->SetSelectedState( true );
                     if (bFrameChanged)
                     {
@@ -1338,7 +1338,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list