compilerplugins/clang/unusedfields.writeonly.results   |   18 ---------
 include/svl/aeitem.hxx                                 |    4 +-
 include/svtools/treelistbox.hxx                        |    2 -
 sd/source/ui/dlg/sdtreelb.cxx                          |    7 ---
 slideshow/source/engine/shapes/drawshapesubsetting.cxx |   21 +++--------
 slideshow/source/inc/doctreenode.hxx                   |   11 +----
 solenv/bin/concat-deps.c                               |    4 --
 soltools/cpp/_cpp.c                                    |    2 -
 soltools/cpp/_include.c                                |    6 +--
 soltools/cpp/_lex.c                                    |    2 -
 soltools/cpp/_macro.c                                  |    4 +-
 soltools/cpp/_nlist.c                                  |    2 -
 soltools/cpp/_tokens.c                                 |    1 
 soltools/cpp/cpp.h                                     |    1 
 sot/source/sdstor/stgdir.cxx                           |    4 --
 sot/source/sdstor/stgdir.hxx                           |    2 -
 starmath/inc/symbol.hxx                                |    3 -
 starmath/source/symbol.cxx                             |    5 --
 starmath/source/unomodel.cxx                           |    1 
 svl/source/items/aeitem.cxx                            |   32 ++++-------------
 svtools/source/contnr/treelistbox.cxx                  |    4 --
 21 files changed, 28 insertions(+), 108 deletions(-)

New commits:
commit e037381f85413fe6329c54e49ccfcac88dd71048
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Mon Jul 3 13:10:00 2017 +0200

    loplugin:unusedfields in slideshow..svtools
    
    Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c
    Reviewed-on: https://gerrit.libreoffice.org/39474
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/compilerplugins/clang/unusedfields.writeonly.results 
b/compilerplugins/clang/unusedfields.writeonly.results
index 728abbd5b8a0..3accc97043e6 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -1218,14 +1218,8 @@ include/sfx2/msg.hxx:117
     SfxType0 createSfxPoolItemFunc std::function<SfxPoolItem *(void)>
 include/sfx2/msg.hxx:119
     SfxType0 nAttribs sal_uInt16
-include/svl/aeitem.hxx:46
-    SfxAllEnumItem pDisabledValues std::vector<sal_uInt16> *
 include/svtools/genericunodialog.hxx:170
     svt::UnoDialogEntryGuard m_aGuard ::osl::MutexGuard
-include/svtools/treelistbox.hxx:131
-    SvLBoxTab pUserData void *
-include/svtools/treelistentry.hxx:64
-    SvTreeListEntry bIsMarked _Bool
 include/svtools/unoevent.hxx:159
     SvEventDescriptor xParentRef css::uno::Reference<css::uno::XInterface>
 include/svx/bmpmask.hxx:129
@@ -2846,20 +2840,8 @@ slideshow/source/engine/opengl/TransitionImpl.hxx:296
     Vertex normal glm::vec3
 slideshow/source/engine/opengl/TransitionImpl.hxx:297
     Vertex texcoord glm::vec2
-slideshow/source/inc/doctreenode.hxx:109
-    slideshow::internal::DocTreeNode meType enum 
slideshow::internal::DocTreeNode::NodeType
-solenv/bin/concat-deps.c:304
-    hash flags int
-soltools/cpp/cpp.h:77
-    token flag unsigned char
 soltools/cpp/cpp.h:144
     macroValidator pMacro Nlist *
-sot/source/sdstor/stgdir.hxx:46
-    StgDirEntry m_bCreated _Bool
-sot/source/sdstor/stgdir.hxx:48
-    StgDirEntry m_bRenamed _Bool
-starmath/inc/symbol.hxx:46
-    SmSym m_bDocSymbol _Bool
 starmath/inc/view.hxx:163
     SmCmdBoxWindow aController class SmEditController
 starmath/inc/view.hxx:224
diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx
index 10aaa1f30d26..9f99ea85a934 100644
--- a/include/svl/aeitem.hxx
+++ b/include/svl/aeitem.hxx
@@ -24,6 +24,7 @@
 #include <svl/eitem.hxx>
 
 #include <cstddef>
+#include <memory>
 #include <vector>
 
 class SfxAllEnumValueArr;
@@ -42,8 +43,7 @@ protected:
 
 class SVL_DLLPUBLIC SfxAllEnumItem: public SfxAllEnumItem_Base
 {
-    SfxAllEnumValueArr*      pValues;
-    std::vector<sal_uInt16>* pDisabledValues;
+    std::unique_ptr<SfxAllEnumValueArr>   pValues;
 
     sal_uInt16              GetPosByValue( sal_uInt16 nValue ) const;
     std::size_t             GetPosByValue_( sal_uInt16 nValue ) const;
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 5080ebcff5df..3558842ae217 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -128,7 +128,6 @@ enum class SvLBoxItemType {String, Button, ContextBmp};
 class SvLBoxTab
 {
     long    nPos;
-    void*   pUserData;
 public:
             SvLBoxTab();
             SvLBoxTab( long nPos, SvLBoxTabFlags nFlags );
@@ -137,7 +136,6 @@ public:
 
     SvLBoxTabFlags nFlags;
 
-    void    SetUserData( void* pPtr ) { pUserData = pPtr; }
     bool    IsDynamic() const { return bool(nFlags & SvLBoxTabFlags::DYNAMIC); 
}
     void    SetPos( long nNewPos) { nPos = nNewPos; }
     long    GetPos() const { return nPos; }
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 66365ef451df..bf8eec60970d 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -932,13 +932,6 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
             SvTreeListEntry* pParentEntry = GetParent(pNewEntry);
             if (!pParentEntry)
                 return;
-            OUString  aStr(GetSelectEntry());
-            sd::DrawDocShell* pSdDrawDocShell = 
SdNavigatorWin::GetDrawDocShell(mpDoc);
-            if (pSdDrawDocShell)
-            {
-                pSdDrawDocShell->GetObjectIsmarked(aStr, true);
-                pSdDrawDocShell->GetObjectIsmarked(aStr, false);
-            }
             Invalidate();
         }
     }
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx 
b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index dccca64df6cf..b94624681233 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -186,22 +186,18 @@ namespace slideshow
                     // non-subsetted node, with some child subsets
                     // that subtract from it
                     maCurrentSubsets.push_back( DocTreeNode( 0,
-                                                             
mnMinSubsetActionIndex,
-                                                             
DocTreeNode::NodeType::Invalid ) );
+                                                             
mnMinSubsetActionIndex ) );
                     maCurrentSubsets.push_back( DocTreeNode( 
mnMaxSubsetActionIndex,
-                                                             
maActionClassVector.size(),
-                                                             
DocTreeNode::NodeType::Invalid ) );
+                                                             
maActionClassVector.size() ) );
                 }
                 else
                 {
                     // subsetted node, from which some further child
                     // subsets subtract content
                     maCurrentSubsets.push_back( DocTreeNode( 
maSubset.getStartIndex(),
-                                                             
mnMinSubsetActionIndex,
-                                                             
DocTreeNode::NodeType::Invalid ) );
+                                                             
mnMinSubsetActionIndex ) );
                     maCurrentSubsets.push_back( DocTreeNode( 
mnMaxSubsetActionIndex,
-                                                             
maSubset.getEndIndex(),
-                                                             
DocTreeNode::NodeType::Invalid ) );
+                                                             
maSubset.getEndIndex() ) );
                 }
             }
             else
@@ -717,14 +713,12 @@ namespace slideshow
 
             DocTreeNode makeTreeNode( const 
DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin,
                                       const 
DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rStart,
-                                      const 
DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd,
-                                      DocTreeNode::NodeType                    
                            eNodeType )
