[Libreoffice-commits] core.git: basic/source compilerplugins/clang include/basegfx include/basic include/comphelper include/connectivity include/drawinglayer include/editeng include/filter include/formula include/oox reportdesign/source sc/source sd/source shell/inc shell/source sw/source

Noel Grandin noel at peralex.com
Thu Aug 25 06:38:08 UTC 2016


 basic/source/classes/sb.cxx                                   |    6 
 basic/source/inc/sbintern.hxx                                 |    4 
 basic/source/inc/sbunoobj.hxx                                 |    2 
 compilerplugins/clang/countusersofdefaultparams.cxx           |  234 ++++++++++
 compilerplugins/clang/countusersofdefaultparams.py            |   80 +++
 compilerplugins/clang/unuseddefaultparams.py                  |   14 
 include/basegfx/polygon/b2dlinegeometry.hxx                   |    4 
 include/basegfx/polygon/b2dpolygontools.hxx                   |   12 
 include/basegfx/polygon/b2dpolypolygontools.hxx               |    4 
 include/basegfx/polygon/b2dtrapezoid.hxx                      |    6 
 include/basegfx/polygon/b3dpolygontools.hxx                   |   10 
 include/basegfx/polygon/b3dpolypolygontools.hxx               |    8 
 include/basic/sbmeth.hxx                                      |    2 
 include/basic/sbxcore.hxx                                     |    2 
 include/basic/sbxfac.hxx                                      |    2 
 include/basic/sbxobj.hxx                                      |    2 
 include/basic/sbxvar.hxx                                      |    4 
 include/comphelper/accessiblewrapper.hxx                      |    2 
 include/comphelper/configuration.hxx                          |    4 
 include/comphelper/embeddedobjectcontainer.hxx                |    2 
 include/comphelper/propertybag.hxx                            |    2 
 include/comphelper/sequence.hxx                               |    2 
 include/comphelper/string.hxx                                 |    2 
 include/connectivity/dbtools.hxx                              |   10 
 include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx |    2 
 include/editeng/AccessibleImageBullet.hxx                     |    2 
 include/editeng/borderline.hxx                                |    2 
 include/editeng/boxitem.hxx                                   |    2 
 include/editeng/editeng.hxx                                   |   16 
 include/editeng/editobj.hxx                                   |    2 
 include/editeng/editview.hxx                                  |    8 
 include/editeng/lrspitem.hxx                                  |    2 
 include/editeng/outliner.hxx                                  |   10 
 include/editeng/paperinf.hxx                                  |    2 
 include/editeng/svxacorr.hxx                                  |   43 -
 include/editeng/unoedprx.hxx                                  |    2 
 include/filter/msfilter/escherex.hxx                          |    6 
 include/filter/msfilter/msdffimp.hxx                          |   14 
 include/filter/msfilter/rtfutil.hxx                           |    2 
 include/filter/msfilter/svdfppt.hxx                           |   10 
 include/formula/FormulaCompiler.hxx                           |    2 
 include/formula/IControlReferenceHandler.hxx                  |    2 
 include/formula/formula.hxx                                   |   10 
 include/oox/export/vmlexport.hxx                              |    2 
 reportdesign/source/ui/inc/Formula.hxx                        |    2 
 sc/source/filter/inc/xiescher.hxx                             |    4 
 sc/source/ui/inc/anyrefdg.hxx                                 |    2 
 sc/source/ui/inc/formula.hxx                                  |    2 
 sd/source/filter/ppt/pptin.hxx                                |    2 
 shell/inc/xml_parser.hxx                                      |    2 
 shell/source/win32/ooofilereader/basereader.cxx               |    2 
 sw/source/filter/ww8/rtfsdrexport.hxx                         |    2 
 sw/source/filter/ww8/ww8par.hxx                               |    2 
 53 files changed, 441 insertions(+), 140 deletions(-)

New commits:
commit b8064bdf7fabdbfd2546830f6fb8f0de6b8d4329
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 25 13:32:04 2016 +0200

    new loplugin: countusersofdefaultparams
    
    Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04
    Reviewed-on: https://gerrit.libreoffice.org/28353
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 6964406..676fc80 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -468,7 +468,7 @@ SbxObject* SbiFactory::CreateObject( const OUString& rClass )
 class SbOLEFactory : public SbxFactory
 {
 public:
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 };
 
@@ -490,7 +490,7 @@ SbxObject* SbOLEFactory::CreateObject( const OUString& rClassName )
 class SbFormFactory : public SbxFactory
 {
 public:
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 };
 
@@ -593,7 +593,7 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
 class SbTypeFactory : public SbxFactory
 {
 public:
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 };
 
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index de299dc..a95a27f 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -39,7 +39,7 @@ class SbModule;
 class SbiFactory : public SbxFactory
 {
 public:
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 };
 
@@ -72,7 +72,7 @@ public:
     void AddClassModule( SbModule* pClassModule );
     void RemoveClassModule( SbModule* pClassModule );
 
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 
     SbModule* FindClass( const OUString& rClassName );
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 7e88e56..25775b4 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -205,7 +205,7 @@ public:
 class SbUnoFactory : public SbxFactory
 {
 public:
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ) override;
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
     virtual SbxObject* CreateObject( const OUString& ) override;
 };
 
