Kaydet (Commit) e037381f authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in slideshow..svtools

Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c
Reviewed-on: https://gerrit.libreoffice.org/39474Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ca4701fe
......@@ -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
......
......@@ -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;
......
......@@ -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; }
......
......@@ -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();
}
}
......
......@@ -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,
......
......@@ -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;
};
......
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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];
......
......@@ -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++)
......
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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;
};
......
......@@ -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)
......
......@@ -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 );
}
}
......
......@@ -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?
}
......
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment