loplugin:unusedfields

Change-Id: Iac4a64af74c92cbd76335faa62e51fa80ef21789
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177718
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-12-03 09:53:24 +02:00
parent d28fcb3e26
commit 5155e21bf1
11 changed files with 7 additions and 58 deletions

View file

@ -174,13 +174,8 @@ for d in definitionSet:
if "Guard" in fieldType: if "Guard" in fieldType:
continue continue
# these are just all model classes # these are just all model classes
if (srcLoc.startswith("oox/") if (srcLoc.startswith("lotuswordpro/")
or srcLoc.startswith("lotuswordpro/") or srcLoc.startswith("hwpfilter/")):
or srcLoc.startswith("include/oox/")
or srcLoc.startswith("include/filter/")
or srcLoc.startswith("hwpfilter/")
or srcLoc.startswith("filter/")
or srcLoc.startswith("vcl/source/filter/")):
continue continue
if "(lambda at " in d[0]: if "(lambda at " in d[0]:
continue continue

View file

@ -53,7 +53,6 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
: mpEscherEx(&rEx) : mpEscherEx(&rEx)
, mpPicStrm(nullptr) , mpPicStrm(nullptr)
, mpHostAppData(nullptr) , mpHostAppData(nullptr)
, mbIsTitlePossible(false)
, mpSdrPage( nullptr ) , mpSdrPage( nullptr )
{ {
} }
@ -829,16 +828,9 @@ sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShap
} }
void ImplEESdrWriter::ImplInitPageValues()
{
mbIsTitlePossible = true; // With more than one title PowerPoint will fail.
}
void ImplEESdrWriter::ImplWritePage( void ImplEESdrWriter::ImplWritePage(
EscherSolverContainer& rSolverContainer, bool ooxmlExport ) EscherSolverContainer& rSolverContainer, bool ooxmlExport )
{ {
ImplInitPageValues();
const sal_uInt32 nShapes = mXShapes->getCount(); const sal_uInt32 nShapes = mXShapes->getCount();
for( sal_uInt32 n = 0; n < nShapes; ++n ) for( sal_uInt32 n = 0; n < nShapes; ++n )
{ {
@ -875,7 +867,6 @@ bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage )
mXShapes = mXDrawPage; mXShapes = mXDrawPage;
if ( !mXShapes.is() ) if ( !mXShapes.is() )
return false; return false;
ImplInitPageValues();
mpSdrPage = &rPage; mpSdrPage = &rPage;
mpSolverContainer.reset( new EscherSolverContainer ); mpSolverContainer.reset( new EscherSolverContainer );
@ -898,8 +889,6 @@ bool ImplEESdrWriter::ImplInitUnoShapes( const Reference< XShapes >& rxShapes )
mXDrawPage.clear(); mXDrawPage.clear();
mXShapes = rxShapes; mXShapes = rxShapes;
ImplInitPageValues();
mpSolverContainer.reset( new EscherSolverContainer ); mpSolverContainer.reset( new EscherSolverContainer );
return true; return true;
} }

View file

@ -105,11 +105,9 @@ class ImplEESdrWriter
SvStream* mpPicStrm; SvStream* mpPicStrm;
// own extensions // own extensions
EscherExHostAppData* mpHostAppData; EscherExHostAppData* mpHostAppData;
bool mbIsTitlePossible;
const SdrPage* mpSdrPage; const SdrPage* mpSdrPage;
std::unique_ptr<EscherSolverContainer> mpSolverContainer; std::unique_ptr<EscherSolverContainer> mpSolverContainer;
void ImplInitPageValues();
void ImplWritePage( EscherSolverContainer& rSolver, bool ooxmlExport ); void ImplWritePage( EscherSolverContainer& rSolver, bool ooxmlExport );
sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj, sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
EscherSolverContainer& rSolver, EscherSolverContainer& rSolver,

View file

@ -1792,11 +1792,6 @@ void SVGFilter::implGetPagePropSet( const Reference< css::drawing::XDrawPage > &
mVisiblePagePropSet.bIsBackgroundVisible = true; mVisiblePagePropSet.bIsBackgroundVisible = true;
mVisiblePagePropSet.bAreBackgroundObjectsVisible = true; mVisiblePagePropSet.bAreBackgroundObjectsVisible = true;
mVisiblePagePropSet.bIsPageNumberFieldVisible = false; mVisiblePagePropSet.bIsPageNumberFieldVisible = false;
mVisiblePagePropSet.bIsHeaderFieldVisible = false;
mVisiblePagePropSet.bIsFooterFieldVisible = true;
mVisiblePagePropSet.bIsDateTimeFieldVisible = true;
mVisiblePagePropSet.bIsDateTimeFieldFixed = true;
mVisiblePagePropSet.nDateTimeFormat = SvxDateFormat::B;
mVisiblePagePropSet.nPageNumberingType = css::style::NumberingType::ARABIC; mVisiblePagePropSet.nPageNumberingType = css::style::NumberingType::ARABIC;
// We collect info on master page elements visibility, and placeholder text shape content. // We collect info on master page elements visibility, and placeholder text shape content.
@ -1811,14 +1806,6 @@ void SVGFilter::implGetPagePropSet( const Reference< css::drawing::XDrawPage > &
implSafeGetPagePropSet( u"IsBackgroundVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsBackgroundVisible; implSafeGetPagePropSet( u"IsBackgroundVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsBackgroundVisible;
implSafeGetPagePropSet( u"IsBackgroundObjectsVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bAreBackgroundObjectsVisible; implSafeGetPagePropSet( u"IsBackgroundObjectsVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bAreBackgroundObjectsVisible;
implSafeGetPagePropSet( u"IsPageNumberVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsPageNumberFieldVisible; implSafeGetPagePropSet( u"IsPageNumberVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsPageNumberFieldVisible;
implSafeGetPagePropSet( u"IsHeaderVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsHeaderFieldVisible;
implSafeGetPagePropSet( u"IsFooterVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsFooterFieldVisible;
implSafeGetPagePropSet( u"IsDateTimeVisible"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsDateTimeFieldVisible;
implSafeGetPagePropSet( u"IsDateTimeFixed"_ustr, xPropSet, xPropSetInfo ) >>= mVisiblePagePropSet.bIsDateTimeFieldFixed;
sal_Int32 nTmp;
if (implSafeGetPagePropSet( u"DateTimeFormat"_ustr, xPropSet, xPropSetInfo ) >>= nTmp)
mVisiblePagePropSet.nDateTimeFormat = static_cast<SvxDateFormat>(nTmp);
if( mVisiblePagePropSet.bIsPageNumberFieldVisible ) if( mVisiblePagePropSet.bIsPageNumberFieldVisible )
{ {

View file

@ -122,22 +122,12 @@ struct PagePropertySet
bool bIsBackgroundVisible; bool bIsBackgroundVisible;
bool bAreBackgroundObjectsVisible; bool bAreBackgroundObjectsVisible;
bool bIsPageNumberFieldVisible; bool bIsPageNumberFieldVisible;
bool bIsDateTimeFieldVisible;
bool bIsFooterFieldVisible;
bool bIsHeaderFieldVisible;
sal_Int32 nPageNumberingType; sal_Int32 nPageNumberingType;
bool bIsDateTimeFieldFixed;
SvxDateFormat nDateTimeFormat;
PagePropertySet() PagePropertySet()
: bIsBackgroundVisible(false) : bIsBackgroundVisible(false)
, bAreBackgroundObjectsVisible(false) , bAreBackgroundObjectsVisible(false)
, bIsPageNumberFieldVisible(false) , bIsPageNumberFieldVisible(false)
, bIsDateTimeFieldVisible(false)
, bIsFooterFieldVisible(false)
, bIsHeaderFieldVisible(false)
, nPageNumberingType(0) , nPageNumberingType(0)
, bIsDateTimeFieldFixed(false)
, nDateTimeFormat(SvxDateFormat::AppDefault)
{ {
} }
}; };

View file

@ -1858,7 +1858,6 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
maAttributeWriter( rExport, rFontExport, mrCurrentState ), maAttributeWriter( rExport, rFontExport, mrCurrentState ),
maTextWriter(rExport, maAttributeWriter, *this), maTextWriter(rExport, maAttributeWriter, *this),
mpVDev(VclPtr<VirtualDevice>::Create()), mpVDev(VclPtr<VirtualDevice>::Create()),
mbClipAttrChanged( false ),
mbIsPlaceholderShape( false ), mbIsPlaceholderShape( false ),
mpEmbeddedBitmapsMap( nullptr ), mpEmbeddedBitmapsMap( nullptr ),
mbIsPreview( false ) mbIsPreview( false )
@ -4054,8 +4053,6 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
const_cast<MetaAction*>(pAction)->Execute( mpVDev ); const_cast<MetaAction*>(pAction)->Execute( mpVDev );
const vcl::Region aClipRegion = mpVDev->GetActiveClipRegion(); const vcl::Region aClipRegion = mpVDev->GetActiveClipRegion();
ImplWriteClipPath( aClipRegion.GetAsPolyPolygon() ); ImplWriteClipPath( aClipRegion.GetAsPolyPolygon() );
mbClipAttrChanged = true;
} }
break; break;

View file

@ -316,7 +316,6 @@ private:
SVGTextWriter maTextWriter; SVGTextWriter maTextWriter;
VclPtr<VirtualDevice> mpVDev; VclPtr<VirtualDevice> mpVDev;
MapMode maTargetMapMode; MapMode maTargetMapMode;
bool mbClipAttrChanged;
bool mbIsPlaceholderShape; bool mbIsPlaceholderShape;
const MetaBitmapActionMap* mpEmbeddedBitmapsMap; const MetaBitmapActionMap* mpEmbeddedBitmapsMap;
bool mbIsPreview; bool mbIsPreview;

View file

@ -72,7 +72,7 @@ struct ElementInfo;
class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") ContextHandler2Helper class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") ContextHandler2Helper
{ {
public: public:
explicit ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBase& rFilter ); explicit ContextHandler2Helper( bool bEnableTrimSpace );
explicit ContextHandler2Helper( const ContextHandler2Helper& rParent ); explicit ContextHandler2Helper( const ContextHandler2Helper& rParent );
virtual ~ContextHandler2Helper(); virtual ~ContextHandler2Helper();
@ -232,7 +232,6 @@ private:
protected: protected:
bool mbEnableTrimSpace; ///< True = trim whitespace in characters(). bool mbEnableTrimSpace; ///< True = trim whitespace in characters().
XmlFilterBase& mrFilter;
}; };
class OOX_DLLPUBLIC ContextHandler2 : public ContextHandler, public ContextHandler2Helper class OOX_DLLPUBLIC ContextHandler2 : public ContextHandler, public ContextHandler2Helper

View file

@ -45,11 +45,10 @@ struct ElementInfo
explicit ElementInfo() : maChars( 0), mnElement( XML_TOKEN_INVALID ), mbTrimSpaces( false ) {} explicit ElementInfo() : maChars( 0), mnElement( XML_TOKEN_INVALID ), mbTrimSpaces( false ) {}
}; };
ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBase& rFilter ) : ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace ) :
mxContextStack( std::make_shared<ContextStack>() ), mxContextStack( std::make_shared<ContextStack>() ),
mnRootStackSize( 0 ), mnRootStackSize( 0 ),
mbEnableTrimSpace( bEnableTrimSpace ), mbEnableTrimSpace( bEnableTrimSpace )
mrFilter( rFilter )
{ {
pushElementInfo( XML_ROOT_CONTEXT ); pushElementInfo( XML_ROOT_CONTEXT );
} }
@ -57,8 +56,7 @@ ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBa
ContextHandler2Helper::ContextHandler2Helper( const ContextHandler2Helper& rParent ) : ContextHandler2Helper::ContextHandler2Helper( const ContextHandler2Helper& rParent ) :
mxContextStack( rParent.mxContextStack ), mxContextStack( rParent.mxContextStack ),
mnRootStackSize( rParent.mxContextStack->size() ), mnRootStackSize( rParent.mxContextStack->size() ),
mbEnableTrimSpace( rParent.mbEnableTrimSpace ), mbEnableTrimSpace( rParent.mbEnableTrimSpace )
mrFilter(rParent.mrFilter)
{ {
} }

View file

@ -33,7 +33,7 @@ using namespace ::com::sun::star::xml::sax;
FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) : FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
FragmentHandler( rFilter, rFragmentPath ), FragmentHandler( rFilter, rFragmentPath ),
ContextHandler2Helper( bEnableTrimSpace, rFilter ) ContextHandler2Helper( bEnableTrimSpace )
{ {
} }

