[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basegfx/source basic/source bridges/source canvas/source chart2/source comphelper/source compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source embeddedobj/source filter/source framework/source include/formula include/svtools include/vcl include/xmloff lotuswordpro/inc oox/source package/source reportdesign/source sal/osl sc/inc sc/qa sc/source sdext/source sd/source sfx2/source slideshow/source soltools/mkdepend store/source svl/source svtools/source svx/source sw/inc sw/source toolkit/source ucb/source vbahelper/source vcl/source vcl/unx xmlhelp/source xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 06:50:00 UTC 2018


 accessibility/source/extended/AccessibleGridControlTable.cxx             |    4 
 accessibility/source/extended/accessiblelistboxentry.cxx                 |    2 
 basctl/source/dlged/dlged.cxx                                            |    4 
 basegfx/source/polygon/b2dpolygonclipper.cxx                             |   16 +-
 basic/source/comp/io.cxx                                                 |    2 
 basic/source/runtime/methods.cxx                                         |    6 -
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx                      |    4 
 canvas/source/cairo/cairo_canvasfont.cxx                                 |    2 
 canvas/source/opengl/ogl_canvashelper.cxx                                |    2 
 canvas/source/vcl/canvasfont.cxx                                         |    2 
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx      |    2 
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx        |    6 -
 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx |    2 
 chart2/source/controller/main/ChartDropTargetHelper.cxx                  |    2 
 chart2/source/controller/main/DragMethod_PieSegment.cxx                  |    2 
 chart2/source/controller/main/UndoCommandDispatch.cxx                    |    4 
 chart2/source/view/axes/ScaleAutomatism.cxx                              |    2 
 chart2/source/view/charttypes/Splines.cxx                                |    4 
 chart2/source/view/main/VLegend.cxx                                      |   24 ++--
 comphelper/source/misc/mimeconfighelper.cxx                              |    4 
 compilerplugins/clang/test/unnecessaryparen.cxx                          |   25 +++-
 compilerplugins/clang/unnecessaryparen.cxx                               |   40 +++++--
 connectivity/source/drivers/dbase/dindexnode.cxx                         |    2 
 connectivity/source/drivers/file/FResultSet.cxx                          |    2 
 connectivity/source/drivers/hsqldb/HStorageAccess.cxx                    |    2 
 cui/source/options/optcolor.cxx                                          |    2 
 dbaccess/source/core/api/RowSetBase.cxx                                  |    4 
 dbaccess/source/core/api/RowSetCache.cxx                                 |   10 -
 dbaccess/source/ui/querydesign/JoinTableView.cxx                         |    2 
 dbaccess/source/ui/tabledesign/TableUndo.cxx                             |    4 
 desktop/source/app/officeipcthread.cxx                                   |    2 
 desktop/source/deployment/misc/dp_misc.cxx                               |    2 
 desktop/source/deployment/registry/sfwk/dp_sfwk.cxx                      |    2 
 drawinglayer/source/attribute/sdrlightingattribute3d.cxx                 |    4 
 editeng/source/editeng/editundo.cxx                                      |    2 
 editeng/source/outliner/outliner.cxx                                     |    4 
 embeddedobj/source/general/intercept.cxx                                 |    4 
 filter/source/graphicfilter/icgm/bundles.cxx                             |    4 
 filter/source/graphicfilter/ipict/shape.cxx                              |    4 
 filter/source/msfilter/escherex.cxx                                      |    2 
 filter/source/msfilter/svdfppt.cxx                                       |    2 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx                  |    4 
 framework/source/services/autorecovery.cxx                               |    2 
 include/formula/tokenarray.hxx                                           |    2 
 include/svtools/ivctrl.hxx                                               |    2 
 include/vcl/seleng.hxx                                                   |    8 -
 include/xmloff/nmspmap.hxx                                               |    4 
 lotuswordpro/inc/lwptools.hxx                                            |    6 -
 oox/source/export/drawingml.cxx                                          |    2 
 package/source/xstor/xstorage.cxx                                        |    6 -
 reportdesign/source/ui/report/ViewsWindow.cxx                            |    2 
 sal/osl/unx/file.cxx                                                     |    4 
 sc/inc/rangeutl.hxx                                                      |    8 -
 sc/qa/unit/mark_test.cxx                                                 |   12 +-
 sc/source/core/data/table1.cxx                                           |    2 
 sc/source/core/data/table6.cxx                                           |    4 
 sc/source/core/tool/address.cxx                                          |    2 
 sc/source/core/tool/compiler.cxx                                         |    2 
 sc/source/core/tool/interpr3.cxx                                         |    2 
 sc/source/core/tool/interpr4.cxx                                         |    4 
 sc/source/core/tool/interpr8.cxx                                         |    4 
 sc/source/core/tool/rangelst.cxx                                         |    4 
 sc/source/core/tool/reffind.cxx                                          |    2 
 sc/source/filter/inc/ftools.hxx                                          |    2 
 sc/source/filter/xml/XMLStylesExportHelper.cxx                           |    2 
 sc/source/ui/Accessibility/AccessibleTableBase.cxx                       |    4 
 sc/source/ui/miscdlgs/delcodlg.cxx                                       |    4 
 sc/source/ui/miscdlgs/inscodlg.cxx                                       |    2 
 sc/source/ui/vba/vbaapplication.cxx                                      |    2 
 sc/source/ui/vba/vbarange.cxx                                            |    8 -
 sc/source/ui/vba/vbawindow.cxx                                           |    4 
 sc/source/ui/view/drawview.cxx                                           |    2 
 sc/source/ui/view/output2.cxx                                            |    2 
 sc/source/ui/view/tabvwsha.cxx                                           |    2 
 sc/source/ui/view/viewfun2.cxx                                           |    8 -
 sd/source/core/CustomAnimationEffect.cxx                                 |   30 ++---
 sd/source/core/CustomAnimationPreset.cxx                                 |    2 
 sd/source/core/EffectMigration.cxx                                       |   36 +++---
 sd/source/filter/eppt/epptso.cxx                                         |    4 
 sd/source/filter/html/buttonset.cxx                                      |    2 
 sd/source/filter/html/pubdlg.cxx                                         |    2 
 sd/source/ui/animations/CustomAnimationPane.cxx                          |   42 +++----
 sd/source/ui/slideshow/slideshowviewimpl.cxx                             |    4 
 sd/source/ui/slidesorter/view/SlsLayouter.cxx                            |    4 
 sd/source/ui/unoidl/SdUnoDrawView.cxx                                    |    2 
 sd/source/ui/view/DocumentRenderer.cxx                                   |    4 
 sd/source/ui/view/sdview3.cxx                                            |    4 
 sdext/source/minimizer/impoptimizer.cxx                                  |    4 
 sfx2/source/appl/childwin.cxx                                            |    4 
 sfx2/source/control/objface.cxx                                          |    2 
 sfx2/source/dialog/basedlgs.cxx                                          |    6 -
 sfx2/source/dialog/printopt.cxx                                          |    2 
 sfx2/source/doc/docfile.cxx                                              |    2 
 slideshow/source/engine/opengl/TransitionerImpl.cxx                      |    2 
 slideshow/source/engine/rehearsetimingsactivity.cxx                      |    2 
 slideshow/source/engine/shapes/shapeimporter.cxx                         |    4 
 slideshow/source/engine/transitions/checkerboardwipe.cxx                 |    2 
 slideshow/source/engine/transitions/figurewipe.cxx                       |    4 
 slideshow/source/engine/transitions/randomwipe.cxx                       |    4 
 slideshow/source/engine/transitions/snakewipe.cxx                        |   12 +-
 slideshow/source/engine/transitions/spiralwipe.cxx                       |    8 -
 slideshow/source/engine/transitions/waterfallwipe.cxx                    |    4 
 slideshow/source/engine/transitions/zigzagwipe.cxx                       |    4 
 soltools/mkdepend/include.c                                              |    2 
 store/source/stordata.cxx                                                |   18 +--
 store/source/stortree.cxx                                                |   10 -
 svl/source/crypto/cryptosign.cxx                                         |    8 -
 svl/source/misc/adrparse.cxx                                             |    4 
 svtools/source/config/printoptions.cxx                                   |    2 
 svtools/source/contnr/fileview.cxx                                       |    2 
 svtools/source/contnr/iconviewimpl.cxx                                   |   18 +--
 svtools/source/contnr/imivctl1.cxx                                       |    6 -
 svtools/source/contnr/imivctl2.cxx                                       |    2 
 svtools/source/control/calendar.cxx                                      |    2 
 svtools/source/control/ruler.cxx                                         |    2 
 svtools/source/control/toolbarmenu.cxx                                   |    2 
 svtools/source/dialogs/wizardmachine.cxx                                 |    2 
 svtools/source/svhtml/parhtml.cxx                                        |    2 
 svtools/source/uno/unoevent.cxx                                          |    2 
 svx/source/customshapes/EnhancedCustomShape2d.cxx                        |    4 
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx                  |    2 
 svx/source/dialog/srchdlg.cxx                                            |    8 -
 svx/source/engine3d/scene3d.cxx                                          |    2 
 svx/source/fmcomp/gridctrl.cxx                                           |    4 
 svx/source/table/tablelayouter.cxx                                       |    6 -
 svx/source/table/tablemodel.cxx                                          |    4 
 svx/source/tbxctrls/PaletteManager.cxx                                   |    2 
 svx/source/tbxctrls/tbcontrl.cxx                                         |    6 -
 sw/inc/swcrsr.hxx                                                        |    6 -
 sw/inc/swmodule.hxx                                                      |   38 +++---
 sw/inc/unocrsr.hxx                                                       |   12 +-
 sw/source/core/attr/swatrset.cxx                                         |    2 
 sw/source/core/bastyp/breakit.cxx                                        |    6 -
 sw/source/core/doc/docnew.cxx                                            |    2 
 sw/source/core/docnode/nodes.cxx                                         |    6 -
 sw/source/core/docnode/threadmanager.cxx                                 |    2 
 sw/source/core/layout/anchoredobject.cxx                                 |    2 
 sw/source/core/layout/pagechg.cxx                                        |    2 
 sw/source/core/layout/paintfrm.cxx                                       |    4 
 sw/source/core/text/guess.cxx                                            |    2 
 sw/source/core/text/inftxt.cxx                                           |    2 
 sw/source/core/text/txtfly.cxx                                           |    2 
 sw/source/core/text/wrong.cxx                                            |    2 
 sw/source/core/unocore/unofield.cxx                                      |    4 
 sw/source/core/unocore/unoportenum.cxx                                   |   10 -
 sw/source/filter/html/css1atr.cxx                                        |    2 
 sw/source/filter/html/htmlsect.cxx                                       |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx                             |    2 
 sw/source/ui/config/optcomp.cxx                                          |    2 
 sw/source/ui/vba/vbadocumentproperties.cxx                               |    2 
 sw/source/uibase/app/apphdl.cxx                                          |   56 +++++-----
 sw/source/uibase/app/appopt.cxx                                          |    4 
 sw/source/uibase/app/swmodul1.cxx                                        |   30 ++---
 sw/source/uibase/app/swmodule.cxx                                        |   27 +---
 sw/source/uibase/docvw/PostItMgr.cxx                                     |    4 
 sw/source/uibase/uiview/view.cxx                                         |    4 
 sw/source/uibase/utlui/shdwcrsr.cxx                                      |    2 
 sw/source/uibase/web/wview.cxx                                           |    4 
 sw/source/uibase/wrtsh/wrtsh1.cxx                                        |    2 
 toolkit/source/controls/tree/treedatamodel.cxx                           |    2 
 ucb/source/ucp/file/filglob.cxx                                          |    4 
 ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx                         |    2 
 ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx                           |    2 
 ucb/source/ucp/webdav-neon/NeonSession.cxx                               |    2 
 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx                         |    2 
 vbahelper/source/vbahelper/vbaapplicationbase.cxx                        |    2 
 vbahelper/source/vbahelper/vbahelper.cxx                                 |    2 
 vcl/source/bitmap/BitmapScaleSuperFilter.cxx                             |   10 -
 vcl/source/control/prgsbar.cxx                                           |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                                        |    4 
 vcl/source/gdi/pngread.cxx                                               |    4 
 vcl/source/outdev/textline.cxx                                           |    2 
 vcl/source/treelist/svimpbox.cxx                                         |   50 ++++----
 vcl/source/treelist/svlbitm.cxx                                          |    6 -
 vcl/source/treelist/svtabbx.cxx                                          |    2 
 vcl/source/treelist/treelistbox.cxx                                      |   18 +--
 vcl/source/treelist/treelistentry.cxx                                    |    2 
 vcl/source/window/builder.cxx                                            |    2 
 vcl/source/window/menu.cxx                                               |    2 
 vcl/source/window/seleng.cxx                                             |   32 ++---
 vcl/source/window/status.cxx                                             |    2 
 vcl/source/window/window.cxx                                             |    2 
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx                                |    4 
 xmlhelp/source/treeview/tvread.cxx                                       |    2 
 xmloff/source/meta/xmlmetai.cxx                                          |    2 
 185 files changed, 553 insertions(+), 535 deletions(-)

New commits:
commit c85f872b1cb8e733b556c03584080d06022f287d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 13:09:55 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:49:42 2018 +0100

    use unique_ptr in SwModule
    
    Change-Id: I6c17853cc84365cb86b3dd2525ab8f2ff7844369
    Reviewed-on: https://gerrit.libreoffice.org/64516
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index e82375966927..eec00ab2f3e5 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -75,21 +75,21 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public
     OUString            m_sActAuthor;
 
     // ConfigItems
-    SwModuleOptions*    m_pModuleConfig;
-    SwMasterUsrPref*    m_pUsrPref;
-    SwMasterUsrPref*    m_pWebUsrPref;
-    SwPrintOptions*     m_pPrintOptions;
-    SwPrintOptions*     m_pWebPrintOptions;
-    SwChapterNumRules*  m_pChapterNumRules;
-    SwStdFontConfig*    m_pStdFontConfig;
-    SwNavigationConfig* m_pNavigationConfig;
-    SwToolbarConfigItem*m_pToolbarConfig;     //For stacked toolbars. Which one was visible?
-    SwToolbarConfigItem*m_pWebToolbarConfig;
-    SwDBConfig*         m_pDBConfig;
-    svtools::ColorConfig*   m_pColorConfig;
-    SvtAccessibilityOptions* m_pAccessibilityOptions;
-    SvtCTLOptions*      m_pCTLOptions;
-    SvtUserOptions*     m_pUserOptions;
+    std::unique_ptr<SwModuleOptions>     m_pModuleConfig;
+    std::unique_ptr<SwMasterUsrPref>     m_pUsrPref;
+    std::unique_ptr<SwMasterUsrPref>     m_pWebUsrPref;
+    std::unique_ptr<SwPrintOptions>      m_pPrintOptions;
+    std::unique_ptr<SwPrintOptions>      m_pWebPrintOptions;
+    std::unique_ptr<SwChapterNumRules>   m_pChapterNumRules;
+    std::unique_ptr<SwStdFontConfig>     m_pStdFontConfig;
+    std::unique_ptr<SwNavigationConfig>  m_pNavigationConfig;
+    std::unique_ptr<SwToolbarConfigItem> m_pToolbarConfig;     //For stacked toolbars. Which one was visible?
+    std::unique_ptr<SwToolbarConfigItem> m_pWebToolbarConfig;
+    std::unique_ptr<SwDBConfig>          m_pDBConfig;
+    std::unique_ptr<svtools::ColorConfig>   m_pColorConfig;
+    std::unique_ptr<SvtAccessibilityOptions> m_pAccessibilityOptions;
+    std::unique_ptr<SvtCTLOptions>       m_pCTLOptions;
+    std::unique_ptr<SvtUserOptions>      m_pUserOptions;
 
     std::unique_ptr<SfxErrorHandler> m_pErrorHandler;
 
@@ -165,13 +165,13 @@ public:
     void ApplyUserCharUnit(bool bApplyChar, bool bWeb);  // apply_char_unit
 
     // Create ConfigItems.
-    SwModuleOptions*    GetModuleConfig()       { return m_pModuleConfig;}
+    SwModuleOptions*    GetModuleConfig()       { return m_pModuleConfig.get();}
     SwPrintOptions*     GetPrtOptions(bool bWeb);
     SwChapterNumRules*  GetChapterNumRules();
-    SwStdFontConfig*    GetStdFontConfig()      { return m_pStdFontConfig; }
+    SwStdFontConfig*    GetStdFontConfig()      { return m_pStdFontConfig.get(); }
     SwNavigationConfig* GetNavigationConfig();
-    SwToolbarConfigItem*GetToolbarConfig()      { return m_pToolbarConfig;    }
-    SwToolbarConfigItem*GetWebToolbarConfig()   { return m_pWebToolbarConfig; }
+    SwToolbarConfigItem*GetToolbarConfig()      { return m_pToolbarConfig.get();    }
+    SwToolbarConfigItem*GetWebToolbarConfig()   { return m_pWebToolbarConfig.get(); }
     SwDBConfig*         GetDBConfig();
     svtools::ColorConfig&   GetColorConfig();
     SvtAccessibilityOptions&    GetAccessibilityOptions();
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index a0aead88a3ea..b041a53964de 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -868,36 +868,36 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
     {
         if (rHint.GetId() == SfxHintId::Deinitializing)
         {
-            DELETEZ(m_pWebUsrPref);
-            DELETEZ(m_pUsrPref);
-            DELETEZ(m_pModuleConfig);
-            DELETEZ(m_pPrintOptions);
-            DELETEZ(m_pWebPrintOptions);
-            DELETEZ(m_pChapterNumRules);
-            DELETEZ(m_pStdFontConfig);
-            DELETEZ(m_pNavigationConfig);
-            DELETEZ(m_pToolbarConfig);
-            DELETEZ(m_pWebToolbarConfig);
-            DELETEZ(m_pDBConfig);
+            m_pWebUsrPref.reset();
+            m_pUsrPref.reset();
+            m_pModuleConfig.reset();
+            m_pPrintOptions.reset();
+            m_pWebPrintOptions.reset();
+            m_pChapterNumRules.reset();
+            m_pStdFontConfig.reset();
+            m_pNavigationConfig.reset();
+            m_pToolbarConfig.reset();
+            m_pWebToolbarConfig.reset();
+            m_pDBConfig.reset();
             if( m_pColorConfig )
             {
                 m_pColorConfig->RemoveListener(this);
-                DELETEZ(m_pColorConfig);
+                m_pColorConfig.reset();
             }
             if( m_pAccessibilityOptions )
             {
                 m_pAccessibilityOptions->RemoveListener(this);
-                DELETEZ(m_pAccessibilityOptions);
+                m_pAccessibilityOptions.reset();
             }
             if( m_pCTLOptions )
             {
                 m_pCTLOptions->RemoveListener(this);
-                DELETEZ(m_pCTLOptions);
+                m_pCTLOptions.reset();
             }
             if( m_pUserOptions )
             {
                 m_pUserOptions->RemoveListener(this);
-                DELETEZ(m_pUserOptions);
+                m_pUserOptions.reset();
             }
         }
     }
@@ -905,14 +905,14 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
 
 void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, ConfigurationHints )
 {
-    if( pBrdCst == m_pUserOptions )
+    if( pBrdCst == m_pUserOptions.get() )
     {
         m_bAuthorInitialised = false;
     }
-    else if ( pBrdCst == m_pColorConfig || pBrdCst == m_pAccessibilityOptions )
+    else if ( pBrdCst == m_pColorConfig.get() || pBrdCst == m_pAccessibilityOptions.get() )
     {
         bool bAccessibility = false;
-        if( pBrdCst == m_pColorConfig )
+        if( pBrdCst == m_pColorConfig.get() )
             SwViewOption::ApplyColorConfigValues(*m_pColorConfig);
         else
             bAccessibility = true;
@@ -940,7 +940,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
             pViewShell = SfxViewShell::GetNext( *pViewShell );
         }
     }