+                                      const 
DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd   )
             {
                 return DocTreeNode( ::std::distance(rBegin,
                                                     rStart),
                                     ::std::distance(rBegin,
-                                                    rEnd),
-                                    eNodeType );
+                                                    rEnd) );
             }
         }
 
@@ -750,8 +744,7 @@ namespace slideshow
             iterateActionClassifications( aFunctor, rBegin, rEnd );
 
             return makeTreeNode( maActionClassVector.begin(),
-                                 aLastBegin, aLastEnd,
-                                 eNodeType );
+                                 aLastBegin, aLastEnd );
         }
 
         DocTreeNode DrawShapeSubsetting::getTreeNode( sal_Int32             
nNodeIndex,
diff --git a/slideshow/source/inc/doctreenode.hxx 
b/slideshow/source/inc/doctreenode.hxx
index f619a4b87659..5cd3fe6fe07c 100644
--- a/slideshow/source/inc/doctreenode.hxx
+++ b/slideshow/source/inc/doctreenode.hxx
@@ -63,8 +63,7 @@ namespace slideshow
              */
             DocTreeNode() :
                 mnStartIndex(-1),
-                mnEndIndex(-1),
-                meType(NodeType::Invalid)
+                mnEndIndex(-1)
             {
             }
 
@@ -82,11 +81,9 @@ namespace slideshow
                 Node type
              */
             DocTreeNode( sal_Int32 nStartIndex,
-                         sal_Int32 nEndIndex,
-                         NodeType  eType ) :
+                         sal_Int32 nEndIndex ) :
                 mnStartIndex(nStartIndex),
-                mnEndIndex(nEndIndex),
-                meType(eType)
+                mnEndIndex(nEndIndex)
             {
             }
 
@@ -100,13 +97,11 @@ namespace slideshow
             {
                 mnStartIndex = -1;
                 mnEndIndex   = -1;
-                meType = NodeType::Invalid;
             }
 
         private:
             sal_Int32   mnStartIndex;
             sal_Int32   mnEndIndex;
-            NodeType    meType;
 
         };
 
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index b174033d63ad..cae9bc88e230 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -301,7 +301,6 @@ struct hash
 {
     struct hash_elem** array;
     struct pool* elems_pool;
-    int flags;
     unsigned int used;
     unsigned int size;
     unsigned int load_limit;
@@ -312,7 +311,6 @@ struct hash
     int memcmp;
 #endif
 };
