[Libreoffice-commits] core.git: compilerplugins/clang sc/inc sc/source sd/source sfx2/source slideshow/source svgio/inc svgio/source svl/source svx/source sw/inc sw/source ucb/source vcl/inc vcl/source vcl/unx writerfilter/source xmlhelp/source xmloff/source xmlscript/source

Noel Grandin noel at peralex.com
Fri Feb 19 11:24:25 UTC 2016


 compilerplugins/clang/plugin.cxx                             |    1 
 compilerplugins/clang/unusedfields.cxx                       |   89 ++++++++++-
 compilerplugins/clang/unusedfields.py                        |   60 ++++++-
 sc/inc/attrib.hxx                                            |   13 -
 sc/inc/chartarr.hxx                                          |    1 
 sc/inc/formulacell.hxx                                       |    1 
 sc/source/core/data/formulacell.cxx                          |    2 
 sc/source/core/tool/chartarr.cxx                             |    9 -
 sc/source/filter/inc/orcusinterface.hxx                      |    2 
 sc/source/filter/orcus/interface.cxx                         |    4 
 sc/source/filter/xml/xmlexprt.cxx                            |    2 
 sc/source/filter/xml/xmlexprt.hxx                            |    1 
 sc/source/filter/xml/xmlimprt.cxx                            |    6 
 sc/source/filter/xml/xmlimprt.hxx                            |    3 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |    6 
 sc/source/ui/Accessibility/AccessibleText.cxx                |    6 
 sc/source/ui/inc/tpusrlst.hxx                                |    1 
 sc/source/ui/optdlg/tpusrlst.cxx                             |    2 
 sd/source/ui/inc/present.hxx                                 |    1 
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx            |    1 
 sfx2/source/inc/workwin.hxx                                  |    4 
 sfx2/source/view/impviewframe.hxx                            |    3 
 slideshow/source/engine/color.cxx                            |   12 -
 slideshow/source/inc/hslcolor.hxx                            |    2 
 svgio/inc/svgio/svgreader/svgtools.hxx                       |    5 
 svgio/source/svgreader/svgsvgnode.cxx                        |    4 
 svgio/source/svgreader/svgtools.cxx                          |    4 
 svl/source/items/stylepool.cxx                               |    3 
 svx/source/form/tabwin.cxx                                   |   11 -
 svx/source/inc/tabwin.hxx                                    |    7 
 sw/inc/accmap.hxx                                            |    2 
 sw/source/core/access/accmap.cxx                             |    2 
 sw/source/core/inc/UndoDelete.hxx                            |    1 
 sw/source/core/inc/UndoSort.hxx                              |    1 
 sw/source/core/text/pormulti.cxx                             |    1 
 sw/source/core/text/pormulti.hxx                             |    4 
 sw/source/core/undo/undel.cxx                                |    2 
 sw/source/core/undo/unsort.cxx                               |    4 
 sw/source/filter/basflt/fltshell.cxx                         |    6 
 sw/source/filter/html/swhtml.cxx                             |    2 
 sw/source/filter/html/swhtml.hxx                             |    1 
 sw/source/filter/inc/fltshell.hxx                            |    3 
 sw/source/filter/ww8/ww8par5.cxx                             |    2 
 sw/source/ui/misc/bookmark.cxx                               |    5 
 sw/source/uibase/cctrl/swlbox.cxx                            |   16 -
 sw/source/uibase/inc/swlbox.hxx                              |    5 
 ucb/source/ucp/file/filtask.hxx                              |    2 
 vcl/inc/sallayout.hxx                                        |    7 
 vcl/inc/svdata.hxx                                           |    1 
 vcl/source/gdi/pdfwriter_impl.hxx                            |    2 
 vcl/source/window/dialog.cxx                                 |    6 
 vcl/unx/generic/glyphs/gcach_layout.cxx                      |    2 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx       |    3 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx       |    3 
 xmlhelp/source/cxxhelp/inc/qe/Query.hxx                      |   70 --------
 xmlhelp/source/cxxhelp/provider/databases.cxx                |    5 
 xmlhelp/source/cxxhelp/provider/databases.hxx                |    1 
 xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx        |    1 
 xmlhelp/source/cxxhelp/qe/DocGenerator.cxx                   |    1 
 xmloff/source/forms/formattributes.hxx                       |    1 
 xmlscript/source/xml_helper/xml_impctx.cxx                   |   10 -
 61 files changed, 181 insertions(+), 257 deletions(-)

New commits:
commit 778e9a65bf5af07c4caeff969a0324e43a78e66b
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 19 10:52:20 2016 +0200

    new loplugin: find write-only fields
    
    Change-Id: I0f83939babacf92485420ee63f290a297d7cb717
    Reviewed-on: https://gerrit.libreoffice.org/22498
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 9beca11..c11c6ecc 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -104,6 +104,7 @@ class ParentBuilder
         bool VisitFunctionDecl( const FunctionDecl* function );
         bool VisitObjCMethodDecl( const ObjCMethodDecl* method );
         void walk( const Stmt* stmt );
+        bool shouldVisitTemplateInstantiations () const { return true; }
         unordered_map< const Stmt*, const Stmt* >* parents;
     };
 
diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx
index f7d7610..2667485 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -16,7 +16,11 @@
 #include "compat.hxx"
 
 /**
-Dump a list of calls to methods, and a list of field definitions.
+This performs two analyses:
+ (1) look for unused fields
+ (2) look for fields that are write-only
+
+We dmp a list of calls to methods, and a list of field definitions.
 Then we will post-process the 2 lists and find the set of unused methods.
 
 Be warned that it produces around 5G of log file.
@@ -24,7 +28,7 @@ Be warned that it produces around 5G of log file.
 The process goes something like this:
   $ make check
   $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unusedfields' check
-  $ ./compilerplugins/clang/unusedfields.py unusedfields.log > result.txt
+  $ ./compilerplugins/clang/unusedfields.py unusedfields.log
 
 and then
   $ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='unusedfieldsremove' $dir; done
@@ -58,6 +62,7 @@ struct MyFieldInfo
 
 // try to limit the voluminous output a little
 static std::set<MyFieldInfo> touchedSet;
+static std::set<MyFieldInfo> readFromSet;
 static std::set<MyFieldInfo> definitionSet;
 
 
@@ -76,6 +81,8 @@ public:
         std::string output;
         for (const MyFieldInfo & s : touchedSet)
             output += "touch:\t" + s.parentClass + "\t" + s.fieldName + "\n";
+        for (const MyFieldInfo & s : readFromSet)
+            output += "read:\t" + s.parentClass + "\t" + s.fieldName + "\n";
         for (const MyFieldInfo & s : definitionSet)
         {
             output += "definition:\t" + s.parentClass + "\t" + s.fieldName + "\t" + s.fieldType + "\t" + s.sourceLocation + "\n";
@@ -204,10 +211,84 @@ bool UnusedFields::VisitFieldDecl( const FieldDecl* fieldDecl )
 bool UnusedFields::VisitMemberExpr( const MemberExpr* memberExpr )
 {
     const ValueDecl* decl = memberExpr->getMemberDecl();
-    if (!isa<FieldDecl>(decl)) {
+    const FieldDecl* fieldDecl = dyn_cast<FieldDecl>(decl);
+    if (!fieldDecl) {
         return true;
     }
-    touchedSet.insert(niceName(dyn_cast<FieldDecl>(decl)));
+    MyFieldInfo fieldInfo = niceName(fieldDecl);
+    touchedSet.insert(fieldInfo);
+
+  // for the write-only analysis
+
+    if (ignoreLocation(memberExpr))
+        return true;
+
+    const Stmt* child = memberExpr;
+    const Stmt* parent = parentStmt(memberExpr);
+    // walk up the tree until we find something interesting
+    bool bPotentiallyReadFrom = false;
+    bool bDump = false;
+    do {
+        if (!parent) {
+            return true;
+        }
+        if (isa<CastExpr>(parent) || isa<MemberExpr>(parent) || isa<ParenExpr>(parent) || isa<ParenListExpr>(parent)
+             || isa<ExprWithCleanups>(parent) || isa<UnaryOperator>(parent))
+        {
+            child = parent;
+            parent = parentStmt(parent);
+        }
+        else if (isa<CaseStmt>(parent))
+        {
+            bPotentiallyReadFrom = dyn_cast<CaseStmt>(parent)->getLHS() == child
+                                  || dyn_cast<CaseStmt>(parent)->getRHS() == child;
+            break;
+        }
+        else if (isa<IfStmt>(parent))
+        {
+            bPotentiallyReadFrom = dyn_cast<IfStmt>(parent)->getCond() == child;
+            break;
+        }
+        else if (isa<DoStmt>(parent))
+        {
+            bPotentiallyReadFrom = dyn_cast<DoStmt>(parent)->getCond() == child;
+            break;
+        }
+        else if (isa<ReturnStmt>(parent) || isa<CXXConstructExpr>(parent) || isa<CallExpr>(parent)
+                 || isa<ConditionalOperator>(parent) || isa<SwitchStmt>(parent) || isa<ArraySubscriptExpr>(parent)
+                 || isa<DeclStmt>(parent) || isa<WhileStmt>(parent) || isa<CXXNewExpr>(parent)
+                 || isa<ForStmt>(parent) || isa<InitListExpr>(parent)
+                 || isa<BinaryOperator>(parent) || isa<CXXDependentScopeMemberExpr>(parent)
+                 || isa<UnresolvedMemberExpr>(parent)
+                 || isa<MaterializeTemporaryExpr>(parent))  //???
+        {
+            bPotentiallyReadFrom = true;
+            break;
+        }
+        else if (isa<CXXDeleteExpr>(parent)
+                  || isa<UnaryExprOrTypeTraitExpr>(parent)
+                 || isa<CXXUnresolvedConstructExpr>(parent) || isa<CompoundStmt>(parent)
+                 || isa<CXXTypeidExpr>(parent) || isa<DefaultStmt>(parent))
+        {
+            break;
+        }
+        else {
+            bPotentiallyReadFrom = true;
+            bDump = true;
+            break;
+        }
+    } while (true);
+    if (bDump)
+    {
+        report(
+             DiagnosticsEngine::Warning,
+             "oh dear, what can the matter be?",
+              memberExpr->getLocStart())
+              << memberExpr->getSourceRange();
+        parent->dump();
+    }
+    if (bPotentiallyReadFrom)
+        readFromSet.insert(fieldInfo);
     return true;
 }
 
diff --git a/compilerplugins/clang/unusedfields.py b/compilerplugins/clang/unusedfields.py
index 2d51785..763a117 100755
--- a/compilerplugins/clang/unusedfields.py
+++ b/compilerplugins/clang/unusedfields.py
@@ -8,6 +8,7 @@ definitionSet = set()
 definitionToSourceLocationMap = dict()
 definitionToTypeMap = dict()
 callSet = set()
+readFromSet = set()
 sourceLocationSet = set()
 # things we need to exclude for reasons like :
 # - it's a weird template thingy that confuses the plugin
@@ -36,6 +37,10 @@ with io.open(sys.argv[1], "rb", buffering=1024*1024) as txt:
             idx1 = line.find("\t",7)
             callInfo = (normalizeTypeParams(line[7:idx1]), line[idx1+1:].strip())
             callSet.add(callInfo)
+        elif line.startswith("read:\t"):
+            idx1 = line.find("\t",6)
+            readInfo = (normalizeTypeParams(line[6:idx1]), line[idx1+1:].strip())
+            readFromSet.add(readInfo)
 
 # Invert the definitionToSourceLocationMap
 # If we see more than one method at the same sourceLocation, it's being autogenerated as part of a template
@@ -49,7 +54,7 @@ for k, definitions in sourceLocationToDefinitionMap.iteritems():
         for d in definitions:
             definitionSet.remove(d)
     
-tmp1set = set()
+untouchedSet = set()
 for d in definitionSet:
     clazz = d[0] + " " + d[1]
     if clazz in exclusionSet:
@@ -86,8 +91,45 @@ for d in definitionSet:
         or srcLoc.startswith("lotuswordpro/source/filter/lwpsdwdrawheader.hxx")
         or srcLoc.startswith("svtools/source/dialogs/insdlg.cxx")):
         continue
+    untouchedSet.add((clazz + " " + definitionToTypeMap[d], srcLoc))
 
-    tmp1set.add((clazz + " " + definitionToTypeMap[d], srcLoc))
+writeonlySet = set()
+for d in definitionSet:
+    clazz = d[0] + " " + d[1]
+    if d in readFromSet:
+        continue
+    srcLoc = definitionToSourceLocationMap[d];
+    # ignore external source code
+    if (srcLoc.startswith("external/")):
+        continue
+    # ignore build folder
+    if (srcLoc.startswith("workdir/")):
+        continue
+    # ignore our stable/URE/UNO api
+    if (srcLoc.startswith("include/com/")
+        or srcLoc.startswith("include/cppu/")
+        or srcLoc.startswith("include/cppuhelper/")
+        or srcLoc.startswith("include/osl/")
+        or srcLoc.startswith("include/rtl/")
+        or srcLoc.startswith("include/sal/")
+        or srcLoc.startswith("include/salhelper/")
+        or srcLoc.startswith("include/systools/")
+        or srcLoc.startswith("include/typelib/")
+        or srcLoc.startswith("include/uno/")):
+        continue
+    # this is all representations of on-disk data structures
+    if (srcLoc.startswith("sc/source/filter/inc/scflt.hxx")
+        or srcLoc.startswith("sw/source/filter/ww8/")
+        or srcLoc.startswith("vcl/source/filter/sgvmain.hxx")
+        or srcLoc.startswith("vcl/source/filter/sgfbram.hxx")
+        or srcLoc.startswith("vcl/inc/unx/XIM.h")
+        or srcLoc.startswith("vcl/inc/unx/gtk/gloactiongroup.h")
+        or srcLoc.startswith("include/svl/svdde.hxx")
+        or srcLoc.startswith("lotuswordpro/source/filter/lwpsdwdrawheader.hxx")
+        or srcLoc.startswith("svtools/source/dialogs/insdlg.cxx")):
+        continue
+
+    writeonlySet.add((clazz + " " + definitionToTypeMap[d], srcLoc))
 
 # 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]+)')):
@@ -95,12 +137,18 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
             for text in re.split(_nsre, s)]
 
 # sort results by name and line number
-tmp1list = sorted(tmp1set, key=lambda v: natural_sort_key(v[1]))
+tmp1list = sorted(untouchedSet, key=lambda v: natural_sort_key(v[1]))
+tmp2list = sorted(writeonlySet, key=lambda v: natural_sort_key(v[1]))
 
 # print out the results
-for t in tmp1list:
-    print t[1]
-    print "    ", t[0]
+with open("unusedfields.untouched", "wt") as f:
+    for t in tmp1list:
+        f.write( t[1] + "\n" )
+        f.write( "    " + t[0] + "\n" )
+with open("unusedfields.writeonly", "wt") as f:
+    for t in tmp2list:
+        f.write( t[1] + "\n" )
+        f.write( "    " + t[0] + "\n" )
 
     
 
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 070f1f0..7bab719 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -154,8 +154,7 @@ public:
 
             inline  ScRangeItem( const sal_uInt16 nWhich );
             inline  ScRangeItem( const sal_uInt16   nWhich,
-                                 const ScRange& rRange,
-                                 const sal_uInt16   nNewFlags = 0 );
+                                 const ScRange& rRange );
             inline  ScRangeItem( const ScRangeItem& rCpy );
 
     inline ScRangeItem& operator=( const ScRangeItem &rCpy );
@@ -171,23 +170,21 @@ public:
 
 private:
     ScRange aRange;
-    sal_uInt16  nFlags;
 };
 
 inline ScRangeItem::ScRangeItem( const sal_uInt16 nWhichP )
-    :   SfxPoolItem( nWhichP ), nFlags( SCR_INVALID ) // == invalid area
+    :   SfxPoolItem( nWhichP )
 {
 }
 
 inline ScRangeItem::ScRangeItem( const sal_uInt16   nWhichP,
-                                 const ScRange& rRange,
-                                 const sal_uInt16   nNew )
-    : SfxPoolItem( nWhichP ), aRange( rRange ), nFlags( nNew )
+                                 const ScRange& rRange )
+    : SfxPoolItem( nWhichP ), aRange( rRange )
 {
 }
 
 inline ScRangeItem::ScRangeItem( const ScRangeItem& rCpy )
-    : SfxPoolItem( rCpy.Which() ), aRange( rCpy.aRange ), nFlags( rCpy.nFlags )
+    : SfxPoolItem( rCpy.Which() ), aRange( rCpy.aRange )
 {}
 
 inline ScRangeItem& ScRangeItem::operator=( const ScRangeItem &rCpy )
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index d91e492..6165290 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -61,7 +61,6 @@ class SC_DLLPUBLIC ScChartArray             // only parameter-struct
     OUString aName;
     ScDocument* pDocument;
     ScChartPositioner aPositioner;
-    bool        bValid;             // for creation out of SchMemChart
 
 private:
     ScMemChart* CreateMemChartSingle();
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index b98be96..d2c8c70 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -64,7 +64,6 @@ public:
     mutable size_t mnRefCount;
 
     ScTokenArray* mpCode;
-    sc::CompiledFormula* mpCompiledFormula;
     ScFormulaCell *mpTopCell;
     SCROW mnLength; // How many of these do we have ?
     short mnFormatType;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 983ebeb..0393b99 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -567,7 +567,6 @@ ScFormulaCellGroup::ScFormulaCellGroup() :
     mpImpl(new Impl),
     mnRefCount(0),
     mpCode(nullptr),
-    mpCompiledFormula(nullptr),
     mpTopCell(nullptr),
     mnLength(0),
     mnFormatType(css::util::NumberFormat::NUMBER),
@@ -582,7 +581,6 @@ ScFormulaCellGroup::~ScFormulaCellGroup()
 {
     SAL_INFO( "sc.core.formulacell", "ScFormulaCellGroup dtor this " << this);
     delete mpCode;
-    delete mpCompiledFormula;
 }
 
 void ScFormulaCellGroup::setCode( const ScTokenArray& rCode )
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 7805379..4d1cccb 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -64,8 +64,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, SCTAB nTab,
                     const OUString& rChartName ) :
         aName( rChartName ),
         pDocument( pDoc ),
-        aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP),
-        bValid( true )
+        aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP)
 {
 }
 
@@ -73,14 +72,12 @@ ScChartArray::ScChartArray(
     ScDocument* pDoc, const ScRangeListRef& rRangeList, const OUString& rChartName ) :
     aName( rChartName ),
     pDocument( pDoc ),
-    aPositioner(pDoc, rRangeList),
-    bValid( true ) {}
+    aPositioner(pDoc, rRangeList) {}
 
 ScChartArray::ScChartArray( const ScChartArray& rArr ) :
     aName(rArr.aName),
     pDocument(rArr.pDocument),
-    aPositioner(rArr.aPositioner),
-    bValid(rArr.bValid) {}
+    aPositioner(rArr.aPositioner) {}
 
 ScChartArray::~ScChartArray() {}
 
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 1f34a72..63b36ef 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -161,8 +161,6 @@ public:
     virtual void commit() override;
 
 private:
-    ScDocument& mrDoc;
-
     ScRange maRange;
 };
 
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index dbe1f5a..e50b8bf 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1207,10 +1207,8 @@ size_t ScOrcusStyles::commit_cell_style()
 
 // auto filter import
 
-ScOrcusAutoFilter::ScOrcusAutoFilter(ScDocument& rDoc):
-    mrDoc(rDoc)
+ScOrcusAutoFilter::ScOrcusAutoFilter(ScDocument&)
 {
-    (void)mrDoc;
 }
 
 ScOrcusAutoFilter::~ScOrcusAutoFilter()
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 17c7c0cc..508f8c2 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -353,7 +353,6 @@ ScXMLExport::ScXMLExport(
     pGroupColumns (nullptr),
     pGroupRows (nullptr),
     pDefaults(nullptr),
-    pChartListener(nullptr),
     pCurrentCell(nullptr),
     pMergedRangesContainer(nullptr),
     pValidationsContainer(nullptr),
@@ -435,7 +434,6 @@ ScXMLExport::~ScXMLExport()
         delete pMergedRangesContainer;
         delete pValidationsContainer;
         delete pChangeTrackingExportHelper;
-        delete pChartListener;
         delete pDefaults;
         delete pNumberFormatAttributesExportHelper;
 }
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 259e373..1b87b1d 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -104,7 +104,6 @@ class ScXMLExport : public SvXMLExport
     ScMyOpenCloseColumnRowGroup*        pGroupColumns;
     ScMyOpenCloseColumnRowGroup*        pGroupRows;
     ScMyDefaultStyles*                  pDefaults;
-    ScChartListener*                    pChartListener;
     const ScMyCell*                     pCurrentCell;
 
     ScMyMergedRangesContainer*  pMergedRangesContainer;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index f03a13a..dff739d 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1986,9 +1986,6 @@ ScXMLImport::ScXMLImport(
     sLocale(SC_LOCALE),
     sCellStyle(SC_UNONAME_CELLSTYL),
     pDocElemTokenMap( nullptr ),
-    pStylesElemTokenMap( nullptr ),
-    pStylesAttrTokenMap( nullptr ),
-    pStyleElemTokenMap( nullptr ),
     pBodyElemTokenMap( nullptr ),
     pContentValidationsElemTokenMap( nullptr ),
     pContentValidationElemTokenMap( nullptr ),
@@ -2131,9 +2128,6 @@ ScXMLImport::~ScXMLImport() throw()
 {
     //  delete pI18NMap;
     delete pDocElemTokenMap;
-    delete pStylesElemTokenMap;
-    delete pStylesAttrTokenMap;
-    delete pStyleElemTokenMap;
     delete pBodyElemTokenMap;
     delete pContentValidationsElemTokenMap;
     delete pContentValidationElemTokenMap;
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 0432301..52cfb9d 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -847,9 +847,6 @@ class ScXMLImport: public SvXMLImport, private boost::noncopyable
     rtl::Reference < XMLPropertySetMapper >       xTableStylesPropertySetMapper;
 
     SvXMLTokenMap           *pDocElemTokenMap;
-    SvXMLTokenMap           *pStylesElemTokenMap;
-    SvXMLTokenMap           *pStylesAttrTokenMap;
-    SvXMLTokenMap           *pStyleElemTokenMap;
     SvXMLTokenMap           *pBodyElemTokenMap;
     SvXMLTokenMap           *pContentValidationsElemTokenMap;
     SvXMLTokenMap           *pContentValidationElemTokenMap;
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 81f06b2..15a784e 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -497,11 +497,10 @@ private:
     ScPreviewShell*                     mpViewShell;
     ScAccessibleDocumentPagePreview*    mpAccDoc;
     MapMode                             maMapMode;
-    bool                            mbValid;
 };
 
 ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
-    : mpViewShell(nullptr), mpAccDoc(nullptr), mbValid(false)
+    : mpViewShell(nullptr), mpAccDoc(nullptr)
 {
 }
 
@@ -510,8 +509,7 @@ ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(ScPreviewShell* pViewShel
                                 const MapMode& aMapMode)
     : mpViewShell(pViewShell),
     mpAccDoc(pAccDoc),
-    maMapMode(aMapMode),
-    mbValid(true)
+    maMapMode(aMapMode)
 {
 }
 
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 4edcec9..5ff874e 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -244,7 +244,6 @@ class ScPreviewViewForwarder : public SvxViewForwarder
 {
 protected:
     ScPreviewShell*     mpViewShell;
-    mutable ScPreviewTableInfo* mpTableInfo;
 public:
     explicit            ScPreviewViewForwarder(ScPreviewShell* pViewShell);
     virtual             ~ScPreviewViewForwarder();
@@ -263,15 +262,12 @@ public:
 };
 
 ScPreviewViewForwarder::ScPreviewViewForwarder(ScPreviewShell* pViewShell)
-    :
-    mpViewShell(pViewShell),
-    mpTableInfo(nullptr)
+    : mpViewShell(pViewShell)
 {
 }
 
 ScPreviewViewForwarder::~ScPreviewViewForwarder()
 {
-    delete mpTableInfo;
 }
 
 bool ScPreviewViewForwarder::IsValid() const
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 912de91..93cdd3f 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -75,7 +75,6 @@ private:
 
     ScDocument*     pDoc;
     ScViewData*     pViewData;
-    ScRangeUtil*    pRangeUtil;
     OUString        aStrSelectedArea;
 
     bool            bModifyMode;
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index cc998cb..1de9b59 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -56,7 +56,6 @@ ScTpUserLists::ScTpUserLists( vcl::Window*               pParent,
         pUserLists      ( nullptr ),
         pDoc            ( nullptr ),
         pViewData       ( nullptr ),
-        pRangeUtil      ( new ScRangeUtil ),
         bModifyMode     ( false ),
         bCancelMode     ( false ),
         bCopyDone       ( false ),
@@ -88,7 +87,6 @@ ScTpUserLists::~ScTpUserLists()
 void ScTpUserLists::dispose()
 {
     delete pUserLists;
-    delete pRangeUtil;
     mpFtLists.clear();
     mpLbLists.clear();
     mpFtEntries.clear();
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
index 6e6a42c..9410cb8 100644
--- a/sd/source/ui/inc/present.hxx
+++ b/sd/source/ui/inc/present.hxx
@@ -52,7 +52,6 @@ private:
     VclPtr<CheckBox>           aCbxManuel;
     VclPtr<CheckBox>           aCbxMousepointer;
     VclPtr<CheckBox>           aCbxPen;
-    VclPtr<CheckBox>           aCbxNavigator;
     VclPtr<CheckBox>           aCbxAnimationAllowed;
     VclPtr<CheckBox>           aCbxChangePage;
     VclPtr<CheckBox>           aCbxAlwaysOnTop;
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 06476ad6..9c93b87 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -69,7 +69,6 @@ private:
     Bitmap maMarkedPreview;
     std::shared_ptr<BitmapReplacement> mpReplacement;
     std::shared_ptr<BitmapCompressor> mpCompressor;
-    Size maBitmapSize;
     bool mbIsUpToDate;
     sal_Int32 mnLastAccessTime;
     // When this flag is set then the bitmap is not modified by a cache
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index a54cb82..e4fa1d6 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -43,13 +43,12 @@ class SfxSplitWindow;
 class SfxWorkWindow;
 
 
-// This struct makes all relevant Informationen available of Toolboxes
+// This struct makes all relevant Information available of Toolboxes
 struct SfxObjectBar_Impl
 {
     sal_uInt16        nId;   // Resource - and ConfigId of Toolbox
     sal_uInt16        nMode; // special visibility flags
     sal_uInt16        nPos;
-    sal_uInt16        nIndex;
     bool              bDestroy;
     SfxInterface*     pIFace;
 
@@ -57,7 +56,6 @@ struct SfxObjectBar_Impl
         nId(0),
         nMode(0),
         nPos(0),
-        nIndex(0),
         bDestroy(false),
         pIFace(nullptr)
     {}
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 2506663..d9c5e9b 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -34,7 +34,6 @@ struct SfxViewFrame_Impl
     Size                aSize;
     OUString            aActualURL;
     SfxFrame&           rFrame;
-    svtools::AsynchronLink* pReloader;
     VclPtr<vcl::Window> pWindow;
     SfxViewFrame*       pActiveChild;
     VclPtr<vcl::Window> pFocusWin;
@@ -53,7 +52,6 @@ struct SfxViewFrame_Impl
 
     explicit SfxViewFrame_Impl(SfxFrame& i_rFrame)
         : rFrame(i_rFrame)
-        , pReloader(nullptr)
         , pWindow(nullptr)
         , pActiveChild(nullptr)
         , pFocusWin(nullptr)
@@ -73,7 +71,6 @@ struct SfxViewFrame_Impl
 
     ~SfxViewFrame_Impl()
     {
-        delete pReloader;
     }
 };
 
diff --git a/slideshow/source/engine/color.cxx b/slideshow/source/engine/color.cxx
index e979b94..3745083 100644
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@ -170,25 +170,19 @@ namespace slideshow
         }
 
         HSLColor::HSLColor() :
-            maHSLTriple( 0.0, 0.0, 0.0 ),
-            mnMagicValue( getMagic( maHSLTriple.mnLuminance,
-                                    maHSLTriple.mnSaturation ) )
+            maHSLTriple( 0.0, 0.0, 0.0 )
         {
         }
 
         HSLColor::HSLColor( double nHue, double nSaturation, double nLuminance ) :
-            maHSLTriple( nHue, nSaturation, nLuminance ),
-            mnMagicValue( getMagic( maHSLTriple.mnLuminance,
-                                    maHSLTriple.mnSaturation ) )
+            maHSLTriple( nHue, nSaturation, nLuminance )
         {
         }
 
         HSLColor::HSLColor( const RGBColor& rColor ) :
             maHSLTriple( rgb2hsl( truncateRangeStd( rColor.getRed() ),
                                   truncateRangeStd( rColor.getGreen() ),
-                                  truncateRangeStd( rColor.getBlue() ) ) ),
-            mnMagicValue( getMagic( maHSLTriple.mnLuminance,
-                                    maHSLTriple.mnSaturation ) )
+                                  truncateRangeStd( rColor.getBlue() ) ) )
         {
         }
 
diff --git a/slideshow/source/inc/hslcolor.hxx b/slideshow/source/inc/hslcolor.hxx
index c38a8f7..96461c0 100644
--- a/slideshow/source/inc/hslcolor.hxx
+++ b/slideshow/source/inc/hslcolor.hxx
@@ -75,8 +75,6 @@ namespace slideshow
 
             HSLTriple   maHSLTriple;
 
-            /// Pre-calculated value, needed for conversion back to RGB
-            double      mnMagicValue;
         };
 
         bool operator==( const HSLColor& rLHS, const HSLColor& rRHS );
diff --git a/svgio/inc/svgio/svgreader/svgtools.hxx b/svgio/inc/svgio/svgreader/svgtools.hxx
index a9dba7f..82f6d00 100644
--- a/svgio/inc/svgio/svgreader/svgtools.hxx
+++ b/svgio/inc/svgio/svgreader/svgtools.hxx
@@ -157,22 +157,19 @@ namespace svgio
             SvgAlign    maSvgAlign;
 
             /// bitfield
-            bool        mbDefer : 1; // default is false
             bool        mbMeetOrSlice : 1; // true = meet (default), false = slice
             bool        mbSet : 1;
 
         public:
             SvgAspectRatio()
             :   maSvgAlign(Align_xMidYMid),
-                mbDefer(false),
                 mbMeetOrSlice(true),
                 mbSet(false)
             {
             }
 
-            SvgAspectRatio(SvgAlign aSvgAlign, bool bDefer, bool bMeetOrSlice)
+            SvgAspectRatio(SvgAlign aSvgAlign, bool bMeetOrSlice)
             :   maSvgAlign(aSvgAlign),
-                mbDefer(bDefer),
                 mbMeetOrSlice(bMeetOrSlice),
                 mbSet(true)
             {
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 79697c1..400d480 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -417,7 +417,7 @@ namespace svgio
                                 // create mapping
                                 // #i122610 SVG 1.1 defines in section 5.1.2 that if the attribute perserveAspectRatio is not specified,
                                 // then the effect is as if a value of 'xMidYMid meet' were specified.
-                                SvgAspectRatio aRatioDefault(Align_xMidYMid,false,true);
+                                SvgAspectRatio aRatioDefault(Align_xMidYMid,true);
                                 const SvgAspectRatio& rRatio = getSvgAspectRatio().isSet()? getSvgAspectRatio() : aRatioDefault;
 
                                 // let mapping be created from SvgAspectRatio
@@ -527,7 +527,7 @@ namespace svgio
                                 // create mapping
                                 // SVG 1.1 defines in section 5.1.2 that if the attribute perserveAspectRatio is not specified,
                                 // then the effect is as if a value of 'xMidYMid meet' were specified.
-                                SvgAspectRatio aRatioDefault(Align_xMidYMid,false,true);
+                                SvgAspectRatio aRatioDefault(Align_xMidYMid,true);
                                 const SvgAspectRatio& rRatio = getSvgAspectRatio().isSet()? getSvgAspectRatio() : aRatioDefault;
 
                                 basegfx::B2DHomMatrix aViewBoxMapping;
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index a4e4233..db5e163 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -1304,7 +1304,6 @@ namespace svgio
             {
                 sal_Int32 nPos(0);
                 SvgAlign aSvgAlign(Align_xMidYMid);
-                bool bDefer(false);
                 bool bMeetOrSlice(true);
                 bool bChanged(false);
 
@@ -1321,7 +1320,6 @@ namespace svgio
                         {
                             case SVGTokenDefer:
                             {
-                                bDefer = true;
                                 bChanged = true;
                                 break;
                             }
@@ -1413,7 +1411,7 @@ namespace svgio
 
                 if(bChanged)
                 {
-                    return SvgAspectRatio(aSvgAlign, bDefer, bMeetOrSlice);
+                    return SvgAspectRatio(aSvgAlign, bMeetOrSlice);
                 }
             }
 
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index c0947c4..9eaf86c 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -347,14 +347,12 @@ class StylePoolImpl
 {
 private:
     std::map< const SfxItemSet*, Node > maRoot;
-    sal_Int32 mnCount;
     // #i86923#
     SfxItemSet* mpIgnorableItems;
 public:
     // #i86923#
     explicit StylePoolImpl( SfxItemSet* pIgnorableItems = nullptr )
         : maRoot(),
-          mnCount(0),
           mpIgnorableItems( pIgnorableItems != nullptr
                             ? pIgnorableItems->Clone( false )
                             : nullptr )
@@ -422,7 +420,6 @@ StylePool::SfxItemSet_Pointer_t StylePoolImpl::insertItemSet( const SfxItemSet&
     {
         pCurNode->setItemSet( rSet );
         bNonPoolable = false; // to avoid a double insertion
-        ++mnCount;
     }
     // If rSet contains at least one non poolable item, a new itemset has to be inserted
     if( bNonPoolable )
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index db01e9a..c9adc54 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -167,20 +167,10 @@ void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi
     pTransferColumn->StartDrag( this, DND_ACTION_COPY );
 }
 
-FmFieldWinData::FmFieldWinData()
-{
-}
-
-
-FmFieldWinData::~FmFieldWinData()
-{
-}
-
 FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent)
             :SfxFloatingWindow(_pBindings, _pMgr, _pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE))
             ,SfxControllerItem(SID_FM_FIELDS_CONTROL, *_pBindings)
             ,::comphelper::OPropertyChangeListener(m_aMutex)
-            ,pData(new FmFieldWinData)
             ,m_nObjectType(0)
             ,m_pChangeListener(nullptr)
 {
@@ -208,7 +198,6 @@ void FmFieldWin::dispose()
         //  delete m_pChangeListener;
     }
     pListBox.disposeAndClear();
-    delete pData;
     ::SfxControllerItem::dispose();
     SfxFloatingWindow::dispose();
 }
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index c3711d9..ab224a4 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -60,12 +60,6 @@ protected:
 
 
 class FmFormShell;
-class FmFieldWinData
-{
-public:
-    FmFieldWinData();
-    ~FmFieldWinData();
-};
 
 
 class FmFieldWin :public SfxFloatingWindow
@@ -74,7 +68,6 @@ class FmFieldWin :public SfxFloatingWindow
 {
     ::osl::Mutex        m_aMutex;
     VclPtr<FmFieldWinListBox> pListBox;
-    FmFieldWinData*    pData;
     ::dbtools::SharedConnection
                        m_aConnection;
     OUString    m_aDatabaseName,
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index eaf01f2..85cc0be 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -94,8 +94,6 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
 
     css::uno::WeakReference < css::accessibility::XAccessible > mxCursorContext;
 
-    sal_Int32 mnPara;
-
     bool mbShapeSelected;
 
     void FireEvent( const SwAccessibleEvent_Impl& rEvent );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 2979c7c..f7de950 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1656,7 +1656,6 @@ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) :
     mpSelectedParas( nullptr ),
     mpVSh( pSh ),
     mpPreview( nullptr ),
-    mnPara( 1 ),
     mbShapeSelected( false ),
     mpSeletedFrameMap(nullptr)
 {
@@ -1886,7 +1885,6 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrame *pFrame,
                 switch( pFrame->GetType() )
                 {
                 case FRM_TXT:
-                    mnPara++;
                     pAcc = new SwAccessibleParagraph( this,
                                     static_cast< const SwTextFrame& >( *pFrame ) );
                     break;
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index 92513a2..18fb522 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -38,7 +38,6 @@ class SwUndoDelete
 {
     SwNodeIndex* m_pMvStt;            // Position of Nodes in UndoNodes-Array
     OUString *m_pSttStr, *m_pEndStr;
-    SwRedlineData* m_pRedlData;
     SwRedlineSaveDatas* m_pRedlSaveData;
     std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
     std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
diff --git a/sw/source/core/inc/UndoSort.hxx b/sw/source/core/inc/UndoSort.hxx
index f5d4f52..2100907 100644
--- a/sw/source/core/inc/UndoSort.hxx
+++ b/sw/source/core/inc/UndoSort.hxx
@@ -64,7 +64,6 @@ class SwUndoSort : public SwUndo, private SwUndRng
     SwSortOptions*    pSortOpt;
     std::vector<std::unique_ptr<SwSortUndoElement>> m_SortList;
     SwUndoAttrTable*  pUndoTableAttr;
-    SwRedlineData*    pRedlData;
     sal_uLong         nTableNd;
 
 public:
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index f720384..6291500 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -59,7 +59,6 @@ using namespace ::com::sun::star;
 // and by another SwLineLayout via pNext to realize a doubleline portion.
 SwMultiPortion::~SwMultiPortion()
 {
-    delete pFieldRest;
 }
 
 void SwMultiPortion::Paint( const SwTextPaintInfo & ) const
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index e2e04b4..0659db9 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -73,7 +73,6 @@ struct SwBracket
 class SwMultiPortion : public SwLinePortion
 {
     SwLineLayout aRoot;     // One or more lines
-    SwFieldPortion *pFieldRest; // Field rest from the previous line
     bool bTab1      :1;     // First line tabulator
     bool bTab2      :1;     // Second line includes tabulator
     bool bDouble    :1;     // Double line
@@ -86,8 +85,7 @@ class SwMultiPortion : public SwLinePortion
     sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees)
 protected:
     explicit SwMultiPortion(sal_Int32 nEnd)
-        : pFieldRest(nullptr)
-        , bTab1(false)
+        : bTab1(false)
         , bTab2(false)
         , bDouble(false)
         , bRuby(false)
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index a9c7dca..f2a93ad 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -102,7 +102,6 @@ SwUndoDelete::SwUndoDelete(
     m_pMvStt( nullptr ),
     m_pSttStr(nullptr),
     m_pEndStr(nullptr),
-    m_pRedlData(nullptr),
     m_pRedlSaveData(nullptr),
     m_nNode(0),
     m_nNdDiff(0),
@@ -524,7 +523,6 @@ SwUndoDelete::~SwUndoDelete()
         m_pMvStt->GetNode().GetNodes().Delete( *m_pMvStt, m_nNode );
         delete m_pMvStt;
     }
-    delete m_pRedlData;
     delete m_pRedlSaveData;
 }
 
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 1e99538..4833545 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -45,7 +45,6 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
     : SwUndo(UNDO_SORT_TXT)
     , SwUndRng(rRg)
     , pUndoTableAttr(nullptr)
-    , pRedlData(nullptr)
     , nTableNd(0)
 {
     pSortOpt = new SwSortOptions(rOpt);
@@ -53,7 +52,7 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
 
 SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTableNd,
                         const SwSortOptions& rOpt, bool bSaveTable )
-    : SwUndo(UNDO_SORT_TBL), pUndoTableAttr( nullptr ), pRedlData( nullptr )
+    : SwUndo(UNDO_SORT_TBL), pUndoTableAttr( nullptr )
 {
     nSttNode = nStt;
     nEndNode = nEnd;
@@ -68,7 +67,6 @@ SwUndoSort::~SwUndoSort()
 {
     delete pSortOpt;
     delete pUndoTableAttr;
-    delete pRedlData;
 }
 
 void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index a70c7f8..583fa77 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -1047,14 +1047,14 @@ const std::vector< std::pair<OUString, OUString> >& SwFltRDFMark::GetAttributes(
 }
 
 // methods of SwFltTOX follow
-SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols)
-    : SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ),
+SwFltTOX::SwFltTOX(SwTOXBase* pBase)
+    : SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase),
       bHadBreakItem( false ), bHadPageDescItem( false )
 {
 }
 
 SwFltTOX::SwFltTOX(const SwFltTOX& rCpy)
-    : SfxPoolItem(RES_FLTR_TOX), pTOXBase(rCpy.pTOXBase), nCols( rCpy.nCols ),
+    : SfxPoolItem(RES_FLTR_TOX), pTOXBase(rCpy.pTOXBase),
       bHadBreakItem( rCpy.bHadBreakItem ), bHadPageDescItem( rCpy.bHadPageDescItem )
 {
 }
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 036992f..707c063 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5463,7 +5463,6 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
     bInsAtStart( true ),
     bLikePara( false ),
     bValid( true ),
-    nCount( 1 ),
     pNext( nullptr ),
     pPrev( nullptr ),
     ppHead( ppHd )
@@ -5480,7 +5479,6 @@ _HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
     bInsAtStart( rAttr.bInsAtStart ),
     bLikePara( rAttr.bLikePara ),
     bValid( rAttr.bValid ),
-    nCount( rAttr.nCount ),
     pNext( nullptr ),
     pPrev( nullptr ),
     ppHead( ppHd )
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 6b5f78b..d9d0ee4 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -82,7 +82,6 @@ class _HTMLAttr
     bool bValid : 1;    // ist das Attribut gueltig?
 
     SfxPoolItem* pItem;
-    sal_uInt16 nCount;      // Anzahl noch zu schliessender Attrs mit einem Wert
     _HTMLAttr *pNext;   // noch zu schliessene Attrs mit unterschiedl. Werten
     _HTMLAttr *pPrev;   // bereits geschlossene aber noch nicht gesetze Attrs
     _HTMLAttr **ppHead; // der Listenkopf
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 7dce671..d4eab5a 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -308,11 +308,10 @@ public:
 class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
 {
     SwTOXBase* pTOXBase;
-    sal_uInt16 nCols;
     bool bHadBreakItem; // there was a break item BEFORE insertion of the TOX
     bool bHadPageDescItem;
 public:
-    SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols = 0);
+    SwFltTOX(SwTOXBase* pBase);
     SwFltTOX(const SwFltTOX&);
     // "pure virtual Methoden" vom SfxPoolItem
     virtual bool operator==(const SfxPoolItem&) const override;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 85bd074..63dc78f 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3303,7 +3303,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
 
     const SwPosition* pPos = m_pPaM->GetPoint();
 
-    SwFltTOX aFltTOX( pBase, nIndexCols );
+    SwFltTOX aFltTOX( pBase );
 
     // test if there is already a break item on this node
     if(SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode())
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 3dd6d2e..c12da8d 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -94,7 +94,7 @@ void SwInsertBookmarkDlg::Apply()
     }
 
     // insert text mark
-    SwBoxEntry  aTmpEntry(m_pBookmarkBox->GetText(), 0 );
+    SwBoxEntry  aTmpEntry(m_pBookmarkBox->GetText() );
 
     if (!m_pBookmarkBox->GetText().isEmpty() &&
         (m_pBookmarkBox->GetSwEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND))
@@ -129,7 +129,6 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
 
     // fill Combobox with existing bookmarks
     IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
-    sal_Int32 nId = 0;
     for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin();
         ppBookmark != pMarkAccess->getBookmarksEnd();
         ++ppBookmark)
@@ -137,7 +136,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
         if(IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
         {
             m_pBookmarkBox->InsertSwEntry(
-                    SwBoxEntry(ppBookmark->get()->GetName(), nId++));
+                    SwBoxEntry(ppBookmark->get()->GetName()));
         }
     }
 
diff --git a/sw/source/uibase/cctrl/swlbox.cxx b/sw/source/uibase/cctrl/swlbox.cxx
index 7d04816..08a4b91 100644
--- a/sw/source/uibase/cctrl/swlbox.cxx
+++ b/sw/source/uibase/cctrl/swlbox.cxx
@@ -24,25 +24,19 @@
 
 //     Description: ListboxElement
 SwBoxEntry::SwBoxEntry() :
-    bModified(false),
-    bNew(false),
-    nId(COMBOBOX_APPEND)
+    bNew(false)
 {
 }
 
-SwBoxEntry::SwBoxEntry(const OUString& aNam, sal_Int32 nIdx) :
-    bModified(false),
+SwBoxEntry::SwBoxEntry(const OUString& aNam) :
     bNew(false),
-    aName(aNam),
-    nId(nIdx)
+    aName(aNam)
 {
 }
 
 SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
-    bModified(rOld.bModified),
     bNew(rOld.bNew),
-    aName(rOld.aName),
-    nId(rOld.nId)
+    aName(rOld.aName)
 {
 }
 
@@ -58,7 +52,7 @@ void SwComboBox::Init()
     sal_Int32 nSize = GetEntryCount();
     for( sal_Int32 i=0; i < nSize; ++i )
     {
-        m_EntryList.push_back(SwBoxEntry(ComboBox::GetEntry(i), i));
+        m_EntryList.push_back(SwBoxEntry(ComboBox::GetEntry(i)));
     }
 }
 
diff --git a/sw/source/uibase/inc/swlbox.hxx b/sw/source/uibase/inc/swlbox.hxx
index be17d98..f408680 100644
--- a/sw/source/uibase/inc/swlbox.hxx
+++ b/sw/source/uibase/inc/swlbox.hxx
@@ -34,14 +34,11 @@ class SW_DLLPUBLIC SwBoxEntry
 {
     friend class SwComboBox;
 
-    bool    bModified : 1;
     bool    bNew : 1;
-
     OUString    aName;
-    sal_Int32   nId;
 
 public:
-    SwBoxEntry(const OUString& aName, sal_Int32 nId=0);
+    SwBoxEntry(const OUString& aName);
     SwBoxEntry(const SwBoxEntry& rOrg);
     SwBoxEntry();
 
diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx
index 11886e0..bb37c2e 100644
--- a/ucb/source/ucp/file/filtask.hxx
+++ b/ucb/source/ucp/file/filtask.hxx
@@ -55,7 +55,6 @@ namespace fileaccess
             bool m_bAbort,m_bHandled;
             sal_Int32 m_nErrorCode,m_nMinorCode;
             css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler;
-            css::uno::Reference< css::ucb::XProgressHandler >     m_xProgressHandler;
             css::uno::Reference< css::ucb::XCommandEnvironment >  m_xCommandEnvironment;
 
 
@@ -69,7 +68,6 @@ namespace fileaccess
                   m_nErrorCode( TASKHANDLER_NO_ERROR ),
                   m_nMinorCode( TASKHANDLER_NO_ERROR ),
                   m_xInteractionHandler( nullptr ),
-                  m_xProgressHandler( nullptr ),
                   m_xCommandEnvironment( xCommandEnv )
             {
             }
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 797805e..f27834f 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -282,8 +282,6 @@ struct GlyphItem
     int     mnNewWidth;     // width after adjustments
     int     mnXOffset;
 
-    int     mnYOffset;
-
     sal_GlyphId maGlyphId;
     Point   maLinearPos;    // absolute position of non rotated string
 
@@ -294,7 +292,6 @@ public:
                 , mnOrigWidth(0)
                 , mnNewWidth(0)
                 , mnXOffset(0)
-                , mnYOffset(0)
                 , maGlyphId(0)
             {}
 
@@ -303,16 +300,14 @@ public:
             :   mnFlags(nFlags), mnCharPos(nCharPos),
                 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
                 mnXOffset(0),
-                mnYOffset(0),
                 maGlyphId(aGlyphId), maLinearPos(rLinearPos)
             {}
 
             GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
-                long nFlags, int nOrigWidth, int nXOffset, int nYOffset )
+                long nFlags, int nOrigWidth, int nXOffset )
             :   mnFlags(nFlags), mnCharPos(nCharPos),
                 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
                 mnXOffset(nXOffset),
-                mnYOffset(nYOffset),
                 maGlyphId(aGlyphId), maLinearPos(rLinearPos)
             {}
 
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 42df79e..f3f34e7 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -123,7 +123,6 @@ struct ImplSVAppData
     sal_uInt64              mnLastInputTime;                // GetLastInputTime()
     sal_uInt16              mnDispatchLevel;                // DispatchLevel
     sal_uInt16              mnModalMode;                    // ModalMode Count
-    sal_uInt16              mnModalDialog;                  // ModalDialog Count
     SystemWindowFlags       mnSysWinMode;                   // Mode, when SystemWindows should be created
     short                   mnDialogScaleX;                 // Scale X-Positions and sizes in Dialogs
     bool                    mbInAppMain;                    // is Application::Main() on stack
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 03156e2..895aa7b 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -700,7 +700,6 @@ private:
         Color                            m_aOverlineColor;
         basegfx::B2DPolyPolygon          m_aClipRegion;
         bool                             m_bClipRegion;
-        sal_Int32                        m_nAntiAlias;
         ComplexTextLayoutMode            m_nLayoutMode;
         LanguageType                     m_aDigitLanguage;
         sal_Int32                        m_nTransparentPercent;
@@ -725,7 +724,6 @@ private:
                 m_aTextLineColor( COL_TRANSPARENT ),
                 m_aOverlineColor( COL_TRANSPARENT ),
                 m_bClipRegion( false ),
-                m_nAntiAlias( 1 ),
                 m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
                 m_aDigitLanguage( 0 ),
                 m_nTransparentPercent( 0 ),
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index ce0d6f1..46dcef9 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -659,7 +659,6 @@ bool Dialog::Notify( NotifyEvent& rNEvt )
             // have re-enabled input for our parent
             if( mbInExecute && mbModalMode )
             {
-                // do not change modal counter (pSVData->maAppData.mnModalDialog)
                 SetModalInputMode( false );
                 SetModalInputMode( true );
 
@@ -1009,12 +1008,9 @@ void Dialog::SetModalInputMode( bool bModal )
     if ( bModal == mbModalMode )
         return;
 
-    ImplSVData* pSVData = ImplGetSVData();
     mbModalMode = bModal;
     if ( bModal )
     {
-        pSVData->maAppData.mnModalDialog++;
-
         // Disable the prev Modal Dialog, because our dialog must close at first,
         // before the other dialog can be closed (because the other dialog
         // is on stack since our dialog returns)
@@ -1034,8 +1030,6 @@ void Dialog::SetModalInputMode( bool bModal )
     }
     else
     {
-        pSVData->maAppData.mnModalDialog--;
-
         if ( mpDialogParent )
         {
             // #115933# re-enable the whole frame hierarchy again (see above)
diff --git a/vcl/unx/generic/glyphs/gcach_layout.cxx b/vcl/unx/generic/glyphs/gcach_layout.cxx
index 70ac190..6e22fd0 100644
--- a/vcl/unx/generic/glyphs/gcach_layout.cxx
+++ b/vcl/unx/generic/glyphs/gcach_layout.cxx
@@ -583,7 +583,7 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
                     nXAdvance = nVirtAdv;
 
                 Point aNewPos = Point(aCurrPos.X() + nXOffset, -(aCurrPos.Y() + nYOffset));
-                const GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nXAdvance, nXOffset, nYOffset);
+                const GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nXAdvance, nXOffset);
                 rLayout.AppendGlyph(aGI);
 
                 aCurrPos.X() += nXAdvance;
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 78bf891..3669502 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -36,9 +36,6 @@ OOXMLFastDocumentHandler::OOXMLFastDocumentHandler(
     sal_Int32 nXNoteId )
     : m_xContext(context)
     , mpStream( pStream )
-#ifdef DEBUG_WRITERFILTER
-    , mpTmpStream()
-#endif
     , mpDocument( pDocument )
     , mnXNoteId( nXNoteId )
     , mxContextHandler()
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
index ff63cdd..6514ef0 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
@@ -91,9 +91,6 @@ private:
     css::uno::Reference< css::uno::XComponentContext > m_xContext;
 
     Stream * mpStream;
-#ifdef DEBUG_WRITERFILTER
-    Stream::Pointer_t mpTmpStream;
-#endif
     OOXMLDocumentImpl* mpDocument;
     sal_Int32 mnXNoteId;
     mutable css::uno::Reference<OOXMLFastContextHandler> mxContextHandler;
diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
deleted file mode 100644
index cfb0a72..0000000
--- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_XMLHELP_SOURCE_CXXHELP_INC_QE_QUERY_HXX
-#define INCLUDED_XMLHELP_SOURCE_CXXHELP_INC_QE_QUERY_HXX
-
-#include <sal/types.h>
-#include <rtl/ustring.hxx>
-#include <vector>
-#include <string.h>
-
-namespace xmlsearch {
-
-    namespace qe {
-
-        class QueryHit
-        {
-        public:
-
-            QueryHit( sal_Int32 nColumns )
-                : matchesL_( 2*nColumns ),
-                  matches_( new sal_Int32[ 2*nColumns ] )
-            {
-                memset( matches_, 0, sizeof( sal_Int32 ) * matchesL_ );
-            }
-
-            ~QueryHit() { delete[] matches_; }
-
-        private:
-              sal_Int32    matchesL_;
-              sal_Int32    *matches_;    // ...concept, word number, ...
-
-        }; // end class QueryHit
-
-
-        class QueryHitData
-        {
-        public:
-            QueryHitData( OUString* terms )
-                : terms_( terms )      { }
-
-            ~QueryHitData() { delete[] terms_; }
-
-        private:
-            OUString* terms_;
-
-        };  // end class QueryHitData
-    }
-
-}
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 0a88ea6..6f645ac 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -126,7 +126,6 @@ Databases::Databases( bool showBasic,
                       Reference< uno::XComponentContext > xContext )
     : m_xContext( xContext ),
       m_bShowBasic(showBasic),
-      m_pErrorDoc( nullptr ),
       m_nCustomCSSDocLength( 0 ),
       m_pCustomCSSDoc( nullptr ),
       m_aCSS(styleSheet.toAsciiLowerCase()),
@@ -165,10 +164,6 @@ Databases::~Databases()
 
     delete[] m_pCustomCSSDoc;
 
-    // release errorDocument
-
-    delete[] m_pErrorDoc;
-
     // unload the databases
 
     {
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index b5988db..d6efc19 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -242,7 +242,6 @@ namespace chelp {
         css::uno::Reference< css::ucb::XSimpleFileAccess3 >      m_xSFA;
 
         bool   m_bShowBasic;
-        char*  m_pErrorDoc;
 
         int    m_nCustomCSSDocLength;
         char*  m_pCustomCSSDoc;
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index ea5b78f..74fd3c9 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -50,7 +50,6 @@
 
 #include <algorithm>
 #include <set>
-#include <qe/Query.hxx>
 #include <qe/DocGenerator.hxx>
 #include "resultsetforquery.hxx"
 #include "databases.hxx"
diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
index f6e9dfb..71a6008 100644
--- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
+++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <qe/DocGenerator.hxx>
-#include <qe/Query.hxx>
 
 
 using namespace xmlsearch;
diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx
index 0a64db7..3d3877e 100644
--- a/xmloff/source/forms/formattributes.hxx
+++ b/xmloff/source/forms/formattributes.hxx
@@ -249,7 +249,6 @@ namespace xmloff
             OUString                 sAttributeName;         // the attribute name
             OUString                 sPropertyName;          // the property name
             css::uno::Type           aPropertyType;          // the property type
-            OUString                 sAttributeDefault;      // the default if the attribute is not present
 
             // entries which are special to some value types
             const SvXMLEnumMapEntry*        pEnumMap;               // the enum map, if appliable
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 694b8ed..c243125 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -327,7 +327,6 @@ class ExtendedAttributes :
 {
     sal_Int32 m_nAttributes;
     sal_Int32 * m_pUids;
-    OUString * m_pPrefixes;
     OUString * m_pLocalNames;
     OUString * m_pQNames;
     OUString * m_pValues;
@@ -337,7 +336,7 @@ class ExtendedAttributes :
 public:
     inline ExtendedAttributes(
         sal_Int32 nAttributes,
-        sal_Int32 * pUids, OUString * pPrefixes,
+        sal_Int32 * pUids,
         OUString * pLocalNames, OUString * pQNames,
         Reference< xml::sax::XAttributeList > const & xAttributeList,
         DocumentHandlerImpl * pHandler );
@@ -374,13 +373,12 @@ public:
 
 inline ExtendedAttributes::ExtendedAttributes(
     sal_Int32 nAttributes,
-    sal_Int32 * pUids, OUString * pPrefixes,
+    sal_Int32 * pUids,
     OUString * pLocalNames, OUString * pQNames,
     Reference< xml::sax::XAttributeList > const & xAttributeList,
     DocumentHandlerImpl * pHandler )
     : m_nAttributes( nAttributes )
     , m_pUids( pUids )
-    , m_pPrefixes( pPrefixes )
     , m_pLocalNames( pLocalNames )
     , m_pQNames( pQNames )
     , m_pValues( new OUString[ nAttributes ] )
@@ -399,7 +397,6 @@ ExtendedAttributes::~ExtendedAttributes() throw ()
     m_pHandler->release();
 
     delete [] m_pUids;
-    delete [] m_pPrefixes;
     delete [] m_pLocalNames;
     delete [] m_pQNames;
     delete [] m_pValues;
@@ -577,10 +574,11 @@ void DocumentHandlerImpl::startElement(
             pUids[ nPos ] = getUidByPrefix( pPrefixes[ nPos ] );
         }
     }
+    delete[] pPrefixes;
     // ownership of arrays belongs to attribute list
     xAttributes = static_cast< xml::input::XAttributes * >(
         new ExtendedAttributes(
-            nAttribs, pUids, pPrefixes, pLocalNames, pQNames,
+            nAttribs, pUids, pLocalNames, pQNames,
             xAttribs, this ) );
 
     getElementName( rQElementName, &nUid, &aLocalName );


More information about the Libreoffice-commits mailing list