-    else if( pBrdCst == m_pCTLOptions )
+    else if( pBrdCst == m_pCTLOptions.get() )
     {
         const SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
         while( pObjSh )
@@ -961,15 +961,15 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
 SwDBConfig* SwModule::GetDBConfig()
 {
     if(!m_pDBConfig)
-        m_pDBConfig = new SwDBConfig;
-    return m_pDBConfig;
+        m_pDBConfig.reset(new SwDBConfig);
+    return m_pDBConfig.get();
 }
 
 svtools::ColorConfig& SwModule::GetColorConfig()
 {
     if(!m_pColorConfig)
     {
-        m_pColorConfig = new svtools::ColorConfig;
+        m_pColorConfig.reset(new svtools::ColorConfig);
         SwViewOption::ApplyColorConfigValues(*m_pColorConfig);
         m_pColorConfig->AddListener(this);
     }
@@ -980,7 +980,7 @@ SvtAccessibilityOptions& SwModule::GetAccessibilityOptions()
 {
     if(!m_pAccessibilityOptions)
     {
-        m_pAccessibilityOptions = new SvtAccessibilityOptions;
+        m_pAccessibilityOptions.reset(new SvtAccessibilityOptions);
         m_pAccessibilityOptions->AddListener(this);
     }
     return *m_pAccessibilityOptions;
@@ -990,7 +990,7 @@ SvtCTLOptions& SwModule::GetCTLOptions()
 {
     if(!m_pCTLOptions)
     {
-        m_pCTLOptions = new SvtCTLOptions;
+        m_pCTLOptions.reset(new SvtCTLOptions);
         m_pCTLOptions->AddListener(this);
     }
     return *m_pCTLOptions;
@@ -1000,7 +1000,7 @@ SvtUserOptions& SwModule::GetUserOptions()
 {
     if(!m_pUserOptions)
     {
-        m_pUserOptions = new SvtUserOptions;
+        m_pUserOptions.reset(new SvtUserOptions);
         m_pUserOptions->AddListener(this);
     }
     return *m_pUserOptions;
@@ -1013,13 +1013,13 @@ const SwMasterUsrPref *SwModule::GetUsrPref(bool bWeb) const
     {
         // The SpellChecker is needed in SwMasterUsrPref's Load, but it must not
         // be created there #58256#
-        pNonConstModule->m_pWebUsrPref = new SwMasterUsrPref(true);
+        pNonConstModule->m_pWebUsrPref.reset(new SwMasterUsrPref(true));
     }
     else if(!bWeb && !m_pUsrPref)
     {
-        pNonConstModule->m_pUsrPref = new SwMasterUsrPref(false);
+        pNonConstModule->m_pUsrPref.reset(new SwMasterUsrPref(false));
     }
-    return  bWeb ? m_pWebUsrPref : m_pUsrPref;
+    return  bWeb ? m_pWebUsrPref.get() : m_pUsrPref.get();
 }
 
 void NewXForms( SfxRequest& rReq )
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 595e2e992d83..626d797bc7c1 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -79,7 +79,7 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
 
     // the options for the Web- and Textdialog are put together here
         SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
-        SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref : m_pWebUsrPref;
+        SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref.get() : m_pWebUsrPref.get();
         // no MakeUsrPref, because only options from textdoks can be used here
         SwView* pAppView = GetView();
         if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
@@ -251,7 +251,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
     }
 
     SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
-    SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref : m_pWebUsrPref;
+    SwMasterUsrPref* pPref = bTextDialog ? m_pUsrPref.get() : m_pWebUsrPref.get();
 
     const SfxPoolItem* pItem;
     SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame()->GetBindings()
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index eaddc4c7d9ae..a76477be082f 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -214,13 +214,13 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, bool bWeb )
         {
             if(!m_pWebUsrPref)
                 GetUsrPref(true);
-            pPref = m_pWebUsrPref;
+            pPref = m_pWebUsrPref.get();
         }
         else
         {
             if(!m_pUsrPref)
                 GetUsrPref(false);
-            pPref = m_pUsrPref;
+            pPref = m_pUsrPref.get();
         }
         FieldUnit eOldMetric = pPref->GetMetric();
         if(eOldMetric != eMetric)
@@ -250,13 +250,13 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, bool bHorizontal, bool bWeb
     {
         if(!m_pWebUsrPref)
             GetUsrPref(true);
-        pPref = m_pWebUsrPref;
+        pPref = m_pWebUsrPref.get();
     }
     else
     {
         if(!m_pUsrPref)
             GetUsrPref(false);
-        pPref = m_pUsrPref;
+        pPref = m_pUsrPref.get();
     }
     if( bHorizontal )
         pPref->SetHScrollMetric(eMetric);
@@ -286,13 +286,13 @@ void SwModule::ApplyUserCharUnit(bool bApplyChar, bool bWeb)
     {
         if(!m_pWebUsrPref)
             GetUsrPref(true);
-        pPref = m_pWebUsrPref;
+        pPref = m_pWebUsrPref.get();
     }
     else
     {
         if(!m_pUsrPref)
             GetUsrPref(false);
-        pPref = m_pUsrPref;
+        pPref = m_pUsrPref.get();
     }
     bool bOldApplyCharUnit = pPref->IsApplyCharUnit();
     bool bHasChanged = false;
@@ -342,30 +342,30 @@ SwNavigationConfig*  SwModule::GetNavigationConfig()
 {
     if(!m_pNavigationConfig)
     {
-        m_pNavigationConfig = new SwNavigationConfig;
+        m_pNavigationConfig.reset( new SwNavigationConfig );
     }
-    return m_pNavigationConfig;
+    return m_pNavigationConfig.get();
 }
 
 SwPrintOptions*     SwModule::GetPrtOptions(bool bWeb)
 {
     if(bWeb && !m_pWebPrintOptions)
     {
-        m_pWebPrintOptions = new SwPrintOptions(true);
+        m_pWebPrintOptions.reset(new SwPrintOptions(true));
     }
     else if(!bWeb && !m_pPrintOptions)
     {
-        m_pPrintOptions = new SwPrintOptions(false);
+        m_pPrintOptions.reset(new SwPrintOptions(false));
     }
 
-    return bWeb ? m_pWebPrintOptions : m_pPrintOptions;
+    return bWeb ? m_pWebPrintOptions.get() : m_pPrintOptions.get();
 }
 
 SwChapterNumRules*  SwModule::GetChapterNumRules()
 {
     if(!m_pChapterNumRules)
-        m_pChapterNumRules = new SwChapterNumRules;
-    return m_pChapterNumRules;
+        m_pChapterNumRules.reset(new SwChapterNumRules);
+    return m_pChapterNumRules.get();
 }
 
 void SwModule::ShowDBObj(SwView const & rView, const SwDBData& rData)
@@ -595,13 +595,13 @@ FieldUnit SwModule::GetMetric( bool bWeb ) const
     {
         if(!m_pWebUsrPref)
             GetUsrPref(true);
-        pPref = m_pWebUsrPref;
+        pPref = m_pWebUsrPref.get();
     }
     else
     {
         if(!m_pUsrPref)
             GetUsrPref(false);
-        pPref = m_pUsrPref;
+        pPref = m_pUsrPref.get();
     }
     return pPref->GetMetric();
 }
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 8aa9841c4c06..963d35cadd3f 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -25,6 +25,8 @@
 #include <vcl/graph.hxx>
 #include <svtools/ehdl.hxx>
 #include <unotools/resmgr.hxx>
+#include <unotools/useroptions.hxx>
+#include <svl/ctloptions.hxx>
 #include <svx/ParaLineSpacingPopup.hxx>
 #include <svx/TextCharacterSpacingPopup.hxx>
 #include <svx/TextUnderlinePopup.hxx>
@@ -140,6 +142,8 @@ bool     g_bNoInterrupt     = false;
 #include <unomid.h>
 
 #include "swdllimpl.hxx"
+#include <dbconfig.hxx>
+#include <navicfg.hxx>
 
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -148,21 +152,6 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
                     SfxObjectFactory* pFact,
                     SfxObjectFactory* pGlobalFact )
     : SfxModule("sw", {pWebFact, pFact, pGlobalFact}),