diff --git a/compilerplugins/clang/countusersofdefaultparams.cxx b/compilerplugins/clang/countusersofdefaultparams.cxx
new file mode 100644
index 0000000..de8d8e5
--- /dev/null
+++ b/compilerplugins/clang/countusersofdefaultparams.cxx
@@ -0,0 +1,234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <string>
+#include <set>
+#include <iostream>
+#include <fstream>
+
+#include "clang/AST/Attr.h"
+
+#include "plugin.hxx"
+#include "compat.hxx"
+
+/*
+  Count call sites that are actually using the defaulted values on params on methods that declare such.
+
+  The process goes something like this:
+    $ make check
+    $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='countusersofdefaultparams' check
+    $ ./compilerplugins/clang/countusersofdefaultparams.py
+*/
+
+namespace {
+
+struct MyFuncInfo
+{
+    std::string access;
+    std::string returnType;
+    std::string nameAndParams;
+    std::string sourceLocation;
+};
+bool operator < (const MyFuncInfo &lhs, const MyFuncInfo &rhs)
+{
+    return std::tie(lhs.returnType, lhs.nameAndParams)
+         < std::tie(rhs.returnType, rhs.nameAndParams);
+}
+struct MyCallInfo : public MyFuncInfo
+{
+    std::string sourceLocationOfCall;
+};
+bool operator < (const MyCallInfo &lhs, const MyCallInfo &rhs)
+{
+    return std::tie(lhs.returnType, lhs.nameAndParams, lhs.sourceLocationOfCall)
+         < std::tie(rhs.returnType, rhs.nameAndParams, rhs.sourceLocationOfCall);
+}
+
+
+// try to limit the voluminous output a little
+static std::set<MyCallInfo> callSet;
+static std::set<MyFuncInfo> definitionSet;
+
+class CountUsersOfDefaultParams:
+    public RecursiveASTVisitor<CountUsersOfDefaultParams>, public loplugin::Plugin
+{
+public:
+    explicit CountUsersOfDefaultParams(InstantiationData const & data): Plugin(data) {}
+
+    virtual void run() override
+    {
+        TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+
+        // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes
+        // writing to the same logfile
+
+        std::string output;
+        for (const MyFuncInfo & s : definitionSet)
+            output += "defn:\t" + s.access + "\t" + s.returnType + "\t" + s.nameAndParams + "\t" + s.sourceLocation + "\n";
+        for (const MyCallInfo & s : callSet)
+            output += "call:\t" + s.returnType + "\t" + s.nameAndParams + "\t" + s.sourceLocationOfCall + "\n";
+        ofstream myfile;
+        myfile.open( SRCDIR "/loplugin.countusersofdefaultparams.log", ios::app | ios::out);
+        myfile << output;
+        myfile.close();
+    }
+
+    bool shouldVisitTemplateInstantiations () const { return true; }
+
+    bool VisitCallExpr(CallExpr * callExpr);
+    bool VisitFunctionDecl( const FunctionDecl* functionDecl );
+private:
+    void niceName(const FunctionDecl* functionDecl, MyFuncInfo&);
+    std::string locationToString(const SourceLocation&);
+};
+
+void CountUsersOfDefaultParams::niceName(const FunctionDecl* functionDecl, MyFuncInfo& aInfo)
+{
+    if (functionDecl->getInstantiatedFromMemberFunction())
+        functionDecl = functionDecl->getInstantiatedFromMemberFunction();
+    else if (functionDecl->getClassScopeSpecializationPattern())
+        functionDecl = functionDecl->getClassScopeSpecializationPattern();
+// workaround clang-3.5 issue
+#if CLANG_VERSION >= 30600
+    else if (functionDecl->getTemplateInstantiationPattern())
+        functionDecl = functionDecl->getTemplateInstantiationPattern();
+#endif
+
+    switch (functionDecl->getAccess())
+    {
+    case AS_public: aInfo.access = "public"; break;
+    case AS_private: aInfo.access = "private"; break;
+    case AS_protected: aInfo.access = "protected"; break;
+    default: aInfo.access = "unknown"; break;
+    }
+    aInfo.returnType = compat::getReturnType(*functionDecl).getCanonicalType().getAsString();
+
+    if (isa<CXXMethodDecl>(functionDecl)) {
+        const CXXRecordDecl* recordDecl = dyn_cast<CXXMethodDecl>(functionDecl)->getParent();
+        aInfo.nameAndParams += recordDecl->getQualifiedNameAsString();
+        aInfo.nameAndParams += "::";
+    }
+    aInfo.nameAndParams += functionDecl->getNameAsString() + "(";
+    bool bFirst = true;
+    for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
+        if (bFirst)
+            bFirst = false;
+        else
+            aInfo.nameAndParams += ",";
+        aInfo.nameAndParams += pParmVarDecl->getType().getCanonicalType().getAsString();
+    }
+    aInfo.nameAndParams += ")";
+    if (isa<CXXMethodDecl>(functionDecl) && dyn_cast<CXXMethodDecl>(functionDecl)->isConst()) {
+        aInfo.nameAndParams += " const";
+    }
+
+    aInfo.sourceLocation = locationToString(functionDecl->getLocation());
+}
+
+bool CountUsersOfDefaultParams::VisitCallExpr(CallExpr * callExpr) {
+    if (ignoreLocation(callExpr)) {
+        return true;
+    }
+    const FunctionDecl* functionDecl;
+    if (isa<CXXMemberCallExpr>(callExpr)) {
+        functionDecl = dyn_cast<CXXMemberCallExpr>(callExpr)->getMethodDecl();
+    }
+    else {
+        functionDecl = callExpr->getDirectCallee();
+    }
+    if (functionDecl == nullptr) {
+        return true;
+    }
+    functionDecl = functionDecl->getCanonicalDecl();
+    // work our way up to the root method
+    while (isa<CXXMethodDecl>(functionDecl)) {
+        const CXXMethodDecl* methodDecl = dyn_cast<CXXMethodDecl>(functionDecl);
+        if (methodDecl->size_overridden_methods()==0)
+            break;
+        functionDecl = *methodDecl->begin_overridden_methods();
+    }
+    // work our way back to the root definition for template methods
+    if (functionDecl->getInstantiatedFromMemberFunction())
+        functionDecl = functionDecl->getInstantiatedFromMemberFunction();
+    else if (functionDecl->getClassScopeSpecializationPattern())
+        functionDecl = functionDecl->getClassScopeSpecializationPattern();
+// workaround clang-3.5 issue
+#if CLANG_VERSION >= 30600
+    else if (functionDecl->getTemplateInstantiationPattern())
+        functionDecl = functionDecl->getTemplateInstantiationPattern();
+#endif
+    int n = functionDecl->getNumParams() - 1;
+    if (n < 0 || !functionDecl->getParamDecl(n)->hasDefaultArg()) {
+        return true;
+    }
+    while (n > 0 && functionDecl->getParamDecl(n-1)->hasDefaultArg()) {
+        --n;
+    }
+    // look for callsites that are actually using the defaulted values
+    if ( n < (int)callExpr->getNumArgs() && callExpr->getArg(n)->isDefaultArgument()) {
+        MyCallInfo callInfo;
+        niceName(functionDecl, callInfo);
+        callInfo.sourceLocationOfCall = locationToString(callExpr->getLocStart());
+        callSet.insert(callInfo);
+    }
+    return true;
+}
+
+std::string CountUsersOfDefaultParams::locationToString(const SourceLocation& sourceLoc)
+{
+    SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( sourceLoc );
+    StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
+    return std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
+}
+
+bool CountUsersOfDefaultParams::VisitFunctionDecl( const FunctionDecl* functionDecl )
+{
+    functionDecl = functionDecl->getCanonicalDecl();
+    if( !functionDecl || !functionDecl->getLocation().isValid() || ignoreLocation( functionDecl )) {
+        return true;
+    }
+    const CXXMethodDecl* methodDecl = dyn_cast_or_null<CXXMethodDecl>(functionDecl);
+
+    // ignore method overrides, since the call will show up as being directed to the root method
+    if (methodDecl && (methodDecl->size_overridden_methods() != 0 || methodDecl->hasAttr<OverrideAttr>())) {
+        return true;
+    }
+    // ignore stuff that forms part of the stable URE interface
+    if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(
+                              functionDecl->getNameInfo().getLoc()))) {
+        return true;
+    }
+    if (isa<CXXDestructorDecl>(functionDecl)) {
+        return true;
+    }
+    if (isa<CXXConstructorDecl>(functionDecl)) {
+        return true;
+    }
+    if (functionDecl->isDeleted()) {
+        return true;
+    }
+    auto n = functionDecl->getNumParams();
+    if (n == 0 || !functionDecl->getParamDecl(n - 1)->hasDefaultArg()) {
+        return true;
+    }
+
+    if( functionDecl->getLocation().isValid() )
+    {
+        MyFuncInfo funcInfo;
+        niceName(functionDecl, funcInfo);
+        definitionSet.insert(funcInfo);
+    }
+    return true;
+}
+
+loplugin::Plugin::Registration< CountUsersOfDefaultParams > X("countusersofdefaultparams", false);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/countusersofdefaultparams.py b/compilerplugins/clang/countusersofdefaultparams.py
new file mode 100755
index 0000000..cfb2711
--- /dev/null
+++ b/compilerplugins/clang/countusersofdefaultparams.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+import sys
+import re
+import io
+
+definitionToSourceLocationMap = dict()
+callDict = dict()
+
+# clang does not always use exactly the same numbers in the type-parameter vars it generates
+# so I need to substitute them to ensure we can match correctly.
+normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+")
+def normalizeTypeParams( line ):
+    return normalizeTypeParamsRegex.sub("type-parameter-?-?", line)
+
+# The parsing here is designed to avoid grabbing stuff which is mixed in from gbuild.
+# I have not yet found a way of suppressing the gbuild output.
+with io.open("loplugin.countusersofdefaultparams.log", "rb", buffering=1024*1024) as txt:
+    for line in txt:
+        if line.startswith("defn:\t"):
+            tokens = line.strip().split("\t")
+            access = tokens[1]
+            returnType = tokens[2]
+            nameAndParams = tokens[3]
+            sourceLocation = tokens[4]
+            funcInfo = normalizeTypeParams(returnType) + " " + normalizeTypeParams(nameAndParams)
+            definitionToSourceLocationMap[funcInfo] = sourceLocation
+            if not funcInfo in callDict:
+                callDict[funcInfo] = set()
+        elif line.startswith("call:\t"):
+            tokens = line.strip().split("\t")
+            returnType = tokens[1]
+            nameAndParams = tokens[2]
+            sourceLocationOfCall = tokens[3]
+            funcInfo = normalizeTypeParams(returnType) + " " + normalizeTypeParams(nameAndParams)
+            if not funcInfo in callDict:
+                callDict[funcInfo] = set()
+            callDict[funcInfo].add(sourceLocationOfCall)
+
+# Invert the definitionToSourceLocationMap.
+sourceLocationToDefinitionMap = {}
+for k, v in definitionToSourceLocationMap.iteritems():
+    sourceLocationToDefinitionMap[v] = sourceLocationToDefinitionMap.get(v, [])
+    sourceLocationToDefinitionMap[v].append(k)
+
+    
+tmp1list = list()
+for k,v in callDict.iteritems():
+    if len(v) >= 1:
+        continue
+    # created by macros
+    if k.endswith("::RegisterInterface(class SfxModule *)"):
+        continue
+    if k.endswith("::RegisterChildWindow(_Bool,class SfxModule *,enum SfxChildWindowFlags)"):
+        continue
+    if k.endswith("::RegisterControl(unsigned short,class SfxModule *)"):
+        continue
+    if k.endswith("::RegisterFactory(unsigned short)"):
+        continue
+    # windows-only stuff
+    if "ShutdownIcon::OpenURL" in k:
+        continue
+    if k in definitionToSourceLocationMap:
+        tmp1list.append((k, definitionToSourceLocationMap[k]))
+
+# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely
+def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
+    return [int(text) if text.isdigit() else text.lower()
+            for text in re.split(_nsre, s)]
+
+# sort results by name and line number
+tmp1list.sort(key=lambda v: natural_sort_key(v[1]))
+
+# print out the results
+with open("loplugin.countusersofdefaultparams.report", "wt") as f:
+    for t in tmp1list:
+        f.write(t[1] + "\n")
+        f.write("    " + t[0] + "\n")
+
+
diff --git a/compilerplugins/clang/unuseddefaultparams.py b/compilerplugins/clang/unuseddefaultparams.py
index c0c6c61..45ef27e 100755
--- a/compilerplugins/clang/unuseddefaultparams.py
+++ b/compilerplugins/clang/unuseddefaultparams.py
@@ -8,12 +8,6 @@ definitionSet = set()
 definitionToSourceLocationMap = dict()
 callSet = set()
 