View file

@ -88,7 +88,6 @@ class GIFReader
bool bGCTransparent; // is the image transparent, if yes: bool bGCTransparent; // is the image transparent, if yes:
bool bInterlaced; bool bInterlaced;
bool bOverreadBlock; bool bOverreadBlock;
bool bImGraphicReady;
bool bGlobalPalette; bool bGlobalPalette;
sal_uInt8 nBackgroundColor; // backgroundcolour sal_uInt8 nBackgroundColor; // backgroundcolour
sal_uInt8 nGCTransparentIndex; // pixels of this index are transparent sal_uInt8 nGCTransparentIndex; // pixels of this index are transparent
@ -146,7 +145,6 @@ GIFReader::GIFReader( SvStream& rStm )
, bGCTransparent ( false ) , bGCTransparent ( false )
, bInterlaced ( false) , bInterlaced ( false)
, bOverreadBlock ( false ) , bOverreadBlock ( false )
, bImGraphicReady ( false )
, bGlobalPalette ( false ) , bGlobalPalette ( false )
, nBackgroundColor ( 0 ) , nBackgroundColor ( 0 )
, nGCTransparentIndex ( 0 ) , nGCTransparentIndex ( 0 )
@ -825,7 +823,6 @@ bool GIFReader::ProcessGIF()
if ( nRet == 1 ) if ( nRet == 1 )
{ {
bImGraphicReady = true;
eActAction = NEXT_BLOCK_READING; eActAction = NEXT_BLOCK_READING;
bOverreadBlock = false; bOverreadBlock = false;
} }