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

loplugin:unusedfields store..svl

Change-Id: I6070a683e5128271b84a10caccb548d07c950927
Reviewed-on: https://gerrit.libreoffice.org/39021Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 742c0838
......@@ -120,12 +120,6 @@ typedef struct
*/
sal_uInt32 m_nAttrib;
/** Size.
@see store_getStreamSize()
@see store_setStreamSize()
*/
sal_uInt32 m_nSize;
/** Reserved for internal use.
*/
sal_uInt32 m_nReserved;
......
......@@ -141,13 +141,11 @@ class OnDemandCalendarWrapper
mutable std::unique_ptr<CalendarWrapper>
pPtr;
mutable bool bValid;
bool bInitialized;
public:
OnDemandCalendarWrapper()
: pPtr(nullptr)
, bValid(false)
, bInitialized(false)
{}
void init(
......@@ -158,7 +156,6 @@ public:
m_xContext = rxContext;
changeLocale( rLocale );
pPtr.reset();
bInitialized = true;
}
void changeLocale( const css::lang::Locale& rLocale )
......@@ -252,12 +249,10 @@ class OnDemandNativeNumberWrapper
css::uno::Reference< css::uno::XComponentContext > m_xContext;
mutable std::unique_ptr<NativeNumberWrapper>
pPtr;
bool bInitialized;
public:
OnDemandNativeNumberWrapper()
: pPtr(nullptr)
, bInitialized(false)
{}
void init(
......@@ -266,7 +261,6 @@ public:
{
m_xContext = rxContext;
pPtr.reset();
bInitialized = true;
}
NativeNumberWrapper* get() const
......
......@@ -114,11 +114,6 @@ yyerror(s)
#else /* not CPP */
#include "ifparser.h"
struct parse_data {
struct filepointer *filep;
struct inclist *inc;
const char *line;
};
static const char *
my_if_errors (IfParser *ip, const char *cp, const char *expecting)
......@@ -199,19 +194,14 @@ my_eval_variable (IfParser *ip, const char *var, size_t len)
}
int cppsetup(char *line, struct filepointer *filep, struct inclist *inc)
int cppsetup(char *line)
{
IfParser ip;
struct parse_data pd;
int val = 0;
pd.filep = filep;
pd.inc = inc;
pd.line = line;
ip.funcs.handle_error = my_if_errors;
ip.funcs.eval_defined = my_eval_defined;
ip.funcs.eval_variable = my_eval_variable;
ip.data = (char *) &pd;
(void) ParseIfExpression (&ip, line, &val);
if (val)
......
......@@ -138,7 +138,6 @@ struct filepointer {
char *f_p;
char *f_base;
char *f_end;
long f_len;
long f_line;
};
......@@ -172,8 +171,7 @@ int find_includes(struct filepointer *filep, struct inclist *file,
struct IncludesCollection* incCollection, struct symhash *symbols);
void included_by(struct inclist *ip,
struct inclist * newfile);
int cppsetup(char *line,
struct filepointer *filep, struct inclist *inc);
int cppsetup(char *line);
void add_include(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, char *include, boolean dot, boolean failOK,
struct IncludesCollection* incCollection, struct symhash *symbols);
......
......@@ -68,7 +68,6 @@ typedef struct if_parser {
int (*eval_variable) (struct if_parser *, const char *, size_t);
int (*eval_defined) (struct if_parser *, const char *, size_t);
} funcs;
char *data;
} IfParser;
const char *ParseIfExpression (IfParser *, const char *, int *);
......
......@@ -512,7 +512,6 @@ struct filepointer *getfile(char *file)
fatalerr("makedepend: Failed to read file \"%s\"\n", file);
close(fd);
content->f_len = bytes_read+1;
content->f_p = content->f_base;
content->f_end = content->f_base + bytes_read;
*content->f_end = '\0';
......
......@@ -34,11 +34,9 @@ char *hash_lookup( char *symbol, struct symhash *symbols );
void hash_undefine( char *symbol, struct symhash *symbols );
int gobble( struct filepointer *filep, struct inclist *file,
struct inclist *file_red, struct symhash *symbols );
int deftype ( char *line, struct filepointer *filep,
struct inclist *file_red, struct inclist *file,
int deftype ( char *line, struct inclist *file,
int parse_it, struct symhash *symbols);
int zero_value(char *exp, struct filepointer *filep,
struct inclist *file_red, struct symhash *symbols);
int zero_value(char *exp, struct symhash *symbols);
extern struct symhash *maininclist;
......@@ -49,7 +47,7 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
boolean recfailOK;
while ((line = get_line(filep))) {
switch(type = deftype(line, filep, file_red, file, TRUE, symbols)) {
switch(type = deftype(line, file, TRUE, symbols)) {
case IF:
doif:
type = find_includes(filep, file,
......@@ -172,7 +170,7 @@ int gobble(struct filepointer *filep,
int type;
while ((line = get_line(filep))) {
switch(type = deftype(line, filep, file_red, file, FALSE, symbols)) {
switch(type = deftype(line, file, FALSE, symbols)) {
case IF:
case IFFALSE:
case IFGUESSFALSE:
......@@ -217,7 +215,7 @@ int gobble(struct filepointer *filep,
/*
* Decide what type of # directive this line is.
*/
int deftype (char *line, struct filepointer *filep, struct inclist *file_red, struct inclist *file, int parse_it, struct symhash *symbols)
int deftype (char *line, struct inclist *file, int parse_it, struct symhash *symbols)
{
char *p;
char *directive, savechar;
......@@ -253,7 +251,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
*/
debug(0,("%s, line %d: #elif %s ",
file->i_file, filep->f_line, p));
ret = zero_value(p, filep, file_red, symbols);
ret = zero_value(p, symbols);
if (ret != IF)
{
debug(0,("false...\n"));
......@@ -282,7 +280,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist *file_red, st
/*
* parse an expression.
*/
ret = zero_value(p, filep, file_red, symbols);
ret = zero_value(p, symbols);
debug(0,("%s, line %d: %s #if %s\n",
file->i_file, filep->f_line, ret?"false":"true", p));
break;
......@@ -372,10 +370,10 @@ char * isdefined( char *symbol )
/*
* Return type based on if the #if expression evaluates to 0
*/
int zero_value(char *exp, struct filepointer *filep, struct inclist *file_red, struct symhash *symbols)
int zero_value(char *exp, struct symhash *symbols)
{
global_symbols = symbols; /* HACK! see above */
if (cppsetup(exp, filep, file_red))
if (cppsetup(exp))
return IFFALSE;
else
return IF;
......
......@@ -67,7 +67,6 @@ void StgDirEntry::InitMembers()
m_aSave = m_aEntry;
m_pUp =
m_pDown = nullptr;
m_ppRoot = nullptr;
m_pStgStrm = nullptr;
m_pCurStrm =
m_pTmpStrm = nullptr;
......@@ -727,11 +726,9 @@ void StgDirEntry::Invalidate( bool bDel )
StgDirStrm::StgDirStrm( StgIo& r )
: StgDataStrm( r, r.m_aHdr.GetTOCStart(), -1 )
, m_pRoot( nullptr )
, m_nEntries( 0 )
{
if( r.GetError() )
return;
m_nEntries = m_nPageSize / STGENTRY_SIZE;
if( m_nStart == STG_EOF )
{
StgEntry aRoot;
......@@ -817,7 +814,6 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper )
( reinterpret_cast<StgAvlNode**>( pUpper ? &pUpper->m_pDown : &m_pRoot ), pCur ) )
{
pCur->m_pUp = pUpper;
pCur->m_ppRoot = &m_pRoot;
}
else
{
......@@ -972,7 +968,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_ppRoot = &m_pRoot;
pRes->m_bCreated =
pRes->m_bDirty = true;
}
......
......@@ -35,9 +35,8 @@ class StgDirEntry : public StgAvlNode
friend class StgIterator;
friend class StgDirStrm;
StgEntry m_aSave; // original dir entry
StgDirEntry* m_pUp; // parent directory
StgDirEntry* m_pDown; // child directory for storages
StgDirEntry** m_ppRoot; // root of TOC tree
StgDirEntry* m_pUp; // parent directory
StgDirEntry* m_pDown; // child directory for storages
StgStrm* m_pStgStrm; // storage stream
StgTmpStrm* m_pTmpStrm; // temporary stream
StgTmpStrm* m_pCurStrm; // temp stream after commit
......@@ -92,7 +91,6 @@ class StgDirStrm : public StgDataStrm
{
friend class StgIterator;
StgDirEntry* m_pRoot; // root of dir tree
short m_nEntries; // entries per page
void SetupEntry( sal_Int32, StgDirEntry* );
public:
explicit StgDirStrm( StgIo& );
......
......@@ -383,7 +383,6 @@ FatError StgIo::ValidateFATs()
{
StgLinkArg aArg;
aArg.aFile = pFileStrm->GetFileName();
aArg.nErr = nErr;
ErrorLink::get().Call( aArg );
m_bCopied = true;
}
......
......@@ -44,7 +44,6 @@ enum class FatError
struct StgLinkArg
{
OUString aFile;
FatError nErr;
};
class StgIo : public StgCache {
......
......@@ -424,7 +424,6 @@ public:
SvStream* m_pStream; // the stream worked on; for readonly streams it is the original stream of the content
// for read/write streams it's a copy into a temporary file
OUString m_aTempURL; // URL of this temporary stream
RepresentMode m_nRepresentMode; // should it be used as XInputStream or as SvStream
ErrCode m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
bool m_bSourceRead; // Source still contains useful information
......@@ -484,7 +483,6 @@ public:
// this means that the root storage does an autocommit when its external
// reference is destroyed
bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts
bool m_bDirty; // ???
bool m_bIsLinked;
bool m_bListCreated;
SotClipboardFormatId m_nFormat;
......@@ -638,7 +636,6 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode
, m_aURL( rName )
, m_pContent( nullptr )
, m_pStream( nullptr )
, m_nRepresentMode( RepresentMode::NONE )
, m_nError( ERRCODE_NONE )
, m_nMode( nMode )
, m_bSourceRead( !( nMode & StreamMode::TRUNC ) )
......@@ -698,8 +695,6 @@ bool UCBStorageStream_Impl::Init()
// no temporary stream was created
// create one
m_nRepresentMode = RepresentMode::svstream; // can not be used as XInputStream
if ( m_aTempURL.isEmpty() )
m_aTempURL = ::utl::TempFile().GetURL();
......@@ -1186,7 +1181,6 @@ void UCBStorageStream_Impl::Free()
}
#endif
m_nRepresentMode = RepresentMode::NONE;
m_rSource.clear();
DELETEZ( m_pStream );
}
......@@ -1475,7 +1469,6 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const OU
, m_bCommited( false )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
, m_bDirty( false )
, m_bIsLinked( true )
, m_bListCreated( false )
, m_nFormat( SotClipboardFormatId::NONE )
......@@ -1507,7 +1500,6 @@ UCBStorage_Impl::UCBStorage_Impl( const OUString& rName, StreamMode nMode, UCBSt
, m_bCommited( false )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
, m_bDirty( false )
, m_bIsLinked( false )
, m_bListCreated( false )
, m_nFormat( SotClipboardFormatId::NONE )
......@@ -1557,7 +1549,6 @@ UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, bool
, m_bCommited( false )
, m_bDirect( bDirect )
, m_bIsRoot( true )
, m_bDirty( false )
, m_bIsLinked( false )
, m_bListCreated( false )
, m_nFormat( SotClipboardFormatId::NONE )
......@@ -2353,7 +2344,6 @@ bool UCBStorage::IsRoot() const
void UCBStorage::SetDirty()
{
pImp->m_bDirty = true;
}
void UCBStorage::SetClass( const SvGlobalName & rClass, SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName )
......
......@@ -193,7 +193,6 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
rFindData.m_nLength = static_cast<sal_Int32>(n);
rFindData.m_nAttrib |= aPage.attrib();
rFindData.m_nSize = aPage.dataLength();
// Leave.
rFindData.m_nReserved = store::ntohl(aKey.m_nLow);
......
......@@ -204,7 +204,6 @@ namespace svgio
SvgNumber maFontSizeNumber;
FontStretch maFontStretch;
FontStyle maFontStyle;
FontVariant maFontVariant;
FontWeight maFontWeight;
TextAlign maTextAlign;
TextDecoration maTextDecoration;
......@@ -381,9 +380,6 @@ namespace svgio
FontStyle getFontStyle() const;
void setFontStyle(const FontStyle aFontStyle) { maFontStyle = aFontStyle; }
/// FontVariant content
void setFontVariant(const FontVariant aFontVariant) { maFontVariant = aFontVariant; }
/// FontWeight content
FontWeight getFontWeight() const;
void setFontWeight(const FontWeight aFontWeight) { maFontWeight = aFontWeight; }
......
......@@ -41,9 +41,6 @@ namespace svgio
/// variable scan values, dependent of given XAttributeList
SvgNumber maStartOffset;
bool mbMethod : 1; // true = align, false = stretch
bool mbSpacing : 1; // true = auto, false = exact
public:
SvgTextPathNode(
SvgDocument& rDocument,
......@@ -60,12 +57,6 @@ namespace svgio
/// StartOffset content
const SvgNumber& getStartOffset() const { return maStartOffset; }
/// Method content
void setMethod(bool bNew) { mbMethod = bNew; }
/// Spacing content
void setSpacing(bool bNew) { mbSpacing = bNew; }
};
} // end of namespace svgreader
} // end of namespace svgio
......
......@@ -1230,7 +1230,6 @@ namespace svgio
maFontSizeNumber(),
maFontStretch(FontStretch_notset),
maFontStyle(FontStyle_notset),
maFontVariant(FontVariant_notset),
maFontWeight(FontWeight_notset),
maTextAlign(TextAlign_notset),
maTextDecoration(TextDecoration_notset),
......@@ -1651,17 +1650,6 @@ namespace svgio
}
case SVGTokenFontVariant:
{
if(!aContent.isEmpty())
{
if(aContent.startsWith("normal"))
{
setFontVariant(FontVariant_normal);
}
else if(aContent.startsWith("small-caps"))
{
setFontVariant(FontVariant_small_caps);
}
}
break;
}
case SVGTokenFontWeight:
......
......@@ -251,9 +251,7 @@ namespace svgio
: SvgNode(SVGTokenTextPath, rDocument, pParent),
maSvgStyleAttributes(*this),
maXLink(),
maStartOffset(),
mbMethod(true),
mbSpacing(false)
maStartOffset()
{
}
......@@ -297,32 +295,10 @@ namespace svgio
}
case SVGTokenMethod:
{
if(!aContent.isEmpty())
{
if(aContent.startsWith("align"))
{
setMethod(true);
}
else if(aContent.startsWith("stretch"))
{
setMethod(false);
}
}
break;
}
case SVGTokenSpacing:
{
if(!aContent.isEmpty())
{
if(aContent.startsWith("auto"))
{
setSpacing(true);
}
else if(aContent.startsWith("exact"))
{
setSpacing(false);
}
}
break;
}
case SVGTokenXlinkHref:
......
......@@ -223,7 +223,6 @@ struct SfxUndoManager_Data
std::unique_ptr<SfxUndoArray>
pUndoArray;
SfxUndoArray* pActUndoArray;
SfxUndoArray* pFatherUndoArray;
sal_Int32 mnMarks;
sal_Int32 mnEmptyMark;
......@@ -236,7 +235,6 @@ struct SfxUndoManager_Data
explicit SfxUndoManager_Data( size_t i_nMaxUndoActionCount )
:pUndoArray( new SfxUndoArray( i_nMaxUndoActionCount ) )
,pActUndoArray( nullptr )
,pFatherUndoArray( nullptr )
,mnMarks( 0 )
,mnEmptyMark(MARK_INVALID)
,mbUndoEnabled( true )
......@@ -1000,7 +998,6 @@ void SfxUndoManager::EnterListAction( const OUString& rComment,
if ( !m_xData->pUndoArray->nMaxUndoActions )
return;
m_xData->pFatherUndoArray = m_xData->pActUndoArray;
SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, nViewShellId, m_xData->pActUndoArray );
OSL_VERIFY( ImplAddUndoAction_NoNotify( pAction, false, false, aGuard ) );
// expected to succeed: all conditions under which it could fail should have been checked already
......
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