-# things we need to exclude for reasons like :
-# - it's a weird template thingy that confuses the plugin
-exclusionSet = set([
-    "class boost::intrusive_ptr<class FontCharMap> FontCharMap::GetDefaultMap(_Bool)"
-])
-
 # clang does not always use exactly the same numbers in the type-parameter vars it generates
 # so I need to substitute them to ensure we can match correctly.
 normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+")
@@ -56,12 +50,14 @@ for k, definitions in sourceLocationToDefinitionMap.iteritems():
     
 tmp1set = set()
 for d in definitionSet:
-    clazz = d[0] + " " + d[1]
-    if clazz in exclusionSet:
+    methodSignature = d[0] + " " + d[1]
+    if (methodSignature == "class boost::intrusive_ptr<class FontCharMap> FontCharMap::GetDefaultMap(_Bool)"
+        # bunch of methods in here all with the same signature
+        or "SwAttrSet::" in d[1] or "SwFormat::" in d[1]):
         continue
     if d in callSet:
         continue
-    tmp1set.add((clazz, definitionToSourceLocationMap[d]))
+    tmp1set.add((methodSignature, definitionToSourceLocationMap[d]))
 
 # sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely
 def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx b/include/basegfx/polygon/b2dlinegeometry.hxx
index 5aefafb..60230cc 100644
--- a/include/basegfx/polygon/b2dlinegeometry.hxx
+++ b/include/basegfx/polygon/b2dlinegeometry.hxx
@@ -74,7 +74,7 @@ namespace basegfx
             const B2DPolyPolygon& rArrow,
             bool bStart,
             double fWidth,
-            double fCandidateLength = 0.0, // 0.0 -> calculate self
+            double fCandidateLength, // 0.0 -> calculate self
             double fDockingPosition = 0.5, // 0->top, 1->bottom
             double* pConsumedLength = nullptr,
             double fShift = 0.0);
@@ -132,7 +132,7 @@ namespace basegfx
         BASEGFX_DLLPUBLIC B2DPolyPolygon createAreaGeometry(
             const B2DPolygon& rCandidate,
             double fHalfLineWidth,
-            B2DLineJoin eJoin = B2DLineJoin::Round,
+            B2DLineJoin eJoin,
             css::drawing::LineCap eCap = css::drawing::LineCap_BUTT,
             double fMaxAllowedAngle = (12.5 * F_PI180),
             double fMaxPartOfEdge = 0.4,
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx
index 423cf8f..f73e02a 100644
--- a/include/basegfx/polygon/b2dpolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolygontools.hxx
@@ -132,13 +132,13 @@ namespace basegfx
         BASEGFX_DLLPUBLIC B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
 
         // Subdivide all contained curves. Use distanceBound value if given.
-        BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon& rCandidate, double fDistanceBound = 0.0);
+        BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon& rCandidate, double fDistanceBound);
 
         // Subdivide all contained curves. Use angleBound value if given.
         BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon& rCandidate, double fAngleBound = 0.0);
 
         // #i37443# Subdivide all contained curves.
-        BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount = 0L);
+        BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount);
 
         // This version works with two points and vectors to define the
         // edges for the cut test.
@@ -344,17 +344,17 @@ namespace basegfx
         BASEGFX_DLLPUBLIC B2VectorOrientation getOrientationForIndex(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
 
         // calculates if given point is on given line, taking care of the numerical epsilon
-        BASEGFX_DLLPUBLIC bool isPointOnLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidate, bool bWithPoints = false);
+        BASEGFX_DLLPUBLIC bool isPointOnLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidate, bool bWithPoints);
 
         // calculates if given point is on given polygon, taking care of the numerical epsilon. Uses
         // isPointOnLine internally
         BASEGFX_DLLPUBLIC bool isPointOnPolygon(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithPoints = true);
 
         // test if candidate is inside triangle
-        BASEGFX_DLLPUBLIC bool isPointInTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC, const B2DPoint& rCandidate, bool bWithBorder = false);
+        BASEGFX_DLLPUBLIC bool isPointInTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC, const B2DPoint& rCandidate, bool bWithBorder);
 
         // test if candidateA and candidateB are on the same side of the given line
-        BASEGFX_DLLPUBLIC bool arePointsOnSameSideOfLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidateA, const B2DPoint& rCandidateB, bool bWithLine = false);
+        BASEGFX_DLLPUBLIC bool arePointsOnSameSideOfLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidateA, const B2DPoint& rCandidateB, bool bWithLine);
 
         // add triangles for given rCandidate to rTarget. For each triangle, 3 points will be added to rCandidate.
         // All triangles will go from the start point of rCandidate to two consecutive points, building (rCandidate.count() - 2)