-    m_pModuleConfig(nullptr),
-    m_pUsrPref(nullptr),
-    m_pWebUsrPref(nullptr),
-    m_pPrintOptions(nullptr),
-    m_pWebPrintOptions(nullptr),
-    m_pChapterNumRules(nullptr),
-    m_pStdFontConfig(nullptr),
-    m_pNavigationConfig(nullptr),
-    m_pToolbarConfig(nullptr),
-    m_pWebToolbarConfig(nullptr),
-    m_pDBConfig(nullptr),
-    m_pColorConfig(nullptr),
-    m_pAccessibilityOptions(nullptr),
-    m_pCTLOptions(nullptr),
-    m_pUserOptions(nullptr),
     m_pAttrPool(nullptr),
     m_pView(nullptr),
     m_bAuthorInitialised(false),
@@ -177,13 +166,13 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
                                      ErrCodeArea::Sw,
                                      GetResLocale() ) );
 
-    m_pModuleConfig = new SwModuleOptions;
+    m_pModuleConfig.reset(new SwModuleOptions);
 
     // We need them anyways
-    m_pToolbarConfig = new SwToolbarConfigItem( false );
-    m_pWebToolbarConfig = new SwToolbarConfigItem( true );
+    m_pToolbarConfig.reset(new SwToolbarConfigItem( false ));
+    m_pWebToolbarConfig.reset(new SwToolbarConfigItem( true ));
 
-    m_pStdFontConfig = new SwStdFontConfig;
+    m_pStdFontConfig.reset(new SwStdFontConfig);
 
     StartListening( *SfxGetpApp() );
 
commit e4472d3c139294499f4c0caeebd9d4e995958eb0
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 11:20:03 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:49:30 2018 +0100

    loplugin:unnecessaryparen include more assignments
    
    Change-Id: I9fb8366634b31230b732dd38a98f800075529714
    Reviewed-on: https://gerrit.libreoffice.org/64510
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 6e5e9d6def79..413a1c15d163 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -222,7 +222,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     sal_Int32 nColumns = m_aTable.GetColumnCount();
-    sal_Int32 nRow = (nChildIndex / nColumns);
+    sal_Int32 nRow = nChildIndex / nColumns;
     m_aTable.SelectRow( nRow, true );
 }
 sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex )
@@ -232,7 +232,7 @@ sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     sal_Int32 nColumns = m_aTable.GetColumnCount();
-    sal_Int32 nRow = (nChildIndex / nColumns);
+    sal_Int32 nRow = nChildIndex / nColumns;
     return isAccessibleRowSelected(nRow);
 }
 void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection()
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 3056b729e1c8..1a92d967e246 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -1095,7 +1095,7 @@ namespace accessibility
     {
         ::osl::MutexGuard aGuard( m_aMutex );
         Any aValue;
-        sal_Int32 level = (static_cast<sal_Int32>(m_aEntryPath.size()) - 1);
+        sal_Int32 level = static_cast<sal_Int32>(m_aEntryPath.size()) - 1;
         level = level < 0 ?  0: level;
         aValue <<= level;
         return aValue;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 23f41d06e6e9..f57e62318f75 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1172,8 +1172,8 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle )    // not wor
     double nPaperSzHeight = aPaperSz.Height();
     double nBmpSzWidth = aBmpSz.Width();
     double nBmpSzHeight = aBmpSz.Height();
-    double nScaleX = (nPaperSzWidth / nBmpSzWidth );
-    double nScaleY = (nPaperSzHeight / nBmpSzHeight );
+    double nScaleX = nPaperSzWidth / nBmpSzWidth;
+    double nScaleY = nPaperSzHeight / nBmpSzHeight;
 
     Size aOutputSz;
     if( nBmpSzHeight * nScaleX <= nPaperSzHeight )
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index b263c88e7c44..f512916052a0 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -583,11 +583,11 @@ namespace basegfx
                     // to bring 't' into the [0<=x<=1] interval.
                     ::basegfx::B2DPoint dir((*next)-(*curr));
 
-                    double denominator = ( pPlane->nx*dir.getX() +
-                                        pPlane->ny*dir.getY() );
-                    double numerator = ( pPlane->nx*curr->getX() +
+                    double denominator = pPlane->nx*dir.getX() +
+                                         pPlane->ny*dir.getY();
+                    double numerator =  pPlane->nx*curr->getX() +
                                         pPlane->ny*curr->getY() +
-                                        pPlane->d );
+                                        pPlane->d;
                     double t = -numerator/denominator;
 
                     // calculate the actual point of intersection
@@ -602,11 +602,11 @@ namespace basegfx
                     // to bring 't' into the [0<=x<=1] interval.
                     ::basegfx::B2DPoint dir((*next)-(*curr));
 
-                    double denominator = ( pPlane->nx*dir.getX() +
-                                        pPlane->ny*dir.getY() );
-                    double numerator = ( pPlane->nx*curr->getX() +
+                    double denominator = pPlane->nx*dir.getX() +
+                                         pPlane->ny*dir.getY();
+                    double numerator =  pPlane->nx*curr->getX() +
                                         pPlane->ny*curr->getY() +
-                                        pPlane->d );
+                                        pPlane->d;
                     double t = -numerator/denominator;
 
                     // calculate the actual point of intersection
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index 988e56031a3e..d1abbee9c330 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -200,7 +200,7 @@ void SbiParser::Open()
             if( Peek() == WRITE )
             {
                 Next();
-                nMode |= (StreamMode::READ | StreamMode::WRITE);
+                nMode |= StreamMode::READ | StreamMode::WRITE;
             }
             else
                 nMode |= StreamMode::READ;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 9490ca242f90..c137909935b0 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3626,7 +3626,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
             pParamList.reset( new rtl_uString*[nParamCount]);
             for(int iVector = 0; iter != aTokenVector.end(); ++iVector, ++iter)
             {
-                const OUString& rParamStr = (*iter);
+                const OUString& rParamStr = *iter;
                 pParamList[iVector] = nullptr;
                 rtl_uString_assign(&(pParamList[iVector]), rParamStr.pData);
             }