-#define HASH_F_NO_RESIZE (1<<0)
 
 /* The following hash_compute function was adapted from :
  * lookup3.c, by Bob Jenkins, May 2006, Public Domain.
@@ -483,7 +481,6 @@ unsigned int i;
     fprintf(stderr, "resize hash %u -> %u\n", old_size, hash->size);
     if(hash->size == old_size)
     {
-        hash->flags |= HASH_F_NO_RESIZE;
         return;
     }
     array = calloc(hash->size + 1, sizeof(struct hash_elem*));
@@ -509,7 +506,6 @@ unsigned int i;
     else
     {
         hash->size = old_size;
-        hash->flags |= HASH_F_NO_RESIZE;
     }
 }
 
diff --git a/soltools/cpp/_cpp.c b/soltools/cpp/_cpp.c
index 08520f4a8a7a..5d71e8af58c0 100644
--- a/soltools/cpp/_cpp.c
+++ b/soltools/cpp/_cpp.c
@@ -29,7 +29,7 @@ char outbuf[OUTS];
 char *outptr = outbuf;
 Source *cursource;
 int nerrs;
-struct token nltoken = {NL, 0, 0, 1, (uchar *) "\n", 0};
+struct token nltoken = {NL, 0, 1, (uchar *) "\n", 0};
 char *curtime;
 int incdepth;
 int ifdepth;
diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c
index 1ddba80802b6..ba5866db1daf 100644
--- a/soltools/cpp/_include.c
+++ b/soltools/cpp/_include.c
@@ -149,7 +149,7 @@ syntax:
 void
     genline(void)
 {
-    static Token ta = {UNCLASS, 0, 0, 0, NULL, 0};
+    static Token ta = {UNCLASS, 0, 0, NULL, 0};
     static Tokenrow tr = {&ta, &ta, &ta + 1, 1};
     uchar *p;
 
@@ -181,7 +181,7 @@ void
 void
     genimport(char *fname, int angled, char *iname, int import)
 {
-    static Token ta = {UNCLASS, 0, 0, 0, NULL, 0};
+    static Token ta = {UNCLASS, 0, 0, NULL, 0};
     static Tokenrow tr = {&ta, &ta, &ta + 1, 1};
     uchar *p;
 
@@ -223,7 +223,7 @@ void
 void
     genwrap(int end)
 {
-    static Token ta = {UNCLASS, 0, 0, 0, NULL, 0};
+    static Token ta = {UNCLASS, 0, 0, NULL, 0};
     static Tokenrow tr = {&ta, &ta, &ta + 1, 1};
     uchar *p;
 
diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c
index b732e5398bf7..94f218a536ef 100644
--- a/soltools/cpp/_lex.c
+++ b/soltools/cpp/_lex.c
@@ -371,7 +371,6 @@ continue2:
         tp->type = UNCLASS;
         tp->t = ip;
         tp->wslen = 0;
-        tp->flag = 0;
         state = START;
         for (;;)
         {
@@ -532,7 +531,6 @@ continue2:
                         runelen = 1;
                         s->lineinc = 0;
                         tp->type = COMMENT;
-                        tp->flag |= XTWS;
                     }
             }
             break;
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index 70b6ba824842..0a64b060152c 100644
--- a/soltools/cpp/_macro.c
+++ b/soltools/cpp/_macro.c
@@ -166,7 +166,7 @@ void
 {
     Nlist *np;
     static uchar onestr[2] = "1";
-    static Token onetoken[1] = {{NUMBER, 0, 0, 1, onestr, 0}};
+    static Token onetoken[1] = {{NUMBER, 0, 1, onestr, 0}};
     static Tokenrow onetr = {onetoken, onetoken, onetoken + 1, 1};
 
     trp->tp = trp->bp;
@@ -645,7 +645,7 @@ int
 Tokenrow *
     stringify(Tokenrow * vp)
 {
-    static Token t = {STRING, 0, 0, 0, NULL, 0};
+    static Token t = {STRING, 0, 0, NULL, 0};
     static Tokenrow tr = {&t, &t, &t + 1, 1};
     Token *tp;
     uchar s[STRLEN];
diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c
index 3bd1a6557d9b..3dbb54c7d1a7 100644
--- a/soltools/cpp/_nlist.c
+++ b/soltools/cpp/_nlist.c
@@ -80,7 +80,7 @@ void
     struct kwtab *kp;
     Nlist *np;
     Token t;
-    static Token deftoken[1] = {{NAME, 0, 0, 7, (uchar *) "defined", 0}};
+    static Token deftoken[1] = {{NAME, 0, 7, (uchar *) "defined", 0}};
     static Tokenrow deftr = {deftoken, deftoken, deftoken + 1, 1};
 
     for (kp = kwtab; kp->kw; kp++)
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index bac421647035..097b627e88b6 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -280,7 +280,6 @@ void
         strncpy((char *)tt, (char *)ntp->t - ntp->wslen, ntp->wslen);
         tp->t = tt + ntp->wslen;
         tp->wslen = ntp->wslen;
-        tp->flag |= XPWS;
     }
 }
 
diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index 7628e43ae3d2..dc8dd8965e66 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -74,7 +74,6 @@ extern void setup_kwtab(void);
 typedef struct token
 {
     unsigned char type;
-    unsigned char flag;
     size_t wslen;
     size_t len;
     uchar *t;
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 0af9b5ada18d..6e85777b1daa 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -76,8 +76,6 @@ void StgDirEntry::InitMembers()
     m_nMode       = StreamMode::READ;
     m_bDirect     = true;
     m_bInvalid    =
-    m_bCreated    =
-    m_bRenamed    =
     m_bRemoved    =
     m_bTemp       =
     m_bDirty      =
@@ -959,7 +957,6 @@ StgDirEntry* StgDirStrm::Create( StgDirEntry& rStg, const 
OUString& rName, StgEn
         pRes->m_bInvalid =
         pRes->m_bRemoved =
         pRes->m_bTemp    = false;
-        pRes->m_bCreated =
         pRes->m_bDirty   = true;
     }
     else
@@ -968,7 +965,6 @@ StgDirEntry* StgDirStrm::Create( StgDirEntry& rStg, const 
OUString& rName, StgEn
         if( StgAvlNode::Insert( reinterpret_cast<StgAvlNode**>(&rStg.m_pDown), 
pRes ) )
         {
             pRes->m_pUp    = &rStg;
-            pRes->m_bCreated =
             pRes->m_bDirty = true;
         }
         else
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index 5809703602dd..b4f1a763bf8b 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -43,9 +43,7 @@ class StgDirEntry : public StgAvlNode
     sal_Int32    m_nEntry;                    // entry # in TOC stream (temp)
     sal_Int32    m_nPos;                      // current position
     bool         m_bDirty;                    // dirty directory entry
-    bool         m_bCreated;                  // newly created entry
     bool         m_bRemoved;                  // removed per Invalidate()
-    bool         m_bRenamed;                  // renamed
     void         InitMembers();             // ctor helper
     virtual short Compare( const StgAvlNode* ) const override;
     bool         StoreStream( StgIo& );     // store the stream
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index fbddd9f6f79b..7a3a79cd6210 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -43,7 +43,6 @@ private:
     OUString            m_aSetName;
     sal_UCS4            m_cChar;
     bool                m_bPredefined;
-    bool                m_bDocSymbol;
 
 public:
     SmSym();
@@ -62,8 +61,6 @@ public:
     const OUString& GetExportName() const       { return m_aExportName; }
     void            SetExportName( const OUString &rName )        { 
m_aExportName = rName; }
 
-    void            SetDocSymbol( bool bVal )   { m_bDocSymbol = bVal; }
-
     // true if rSymbol has the same name, font and character
     bool            IsEqualInUI( const SmSym& rSymbol ) const;
 };
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 927680eb74d1..2f7143bb34b6 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -33,8 +33,7 @@ SmSym::SmSym() :
     m_aName(OUString("unknown")),
     m_aSetName(OUString("unknown")),
     m_cChar('\0'),
-    m_bPredefined(false),
-    m_bDocSymbol(false)
+    m_bPredefined(false)
 {
     m_aExportName = m_aName;
     m_aFace.SetTransparent(true);
@@ -60,7 +59,6 @@ SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, 
sal_UCS4 cChar,
     m_cChar         = cChar;
     m_aSetName      = rSet;
     m_bPredefined   = bIsPredefined;
-    m_bDocSymbol    = false;
 }
 
 
@@ -72,7 +70,6 @@ SmSym& SmSym::operator = (const SmSym& rSymbol)
     m_aFace         = rSymbol.m_aFace;
     m_aSetName      = rSymbol.m_aSetName;
     m_bPredefined   = rSymbol.m_bPredefined;
-    m_bDocSymbol    = rSymbol.m_bDocSymbol;
 
     SmSymbolManager * pSymSetManager = &SM_MOD()->GetSymbolManager();
     if (pSymSetManager)
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 304f3cf431bd..489a8ba1cabd 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -659,7 +659,6 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** 
ppEntries, const Any*
                         SmSym aSymbol ( pDescriptor->sName, aFont, static_cast 
< sal_Unicode > (pDescriptor->nCharacter),
                                         pDescriptor->sSymbolSet );
                         aSymbol.SetExportName ( pDescriptor->sExportName );
-                        aSymbol.SetDocSymbol( true );
                         rManager.AddOrReplaceSymbol ( aSymbol );
                     }
                 }
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index 819a0d61fa77..7d818b903067 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -34,47 +34,31 @@ class SfxAllEnumValueArr : public 
std::vector<SfxAllEnumValue_Impl> {};
 
 SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal):
     SfxAllEnumItem_Base(which, nVal),
-    pValues( nullptr ),
-    pDisabledValues( nullptr )
+    pValues( nullptr )
 {
     InsertValue( nVal );
 }
 
 SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ):
-    SfxAllEnumItem_Base(which, rStream),
-    pValues( nullptr ),
-    pDisabledValues( nullptr )
+    SfxAllEnumItem_Base(which, rStream)
 {
     InsertValue( GetValue() );
 }
 
 SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which):
-    SfxAllEnumItem_Base(which, 0),
-    pValues( nullptr ),
-    pDisabledValues( nullptr )
+    SfxAllEnumItem_Base(which, 0)
 {
 }
 
 SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
-    SfxAllEnumItem_Base(rCopy),
-    pValues(nullptr),
-    pDisabledValues( nullptr )
+    SfxAllEnumItem_Base(rCopy)
 {
-    if ( !rCopy.pValues )
-        return;
-
-    pValues = new SfxAllEnumValueArr(*rCopy.pValues);
-
-    if( rCopy.pDisabledValues )
-    {
-        pDisabledValues = new std::vector<sal_uInt16>( 
*(rCopy.pDisabledValues) );
-    }
+    if ( rCopy.pValues )
+        pValues.reset( new SfxAllEnumValueArr(*rCopy.pValues) );
 }
 
 SfxAllEnumItem::~SfxAllEnumItem()
 {
-    delete pValues;
-    delete pDisabledValues;
 }
 
 sal_uInt16 SfxAllEnumItem::GetValueCount() const
@@ -139,7 +123,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const 
OUString &rValue )
     aVal.nValue = nValue;
     aVal.aText = rValue;
     if ( !pValues )
-        pValues = new SfxAllEnumValueArr;
+        pValues.reset( new SfxAllEnumValueArr );
     else if ( GetPosByValue( nValue ) != USHRT_MAX )
         // remove when exists
         RemoveValue( nValue );
@@ -153,7 +137,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue )
     aVal.nValue = nValue;
     aVal.aText = OUString::number(nValue);
     if ( !pValues )
-        pValues = new SfxAllEnumValueArr;
+        pValues.reset( new SfxAllEnumValueArr );
 
     pValues->insert(pValues->begin() + GetPosByValue_(nValue), aVal); // 
FIXME: Duplicates?
 }
diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index 0b728f512c38..0686a8cd0fe0 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -237,21 +237,18 @@ OUString SvInplaceEdit2::GetText() const
 SvLBoxTab::SvLBoxTab()
 {
     nPos = 0;
-    pUserData = nullptr;
     nFlags = SvLBoxTabFlags::NONE;
 }
 
 SvLBoxTab::SvLBoxTab( long nPosition, SvLBoxTabFlags nTabFlags )
 {
     nPos = nPosition;
-    pUserData = nullptr;
     nFlags = nTabFlags;
 }
 
 SvLBoxTab::SvLBoxTab( const SvLBoxTab& rTab )
 {
     nPos = rTab.nPos;
-    pUserData = rTab.pUserData;
     nFlags = rTab.nFlags;
 }
 
@@ -3261,7 +3258,6 @@ void SvTreeListBox::AddTab(long nTabPos, SvLBoxTabFlags 
nFlags )
 {
     nFocusWidth = -1;
     SvLBoxTab* pTab = new SvLBoxTab( nTabPos, nFlags );
-    pTab->SetUserData( nullptr );
     aTabs.push_back( pTab );
     if( nTreeFlags & SvTreeFlags::USESEL )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to