@@ -463,7 +463,7 @@ namespace basegfx
         B2DPolygon UnoPolygonBezierCoordsToB2DPolygon(
             const css::drawing::PointSequence& rPointSequenceSource,
             const css::drawing::FlagSequence& rFlagSequenceSource,
-            bool bCheckClosed = true);
+            bool bCheckClosed);
         void B2DPolygonToUnoPolygonBezierCoords(
             const B2DPolygon& rPolyPolygon,
             css::drawing::PointSequence& rPointSequenceRetval,
diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx
index 07880e9..97817a8 100644
--- a/include/basegfx/polygon/b2dpolypolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolypolygontools.hxx
@@ -52,7 +52,7 @@ namespace basegfx
         BASEGFX_DLLPUBLIC B2DPolyPolygon correctOutmostPolygon(const B2DPolyPolygon& rCandidate);
 
         // Subdivide all contained curves. Use distanceBound value if given.
-        BASEGFX_DLLPUBLIC B2DPolyPolygon adaptiveSubdivideByDistance(const B2DPolyPolygon& rCandidate, double fDistanceBound = 0.0);
+        BASEGFX_DLLPUBLIC B2DPolyPolygon adaptiveSubdivideByDistance(const B2DPolyPolygon& rCandidate, double fDistanceBound);
 
         // Subdivide all contained curves. Use distanceBound value if given. Else, a convenient one
         // is created.
@@ -265,7 +265,7 @@ namespace basegfx
             are 'lit' for the given number. Return un-lit segments
             otherwise.
          */
-        B2DPolyPolygon createSevenSegmentPolyPolygon(sal_Char cNumber, bool bLitSegments=true);
+        B2DPolyPolygon createSevenSegmentPolyPolygon(sal_Char cNumber, bool bLitSegments);
 
         /** snap some polygon coordinates to discrete coordinates
 
diff --git a/include/basegfx/polygon/b2dtrapezoid.hxx b/include/basegfx/polygon/b2dtrapezoid.hxx
index 41885cf..f838a63 100644
--- a/include/basegfx/polygon/b2dtrapezoid.hxx
+++ b/include/basegfx/polygon/b2dtrapezoid.hxx
@@ -94,7 +94,7 @@ namespace basegfx
             B2DTrapezoidVector& ro_Result,
             const B2DPoint& rPointA,
             const B2DPoint& rPointB,
-            double fLineWidth = 1.0);
+            double fLineWidth);
 
         // create trapezoids for all edges of the given polygon. The closed state of
         // the polygon is taken into account. If curves are contaned, the default
@@ -102,7 +102,7 @@ namespace basegfx
         BASEGFX_DLLPUBLIC void createLineTrapezoidFromB2DPolygon(
             B2DTrapezoidVector& ro_Result,
             const B2DPolygon& rPolygon,
-            double fLineWidth = 1.0);
+            double fLineWidth);
 
         // create trapezoids for all edges of the given polyPolygon. The closed state of
         // the tools::PolyPolygon is taken into account. If curves are contaned, the default
@@ -110,7 +110,7 @@ namespace basegfx
         BASEGFX_DLLPUBLIC void createLineTrapezoidFromB2DPolyPolygon(
             B2DTrapezoidVector& ro_Result,
             const B2DPolyPolygon& rPolyPolygon,
-            double fLineWidth = 1.0);
+            double fLineWidth);
 
     } // end of namespace tools
 } // end of namespace basegfx
diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx
index 9a22910..fa1442f 100644
--- a/include/basegfx/polygon/b3dpolygontools.hxx
+++ b/include/basegfx/polygon/b3dpolygontools.hxx
@@ -65,7 +65,7 @@ namespace basegfx
             const B3DPolygon& rCandidate,
             const ::std::vector<double>& rDotDashArray,
             B3DPolyPolygon* pLineTarget,
-            B3DPolyPolygon* pGapTarget = nullptr,
+            B3DPolyPolygon* pGapTarget,
             double fFullDashDotLen = 0.0);
 
         /** Create/replace normals for given 3d geometry with default normals from given center to outside.
@@ -83,20 +83,20 @@ namespace basegfx
             If bChangeX, x texture coordinate will be recalculated.
             If bChangeY, y texture coordinate will be recalculated.
          */
-        BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesParallel( const B3DPolygon& rCandidate, const B3DRange& rRange, bool bChangeX = true, bool bChangeY = true);
+        BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesParallel( const B3DPolygon& rCandidate, const B3DRange& rRange, bool bChangeX, bool bChangeY = true);
 
         /** Create/replace texture coordinates for given 3d geometry with spherical one
             rCenter: the centre of the used 3d geometry
             If bChangeX, x texture coordinate will be recalculated.
             If bChangeY, y texture coordinate will be recalculated.
          */
-        BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter, bool bChangeX = true, bool bChangeY = true);
+        BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter, bool bChangeX, bool bChangeY = true);
 
         // isInside tests for B3DPoint. On border is not inside as long as not true is given in bWithBorder flag.
-        BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder = false);
+        BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder);
 
         // calculates if given point is on given line, taking care of the numerical epsilon
-        BASEGFX_DLLPUBLIC bool isPointOnLine(const B3DPoint& rStart, const B3DPoint& rEnd, const B3DPoint& rCandidate, bool bWithPoints = false);
+        BASEGFX_DLLPUBLIC bool isPointOnLine(const B3DPoint& rStart, const B3DPoint& rEnd, const B3DPoint& rCandidate, bool bWithPoints);
 
         // calculates if given point is on given polygon, taking care of the numerical epsilon. Uses
         // isPointOnLine internally
diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx
index afb4acf..f88c283 100644
--- a/include/basegfx/polygon/b3dpolypolygontools.hxx
+++ b/include/basegfx/polygon/b3dpolypolygontools.hxx
@@ -64,7 +64,7 @@ namespace basegfx
             With VerStart, VerStop and hor range in cartesian may be specified to create a partial sphere only.
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSpherePolyPolygon(
-            sal_uInt32 nHorSeg = 0L, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
 
@@ -74,7 +74,7 @@ namespace basegfx
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createSpherePolyPolygonFromB3DRange(
             const B3DRange& rRange,
-            sal_uInt32 nHorSeg = 0L, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
 
@@ -82,7 +82,7 @@ namespace basegfx
             There is one extra, the bool bNormals defines if normals will be set, default is false
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSphereFillPolyPolygon(
-            sal_uInt32 nHorSeg = 0L, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
             bool bNormals = false,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
@@ -92,7 +92,7 @@ namespace basegfx
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createSphereFillPolyPolygonFromB3DRange(
             const B3DRange& rRange,
-            sal_uInt32 nHorSeg = 0L, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
             bool bNormals = false,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index c09c79c..7919980 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -61,7 +61,7 @@ public:
     void       GetLineRange( sal_uInt16&, sal_uInt16& );
 
     // Interface to execute a method from the applications
-    ErrCode         Call( SbxValue* pRet = nullptr,  SbxVariable* pCaller = nullptr );
+    ErrCode         Call( SbxValue* pRet,  SbxVariable* pCaller = nullptr );
     virtual void    Broadcast( sal_uInt32 nHintId ) override;
 };
 
diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx
index 25c7815..717aea3 100644
--- a/include/basic/sbxcore.hxx
+++ b/include/basic/sbxcore.hxx
@@ -91,7 +91,7 @@ public:
     static void AddFactory( SbxFactory* );
     static void RemoveFactory( SbxFactory* );
 
-    static SbxBase* Create( sal_uInt16, sal_uInt32=SBXCR_SBX );
+    static SbxBase* Create( sal_uInt16, sal_uInt32 );
     static SbxObject* CreateObject( const OUString& );
 };
 
diff --git a/include/basic/sbxfac.hxx b/include/basic/sbxfac.hxx
index 95139d5..5b3e3b4 100644
--- a/include/basic/sbxfac.hxx
+++ b/include/basic/sbxfac.hxx
@@ -34,7 +34,7 @@ public:
     virtual ~SbxFactory();
     SbxFactory( bool bLast=false )  { bHandleLast = bLast; }
     bool IsHandleLast()       { return bHandleLast; }
-    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
+    virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 );
     virtual SbxObject* CreateObject( const OUString& );
 };
 
diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx
index 80449e2..b91056d 100644
--- a/include/basic/sbxobj.hxx
+++ b/include/basic/sbxobj.hxx
@@ -78,7 +78,7 @@ public:
     SbxArray* GetProperties()   { return pProps;    }
     SbxArray* GetObjects()      { return pObjs;     }
     // Debugging
-    void Dump( SvStream&, bool bDumpAll=false );
+    void Dump( SvStream&, bool bDumpAll );
 };
 
 #endif // INCLUDED_BASIC_SBXOBJ_HXX
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index c90e98b..1cdac7c 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -174,7 +174,7 @@ public:
     bool Convert( SbxDataType );
     bool Compute( SbxOperator, const SbxValue& );
     bool Compare( SbxOperator, const SbxValue& ) const;
-    bool Scan( const OUString&, sal_uInt16* = nullptr );
+    bool Scan( const OUString&, sal_uInt16* );
     void Format( OUString&, const OUString* = nullptr ) const;
 
     // The following operators are definied for easier handling.
@@ -246,7 +246,7 @@ public:
     SbxVariable( const SbxVariable& );
     SbxVariable& operator=( const SbxVariable& );
 
-    void Dump( SvStream&, bool bDumpAll=false );
+    void Dump( SvStream&, bool bDumpAll );
 
     void SetName( const OUString& );
     const OUString& GetName( SbxNameType = SbxNAME_NONE ) const;
diff --git a/include/comphelper/accessiblewrapper.hxx b/include/comphelper/accessiblewrapper.hxx
index 84479c0..4676d2c 100644
--- a/include/comphelper/accessiblewrapper.hxx
+++ b/include/comphelper/accessiblewrapper.hxx
@@ -339,7 +339,7 @@ namespace comphelper
         /** specifies if the children are to be considered transient (i.e.: not cached)
             <p>to be called only once per lifetime</p>
         */