@@ -4636,7 +4636,7 @@ void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool)
     if( nLen > nLen1 )
     {
         // appending the leading spaces for the lowervalue
-        for ( sal_Int32 i= (nLen - nLen1) ; i > 0; --i )
+        for ( sal_Int32 i= nLen - nLen1; i > 0; --i )
         {
             aRetStr.append(" ");
         }
@@ -4645,7 +4645,7 @@ void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool)
     if( nLen > nLen2 )
     {
         // appending the leading spaces for the uppervalue
-        for ( sal_Int32 i= (nLen - nLen2) ; i > 0; --i )
+        for ( sal_Int32 i= nLen - nLen2; i > 0; --i )
         {
             aRetStr.append(" ");
         }
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index ad2b9f702c5d..e9e861f1c210 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -56,7 +56,7 @@ static OUString toUNOname( char const * p )
     while (*p != 'E')
     {
         // read chars count
-        int n = (*p++ - '0');
+        int n = *p++ - '0';
         while ('0' <= *p && '9' >= *p)
         {
             n *= 10;
@@ -81,7 +81,7 @@ static OUString toUNOname( char const * p )
 extern "C" {
 static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
 {
-    __cxxabiv1::__cxa_exception const * header = (static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1);
+    __cxxabiv1::__cxa_exception const * header = static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1;
     typelib_TypeDescription * pTD = nullptr;
     OUString unoName( toUNOname( header->exceptionType->name() ) );
     ::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 896f06f3dbaf..dac423fd6901 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -71,7 +71,7 @@ namespace cairocanvas
                 const Size aSize = pOutDev->GetFontMetric( *maFont ).GetFontSize();
 
                 const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
-                double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
+                double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
 
                 if( !::basegfx::fTools::equalZero( fDividend) )
                     fStretch /= fDividend;
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index 2902c2e9b8db..41ecfebc31e4 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -709,7 +709,7 @@ namespace oglcanvas
                 {
                     const Size aSize = pVDev->GetFontMetric( aFont ).GetFontSize();
                     const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
-                    double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
+                    double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
 
                     if( !::basegfx::fTools::equalZero( fDividend) )
                         fStretch /= fDividend;
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index d3ca032d6563..b21ffd4cdaaa 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -71,7 +71,7 @@ namespace vclcanvas
             const Size aSize = rOutDev.GetFontMetric( *maFont ).GetFontSize();
 
             const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
-            double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
+            double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
 
             if( !::basegfx::fTools::equalZero( fDividend) )
                 fStretch /= fDividend;
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 8b5d0800b25f..0562ef61f3e3 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -335,7 +335,7 @@ Any WrappedSegmentOffsetProperty::convertOuterToInnerValue( const Any& rOuterVal
     Any aResult( rOuterValue );
 
     if( rOuterValue >>= nOffset )
-        aResult <<= (static_cast< double >( nOffset ) / 100.0);
+        aResult <<= static_cast< double >( nOffset ) / 100.0;
 
     return aResult;
 }
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index 7604af7234d6..c55c03d7b976 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -420,7 +420,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
                         (rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount) &&
                         nIntervalCount > 0 )
                     {
-                        aRet <<= ( fStepMain / static_cast< double >( nIntervalCount ) );
+                        aRet <<= fStepMain / static_cast< double >( nIntervalCount );
                         bNeedToCalculateExplicitValues = false;
                     }
                 }
@@ -448,9 +448,9 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
                         }
                     }
                     else
-                        aRet <<= ( aExplicitIncrement.Distance /
+                        aRet <<= aExplicitIncrement.Distance /
                                 static_cast< double >(
-                                    aExplicitIncrement.SubIncrements[ 0 ].IntervalCount ));
+                                    aExplicitIncrement.SubIncrements[ 0 ].IntervalCount );
                 }
                 else
                 {
diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
index b6da99147888..365c6af63b28 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
@@ -59,7 +59,7 @@ Any WrappedTextRotationProperty::convertOuterToInnerValue( const Any& rOuterValu
     sal_Int32 nVal = 0;
     if( rOuterValue >>= nVal )
     {
-        double fDoubleDegrees = ( static_cast< double >( nVal ) / 100.0 );
+        double fDoubleDegrees = static_cast< double >( nVal ) / 100.0;
         aRet <<= fDoubleDegrees;
     }
     return aRet;
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx
index 5205d9620753..d0eeddf9ce01 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.cxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx
@@ -148,7 +148,7 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt )
                                     {
                                         // @todo: using implicit knowledge that ranges can be
                                         // merged with ";". This should be done more general
-                                        pCellRange->Value <<= (aOldRange + ";" + aRangeString );
+                                        pCellRange->Value <<= aOldRange + ";" + aRangeString;
                                     }
                                     // move means replace range
                                     else
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index c150e7b297c9..c352f99f4df7 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -87,7 +87,7 @@ void DragMethod_PieSegment::MoveSdrDrag(const Point& rPnt)
     if( DragStat().CheckMinMoved(rPnt) )
     {
         //calculate new offset
-        B2DVector aShiftVector(( B2DVector( rPnt.X(), rPnt.Y() ) - m_aStartVector ));
+        B2DVector aShiftVector( B2DVector( rPnt.X(), rPnt.Y() ) - m_aStartVector );
         m_fAdditionalOffset = m_aDragDirection.scalar( aShiftVector )/m_fDragRange; // projection
 
         if( m_fAdditionalOffset < -m_fInitialOffset )
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index b7481665a1a6..401cd70895f0 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -66,9 +66,9 @@ void UndoCommandDispatch::fireStatusEvent(
         const bool bFireAll = rURL.isEmpty();
         uno::Any aUndoState, aRedoState;
         if( m_xUndoManager->isUndoPossible())
-            aUndoState <<= ( SvtResId( STR_UNDO ) + m_xUndoManager->getCurrentUndoActionTitle());
+            aUndoState <<= SvtResId( STR_UNDO ) + m_xUndoManager->getCurrentUndoActionTitle();
         if( m_xUndoManager->isRedoPossible())
-            aRedoState <<= ( SvtResId( STR_REDO ) + m_xUndoManager->getCurrentRedoActionTitle());
+            aRedoState <<= SvtResId( STR_REDO ) + m_xUndoManager->getCurrentRedoActionTitle();
 
         if( bFireAll || rURL == ".uno:Undo" )
             fireStatusEventForURL( ".uno:Undo", aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener );
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 6c014dd0848a..a53e625c2a7c 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -612,7 +612,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
         nMaxMainIncrementCount--;
 
     //choose major time interval:
-    long nDayCount = (aMaxDate-aMinDate);
+    long nDayCount = aMaxDate - aMinDate;
     long nMainIncrementCount = 1;
     if( !bAutoMajor )
     {
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index c03df7c7d719..3527d1bec01f 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -158,7 +158,7 @@ void lcl_SplineCalculation::Calculate()
     else
     {
         m_aSecDerivY[ 0 ] = -0.5;
-        double xDiff = ( m_aPoints[ 1 ].first - m_aPoints[ 0 ].first );
+        double xDiff = m_aPoints[ 1 ].first - m_aPoints[ 0 ].first;
         u[ 0 ] = ( 3.0 / xDiff ) *
             ((( m_aPoints[ 1 ].second - m_aPoints[ 0 ].second ) / xDiff ) - m_fYp1 );
     }
@@ -193,7 +193,7 @@ void lcl_SplineCalculation::Calculate()
     if( ! ::rtl::math::isInf( m_fYpN ) )
     {
         qn = 0.5;
-        double xDiff = ( m_aPoints[ n ].first - m_aPoints[ n - 1 ].first );
+        double xDiff = m_aPoints[ n ].first - m_aPoints[ n - 1 ].first;
         un = ( 3.0 / xDiff ) *
             ( m_fYpN - ( m_aPoints[ n ].second - m_aPoints[ n - 1 ].second ) / xDiff );
     }
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index a7a313b0ad49..52a4f78fd8c9 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -202,7 +202,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal
     {
         for (sal_Int32 nColumn = 0; nColumn < nNumberOfColumns; ++nColumn )
         {
-            sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns);
+            sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns;
             if( nEntry < nNumberOfEntries )
             {
                 awt::Size aTextSize( rTextShapes[ nEntry ]->getSize() );
@@ -228,7 +228,7 @@ void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int3
         sal_Int32 nCurrentRowHeight = 0;
         for (sal_Int32 nColumn = 0; nColumn < nNumberOfColumns; ++nColumn)
         {
-            sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns);
+            sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns;
             if( nEntry < nNumberOfEntries )
             {
                 awt::Size aTextSize( rTextShapes[ nEntry ]->getSize() );
@@ -397,7 +397,7 @@ awt::Size lcl_placeLegendEntries(
             {
                 for (sal_Int32 nColumn = nNumberOfColumns; nColumn--; )
                 {
-                    sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns);
+                    sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns;
                     if( nEntry < static_cast<sal_Int32>(aTextShapes.size()) )
                     {
                         DrawModelWrapper::removeShape( aTextShapes[nEntry] );
@@ -526,7 +526,7 @@ awt::Size lcl_placeLegendEntries(
         sal_Int32 nCurrentYPos = nYPadding + nYStartPosition;
         for (sal_Int32 nRow = 0; nRow < nNumberOfRows; ++nRow)
         {
-            sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns);
+            sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns;
             if( nEntry >= nNumberOfEntries )
                 break;
 
@@ -625,8 +625,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt:
         case LegendPosition_LINE_START:
             {
                 // #i109336# Improve auto positioning in chart
-                const double fDefaultDistance = ( static_cast< double >( lcl_getLegendLeftRightMargin() ) /
-                    static_cast< double >( rPageSize.Width ) );
+                const double fDefaultDistance = static_cast< double >( lcl_getLegendLeftRightMargin() ) /
+                    static_cast< double >( rPageSize.Width );
                 aResult = chart2::RelativePosition(
                     fDefaultDistance, 0.5, drawing::Alignment_LEFT );
             }
@@ -634,8 +634,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt:
         case LegendPosition_LINE_END:
             {
                 // #i109336# Improve auto positioning in chart
-                const double fDefaultDistance = ( static_cast< double >( lcl_getLegendLeftRightMargin() ) /
-                    static_cast< double >( rPageSize.Width ) );
+                const double fDefaultDistance = static_cast< double >( lcl_getLegendLeftRightMargin() ) /
+                    static_cast< double >( rPageSize.Width );
                 aResult = chart2::RelativePosition(
                     1.0 - fDefaultDistance, 0.5, drawing::Alignment_RIGHT );
             }
@@ -643,8 +643,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt:
         case LegendPosition_PAGE_START:
             {
                 // #i109336# Improve auto positioning in chart
-                const double fDefaultDistance = ( static_cast< double >( lcl_getLegendTopBottomMargin() ) /
-                    static_cast< double >( rPageSize.Height ) );
+                const double fDefaultDistance = static_cast< double >( lcl_getLegendTopBottomMargin() ) /
+                    static_cast< double >( rPageSize.Height );
                 double fDistance = (static_cast<double>(rOutAvailableSpace.Y)/static_cast<double>(rPageSize.Height)) + fDefaultDistance;
                 aResult = chart2::RelativePosition(
                     0.5, fDistance, drawing::Alignment_TOP );
@@ -653,8 +653,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt:
         case LegendPosition_PAGE_END:
             {
                 // #i109336# Improve auto positioning in chart
-                const double fDefaultDistance = ( static_cast< double >( lcl_getLegendTopBottomMargin() ) /
-                    static_cast< double >( rPageSize.Height ) );
+                const double fDefaultDistance = static_cast< double >( lcl_getLegendTopBottomMargin() ) /
+                    static_cast< double >( rPageSize.Height );
 
                 double fDistance = double(rPageSize.Height - (rOutAvailableSpace.Y + rOutAvailableSpace.Height));
                 fDistance += fDefaultDistance;
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index fc55f2c73ed2..5d7249c5f04b 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -728,12 +728,12 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin
                         SfxFilterFlags nFlags = static_cast<SfxFilterFlags>(aPropsHM.getUnpackedValueOrDefault( "Flags", sal_Int32(0) ));
 
                         // that should be import, export, own filter and not a template filter ( TemplatePath flag )
-                        SfxFilterFlags const nRequired = (SfxFilterFlags::OWN
+                        SfxFilterFlags const nRequired = SfxFilterFlags::OWN
                             // fdo#78159 for OOoXML, there is code to convert
                             // to ODF in OCommonEmbeddedObject::store*
                             // so accept it even though there's no export
                             | (SOFFICE_FILEFORMAT_60 == nVersion ? SfxFilterFlags::NONE : SfxFilterFlags::EXPORT)
-                            | SfxFilterFlags::IMPORT );
+                            | SfxFilterFlags::IMPORT;
                         if ( ( ( nFlags & nRequired ) == nRequired ) && !( nFlags & SfxFilterFlags::TEMPLATEPATH ) )
                         {
                             // if there are more than one filter the preferred one should be used
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 8621fe9e8746..e89da95df384 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -9,6 +9,7 @@
 
 #include <string>
 #include <rtl/ustring.hxx>
+#include <o3tl/typed_flags_set.hxx>
 
 #define MACRO (1)
 
@@ -18,6 +19,20 @@ enum class EFoo { Bar };
 
 struct S { operator bool(); };
 
+enum class BrowseMode
+{
+    Modules = 0x01,
+    Top = 0x02,
+    Bottom = 0x04,
+    Left = 0x04,
+};
+namespace o3tl
+{
+template <> struct typed_flags<BrowseMode> : is_typed_flags<BrowseMode, 0xf>
+{
+};
+}
+
 int main()
 {
     int x = 1;
@@ -94,15 +109,9 @@ int main()
 
     char *p = nullptr;
     delete (p); // expected-error {{parentheses immediately inside delete expr [loplugin:unnecessaryparen]}}
-};
 
-struct S2 {
-    S2& GetText();
-    void toChar();
-};
-void func2(S2 *p)
-{
-    (p->GetText()).toChar(); // expected-error {{unnecessary parentheses around member expr [loplugin:unnecessaryparen]}}
+    BrowseMode nBits = ( BrowseMode::Modules | BrowseMode::Top ); // expected-error {{parentheses immediately inside vardecl statement [loplugin:unnecessaryparen]}}
+    (void)nBits;
 };
 
 /* 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 b2ad2951ec90..a39bcc813a63 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -386,7 +386,6 @@ bool UnnecessaryParen::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* callE
         Opc != OO_AmpEqual && Opc != OO_CaretEqual &&
         Opc != OO_PipeEqual)
         return true;
-
     auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(callExpr->getArg(1)));
     if (!parenExpr)
         return true;
@@ -395,9 +394,18 @@ bool UnnecessaryParen::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* callE
     // Sometimes parentheses make the RHS of an assignment easier to read by
     // visually disambiguating the = from a call to ==
     auto sub = parenExpr->getSubExpr();
-    if (isa<BinaryOperator>(sub)
-        || isa<CXXOperatorCallExpr>(sub)
-        || isa<ConditionalOperator>(sub))
+    if (auto subBinOp = dyn_cast<BinaryOperator>(sub))
+    {
+        if (!(subBinOp->isMultiplicativeOp() || subBinOp->isAdditiveOp() || subBinOp->isPtrMemOp()))
+            return true;
+    }
+    if (auto subOperatorCall = dyn_cast<CXXOperatorCallExpr>(sub))
+    {
+        auto op = subOperatorCall->getOperator();
+        if (!((op >= OO_Plus && op <= OO_Exclaim) || (op >= OO_ArrowStar && op <= OO_Subscript)))
+            return true;
+    }
+    if (isa<ConditionalOperator>(sub))
         return true;
 
     report(
@@ -420,12 +428,26 @@ bool UnnecessaryParen::VisitVarDecl(const VarDecl* varDecl)
         return true;
     if (compat::getBeginLoc(parenExpr).isMacroID())
         return true;
+
+    // Sometimes parentheses make the RHS of an assignment easier to read by
+    // visually disambiguating the = from a call to ==
     auto sub = parenExpr->getSubExpr();
-    if (isa<BinaryOperator>(sub)
-        || isa<CXXOperatorCallExpr>(sub)
-        || isa<ConditionalOperator>(sub)
-            // these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
-        || isa<CXXBindTemporaryExpr>(sub)
+    if (auto subBinOp = dyn_cast<BinaryOperator>(sub))
+    {
+        if (!(subBinOp->isMultiplicativeOp() || subBinOp->isAdditiveOp() || subBinOp->isPtrMemOp()))
+            return true;
+    }
+    if (auto subOperatorCall = dyn_cast<CXXOperatorCallExpr>(sub))
+    {
+        auto op = subOperatorCall->getOperator();
+        if (!((op >= OO_Plus && op <= OO_Exclaim) || (op >= OO_ArrowStar && op <= OO_Subscript)))
+            return true;
+    }
+    if (isa<ConditionalOperator>(sub))
+        return true;
+
+    // these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
+    if (isa<CXXBindTemporaryExpr>(sub)
         || isa<CXXFunctionalCastExpr>(sub))
         return true;
 
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 73e262c98bb2..3278f195a369 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -439,7 +439,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
     ONDXNode aResultNode;
     if (IsLeaf())
     {
-        for (sal_uInt16 i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++)
+        for (sal_uInt16 i = nCount - (nCount / 2), j = 0 ; i < nCount; i++)
             rPage.Insert(j++,(*this)[i]);
 
         // this node contains a key that already exists in the tree and must be replaced
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index ecf1d34b2ee1..13f6c5226018 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1556,7 +1556,7 @@ void OResultSet::clearInsertRow()
     const OValueRefVector::Vector::const_iterator aEnd = m_aInsertRow->get().end();
     for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos)
     {
-        ORowSetValueDecoratorRef& rValue = (*aIter);
+        ORowSetValueDecoratorRef& rValue = *aIter;
         if ( rValue->isBound() )
         {
             (m_aRow->get())[nPos]->setValue( (*aIter)->getValue() );
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index a559f3d4cad6..3854c7fff035 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -318,7 +318,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
                             "One byte is < 0");
             return -1;
         }
-        jint nRet = ((ch[0] << 24) + (ch[1] << 16) + (ch[2] << 8) + (ch[3] << 0));
+        jint nRet = (ch[0] << 24) + (ch[1] << 16) + (ch[2] << 8) + (ch[3] << 0);
 #ifdef HSQLDB_DBG
         DataLogFile aDataLog( env, name, "data" );
         aDataLog.write( nRet );
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index d2ad30ab52b8..19625707f5e7 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -946,7 +946,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ControlFocusHdl, Control&, rCtrl, void)
     // calc visible area
     long const nScrollOffset = m_pScrollWindow->GetScrollOffset();
     long nThumbPos = m_pVScroll->GetThumbPos();
-    long const nWinTop = (nThumbPos * nScrollOffset);
+    long const nWinTop = nThumbPos * nScrollOffset;
     long const nWinBottom = nWinTop + nWinHeight;
 
     long const nCtrlPosY = rCtrl.GetPosPixel().Y();
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index fa8cd6ab311e..84d18d8aae34 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -233,7 +233,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
             OSL_ENSURE( pTemp != reinterpret_cast<void*>(0xfeeefeee),"HALT!" );
         }
         OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!");
-        ORowSetRow rRow = (*m_aCurrentRow);
+        ORowSetRow rRow = *m_aCurrentRow;
         OSL_ENSURE(rRow.is() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!");
 #endif
         return ((*m_aCurrentRow)->get())[m_nLastColumnIndex = columnIndex];
@@ -1038,7 +1038,7 @@ void ORowSetBase::setCurrentRow( bool _bMoved, bool _bDoNotify, const ORowSetRow
         m_bIsInsertRow  = false;
         OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!");
 #if OSL_DEBUG_LEVEL > 0
-        ORowSetRow rRow = (*m_aCurrentRow);
+        ORowSetRow rRow = *m_aCurrentRow;
         OSL_ENSURE(rRow.is() ,"Invalid size of vector!");
 #endif
 
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index d4443a17ee6a..e7f5b66a6171 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -393,12 +393,12 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
             if ( !aCacheIter->second.pRowSet->isInsertRow()
                 /*&& aCacheIter->second.aIterator != m_pMatrix->end()*/ && !m_bModified )
             {
-                ptrdiff_t nDist = (aCacheIter->second.aIterator - m_pMatrix->begin());
+                ptrdiff_t nDist = aCacheIter->second.aIterator - m_pMatrix->begin();
                 aPositions.push_back(nDist);
                 aCacheIterToChange[aCacheIter->first] = true;
             }
         }
-        sal_Int32 nKeyPos = (m_aMatrixIter - m_pMatrix->begin());
+        sal_Int32 nKeyPos = m_aMatrixIter - m_pMatrix->begin();
         m_pMatrix->resize(_nSize);
 
         if ( nKeyPos < _nSize )
@@ -919,7 +919,7 @@ void ORowSetCache::moveWindow()
                         if ( !aCacheIter->second.pRowSet->isInsertRow()
                             && aCacheIter->second.aIterator != m_pMatrix->end() )
                         {
-                            const ptrdiff_t nDist = (aCacheIter->second.aIterator - m_pMatrix->begin());
+                            const ptrdiff_t nDist = aCacheIter->second.aIterator - m_pMatrix->begin();
                             if ( nDist >= nOverlapSize )
                             {
                                 // That's from outside the overlap area; invalidate iterator.
@@ -1458,7 +1458,7 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
             if ( !aCacheIter->second.pRowSet->isInsertRow()
                 && aCacheIter->second.aIterator != m_pMatrix->end())
             {
-                ptrdiff_t nDist = (aCacheIter->second.aIterator - m_pMatrix->begin());
+                ptrdiff_t nDist = aCacheIter->second.aIterator - m_pMatrix->begin();
                 if(nDist < _nDist)
                 {
                     aCacheIter->second.aIterator = m_pMatrix->end();
@@ -1497,7 +1497,7 @@ void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRo
     if(!m_aInsertRow->is())
         *m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount());
 
-    (*(*m_aInsertRow)) = (*(*_rOriginalRow));
+    (*(*m_aInsertRow)) = *(*_rOriginalRow);
     // we don't unbound the bookmark column
     ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin();
     ORowSetValueVector::Vector::const_iterator aEnd = (*m_aInsertRow)->get().end();
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 51369f8d4ce9..aa1ca17714c3 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -354,7 +354,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
     auto aIter = m_vTableConnection.rbegin();
     while(aIter != m_vTableConnection.rend() && bRemove)
     {
-        VclPtr<OTableConnection>& rTabConn = (*aIter);
+        VclPtr<OTableConnection>& rTabConn = *aIter;
         if (
              (pData == rTabConn->GetData()->getReferencingTable()) ||
              (pData == rTabConn->GetData()->getReferencedTable())
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index bba5dae8f376..107722a7c07c 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -235,7 +235,7 @@ void OTableEditorInsUndoAct::Undo()
 {
     // delete lines again
     std::vector< std::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList();
-    for( long i=(m_nInsPos+m_vInsertedRows.size()-1); i>(m_nInsPos-1); i-- )
+    for( long i=m_nInsPos+m_vInsertedRows.size()-1; i>(m_nInsPos-1); i-- )
     {
         pOriginalRows->erase(pOriginalRows->begin()+i);
     }
@@ -282,7 +282,7 @@ void OTableEditorInsNewUndoAct::Undo()
     // delete inserted lines
     std::vector< std::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList();
 
-    for( long i=(m_nInsPos+m_nInsRows-1); i>(m_nInsPos-1); i-- )
+    for( long i=m_nInsPos+m_nInsRows-1; i>(m_nInsPos-1); i-- )
     {
         pOriginalRows->erase(pOriginalRows->begin()+i);
     }
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 92e5a65bb3b8..80432dd12d3f 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -245,7 +245,7 @@ static OUString CreateMD5FromString( const OUString& aMsg )
     if ( handle )
     {
         const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMsg.getStr());
-        sal_uInt32       nSize = ( aMsg.getLength() * sizeof( sal_Unicode ));
+        sal_uInt32       nSize = aMsg.getLength() * sizeof( sal_Unicode );
         sal_uInt32       nMD5KeyLen = rtl_digest_queryLength( handle );
         std::unique_ptr<sal_uInt8[]> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]);
 
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 50855feb7c4a..031d599050f2 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -106,7 +106,7 @@ const OUString OfficePipeId::operator () ()
 
     sal_uInt8 const * data =
         reinterpret_cast<sal_uInt8 const *>(userPath.getStr());
-    std::size_t size = (userPath.getLength() * sizeof (sal_Unicode));
+    std::size_t size = userPath.getLength() * sizeof (sal_Unicode);
     sal_uInt32 md5_key_len = rtl_digest_queryLength( digest );
     std::unique_ptr<sal_uInt8[]> md5_buf( new sal_uInt8 [ md5_key_len ] );
 
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 3cba65cbf1af..0701a3492e86 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -143,7 +143,7 @@ BackendImpl::PackageImpl::PackageImpl(
     sal_Int32 segmEnd = url.getLength();
     if ( url.endsWith("/") )
         --segmEnd;
-    sal_Int32 segmStart = (url.lastIndexOf( '/', segmEnd ) + 1);
+    sal_Int32 segmStart = url.lastIndexOf( '/', segmEnd ) + 1;
     if (segmStart < 0)
         segmStart = 0;
     // name and display name default the same:
diff --git a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
index 07b53405bf46..0de72b179b88 100644
--- a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
+++ b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
@@ -139,7 +139,7 @@ namespace drawinglayer
 
                     if(basegfx::fTools::more(fCosFac, 0.0))
                     {
-                        aRetval += ((rLight.getColor() * rColor) * fCosFac);
+                        aRetval += (rLight.getColor() * rColor) * fCosFac;
 
                         if(rLight.getSpecular())
                         {
@@ -151,7 +151,7 @@ namespace drawinglayer
                             if(basegfx::fTools::more(fCosFac2, 0.0))
                             {
                                 fCosFac2 = pow(fCosFac2, static_cast<double>(nSpecularIntensity));
-                                aRetval += (rSpecular * fCosFac2);
+                                aRetval += rSpecular * fCosFac2;
                             }
                         }
                     }
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index 7147c3f4f6c9..de6f4f4940b8 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -417,7 +417,7 @@ void EditUndoMoveParagraphs::Undo()
     Range aTmpRange( nParagraphs );
     long nTmpDest = aTmpRange.Min();
 
-    long nDiff = ( nDest - aTmpRange.Min() );
+    long nDiff = nDest - aTmpRange.Min();
     aTmpRange.Min() += nDiff;
     aTmpRange.Max() += nDiff;
 
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 342e5878889f..5d448f579d69 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -460,7 +460,7 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
                     nCurDepth = nTabs-1; //TODO: sal_Int32 -> sal_Int16!
                     ImplCheckDepth( nCurDepth );
                     pPara->SetDepth( nCurDepth );
-                    pPara->nFlags &= (~ParaFlag::HOLDDEPTH);
+                    pPara->nFlags &= ~ParaFlag::HOLDDEPTH;
                 }
             }
             if( nPos ) // not with the first paragraph
@@ -1850,7 +1850,7 @@ void Outliner::ImplCalcBulletText( sal_Int32 nPara, bool bRecalcLevel, bool bRec
         if (pPara->GetText() != aBulletText)
             pPara->SetText( aBulletText );
 
-        pPara->nFlags &= (~ParaFlag::SETBULLETTEXT);
+        pPara->nFlags &= ~ParaFlag::SETBULLETTEXT;
 
         if ( bRecalcLevel )
         {
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 3342c5a056d7..59df88e7873f 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -131,7 +131,7 @@ Interceptor::addStatusListener(
         aStateEvent.FeatureDescriptor = "Update";
         aStateEvent.IsEnabled = true;
         aStateEvent.Requery = false;
-        aStateEvent.State <<= ( "($1) " + m_pDocHolder->GetTitle() );
+        aStateEvent.State <<= "($1) " + m_pDocHolder->GetTitle();
         Control->statusChanged(aStateEvent);
 
         {
@@ -154,7 +154,7 @@ Interceptor::addStatusListener(
         aStateEvent.FeatureDescriptor = "Close and Return";
         aStateEvent.IsEnabled = true;
         aStateEvent.Requery = false;
-        aStateEvent.State <<= ( "($2)" + m_pDocHolder->GetContainerName() );
+        aStateEvent.State <<= "($2)" + m_pDocHolder->GetContainerName();
         Control->statusChanged(aStateEvent);
 
 
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index c1b6277c88c1..6754b9bccaf2 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -128,7 +128,7 @@ void CGMFList::InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize )
     if ( pFound )
     {
         pFontEntry->nFontType |= 1;
-        sal_uInt32 nPrev = ( pFound - pBuf.get() );
+        sal_uInt32 nPrev = pFound - pBuf.get();
         sal_uInt32 nToCopyOfs = 6;
         if ( nPrev && ( pFound[ -1 ] == '-' || pFound[ -1 ] == ' ' ) )
         {
@@ -148,7 +148,7 @@ void CGMFList::InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize )
     {
         pFontEntry->nFontType |= 2;
 
-        sal_uInt32 nPrev = ( pFound - pBuf.get() );
+        sal_uInt32 nPrev = pFound - pBuf.get();
         sal_uInt32 nToCopyOfs = 4;
         if ( nPrev && ( pFound[ -1 ] == '-' || pFound[ -1 ] == ' ' ) )
         {
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index 3bdd022bb3e7..f058dcf5d87f 100644
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -84,11 +84,11 @@ namespace PictReaderShape {
                { dest.X()+pSize.Width(), dest.Y()+pSize.Height() },
                { dest.X(), dest.Y()+pSize.Height() }};
       for (int w = origAvoid+1; w < origAvoid+4; w++) {
-    int wh = (w%4);
+    int wh = w%4;
     poly.append(B2DPoint(origPt[wh][0], origPt[wh][1]));
       }
       for (int w = origAvoid+3; w < origAvoid+6; w++) {
-    int wh = (w%4);
+    int wh = w%4;
     poly.append(B2DPoint(destPt[wh][0], destPt[wh][1]));
       }
       int wh = (origAvoid+1)%4;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b5d6f7f7142f..f3dc9d2b697b 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1319,7 +1319,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<drawi
             if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "VisibleArea" ) )
             {
                 pVisArea.reset(new awt::Rectangle);
-                aAny >>= (*pVisArea);
+                aAny >>= *pVisArea;
             }
             sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, rGraphicObj, pVisArea.get() );
             if ( nBlibId )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ac8728cd424f..259035bd2285 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5708,7 +5708,7 @@ void PPTPortionObj::ApplyTo(  SfxItemSet& rSet, SdrPowerPointImport& rManager, T
                                 }
                             }
                             pAcc.reset();
-                            sal_uInt32 nC = ( aSize.Width() * aSize.Height() );
+                            sal_uInt32 nC = aSize.Width() * aSize.Height();
                             nRt /= nC;
                             nGn /= nC;
                             nBl /= nC;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 3cfcbe3b88fc..40e88154d7e3 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -2456,7 +2456,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn(
             {
                 if ( isHorizontalDockingArea( nDockingArea ))
                 {
-                    sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() );
+                    sal_Int32 nMaxReducation = rWinRect.Width - aMinSize.Width();
                     if ( nMaxReducation >= -nDiff )
                     {
                         rWinRect.Width = rWinRect.Width + nDiff;
@@ -2474,7 +2474,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn(
                 }
                 else
                 {
-                    sal_Int32 nMaxReducation = ( rWinRect.Height - aMinSize.Height() );
+                    sal_Int32 nMaxReducation = rWinRect.Height - aMinSize.Height();
                     if ( nMaxReducation >= -nDiff )
                     {
                         rWinRect.Height = rWinRect.Height + nDiff;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index da6c33022c23..568c6ba0e6f6 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -4039,7 +4039,7 @@ bool AutoRecovery::impl_enoughDiscSpace(sal_Int32 nRequiredSpace)
         nFreeSpace = aInfo.getFreeSpace();
     }
 
-    sal_uInt64 nFreeMB = (nFreeSpace/1048576);
+    sal_uInt64 nFreeMB = nFreeSpace/1048576;
     return (nFreeMB >= static_cast<sal_uInt64>(nRequiredSpace));
 #endif // SIMULATE_FULL_DISC
 }
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 2891601b2626..9f93aa63a9b1 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -389,7 +389,7 @@ public:
     ScRecalcMode    GetRecalcMode() const { return nMode; }
 
     void            SetCombinedBitsRecalcMode( ScRecalcMode nBits )
-                                { nMode |= (nBits & ~ScRecalcMode::EMask); }
+                                { nMode |= nBits & ~ScRecalcMode::EMask; }
     ScRecalcMode    GetCombinedBitsRecalcMode() const
                                 { return nMode & ~ScRecalcMode::EMask; }
 
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 2f4f2f63ae29..eb834bdd6687 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -89,7 +89,7 @@ class SvxIconChoiceCtrlEntry
     sal_uInt16                      nX,nY;      // for keyboard control
     SvxIconViewFlags                nFlags;
 
-    void                    ClearFlags( SvxIconViewFlags nMask ) { nFlags &= (~nMask); }
+    void                    ClearFlags( SvxIconViewFlags nMask ) { nFlags &= ~nMask; }
     void                    SetFlags( SvxIconViewFlags nMask ) { nFlags |= nMask; }
     void                    AssignFlags( SvxIconViewFlags _nFlags ) { nFlags = _nFlags; }
 
diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index a95bbedc15fc..0ba81da8052a 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -173,7 +173,7 @@ inline void SelectionEngine::SetAddMode( bool bNewMode )
     if ( bNewMode )
         nFlags |= SelectionEngineFlags::IN_ADD;
     else
-        nFlags &= (~SelectionEngineFlags::IN_ADD);
+        nFlags &= ~SelectionEngineFlags::IN_ADD;
 }
 
 inline void SelectionEngine::EnableDrag( bool bOn )
@@ -181,7 +181,7 @@ inline void SelectionEngine::EnableDrag( bool bOn )
     if ( bOn )
         nFlags |= SelectionEngineFlags::DRG_ENAB;
     else
-        nFlags &= (~SelectionEngineFlags::DRG_ENAB);
+        nFlags &= ~SelectionEngineFlags::DRG_ENAB;
 }
 
 inline void SelectionEngine::AddAlways( bool bOn )
@@ -189,7 +189,7 @@ inline void SelectionEngine::AddAlways( bool bOn )
     if( bOn )
         nFlags |= SelectionEngineFlags::ADD_ALW;
     else
-        nFlags &= (~SelectionEngineFlags::ADD_ALW);
+        nFlags &= ~SelectionEngineFlags::ADD_ALW;
 }
 
 inline bool SelectionEngine::IsAlwaysAdding() const
@@ -221,7 +221,7 @@ inline void SelectionEngine::SetAnchor( bool bAnchor )
     if ( bAnchor )
         nFlags |= SelectionEngineFlags::HAS_ANCH;
     else
-        nFlags &= (~SelectionEngineFlags::HAS_ANCH);
+        nFlags &= ~SelectionEngineFlags::HAS_ANCH;
 }
 
 #endif // INCLUDED_VCL_SELENG_HXX
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index 1064a8550f1d..127d5b59f06b 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -34,8 +34,8 @@
 
 #include <limits.h>
 
-const sal_uInt16 XML_NAMESPACE_XMLNS         = (USHRT_MAX-2);
-const sal_uInt16 XML_NAMESPACE_NONE          = (USHRT_MAX-1);
+const sal_uInt16 XML_NAMESPACE_XMLNS         = USHRT_MAX-2;
+const sal_uInt16 XML_NAMESPACE_NONE          = USHRT_MAX-1;
 const sal_uInt16 XML_NAMESPACE_UNKNOWN       = USHRT_MAX;
 const sal_uInt16 XML_NAMESPACE_UNKNOWN_FLAG  = 0x8000;
 
diff --git a/lotuswordpro/inc/lwptools.hxx b/lotuswordpro/inc/lwptools.hxx
index edbfd4d00949..a0ec4bae29cc 100644
--- a/lotuswordpro/inc/lwptools.hxx
+++ b/lotuswordpro/inc/lwptools.hxx
@@ -72,13 +72,13 @@
 // 01/19/2005
 const sal_uInt32 UNITS_PER_INCH = 65536L * 72L;
 const double CM_PER_INCH = 2.54;
-const double INCHT_PER_CM = (1.0 / CM_PER_INCH);
+const double INCHT_PER_CM = 1.0 / CM_PER_INCH;
 //end
 
 const double POINTS_PER_INCH = 72.27;
 const double TWIPS_PER_POINT = 20.0;
-const double TWIPS_PER_INCH = (TWIPS_PER_POINT * POINTS_PER_INCH);
-const double TWIPS_PER_CM = (TWIPS_PER_INCH/CM_PER_INCH);
+const double TWIPS_PER_INCH = TWIPS_PER_POINT * POINTS_PER_INCH;
+const double TWIPS_PER_CM = TWIPS_PER_INCH/CM_PER_INCH;
 /**
  * @brief   tool class (unicode, conversion) for lwp filter.
 */
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a797adbc1f1e..96c533d404f1 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -460,7 +460,7 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad
         if( sSchemeClr.isEmpty() )
         {
             // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
-            sal_Int32 nAlpha = (MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
+            sal_Int32 nAlpha = MAX_PERCENT - ( PER_PERCENT * nTransparency );
             WriteColor( nRgbClr, nAlpha );
         }
         else
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 492d96692f65..2d2098df298a 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1856,7 +1856,7 @@ void OStorage::InternalDispose( bool bNotifyImpl )
                 for ( WeakComponentVector::iterator pCompIter = m_pData->m_aOpenSubComponentsVector.begin();
                       pCompIter != m_pData->m_aOpenSubComponentsVector.end(); ++pCompIter )
                 {
-                    uno::Reference< lang::XComponent > xTmp = (*pCompIter);
+                    uno::Reference< lang::XComponent > xTmp = *pCompIter;
                     if ( xTmp.is() )
                     {
                         xTmp->removeEventListener( uno::Reference< lang::XEventListener >(
@@ -1907,7 +1907,7 @@ void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild
     for ( WeakComponentVector::iterator pCompIter = m_pData->m_aOpenSubComponentsVector.begin();
           pCompIter != m_pData->m_aOpenSubComponentsVector.end(); )
     {
-        uno::Reference< lang::XComponent > xTmp = (*pCompIter);
+        uno::Reference< lang::XComponent > xTmp = *pCompIter;
         if ( !xTmp.is() || xTmp == xChild )
         {
             pCompIter = m_pData->m_aOpenSubComponentsVector.erase(pCompIter);
@@ -2408,7 +2408,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
                     for ( SotElementVector_Impl::iterator pElementIter = pElement->m_xStorage->m_aChildrenVector.begin();
                            pElementIter != pElement->m_xStorage->m_aChildrenVector.end(); )
                     {
-                        SotElement_Impl* pElementToDel = (*pElementIter);
+                        SotElement_Impl* pElementToDel = *pElementIter;
                         ++pElementIter;
 
                         m_pImpl->RemoveElement( pElementToDel );
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 8c6decf83582..f37bce178528 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1319,7 +1319,7 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe
                             // bring aNewPos to the position of the next object
                             uno::Reference< report::XReportComponent> xRCNext(*(pColIter + 1),uno::UNO_QUERY);
                             Point aNextPosition = VCLPoint(xRCNext->getPosition());
-                            aNewPos += (aNextPosition - aPrevious);
+                            aNewPos += aNextPosition - aPrevious;
                         }
                     }
                 }
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 9f888579e3a9..305a57a27034 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -399,7 +399,7 @@ oslFileError FileHandle_Impl::readFileAt(
     for (*pBytesRead = 0; nBytesRequested > 0; )
     {
         off_t  const bufptr = (nOffset / m_bufsiz) * m_bufsiz;
-        size_t const bufpos = (nOffset % m_bufsiz);
+        size_t const bufpos = nOffset % m_bufsiz;
 
         if (bufptr != m_bufptr)
         {
@@ -479,7 +479,7 @@ oslFileError FileHandle_Impl::writeFileAt(
     for (*pBytesWritten = 0; nBytesToWrite > 0;)
     {
         off_t const bufptr = (nOffset / m_bufsiz) * m_bufsiz;
-        size_t const bufpos = (nOffset % m_bufsiz);
+        size_t const bufpos = nOffset % m_bufsiz;
         if (bufptr != m_bufptr)
         {
             // flush current buffer
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index e65213f848db..feab1fa5f853 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -166,7 +166,7 @@ public:
                             formula::FormulaGrammar::AddressConvention eConv,
                             sal_Unicode cSeparator = ' ',
                             bool bAppendStr = false,
-                            ScRefFlags nFormatFlags = (ScRefFlags::VALID | ScRefFlags::TAB_3D) );
+                            ScRefFlags nFormatFlags = ScRefFlags::VALID | ScRefFlags::TAB_3D );
     static void         GetStringFromRange(
                             OUString& rString,
                             const ScRange& rRange,
@@ -174,7 +174,7 @@ public:
                             formula::FormulaGrammar::AddressConvention eConv,
                             sal_Unicode cSeparator = ' ',
                             bool bAppendStr = false,
-                            ScRefFlags nFormatFlags = (ScRefFlags::VALID | ScRefFlags::TAB_3D) );
+                            ScRefFlags nFormatFlags = ScRefFlags::VALID | ScRefFlags::TAB_3D );
     static void         GetStringFromRangeList(
                             OUString& rString,
                             const ScRangeList* pRangeList,
@@ -189,7 +189,7 @@ public:
                             formula::FormulaGrammar::AddressConvention eConv,
                             sal_Unicode cSeparator,
                             bool bAppendStr = false,
-                            ScRefFlags nFormatFlags = (ScRefFlags::VALID | ScRefFlags::TAB_3D) );
+                            ScRefFlags nFormatFlags = ScRefFlags::VALID | ScRefFlags::TAB_3D );
 
 /// Range to String API
     static void         GetStringFromAddress(
@@ -206,7 +206,7 @@ public:
                             formula::FormulaGrammar::AddressConvention eConv,
                             sal_Unicode cSeparator = ' ',
                             bool bAppendStr = false,
-                            ScRefFlags nFormatFlags = (ScRefFlags::VALID | ScRefFlags::TAB_3D) );
+                            ScRefFlags nFormatFlags = ScRefFlags::VALID | ScRefFlags::TAB_3D );
     static void         GetStringFromRangeList(
                             OUString& rString,
                             const css::uno::Sequence< css::table::CellRangeAddress >& rRangeSeq,
diff --git a/sc/qa/unit/mark_test.cxx b/sc/qa/unit/mark_test.cxx
index 16122da55f8c..722d07ea75a5 100644
--- a/sc/qa/unit/mark_test.cxx
+++ b/sc/qa/unit/mark_test.cxx
@@ -145,12 +145,12 @@ void Test::testSimpleMark( const ScRange& rRange, const ScRange& rSelectionCover
     aMark.GetMarkArea( aRangeResult );
     CPPUNIT_ASSERT_EQUAL( rRange, aRangeResult );
 
-    SCROW nMidRow = ( ( rRange.aStart.Row() + rRange.aEnd.Row() ) / 2 );
-    SCCOL nMidCol = ( ( rRange.aStart.Col() + rRange.aEnd.Col() ) / 2 );
-    SCROW nOutRow1 = ( rRange.aEnd.Row() + 1 );
-    SCCOL nOutCol1 = ( rRange.aEnd.Col() + 1 );
-    SCROW nOutRow2 = ( rRange.aStart.Row() - 1 );
-    SCCOL nOutCol2 = ( rRange.aStart.Col() - 1 );
+    SCROW nMidRow = ( rRange.aStart.Row() + rRange.aEnd.Row() ) / 2;
+    SCCOL nMidCol = ( rRange.aStart.Col() + rRange.aEnd.Col() ) / 2;
+    SCROW nOutRow1 = rRange.aEnd.Row() + 1;
+    SCCOL nOutCol1 = rRange.aEnd.Col() + 1;
+    SCROW nOutRow2 = rRange.aStart.Row() - 1;
+    SCCOL nOutCol2 = rRange.aStart.Col() - 1;
 
     CPPUNIT_ASSERT( aMark.IsCellMarked( nMidCol, nMidRow ) );
     if ( ValidCol( nOutCol1 ) && ValidRow( nOutRow1 ) )
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index ede4096b7f3d..6a3527f36709 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -108,7 +108,7 @@ void GetOptimalHeightsInColumn(
     const SCROW nMinStart = nPos;
 
     sal_uLong nWeightedCount = nProgressStart + rCol.back().GetWeightedCount(nStartRow, nEndRow);
-    const SCCOL maxCol = (rCol.size() - 1); // last col done already above
+    const SCCOL maxCol = rCol.size() - 1; // last col done already above
     const SCCOL progressUpdateStep = rCol.size() / 10;
     for (SCCOL nCol=0; nCol<maxCol; nCol++)
     {
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 53e74aba6d20..021a185aaf99 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -812,8 +812,8 @@ bool ScTable::SearchAndReplace(
             //  This is also done in SvxSearchDialog CommandHdl, but not in API object.
             if ( !rSearchItem.IsUseAsianOptions() )
                 aSearchOptions.transliterateFlags &=
-                    ( TransliterationFlags::IGNORE_CASE |
-                      TransliterationFlags::IGNORE_WIDTH );
+                    TransliterationFlags::IGNORE_CASE |
+                      TransliterationFlags::IGNORE_WIDTH;
 
             pSearchText.reset( new utl::TextSearch( aSearchOptions ) );
 
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index abb057647be3..20dc149c2abc 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2002,7 +2002,7 @@ template<typename T > static void lcl_Format( T& r, SCTAB nTab, SCROW nRow, SCCO
                                   const ScAddress::Details& rDetails)
 {
     if( nFlags & ScRefFlags::VALID )
-        nFlags |= ( ScRefFlags::ROW_VALID | ScRefFlags::COL_VALID | ScRefFlags::TAB_VALID );
+        nFlags |= ScRefFlags::ROW_VALID | ScRefFlags::COL_VALID | ScRefFlags::TAB_VALID;
     if( pDoc && (nFlags & ScRefFlags::TAB_VALID ) )
     {
         if ( nTab < 0 || nTab >= pDoc->GetTableCount() )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index eef51bbeecff..b47fe824f004 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -409,7 +409,7 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
 /*   */     t[32] |=   ScCharFlags::Word;
 /* ! */     t[33] |=   ScCharFlags::Ident | ScCharFlags::Word;
 /* " */     t[34] |=   ScCharFlags::Word;
-/* # */     t[35] &= (~ScCharFlags::WordSep);
+/* # */     t[35] &=  ~ScCharFlags::WordSep;
 /* # */     t[35] |=   ScCharFlags::Word;
 /* % */     t[37] |=   ScCharFlags::Word;
 /* ' */     t[39] |=   ScCharFlags::Word;
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index f91d0037ddb5..2d7a8bafec5b 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -2696,7 +2696,7 @@ void ScInterpreter::ScTTest()
             return;
         }
         double fSumD = fSum1 - fSum2;
-        double fDivider = (fCount*fSumSqrD - fSumD*fSumD);
+        double fDivider = fCount*fSumSqrD - fSumD*fSumD;
         if ( fDivider == 0.0 )
         {
             PushError(FormulaError::DivisionByZero);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index cc3672cbdbeb..43009c30d180 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -439,7 +439,7 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                         *p++ = nLen;
                         memcpy( p, aTmp.getStr(), nStrLen + 1);
                         nPos += 10 + nStrLen + 1;
-                        sal_uInt8* q = ( pCellArr + nPos );
+                        sal_uInt8* q = pCellArr + nPos;
                         if( (nStrLen & 1) == 0 )
                         {
                             *q++ = 0;
@@ -556,7 +556,7 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                             *p++ = nLen;
                             memcpy( p, aTmp.getStr(), nStrLen + 1);
                             nPos += 2 + nStrLen + 1;
-                            sal_uInt8* q = ( pCellArr + nPos );
+                            sal_uInt8* q = pCellArr + nPos;
                             if( (nStrLen & 1) == 0 )
                             {
                                 *q++ = 0;
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 8fad91109fbc..a3b77cb14004 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -977,7 +977,7 @@ void ScETSForecastCalculation::GetETSPredictionIntervals( const ScMatrixRef& rTM
         fMaxTarget = convertXtoMonths( fMaxTarget ) - maRange[ mnCount - 1 ].X;
     else
         fMaxTarget -= maRange[ mnCount - 1 ].X;
-    SCSIZE nSize = ( fMaxTarget / mfStepSize );
+    SCSIZE nSize = fMaxTarget / mfStepSize;
     if ( fmod( fMaxTarget, mfStepSize ) != 0.0 )
         nSize++;
 
@@ -1106,7 +1106,7 @@ void ScETSForecastCalculation::GetEDSPredictionIntervals( const ScMatrixRef& rTM
         fMaxTarget = convertXtoMonths( fMaxTarget ) - maRange[ mnCount - 1 ].X;
     else
         fMaxTarget -= maRange[ mnCount - 1 ].X;
-    SCSIZE nSize = ( fMaxTarget / mfStepSize );
+    SCSIZE nSize = fMaxTarget / mfStepSize;
     if ( fmod( fMaxTarget, mfStepSize ) != 0.0 )
         nSize++;
 
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 93fb0b6f7208..575c0eee363d 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -154,8 +154,8 @@ ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc,
             aRange.aStart.SetTab( nTab );   // default tab if not specified
             ScRefFlags nRes = aRange.ParseAny( aOne, pDoc, eConv );
             ScRefFlags nEndRangeBits = ScRefFlags::COL2_VALID | ScRefFlags::ROW2_VALID | ScRefFlags::TAB2_VALID;
-            ScRefFlags nTmp1 = ( nRes & ScRefFlags::BITS );
-            ScRefFlags nTmp2 = ( nRes & nEndRangeBits );
+            ScRefFlags nTmp1 = nRes & ScRefFlags::BITS;
+            ScRefFlags nTmp2 = nRes & nEndRangeBits;
             // If we have a valid single range with
             // any of the address bits we are interested in
             // set - set the equiv end range bits
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 230218c5334a..970fa880b993 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -217,7 +217,7 @@ ScRefFinder::~ScRefFinder()
 
 static ScRefFlags lcl_NextFlags( ScRefFlags nOld )
 {
-    const ScRefFlags Mask_ABS = (ScRefFlags::COL_ABS | ScRefFlags::ROW_ABS | ScRefFlags::TAB_ABS);
+    const ScRefFlags Mask_ABS = ScRefFlags::COL_ABS | ScRefFlags::ROW_ABS | ScRefFlags::TAB_ABS;
     ScRefFlags nNew = nOld & Mask_ABS;
     nNew = ScRefFlags( static_cast<std::underlying_type<ScRefFlags>::type>(nNew) - 1 ) & Mask_ABS; // weiterzaehlen
 
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 81b0b44e688c..4925af2aa6ee 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -99,7 +99,7 @@ inline void set_flag( Type& rnBitField, Type nMask, bool bSet = true )
 template< typename Type, typename InsertType >
 void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal_uInt8 nBitCount )
 {
-    unsigned int nMask = ((1U << nBitCount) - 1);
+    unsigned int nMask = (1U << nBitCount) - 1;
     Type nNewValue = static_cast< Type >( nValue & nMask );
     rnBitField = (rnBitField & ~(nMask << nStartBit)) | (nNewValue << nStartBit);
 }
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index b6aebd7ece7c..7ed2653f5a15 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -637,7 +637,7 @@ bool ScRowFormatRanges::GetNext(ScMyRowFormatRange& aFormatRange)
     ScMyRowFormatRangesList::iterator aItr(aRowFormatRanges.begin());
     if (aItr != aRowFormatRanges.end())
     {
-        aFormatRange = (*aItr);
+        aFormatRange = *aItr;
         aRowFormatRanges.erase(aItr);
         --nSize;
         return true;
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 6b9705ec7bba..6257e1941f31 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -311,8 +311,8 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleChildCount()
 
     // FIXME: representing rows & columns this way is a plain and simple madness.
     // this needs a radical re-think.
-    sal_Int64 nMax = (static_cast<sal_Int64>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
-                      static_cast<sal_Int64>(maRange.aEnd.Col() - maRange.aStart.Col() + 1));
+    sal_Int64 nMax = static_cast<sal_Int64>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
+                     static_cast<sal_Int64>(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
     if (nMax > SAL_MAX_INT32)
         nMax = SAL_MAX_INT32;
     if (nMax < 0)
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 28b1169f22e9..e6e6d3389356 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -22,9 +22,9 @@
 #include <delcodlg.hxx>
 
 bool       ScDeleteContentsDlg::bPreviousAllCheck = false;
-InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks   = (InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING  |
+InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks   = InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING  |
                                                  InsertDeleteFlags::NOTE     | InsertDeleteFlags::FORMULA |
-                                                 InsertDeleteFlags::VALUE);
+                                                 InsertDeleteFlags::VALUE;
 
 ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* pParent)
     : GenericDialogController(pParent, "modules/scalc/ui/deletecontents.ui", "DeleteContentsDialog")
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index 5f3343c7e716..33107ed575f8 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -22,7 +22,7 @@
 #include <inscodlg.hxx>
 
 bool       ScInsertContentsDlg::bPreviousAllCheck = false;
-InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks   = (InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING);
+InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks   = InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING;
 ScPasteFunc  ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::NONE;
 InsertContentsFlags ScInsertContentsDlg::nPreviousChecks2 = InsertContentsFlags::NONE;
 sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE;   // enum InsCellCmd
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 6f502c8880dd..57d61297d842 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1285,7 +1285,7 @@ uno::Reference< excel::XRange > SAL_CALL ScVbaApplication::Union(
 double
 ScVbaApplication::InchesToPoints( double Inches )
 {
-   double result = ( Inches * 72.0 );
+   double result = Inches * 72.0;
    return result;
 }
 
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b9a648c79b76..cf4e19e68487 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2078,8 +2078,8 @@ ScVbaRange::Address(  const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
     RangeHelper thisRange( mxRange );
     table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
     ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
-    ScRefFlags const ROW_ABS = ( ScRefFlags::ROW_ABS | ScRefFlags::ROW2_ABS );
-    ScRefFlags const COL_ABS = ( ScRefFlags::COL_ABS | ScRefFlags::COL2_ABS );
+    ScRefFlags const ROW_ABS = ScRefFlags::ROW_ABS | ScRefFlags::ROW2_ABS;
+    ScRefFlags const COL_ABS = ScRefFlags::COL_ABS | ScRefFlags::COL2_ABS;
 
     if ( RowAbsolute.hasValue() )
     {
@@ -5387,7 +5387,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue)
                 // need to process each area, gather the results and
                 // create a new range from those
                 std::vector< table::CellRangeAddress > rangeResults;
-                sal_Int32 nItems = ( m_Areas->getCount() + 1 );
+                sal_Int32 nItems = m_Areas->getCount() + 1;
                 for ( sal_Int32 index=1; index <= nItems; ++index )
                 {
                     uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW );
@@ -5395,7 +5395,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue)
                     ScVbaRange* pRange = getImplementation( xRange );
                     if ( xRange.is() && pRange )
                     {
-                        sal_Int32 nElems = ( pRange->m_Areas->getCount() + 1 );
+                        sal_Int32 nElems = pRange->m_Areas->getCount() + 1;
                         for ( sal_Int32 nArea = 1; nArea < nElems; ++nArea )
                         {
                             uno::Reference< excel::XRange > xTmpRange( m_Areas->Item( uno::makeAny( nArea ), uno::Any() ), uno::UNO_QUERY_THROW );
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index e0498cb7a73a..91bcc5d2be87 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -818,7 +818,7 @@ sal_Int32 SAL_CALL
 ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points)
 {
     sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-    double fConvertFactor = (getDevice()->getInfo().PixelPerMeterX/100000);
+    double fConvertFactor = getDevice()->getInfo().PixelPerMeterX/100000;
     return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
 }
 
@@ -826,7 +826,7 @@ sal_Int32 SAL_CALL
 ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points)
 {
     sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-    double fConvertFactor = (getDevice()->getInfo().PixelPerMeterY/100000);
+    double fConvertFactor = getDevice()->getInfo().PixelPerMeterY/100000;
     return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
 }
 
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index a19d7ce48c84..9cd2db49bd17 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -964,7 +964,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
         // find position of same point on the screen ( e.g. grid )
         Point aCurPos =  pViewData->GetScrPos(  aOldStt.Col(), aOldStt.Row(), eWhich, true );
         Point aCurPosHmm = pGridWin->PixelToLogic(aCurPos, aDrawMode );
-        Point aGridOff = ( aCurPosHmm - aOldPos );
+        Point aGridOff = aCurPosHmm - aOldPos;
         // fdo#63878 Fix the X position for RTL Sheet
         if( pDoc->IsNegativePage( GetTab() ) )
             aGridOff.setX( aCurPosHmm.getX() + aOldPos.getX() );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index bdb25193d89f..ddf6e6020caf 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -585,7 +585,7 @@ void ScDrawStringsVars::RepeatToFill( long nColWidth )
         nTextWidth = pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width();
     }
 
-    long nSpaceToFill = ( nColWidth - nTextWidth );
+    long nSpaceToFill = nColWidth - nTextWidth;
     if ( nSpaceToFill <= nCharWidth )
         return;
 
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 2785c8097dcf..2778d5d79c90 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -147,7 +147,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
                 bFirst = false;
             }
             else
-                rFuncStr += ("; " + aStr);
+                rFuncStr += "; " + aStr;
         }
     }
 
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 565fa987e0e3..a20e0ae05641 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1454,8 +1454,8 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
         }
 
         typedef const std::vector<editeng::MisspellRanges>* MisspellRangesType;
-        SCROW nRowRepeatSize = (nEndRow - nStartRow + 1);
-        SCCOL nColRepeatSize = (nEndCol - nStartCol + 1);
+        SCROW nRowRepeatSize = nEndRow - nStartRow + 1;
+        SCCOL nColRepeatSize = nEndCol - nStartCol + 1;
         SCROW nTillRow = 0;
         SCCOL nTillCol = 0;
         std::vector<std::vector<MisspellRangesType>> aSourceSpellRanges(nRowRepeatSize, std::vector<MisspellRangesType>(nColRepeatSize));
@@ -1472,7 +1472,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
                 {
                     for ( SCROW nRowItr = nEndRow + 1; nRowItr <= nTillRow; ++nRowItr )
                     {
-                        size_t nSourceRowIdx = ( ( nRowItr - nEndRow - 1 ) % nRowRepeatSize );
+                        size_t nSourceRowIdx = ( nRowItr - nEndRow - 1 ) % nRowRepeatSize;
                         MisspellRangesType pRanges = aSourceSpellRanges[nSourceRowIdx][nColItr - nStartCol];
                         if ( !pRanges )
                             continue;
@@ -1500,7 +1500,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
                 nTillCol = nEndCol + nCount;
                 for ( SCCOL nColItr = nEndCol + 1; nColItr <= nTillCol; ++nColItr )
                 {
-                    size_t nSourceColIdx = ( ( nColItr - nEndCol - 1 ) % nColRepeatSize );
+                    size_t nSourceColIdx = ( nColItr - nEndCol - 1 ) % nColRepeatSize;
                     for ( SCROW nRowItr = nStartRow; nRowItr <= nEndRow; ++nRowItr )
                     {
                         MisspellRangesType pRanges = aSourceSpellRanges[nRowItr - nStartRow][nSourceColIdx];
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 230f2811db8c..7585480b155c 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1619,7 +1619,7 @@ void EffectSequenceHelper::reset()
     EffectSequence::iterator aEnd( maEffects.end() );
     if( aIter != aEnd )
     {
-        CustomAnimationEffectPtr pEffect = (*aIter++);
+        CustomAnimationEffectPtr pEffect = *aIter++;
         pEffect->setEffectSequence(nullptr);
     }
     maEffects.clear();
@@ -1839,7 +1839,7 @@ void EffectSequenceHelper::implRebuild()
         {
             std::vector< sd::AfterEffectNode > aAfterEffects;
 
-            CustomAnimationEffectPtr pEffect = (*aIter++);
+            CustomAnimationEffectPtr pEffect = *aIter++;
 
             bool bFirst = true;
             do
@@ -1900,7 +1900,7 @@ void EffectSequenceHelper::implRebuild()
                             fDuration = fTemp;
 
                         if( aIter != aEnd )
-                            pEffect = (*aIter++);
+                            pEffect = *aIter++;
                         else
                             pEffect.reset();
                     }
@@ -2084,7 +2084,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::findEffect( const css::uno::Refer
     {
         if( (*aIter)->getNode() == xNode )
         {
-            pEffect = (*aIter);
+            pEffect = *aIter;
             break;
         }
     }
@@ -2114,7 +2114,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::getEffectFromOffset( sal_Int32 nO
 
     CustomAnimationEffectPtr pEffect;
     if( aIter != maEffects.end() )
-        pEffect = (*aIter);
+        pEffect = *aIter;
 
     return pEffect;
 }
@@ -2317,7 +2317,7 @@ void EffectSequenceHelper::updateTextGroups()
     const EffectSequence::iterator aEnd( maEffects.end() );
     while( aIter != aEnd )
     {
-        CustomAnimationEffectPtr pEffect( (*aIter++) );
+        CustomAnimationEffectPtr pEffect( *aIter++ );
 
         const sal_Int32 nGroupId = pEffect->getGroupId();
 
@@ -2523,7 +2523,7 @@ void EffectSequenceHelper::setTextGrouping( const CustomAnimationTextGroupPtr& p
         const EffectSequence::iterator aEnd( aEffects.end() );
         while( aIter != aEnd )
         {
-            CustomAnimationEffectPtr pEffect( (*aIter++) );
+            CustomAnimationEffectPtr pEffect( *aIter++ );
 
             if( pEffect->getTarget().getValueType() == ::cppu::UnoType<ParagraphTarget>::get() )
                 remove( pEffect );
@@ -2544,7 +2544,7 @@ void EffectSequenceHelper::setTextGrouping( const CustomAnimationTextGroupPtr& p
         const EffectSequence::iterator aEnd( aEffects.end() );
         while( aIter != aEnd )
         {
-            CustomAnimationEffectPtr pEffect( (*aIter++) );
+            CustomAnimationEffectPtr pEffect( *aIter++ );
 
             if( pEffect->getTarget().getValueType() == ::cppu::UnoType<ParagraphTarget>::get() )
             {
@@ -2605,7 +2605,7 @@ void EffectSequenceHelper::setAnimateForm( const CustomAnimationTextGroupPtr& pT
             {
                 // special case, only one effect and that targets whole text,
                 // convert this to target whole shape
-                pEffect = (*aIter++);
+                pEffect = *aIter++;
                 pEffect->setTargetSubItem( ShapeAnimationSubType::AS_WHOLE );
             }
             else
@@ -2621,7 +2621,7 @@ void EffectSequenceHelper::setAnimateForm( const CustomAnimationTextGroupPtr& pT
 
         if( !bAnimateForm && (aEffects.size() == 1) )
         {
-            CustomAnimationEffectPtr pEffect( (*aIter) );
+            CustomAnimationEffectPtr pEffect( *aIter );
             pEffect->setTarget( makeAny( (*aIter)->getTargetShape() ) );
             pEffect->setTargetSubItem( ShapeAnimationSubType::ONLY_TEXT );
             pTextGroup->addEffect( pEffect );
@@ -2631,7 +2631,7 @@ void EffectSequenceHelper::setAnimateForm( const CustomAnimationTextGroupPtr& pT
             // read the rest to the group again
             while( aIter != aEnd )
             {
-                CustomAnimationEffectPtr pEffect( (*aIter++) );
+                CustomAnimationEffectPtr pEffect( *aIter++ );
 
                 if( pEffect->getTarget().getValueType() == ::cppu::UnoType<ParagraphTarget>::get() )
                 {
@@ -2659,7 +2659,7 @@ void EffectSequenceHelper::setTextGroupingAuto( const CustomAnimationTextGroupPt
     const EffectSequence::iterator aEnd( aEffects.end() );
     while( aIter != aEnd )
     {
-        CustomAnimationEffectPtr pEffect( (*aIter++) );
+        CustomAnimationEffectPtr pEffect( *aIter++ );
 
         if( pEffect->getTarget().getValueType() == ::cppu::UnoType<ParagraphTarget>::get() )
         {
@@ -2749,7 +2749,7 @@ void EffectSequenceHelper::setTextReverse( const CustomAnimationTextGroupPtr& pT
             EffectSequence::iterator aInsertIter( find( *aIter++ ) );
             while( aIter != aEnd )
             {
-                CustomAnimationEffectPtr pEffect( (*aIter++) );
+                CustomAnimationEffectPtr pEffect( *aIter++ );
                 maEffects.erase( find( pEffect ) );
                 aInsertIter = maEffects.insert( ++aInsertIter, pEffect );
                 pTextGroup->addEffect( pEffect );
@@ -2896,7 +2896,7 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode >
             stl_CustomAnimationEffect_search_node_predict aSearchPredict( xMaster );
             EffectSequence::iterator aIter( std::find_if( maEffects.begin(), maEffects.end(), aSearchPredict ) );
             if( aIter != maEffects.end() )
-                pMasterEffect = (*aIter );
+                pMasterEffect = *aIter;
 
             if( pMasterEffect.get() )
             {
@@ -3289,7 +3289,7 @@ void MainSequence::implRebuild()
     auto aIter( maInteractiveSequenceVector.begin() );
     while( aIter != maInteractiveSequenceVector.end() )
     {
-        InteractiveSequencePtr pIS( (*aIter) );
+        InteractiveSequencePtr pIS( *aIter );
         if( pIS->maEffects.empty() )
         {
             // remove empty interactive sequences
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 804ef7b9ddf2..5735c5df9f13 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list