summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-15 15:54:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-16 08:30:26 +0000
commita2b77b43685884fb4e9be04152a49294fa50db36 (patch)
tree00d599e81a653dc5c663f9dd179970b3e6aa11f2 /filter
parent389939b02bde4ea72268960310bbd1f2984200bf (diff)
loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the connectivity::odbc::OConnection::m_bClosed field. Probably closes some kind of connection leak there. Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82 Reviewed-on: https://gerrit.libreoffice.org/28932 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx5
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/viscache.hxx5
-rw-r--r--filter/source/t602/t602filter.cxx5
-rw-r--r--filter/source/t602/t602filter.hxx3
5 files changed, 5 insertions, 17 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index ee909bb948ca..cce464e2faff 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -109,8 +109,7 @@ private:
GDIMetaFile* pAMTF; // only created if Graphics is not a Metafile
ScopedVclPtrInstance<VirtualDevice> pVDev;
- double nBoundingX1; // this represents the bounding box
- double nBoundingX2;
+ double nBoundingX2; // this represents the bounding box
double nBoundingY2;
StackMember* pGDIStack;
@@ -242,7 +241,6 @@ PSWriter::PSWriter()
, pMTF(nullptr)
, pAMTF(nullptr)
, pVDev()
- , nBoundingX1(0)
, nBoundingX2(0)
, nBoundingY2(0)
, pGDIStack(nullptr)
@@ -401,7 +399,6 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pMTF = pAMTF;
}
pVDev->SetMapMode( pMTF->GetPrefMapMode() );
- nBoundingX1 = 0;
nBoundingX2 = pMTF->GetPrefSize().Width();
nBoundingY2 = pMTF->GetPrefSize().Height();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 6e2c7bda28c5..dcfaca68b635 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -168,9 +168,7 @@ struct SvxMSDffBLIPInfos : public std::vector<SvxMSDffBLIPInfo> {};
void Impl_OlePres::Write( SvStream & rStm )
{
WriteClipboardFormat( rStm, SotClipboardFormatId::GDIMETAFILE );
- rStm.WriteInt32( nJobLen + 4 ); // a TargetDevice that's always empty
- if( nJobLen )
- rStm.WriteBytes(pJob, nJobLen);
+ rStm.WriteInt32( 4 ); // a TargetDevice that's always empty
rStm.WriteUInt32( nAspect );
rStm.WriteInt32( -1 ); //L-Index always -1
rStm.WriteInt32( nAdvFlags );
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index d4afde6df34d..ee1767c5c05e 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -32,8 +32,6 @@ class Impl_OlePres
GDIMetaFile * pMtf;
sal_uInt32 nAdvFlags;
- sal_Int32 nJobLen;
- sal_uInt8* pJob;
Size aSize; // Groesse in 100TH_MM
public:
explicit Impl_OlePres( SotClipboardFormatId nF )
@@ -41,12 +39,9 @@ public:
, nAspect( ASPECT_CONTENT )
, pMtf( nullptr )
, nAdvFlags( 0x2 ) // in Dokument gefunden
- , nJobLen( 0 )
- , pJob( nullptr )
{}
~Impl_OlePres()
{
- delete pJob;
delete pMtf;
}
void SetMtf( const GDIMetaFile & rMtf )
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index e1df97f839e5..4b9e7723255f 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -278,8 +278,8 @@ bool SAL_CALL T602ImportFilter::importImpl( const Sequence< css::beans::Property
xImporter->setTargetDocument(mxDoc);
char fs[32], fs2[32];
- sprintf(fs, "%ipt", ini.fontsize);
- sprintf(fs2,"%ipt", 2*ini.fontsize);
+ sprintf(fs, "%ipt", inistruct::fontsize);
+ sprintf(fs2,"%ipt", 2*inistruct::fontsize);
mpAttrList = new SvXMLAttributeList;
@@ -485,7 +485,6 @@ void T602ImportFilter::Reset602()
ini.xcode = KAM;
ini.ruscode = false;
ini.reformatpars= false;
- ini.fontsize = 10;
fst.nowfnt = fst.oldfnt = standard;
fst.uline = fst.olduline = false;
diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx
index f9ccc0526af0..d8dbbdd3439f 100644
--- a/filter/source/t602/t602filter.hxx
+++ b/filter/source/t602/t602filter.hxx
@@ -75,7 +75,7 @@ struct inistruct
tcode xcode; // KAM encoding set - forced
bool ruscode; // false Russian tables turned on
bool reformatpars; // false Reformat paragraphs (whitespaces and line breaks)
- sal_Int16 fontsize; // font size in points
+ static const sal_Int16 fontsize = 10; // font size in points
inistruct()
: showcomm( true )
@@ -83,7 +83,6 @@ struct inistruct
, xcode ( KAM )
, ruscode ( false )
, reformatpars ( false )
- , fontsize (10)
{
};
};