-        void    setTransientChildren( bool _bSet = true );
+        void    setTransientChildren( bool _bSet );
 
         /** sets the XAccessible which belongs to the XAccessibleContext which we work for
             <p>to be called only once per lifetime</p>
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx
index 915d803..d2df43b 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -245,9 +245,7 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty
     /// com.sun.star.configuration.theDefaultProvider.
     ///
     /// For nillable properties, U is of type boost::optional<U'>.
-    static U get(
-        css::uno::Reference< css::uno::XComponentContext >
-            const & context = comphelper::getProcessComponentContext())
+    static U get(css::uno::Reference< css::uno::XComponentContext > const & context)
     {
         // Folding this into one statement causes a bogus error at least with
         // Red Hat GCC 4.6.2-1:
diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx
index 70a583c..af548ad 100644
--- a/include/comphelper/embeddedobjectcontainer.hxx
+++ b/include/comphelper/embeddedobjectcontainer.hxx
@@ -57,7 +57,7 @@ class COMPHELPER_DLLPUBLIC EmbeddedObjectContainer
 
     css::uno::Reference < css::embed::XEmbeddedObject > Get_Impl( const OUString&,
             const css::uno::Reference < css::embed::XEmbeddedObject >& xCopy,
-            OUString const* pBaseURL = nullptr);
+            OUString const* pBaseURL);
 
 public:
     // add an embedded object to the container storage
diff --git a/include/comphelper/propertybag.hxx b/include/comphelper/propertybag.hxx
index 3cc4cea..2123484 100644
--- a/include/comphelper/propertybag.hxx
+++ b/include/comphelper/propertybag.hxx
@@ -53,7 +53,7 @@ namespace comphelper
             @param i_isAllowed
                 iff true, empty property name will be allowed
          */
-        void setAllowEmptyPropertyName(bool i_isAllowed = true);
+        void setAllowEmptyPropertyName(bool i_isAllowed);
 
         /** adds a property to the bag
 
diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index cbc2317..7d8209d 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -32,7 +32,7 @@ namespace comphelper
     /** search the given string within the given sequence, return the positions where it was found.
         if _bOnlyFirst is sal_True, only the first occurrence will be returned.
     */
