summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-27 15:11:15 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-28 06:25:08 +0000
commit2a4c68a6ffa46eb7b6d7fafdf5e9c19970cdd6a5 (patch)
treec2cf7d28114805852a244a796a814e35c358b9eb /filter
parent612ebb9b972fde18b1492b601116a8c03adb2912 (diff)
loplugin:singlevalfields in filter
Change-Id: I6f7220e54178ba9e2c25adda2c1e048d3a222d43 Reviewed-on: https://gerrit.libreoffice.org/26709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx14
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.hxx2
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx4
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx3
-rw-r--r--filter/source/msfilter/eschesdo.cxx18
-rw-r--r--filter/source/msfilter/eschesdo.hxx10
-rw-r--r--filter/source/pdf/pdfexport.cxx3
-rw-r--r--filter/source/pdf/pdfexport.hxx1
-rw-r--r--filter/source/svg/svgwriter.cxx6
-rw-r--r--filter/source/svg/svgwriter.hxx3
11 files changed, 5 insertions, 61 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 14a3c878ac22..4ab22f20828b 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -96,7 +96,6 @@ class PSWriter
private:
bool mbStatus;
sal_uLong mnLevelWarning; // number of embedded eps files which was not exported
- sal_uLong mnLastPercent; // the number with which pCallback was called the last time
sal_uInt32 mnLatestPush; // offset to streamposition, where last push was done
long mnLevel; // dialog options
@@ -111,7 +110,6 @@ private:
ScopedVclPtrInstance<VirtualDevice> pVDev;
double nBoundingX1; // this represents the bounding box
- double nBoundingY1;
double nBoundingX2;
double nBoundingY2;
@@ -126,7 +124,6 @@ private:
bool bTextFillColor;
Color aTextFillColor;
Color aBackgroundColor;
- bool bRegionChanged;
TextAlign eTextAlign;
double fLineWidth;
@@ -137,7 +134,6 @@ private:
vcl::Font maFont;
vcl::Font maLastFont;
- sal_uInt8 nChrSet;
sal_uInt8 nNextChrSetId; // first unused ChrSet-Id
PSLZWCTreeNode* pTable; // LZW compression data
@@ -236,7 +232,6 @@ public:
PSWriter::PSWriter()
: mbStatus(false)
, mnLevelWarning(0)
- , mnLastPercent(0)
, mnLatestPush(0)
, mnLevel(0)
, mbGrayScale(false)
@@ -248,7 +243,6 @@ PSWriter::PSWriter()
, pAMTF(nullptr)
, pVDev()
, nBoundingX1(0)
- , nBoundingY1(0)
, nBoundingX2(0)
, nBoundingY2(0)
, pGDIStack(nullptr)
@@ -262,7 +256,6 @@ PSWriter::PSWriter()
, bTextFillColor(false)
, aTextFillColor()
, aBackgroundColor()
- , bRegionChanged(false)
, eTextAlign()
, fLineWidth(0)
, fMiterLimit(0)
@@ -271,7 +264,6 @@ PSWriter::PSWriter()
, aDashArray()
, maFont()
, maLastFont()
- , nChrSet(0)
, nNextChrSetId(0)
, pTable(nullptr)
, pPrefix(nullptr)
@@ -299,7 +291,6 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
mbStatus = true;
mnPreview = 0;
mnLevelWarning = 0;
- mnLastPercent = 0;
mnLatestPush = 0xEFFFFFFE;
if ( pFilterConfigItem )
@@ -410,7 +401,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pMTF = pAMTF;
}
pVDev->SetMapMode( pMTF->GetPrefMapMode() );
- nBoundingX1 = nBoundingY1 = 0;
+ nBoundingX1 = 0;
nBoundingX2 = pMTF->GetPrefSize().Width();
nBoundingY2 = pMTF->GetPrefSize().Height();
@@ -428,9 +419,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
eJoinType = SvtGraphicStroke::joinMiter;
aBackgroundColor = Color( COL_WHITE );
eTextAlign = ALIGN_BASELINE;
- bRegionChanged = false;
- nChrSet = 0x00;
nNextChrSetId = 1;
if( pMTF->GetActionSize() )
@@ -1073,7 +1062,6 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
pGS->bTextFillCol = bTextFillColor;
pGS->aTextFillCol = aTextFillColor;
pGS->aBackgroundCol = aBackgroundColor;
- bRegionChanged = false;
pGS->aFont = maFont;
mnLatestPush = mpPS->Tell();
ImplWriteLine( "gs" );
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index c26056804307..f7d053bd8dca 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -537,8 +537,6 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
BmpMirrorFlags nMirr = BmpMirrorFlags::NONE;
if ( pBmpDesc->mbVMirror )
nMirr |= BmpMirrorFlags::Vertical;
- if ( pBmpDesc->mbHMirror )
- nMirr |= BmpMirrorFlags::Horizontal;
if ( nMirr != BmpMirrorFlags::NONE )
pBmpDesc->mpBitmap->Mirror( nMirr );
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index 6614a0e571a4..5fba2d72462c 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -33,7 +33,6 @@ class CGMBitmapDescriptor
BitmapWriteAccess* mpAcc;
bool mbStatus;
bool mbVMirror;
- bool mbHMirror;
sal_uInt32 mnDstBitsPerPixel;
sal_uInt32 mnScanSize; // bytes per line
FloatPoint mnP, mnQ, mnR;
@@ -52,7 +51,6 @@ class CGMBitmapDescriptor
, mpAcc(nullptr)
, mbStatus(false)
, mbVMirror(false)
- , mbHMirror(false)
, mnDstBitsPerPixel(0)
, mnScanSize(0)
, mndx(0.0)
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 7ae9f324775f..c78101ebddca 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -45,8 +45,6 @@ private:
bool bStatus;
- sal_uLong nLastPercent;
-
SvStream &m_rPCD;
BitmapWriteAccess* mpAcc;
@@ -78,7 +76,6 @@ public:
explicit PCDReader(SvStream &rStream)
: bStatus(false)
- , nLastPercent(0)
, m_rPCD(rStream)
, mpAcc(nullptr)
, nOrientation(0)
@@ -101,7 +98,6 @@ bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
Bitmap aBmp;
bStatus = true;
- nLastPercent = 0;
// is it a PCD file with a picture? ( sets bStatus == sal_False, if that's not the case):
CheckPCDImagePacFile();
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 609786a6aad7..39f733648247 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -47,7 +47,6 @@ private:
bool bStatus; // Whether until now no error occurred
Animation aAnimation;
- sal_uLong nLastPercent;
SvStream* pTIFF; // the TIFF file that should be read
Bitmap aBitmap;
@@ -125,7 +124,6 @@ public:
TIFFReader()
: bStatus(false)
- , nLastPercent(0)
, pTIFF(nullptr)
, pAcc(nullptr)
, nDstBitsPerPixel(0)
@@ -1177,7 +1175,6 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
sal_uInt32 nFirstIfd(0), nDataLen;
bStatus = true;
- nLastPercent = 0;
pTIFF = &rTIFF;
nMaxPos = nOrigPos = pTIFF->Tell();
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 1cbb28a886b1..50df810f8214 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -69,13 +69,7 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
, mpPicStrm(nullptr)
, mpHostAppData(nullptr)
, mnPagesWritten(0)
- , mnShapeMasterBody(0)
- , mnIndices(0)
- , mnOutlinerCount(0)
- , mnStatMaxValue(0)
- , mnEffectCount(0)
, mbIsTitlePossible(false)
- , mbStatusIndicator(false)
{
}
@@ -526,7 +520,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
aPropOpt.AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
- aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
+ aPropOpt.AddOpt( ESCHER_Prop_hspMaster, 0 );
}
else
{
@@ -592,7 +586,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
aPropOpt.AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
- aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
+ aPropOpt.AddOpt( ESCHER_Prop_hspMaster, 0 );
}
else
{
@@ -812,9 +806,6 @@ sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShap
bool ImplEESdrWriter::ImplInitPageValues()
{
- mnIndices = 0;
- mnOutlinerCount = 0; // die outline objects must be in accordance with the layout.
- mnEffectCount = 0;
mbIsTitlePossible = true; // With more than one title PowerPoint will fail.
return true;
@@ -832,11 +823,6 @@ void ImplEESdrWriter::ImplWritePage(
if( nPer != nLastPer )
{
nLastPer = nPer;
- sal_uInt32 nValue = mnPagesWritten * 5 + nPer;
- if( nValue > mnStatMaxValue )
- nValue = mnStatMaxValue;
- if( mbStatusIndicator )
- mXStatusIndicator->setValue( nValue );
}
ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 13e37ed6679b..f583761e568d 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -123,17 +123,7 @@ protected:
sal_uInt32 mnPagesWritten;
- sal_uInt32 mnShapeMasterBody;
-
- // per page values
- sal_uInt32 mnIndices;
- sal_uInt32 mnOutlinerCount;
- sal_uInt32 mnStatMaxValue;
-
- sal_uInt16 mnEffectCount;
-
bool mbIsTitlePossible;
- bool mbStatusIndicator;
explicit ImplEESdrWriter( EscherEx& rEx );
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index c98b07240a6a..6e4d644ef950 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -125,7 +125,6 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
mnZoom ( 100 ),
mnInitialPage ( 1 ),
mnPDFPageLayout ( 0 ),
- mbFirstPageLeft ( false ),
mbEncrypt ( false ),
mbRestrictPermissions ( false ),
@@ -646,7 +645,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
break;
}
- aContext.FirstPageLeft = mbFirstPageLeft;
+ aContext.FirstPageLeft = false;
// check if PDF/A, which does not allow encryption
if( aContext.Version != vcl::PDFWriter::PDF_A_1 )
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index c4c021f418eb..5b9391ad60e9 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -81,7 +81,6 @@ private:
sal_Int32 mnZoom;
sal_Int32 mnInitialPage;
sal_Int32 mnPDFPageLayout;
- bool mbFirstPageLeft;
bool mbEncrypt;
bool mbRestrictPermissions;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 902cd31f9aec..3fb3f4cdc9e8 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -439,7 +439,6 @@ SVGTextWriter::SVGTextWriter( SVGExport& rExport )
mbIsURLField( false ),
msUrl(),
mbIsPlaceholderShape( false ),
- mbIWS( false ),
maCurrentFont(),
maParentFont()
{
@@ -1699,7 +1698,6 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
mrFontExport( rFontExport ),
mpContext( nullptr ),
maTextWriter( rExport ),
- mnInnerMtfCount( 0 ),
mbClipAttrChanged( false ),
mbIsPlaceholderShape( false )
{
@@ -2688,10 +2686,6 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
// generation
sal_Int32 nEntryCount(0);
- if( mnInnerMtfCount )
- nWriteFlags |= SVGWRITER_NO_SHAPE_COMMENTS;
-
-
#if OSL_DEBUG_LEVEL > 0
bool bIsTextShape = false;
if( !mrExport.IsUsePositionedCharacters() && pxShape
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index e26427542cdd..38eedc0411ce 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -183,7 +183,7 @@ class SVGTextWriter
OUString msUrl;
OUString msHyperlinkIdList;
bool mbIsPlaceholderShape;
- bool mbIWS;
+ static const bool mbIWS = false;
vcl::Font maCurrentFont;
vcl::Font maParentFont;
@@ -268,7 +268,6 @@ private:
SVGTextWriter maTextWriter;
VclPtr<VirtualDevice> mpVDev;
MapMode maTargetMapMode;
- sal_uInt32 mnInnerMtfCount;
bool mbClipAttrChanged;
bool mbIsPlaceholderShape;