-    COMPHELPER_DLLPUBLIC css::uno::Sequence<sal_Int16> findValue(const css::uno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst = false);
+    COMPHELPER_DLLPUBLIC css::uno::Sequence<sal_Int16> findValue(const css::uno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst);
 
     namespace internal
     {
diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx
index ea87628..8aab4f1 100644
--- a/include/comphelper/string.hxx
+++ b/include/comphelper/string.hxx
@@ -253,7 +253,7 @@ COMPHELPER_DLLPUBLIC OUString setToken(const OUString& rIn, sal_Int32 nToken, sa
             or -1 if none of the code units occur in the string
  */
 COMPHELPER_DLLPUBLIC sal_Int32 indexOfAny(OUString const& rIn,
-        sal_Unicode const*const pChars, sal_Int32 const nPos = 0);
+        sal_Unicode const*const pChars, sal_Int32 const nPos);
 
 /** Convert a sequence of strings to a single comma separated string.
 
diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx
index 18e0919..2d57893 100644
--- a/include/connectivity/dbtools.hxx
+++ b/include/connectivity/dbtools.hxx
@@ -332,7 +332,7 @@ namespace dbtools
     OOO_DLLPUBLIC_DBTOOLS
     bool isDataSourcePropertyEnabled(const css::uno::Reference< css::uno::XInterface>& _xProp,
                                      const OUString& _sProperty,
-                                           bool _bDefault = false);
+                                           bool _bDefault);
 
     /** retrieves a particular indirect data source setting
 
@@ -509,7 +509,7 @@ namespace dbtools
     OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName(
         const css::uno::Sequence< OUString >& _rNames,
         const OUString& _rBaseName,
-        bool _bStartWithNumber = true
+        bool _bStartWithNumber
     );
 
     /** create a name which is a valid SQL 92 identifier name
@@ -590,7 +590,7 @@ namespace dbtools
                             sal_Int32 parameterIndex,
                             const ::connectivity::ORowSetValue& x,
                             sal_Int32 sqlType,
-                            sal_Int32 scale=0) throw(css::sdbc::SQLException, css::uno::RuntimeException);
+                            sal_Int32 scale) throw(css::sdbc::SQLException, css::uno::RuntimeException);
 
 
     /** implements <method scope="com.sun.star.sdb">XParameters::setObject</method>
@@ -622,7 +622,7 @@ namespace dbtools
     OUString createStandardCreateStatement(  const css::uno::Reference< css::beans::XPropertySet >& descriptor,
                                                     const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
                                                     ISQLStatementHelper* _pHelper,
-                                                    const OUString& _sCreatePattern = OUString());
+                                                    const OUString& _sCreatePattern);
 
     /** creates the standard sql statement for the key part of a create table statement.
         @param  descriptor
@@ -704,7 +704,7 @@ namespace dbtools
                                 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
                                 const OUString& _rName,
                                 bool _bCase,
-                                bool _bQueryForInfo = true,
+                                bool _bQueryForInfo,
                                 bool _bIsAutoIncrement = false,
                                 bool _bIsCurrency = false,
                                 sal_Int32 _nDataType = css::sdbc::DataType::OTHER);
diff --git a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
index 151473b..9e5b540 100644
--- a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
+++ b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
@@ -51,7 +51,7 @@ namespace drawinglayer
         */
         Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(
             const Primitive2DContainer& rChildren,
-            GraphicDrawMode aGraphicDrawMode = GRAPHICDRAWMODE_STANDARD,
+            GraphicDrawMode aGraphicDrawMode,
             double fLuminance = 0.0,        // [-1.0 .. 1.0]
             double fContrast = 0.0,         // [-1.0 .. 1.0]
             double fRed = 0.0,              // [-1.0 .. 1.0]
diff --git a/include/editeng/AccessibleImageBullet.hxx b/include/editeng/AccessibleImageBullet.hxx
index f13908f..aaa9482 100644
--- a/include/editeng/AccessibleImageBullet.hxx
+++ b/include/editeng/AccessibleImageBullet.hxx
@@ -145,7 +145,7 @@ namespace accessibility
         sal_Int32 GetParagraphIndex() const { return mnParagraphIndex; }
 
         /// Calls all Listener objects to tell them the change. Don't hold locks when calling this!
-        void FireEvent(const sal_Int16 nEventId, const css::uno::Any& rNewValue = css::uno::Any(), const css::uno::Any& rOldValue = css::uno::Any() ) const;
+        void FireEvent(const sal_Int16 nEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue = css::uno::Any() ) const;
 
     private:
         AccessibleImageBullet( const AccessibleImageBullet& ) = delete;
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index bd8cb5a..cc0a33f 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -84,7 +84,7 @@ namespace editeng {
         bool            HasGapColor() const { return m_pColorGapFn != nullptr; }
         Color           GetColorGap() const;
 
-        void SetWidth( long nWidth = 0 );
+        void SetWidth( long nWidth );
         /** Guess the style and width from the three lines widths values.
 
             When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 83c42e2..73f66d9 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -106,7 +106,7 @@ public:
     void    SetDistance( sal_uInt16 nNew, SvxBoxItemLine nLine );
     inline void SetAllDistances( sal_uInt16 nNew );
 
-    void SetRemoveAdjacentCellBorder( bool bSet = true ) { bRemoveAdjCellBorder = bSet; }
+    void SetRemoveAdjacentCellBorder( bool bSet ) { bRemoveAdjCellBorder = bSet; }
 
     // Line width plus Space plus inward distance
     // bIgnoreLine = TRUE -> Also return distance, when no Line is set
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index a20c996..d30b3b0 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -158,7 +158,7 @@ private:
 
                                        EditEngine( const EditEngine& ) = delete;
                        EditEngine&     operator=( const EditEngine& ) = delete;
-    EDITENG_DLLPRIVATE bool            PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, vcl::Window* pFrameWin = nullptr );
+    EDITENG_DLLPRIVATE bool            PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, vcl::Window* pFrameWin );
 
     EDITENG_DLLPRIVATE void CursorMoved(ContentNode* pPrevNode);
     EDITENG_DLLPRIVATE void CheckIdleFormatter();
@@ -227,7 +227,7 @@ public:
 
     void            InsertView(EditView* pEditView, size_t nIndex = EE_APPEND);
     EditView*       RemoveView( EditView* pEditView );
-    void            RemoveView(size_t nIndex = EE_APPEND);
+    void            RemoveView(size_t nIndex);
     EditView*       GetView(size_t nIndex = 0) const;
     size_t          GetViewCount() const;
     bool            HasView( EditView* pView ) const;
@@ -326,7 +326,7 @@ public:
 
     void            RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich );
 
-    void            ShowParagraph( sal_Int32 nParagraph, bool bShow = true );
+    void            ShowParagraph( sal_Int32 nParagraph, bool bShow );
 
     ::svl::IUndoManager& GetUndoManager();
     ::svl::IUndoManager* SetUndoManager(::svl::IUndoManager* pNew);
@@ -358,7 +358,7 @@ public:
     long            GetFirstLineStartX( sal_Int32 nParagraph );
     Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     Point           GetDocPos( const Point& rPaperPos ) const;
-    bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
+    bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder );
 
     // StartDocPos corresponds to VisArea.TopLeft().
     void            Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
@@ -395,7 +395,7 @@ public:
     void            QuickDelete( const ESelection& rSel );
     void            QuickMarkToBeRepainted( sal_Int32 nPara );
 
-    void            SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
+    void            SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY = 100 );
     void            GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) const;
 
     void            SetEditTextObjectPool( SfxItemPool* pPool );
@@ -547,7 +547,7 @@ public:
 
     EditPaM CreateEditPaM(const EPaM& rEPaM);
     EditPaM ConnectParagraphs(
-        ContentNode* pLeft, ContentNode* pRight, bool bBackward = false);
+        ContentNode* pLeft, ContentNode* pRight, bool bBackward);
 
     EditPaM InsertField(const EditSelection& rEditSelection, const SvxFieldItem& rFld);
     EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr);
@@ -593,13 +593,13 @@ public:
     EditSelection MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos, EditView* pCurView);
 
     void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
-    void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich = 0);
+    void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich);
 
     ViewsType& GetEditViews();
     const ViewsType& GetEditViews() const;
 
     void SetUndoMode(bool b);
-    void FormatAndUpdate(EditView* pCurView = nullptr);
+    void FormatAndUpdate(EditView* pCurView);
 
     void Undo(EditView* pView);
     void Redo(EditView* pView);
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index a3ab3a9..6920d06 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -110,7 +110,7 @@ public:
 
     void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
 
-    bool RemoveCharAttribs( sal_uInt16 nWhich = 0 );
+    bool RemoveCharAttribs( sal_uInt16 nWhich );
 
     /**
      * Get all text sections in this content.  Sections are non-overlapping
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 3175cd0..7c28a75 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -174,10 +174,10 @@ public:
     SfxItemSet          GetAttribs();
     void                SetAttribs( const SfxItemSet& rSet );
     void                RemoveAttribs( bool bRemoveParaAttribs = false, sal_uInt16 nWhich = 0 );
-    void                RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
-    void                RemoveAttribsKeepLanguages( bool bRemoveParaAttribs = false );
+    void                RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich );
+    void                RemoveAttribsKeepLanguages( bool bRemoveParaAttribs );
 
-    sal_uInt32          Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
+    sal_uInt32          Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs );
 
     void            SetBackgroundColor( const Color& rColor );
     Color           GetBackgroundColor() const;
@@ -217,7 +217,7 @@ public:
 
     bool            IsCursorAtWrongSpelledWord();
     bool            IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
-    void            ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = nullptr );
+    void            ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack );
 
     void                InsertField( const SvxFieldItem& rFld );
     const SvxFieldItem* GetFieldUnderMousePointer() const;
diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx
index 064d68a..084fcb2 100644
--- a/include/editeng/lrspitem.hxx
+++ b/include/editeng/lrspitem.hxx
@@ -115,7 +115,7 @@ public:
 
     inline void   SetTextFirstLineOfst( const short nF, const sal_uInt16 nProp = 100 );
     inline short  GetTextFirstLineOfst() const { return nFirstLineOfst; }
-    inline void SetPropTextFirstLineOfst( const sal_uInt16 nProp = 100 )
+    inline void SetPropTextFirstLineOfst( const sal_uInt16 nProp )
                     { nPropFirstLineOfst = nProp; }
     inline sal_uInt16 GetPropTextFirstLineOfst() const
                     { return nPropFirstLineOfst; }
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 90df8d6..913f6f9 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -256,7 +256,7 @@ public:
 
     void        AdjustHeight( long nDY );
 
-    sal_uLong   Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
+    sal_uLong   Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs );
 
     void        InsertText( const OUString& rNew, bool bSelect = false );
     void        InsertText( const OutlinerParaObject& rParaObj );
@@ -307,7 +307,7 @@ public:
     void        SetSelection( const ESelection& );
     void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const;
 
-    void        RemoveAttribs( bool bRemoveParaAttribs = false, bool bKeepLanguages = false );
+    void        RemoveAttribs( bool bRemoveParaAttribs, bool bKeepLanguages = false );
     void        RemoveAttribsKeepLanguages( bool bRemoveParaAttribs );
     bool        HasSelection() const;
 
@@ -323,7 +323,7 @@ public:
     void ToggleBulletsNumbering(
         const bool bToggle,
         const bool bHandleBullets,
-        const SvxNumRule* pNumRule = nullptr );
+        const SvxNumRule* pNumRule );
 
     /** apply bullets/numbering for paragraphs
 
@@ -360,7 +360,7 @@ public:
 
     bool        IsCursorAtWrongSpelledWord();
     bool        IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
-    void        ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = nullptr );
+    void        ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack );
 
     void        SetInvalidateMore( sal_uInt16 nPixel );
     sal_uInt16  GetInvalidateMore() const;
@@ -942,7 +942,7 @@ public:
     sal_uLong       GetTextHeight( sal_Int32 nParagraph ) const;
     Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     Point           GetDocPos( const Point& rPaperPos ) const;
-    bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
+    bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder );
     bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, bool* pbBulletPos );
 
     void            SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index d135170..566e741 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -39,7 +39,7 @@ public:
     static Size     GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP );
     static Size     GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
     static Size     GetPaperSize( const Printer* pPrinter );
-    static Paper    GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = false );
+    static Paper    GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy = false );
     static long     GetSloppyPaperDimension( long nSize );
     static OUString GetName( Paper ePaper );
 };
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index d5dc16d..dbe2704 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -329,49 +329,42 @@ public:
     void SetAutoCorrFlag( long nFlag, bool bOn = true );
 
     // Load, Set, Get - the replacement list
-    SvxAutocorrWordList* LoadAutocorrWordList(
-                                    LanguageType eLang = LANGUAGE_SYSTEM )
+    SvxAutocorrWordList* LoadAutocorrWordList( LanguageType eLang )
         { return GetLanguageList_( eLang ).LoadAutocorrWordList(); }
 
     // Save word substitutions:
     //      Save these directly in the storage. The word list is updated
     //      accordingly!
     //  - pure Text
-    bool PutText( const OUString& rShort, const OUString& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
+    bool PutText( const OUString& rShort, const OUString& rLong, LanguageType eLang );
     //  - Text with attribution (only in the SWG - SWG format!)
-    void PutText( const OUString& rShort, SfxObjectShell& rShell,
-                 LanguageType eLang = LANGUAGE_SYSTEM )
+    void PutText( const OUString& rShort, SfxObjectShell& rShell, LanguageType eLang )
         { GetLanguageList_( eLang ).PutText(rShort, rShell ); }
 
     void MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries,
                                   std::vector<SvxAutocorrWord>& aDeleteEntries,
-                                  LanguageType eLang = LANGUAGE_SYSTEM );
+                                  LanguageType eLang );
 
     // Load, Set, Get - the exception list for capital letters at the
     // beginning of a sentence
     void SaveCplSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM );
-    SvStringsISortDtor* LoadCplSttExceptList(
-                                    LanguageType eLang = LANGUAGE_SYSTEM)
+    SvStringsISortDtor* LoadCplSttExceptList(LanguageType eLang)
         {   return GetLanguageList_( eLang ).LoadCplSttExceptList(); }
-    const SvStringsISortDtor* GetCplSttExceptList(
-                                    LanguageType eLang = LANGUAGE_SYSTEM )
+    const SvStringsISortDtor* GetCplSttExceptList( LanguageType eLang )
         {   return GetLanguageList_( eLang ).GetCplSttExceptList(); }
 
     // Adds a single word. The list will be immediately written to the file!
-    bool AddCplSttException( const OUString& rNew,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+    bool AddCplSttException( const OUString& rNew, LanguageType eLang );
 
     // Load, Set, Get the exception list for 2 Capital letters at the
     // beginning of a word.
-    void SaveWrdSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM );
-    SvStringsISortDtor* LoadWrdSttExceptList(
-                                    LanguageType eLang = LANGUAGE_SYSTEM )
+    void SaveWrdSttExceptList( LanguageType eLang );
+    SvStringsISortDtor* LoadWrdSttExceptList( LanguageType eLang )
         {   return GetLanguageList_( eLang ).LoadWrdSttExceptList(); }
-    const SvStringsISortDtor* GetWrdSttExceptList(
-                                    LanguageType eLang = LANGUAGE_SYSTEM )
+    const SvStringsISortDtor* GetWrdSttExceptList( LanguageType eLang )
         {   return GetLanguageList_( eLang ).GetWrdSttExceptList(); }
     // Adds a single word. The list will be immediately written to the file!
-    bool AddWrtSttException( const OUString& rNew, LanguageType eLang = LANGUAGE_SYSTEM);
+    bool AddWrtSttException( const OUString& rNew, LanguageType eLang);
 
     // Search through the Languages for the entry
     bool FindInWrdSttExceptList( LanguageType eLang, const OUString& sWord );
@@ -381,27 +374,27 @@ public:
     // Methods for the auto-correction
     bool FnCapitalStartWord( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+                                LanguageType eLang );
     bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+                                LanguageType eLang );
     bool FnChgToEnEmDash( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+                                LanguageType eLang );
     bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+                                LanguageType eLang );
     bool FnSetINetAttr( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang = LANGUAGE_SYSTEM );
+                                LanguageType eLang );
     bool FnChgWeightUnderl( SvxAutoCorrDoc&, const OUString&,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos );
     bool FnCapitalStartSentence( SvxAutoCorrDoc&, const OUString&, bool bNormalPos,
                                 sal_Int32 nSttPos, sal_Int32 nEndPos,
-                                LanguageType eLang  = LANGUAGE_SYSTEM);
+                                LanguageType eLang);
     bool FnCorrectCapsLock( SvxAutoCorrDoc&, const OUString&,
                             sal_Int32 nSttPos, sal_Int32 nEndPos,
-                            LanguageType eLang  = LANGUAGE_SYSTEM );
+                            LanguageType eLang );
 
     bool                HasRunNext() { return bRunNext; }
 
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index 8ec9c61..68b96f3 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -147,7 +147,7 @@ public:
     SvxAccessibleTextAdapter*                   GetTextForwarderAdapter(); // covariant return types don't work on MSVC
     virtual SvxViewForwarder*                   GetViewForwarder() override;
     virtual SvxEditViewForwarder*               GetEditViewForwarder( bool bCreate = false ) override;
-    SvxAccessibleTextEditViewAdapter*           GetEditViewForwarderAdapter( bool bCreate = false ); // covariant return types don't work on MSVC
+    SvxAccessibleTextEditViewAdapter*           GetEditViewForwarderAdapter( bool bCreate ); // covariant return types don't work on MSVC
     virtual void                                UpdateData() override;
     virtual SfxBroadcaster&                     GetBroadcaster() const override;
 
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index b541b36..e71ec47 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -688,7 +688,7 @@ public:
     sal_uInt32  GetBlibStoreContainerSize( SvStream* pMergePicStreamBSE = nullptr ) const;
     void        WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = nullptr  );
     void        WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId,
-                    bool bWritePictureOffset, sal_uInt32 nResize = 0);
+                    bool bWritePictureOffset, sal_uInt32 nResize);
     sal_uInt32  GetBlibID(
                     SvStream& rPicOutStream,
                     const OString& rGraphicId,
@@ -1233,7 +1233,7 @@ public:
     void AddChildAnchor( const Rectangle& rRectangle );
     void AddClientAnchor( const Rectangle& rRectangle );
 
-    virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect = nullptr );
+    virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect );
     sal_uInt32  EnterGroup( const Rectangle* pBoundRect = nullptr );
     sal_uInt32  GetGroupLevel() const { return mnGroupLevel; };
     void SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
@@ -1246,7 +1246,7 @@ public:
     virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect);
 
     static sal_uInt32  GetColor( const sal_uInt32 nColor );
-    static sal_uInt32  GetColor( const Color& rColor, bool bSwap = true );
+    static sal_uInt32  GetColor( const Color& rColor, bool bSwap );
 
                 // ...Sdr... implemented in eschesdo.cxx
 
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 9cbf2e1..3eca3ca 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -100,7 +100,7 @@ public:
     void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const;
     void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const;
     void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const;
-    void ImportGradientColor( SfxItemSet& aSet, MSO_FillType eMSO_FillType, double dTrans = 1.0 , double dBackTrans = 1.0 ) const;
+    void ImportGradientColor( SfxItemSet& aSet, MSO_FillType eMSO_FillType, double dTrans, double dBackTrans = 1.0 ) const;
 };
 
 #define COL_DEFAULT RGB_COLORDATA( 0xFA, 0xFB, 0xFC )
@@ -501,13 +501,13 @@ protected:
                                    DffObjData& rData,
                                    void* pData,
                                    Rectangle& rTextRect,
-                                   SdrObject* pObj = nullptr);
+                                   SdrObject* pObj);
 
     /** Object finalization, used by the Excel filter to correctly
         compute the object anchoring after nested objects have been imported.
     */
     virtual SdrObject* FinalizeObj(DffObjData& rData,
-                                   SdrObject* pObj = nullptr);
+                                   SdrObject* pObj);
 
     virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const;
 
@@ -555,7 +555,7 @@ public:
 
     static OUString MSDFFReadZString( SvStream& rIn,
                                            sal_uInt32 nMaxLen,
-                                           bool bUniCode = false);
+                                           bool bUniCode);
 
     static bool ReadCommonRecordHeader( SvStream& rSt,
                                         sal_uInt8& rVer,
@@ -661,14 +661,14 @@ public:
                             void* pData,
                             Rectangle& rClientRect,
                             const Rectangle& rGlobalChildRect,
-                            int nCalledByGroup = 0,
+                            int nCalledByGroup,
                             sal_Int32* pShapeId = nullptr );
     SdrObject* ImportShape( const DffRecordHeader& rHd,
                             SvStream& rSt,
                             void* pData,
                             Rectangle& rClientRect,
                             const Rectangle& rGlobalChildRect,
-                            int nCalledByGroup = 0,
+                            int nCalledByGroup,
                             sal_Int32* pShapeId = nullptr);
 
     Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd,
@@ -724,7 +724,7 @@ public:
         const css::uno::Any& rAny,
         const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
         const OUString& rPropertyName,
-        bool bTestPropertyAvailability = false
+        bool bTestPropertyAvailability
     );
 
     void insertShapeId( sal_Int32 nShapeId, SdrObject* pShape );
diff --git a/include/filter/msfilter/rtfutil.hxx b/include/filter/msfilter/rtfutil.hxx
index 12ccb42..4db8c524 100644
--- a/include/filter/msfilter/rtfutil.hxx
+++ b/include/filter/msfilter/rtfutil.hxx
@@ -24,7 +24,7 @@ namespace rtfutil {
 MSFILTER_DLLPUBLIC OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
 
 /// Handles correct unicode and legacy export of a single character.
-MSFILTER_DLLPUBLIC OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess = nullptr, bool bUnicode = true);
+MSFILTER_DLLPUBLIC OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess, bool bUnicode = true);
 
 /**
  * Handles correct unicode and legacy export of a string.
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index a32a492..ee893ad 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -471,7 +471,7 @@ public:
     PptFontEntityAtom*  GetFontEnityAtom( sal_uInt32 nNum ) const;
     void                RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
     virtual SdrObject*  ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const;
-    virtual SdrObject*  ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = nullptr ) override;
+    virtual SdrObject*  ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override;
     virtual void        ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) override;
     void                ImportHeaderFooterContainer( DffRecordHeader& rHeader, HeaderFooterEntry& rEntry );
 };
@@ -560,8 +560,8 @@ protected:
 protected:
     using SdrEscherImport::ReadObjText;
 
-    bool                    SeekToAktPage(DffRecordHeader* pRecHd=nullptr) const;
-    bool                    SeekToDocument(DffRecordHeader* pRecHd=nullptr) const;
+    bool                    SeekToAktPage(DffRecordHeader* pRecHd) const;
+    bool                    SeekToDocument(DffRecordHeader* pRecHd) const;
     static bool             SeekToContentOfProgTag(
                                 sal_Int32 nVersion,
                                 SvStream& rSt,
@@ -619,7 +619,7 @@ public:
                                 PptPageKind ePageKind = PPT_SLIDEPAGE
                             ) const;
 
-    void                    ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = nullptr );
+    void                    ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist );
     virtual bool            GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const override;
     virtual bool            SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const override;
     virtual const PptSlideLayoutAtom*   GetSlideLayoutAtom() const override;
@@ -1294,7 +1294,7 @@ public:
         mpPPTImporter           ( pPPTImporter )
     {};
     bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
-        css::uno::Reference<css::drawing::XShape > *pShapeRef=nullptr );
+        css::uno::Reference<css::drawing::XShape > *pShapeRef );
     virtual bool InsertControl(
         const css::uno::Reference< css::form::XFormComponent > &rFComp,
         const css::awt::Size& rSize,
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 0b2486b..5d0e3da 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -317,7 +317,7 @@ protected:
     void NotLine();
     OpCode Expression();
     void PopTokenArray();
-    void PushTokenArray( FormulaTokenArray*, bool = false );
+    void PushTokenArray( FormulaTokenArray*, bool );
 
     bool MergeRangeReference( FormulaToken * * const pCode1, FormulaToken * const * const pCode2 );
 
diff --git a/include/formula/IControlReferenceHandler.hxx b/include/formula/IControlReferenceHandler.hxx
index 38586f1..e1096c4 100644
--- a/include/formula/IControlReferenceHandler.hxx
+++ b/include/formula/IControlReferenceHandler.hxx
@@ -33,7 +33,7 @@ namespace formula
         virtual void ShowReference(const OUString& _sRef) = 0;
         virtual void HideReference( bool bDoneRefMode = true ) = 0;
         virtual void ReleaseFocus( RefEdit* pEdit ) = 0;
-        virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton = nullptr ) = 0;
+        virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton ) = 0;
 
     protected:
         ~IControlReferenceHandler() {}
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index 94b12c3..ac5aa57 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -75,8 +75,8 @@ private:
 protected:
 
     virtual bool    PreNotify( NotifyEvent& rNEvt ) override;
-    ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = nullptr );
-    void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = nullptr );
+    ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
+    void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton );
     void            RefInputDoneAfter();
 
     void            SetMeText(const OUString& _sText);
@@ -114,9 +114,9 @@ protected:
 protected:
 
     virtual bool    PreNotify( NotifyEvent& rNEvt ) override;
-    ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = nullptr );
-    void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = nullptr );
-    void            RefInputDoneAfter( bool bForced = false );
+    ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
+    void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton );
+    void            RefInputDoneAfter( bool bForced );
 
     void            SetMeText(const OUString& _sText);
     FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 6624cdf..618dd75 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -147,7 +147,7 @@ private:
     virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 ) override;
     virtual void CloseContainer() override;
 
-    virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect = nullptr ) override;
+    virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect ) override;
     virtual void LeaveGroup() override;
 
     virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 ) override;
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index b0df269..245f708 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -99,7 +99,7 @@ public:
     virtual void ShowReference(const OUString& _sRef) override;
     virtual void HideReference( bool bDoneRefMode = true ) override;
     virtual void ReleaseFocus( formula::RefEdit* pEdit ) override;
-    virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
+    virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ) override;
 };
 
 
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index afa7478..7c33328 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -979,12 +979,12 @@ private:
                             DffObjData& rDffObjData,
                             void* pClientData,
                             Rectangle& rTextRect,
-                            SdrObject* pOldSdrObj = nullptr ) override;
+                            SdrObject* pOldSdrObj ) override;
 
     /** Finalize a DFF object, sets anchor after nested objs have been loaded. */
     virtual SdrObject*  FinalizeObj(
                             DffObjData& rDffObjData,
-                            SdrObject* pOldSdrObj = nullptr ) override;
+                            SdrObject* pOldSdrObj ) override;
 
     // virtual functions of SvxMSConvertOCXControls
 
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 2ff1edf..280dbf7 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -148,7 +148,7 @@ public:
     virtual void        ShowReference(const OUString& rStr) override;
     virtual void        HideReference( bool bDoneRefMode = true ) override;
 
-    virtual void        ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
+    virtual void        ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ) override;
     virtual void        ReleaseFocus( formula::RefEdit* pEdit ) override;
 
     virtual void        ViewShellChanged() override;
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 0efb75d..5a0fbda 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -88,7 +88,7 @@ public:
     virtual void SetReference( const ScRange& rRef, ScDocument* pD ) override;
 
     virtual void ReleaseFocus( formula::RefEdit* pEdit ) override;
-    virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
+    virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ) override;
     virtual void RefInputDone( bool bForced = false ) override;
     virtual bool IsTableLocked() const override;
     virtual bool IsRefInputMode() const override;
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index a6a25d2..ef69e29 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -64,7 +64,7 @@ class ImplSdPPTImport : public SdrPowerPointImport
 
     void            FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName );
 
-    virtual         SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = nullptr ) override;
+    virtual         SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override;
     virtual         SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPageCapsule pPage,
                                             SfxStyleSheet*, SfxStyleSheet** ) const override;
 
diff --git a/shell/inc/xml_parser.hxx b/shell/inc/xml_parser.hxx
index 484b055..90aa366 100644
--- a/shell/inc/xml_parser.hxx
+++ b/shell/inc/xml_parser.hxx
@@ -68,7 +68,7 @@ public:
         @throws     SaxException
                     If the used Sax parser returns an error. The SaxException
                     contains detailed information about the error.  */
-    void parse(const char* XmlData, size_t Length, bool IsFinal = true);
+    void parse(const char* XmlData, size_t Length, bool IsFinal);
 
     /** Set a document handler
 
diff --git a/shell/source/win32/ooofilereader/basereader.cxx b/shell/source/win32/ooofilereader/basereader.cxx
index d2e9773..9b05cc5 100644
--- a/shell/source/win32/ooofilereader/basereader.cxx
+++ b/shell/source/win32/ooofilereader/basereader.cxx
@@ -67,7 +67,7 @@ void CBaseReader::Initialize( const std::string& ContentName)
         {
             xml_parser parser;
             parser.set_document_handler(this);  // pass current reader as reader to the sax parser
-            parser.parse(&m_ZipContent[0], m_ZipContent.size());
+            parser.parse(&m_ZipContent[0], m_ZipContent.size(), true/*IsFinal*/);
         }
     }
     catch(std::exception&)
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index 15a7fbf..a5b3273 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -93,7 +93,7 @@ private:
     virtual void OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance = 0) override;
     virtual void CloseContainer() override;
 
-    virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const Rectangle* pBoundRect = nullptr) override;
+    virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const Rectangle* pBoundRect) override;
     virtual void LeaveGroup() override;
 
     virtual void AddShape(sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0) override;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index d1825e9..2d0fe6f 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -770,7 +770,7 @@ public:
     void DisableFallbackStream();
     void EnableFallbackStream();
 protected:
-    virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pObj = nullptr ) override;
+    virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override;
 };
 
 class wwSection


More information about the Libreoffice-commits mailing list