summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-15 11:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 08:45:17 +0200
commit98c4cd372bf0e9d4b5b129405f5af4562d8a0f64 (patch)
treef3aae749f01d0453a227b922a6ad3217171700d7 /starmath/source
parent666901bc82fab69f9a80b564f97b5456d0ef684e (diff)
loplugin:unusedfields improve write-only analysis
by whitelisting a couple of methods we know only write to their parameters Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c Reviewed-on: https://gerrit.libreoffice.org/37647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/mathtype.cxx7
-rw-r--r--starmath/source/mathtype.hxx15
2 files changed, 6 insertions, 16 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 7411912b7fa4..4a4f84a4dacf 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -565,6 +565,10 @@ bool MathType::Parse(SotStorage *pStor)
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
+ sal_uInt8 nProdVersion;
+ sal_uInt8 nProdSubVersion;
+ sal_uInt8 nPlatform;
+ sal_uInt8 nProduct;
pS->ReadUChar( nVersion );
pS->ReadUChar( nPlatform );
pS->ReadUChar( nProduct );
@@ -2640,6 +2644,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
bool MathType::HandlePile(int &rSetAlign, int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariation)
{
+ sal_uInt8 nVAlign;
pS->ReadUChar( nHAlign );
pS->ReadUChar( nVAlign );
@@ -2660,7 +2665,7 @@ bool MathType::HandlePile(int &rSetAlign, int nLevel, sal_uInt8 nSelector, sal_u
bool MathType::HandleMatrix(int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariation)
{
- sal_uInt8 nH_just,nV_just,nRows,nCols;
+ sal_uInt8 nH_just,nV_just,nRows,nCols,nVAlign;
pS->ReadUChar( nVAlign );
pS->ReadUChar( nH_just );
pS->ReadUChar( nV_just );
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 2e617a155339..2fd259fd81f7 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -55,15 +55,10 @@ class MathType
public:
explicit MathType(OUString &rIn)
: nVersion(0)
- , nPlatform(0)
- , nProduct(0)
- , nProdVersion(0)
- , nProdSubVersion(0)
, pS(nullptr)
, rRet(rIn)
, pTree(nullptr)
, nHAlign(0)
- , nVAlign(0)
, nPendingAttributes(0)
, nInsertion(0)
, nLSize(0)
@@ -81,15 +76,10 @@ public:
MathType(OUString &rIn,SmNode *pIn)
: nVersion(0)
- , nPlatform(0)
- , nProduct(0)
- , nProdVersion(0)
- , nProdSubVersion(0)
, pS(nullptr)
, rRet(rIn)
, pTree(pIn)
, nHAlign(2)
- , nVAlign(0)
, nPendingAttributes(0)
, nInsertion(0)
, nLSize(0)
@@ -111,10 +101,6 @@ public:
private:
/*Ver 2 Header*/
sal_uInt8 nVersion;
- sal_uInt8 nPlatform;
- sal_uInt8 nProduct;
- sal_uInt8 nProdVersion;
- sal_uInt8 nProdSubVersion;
SotStorageStream *pS;
@@ -164,7 +150,6 @@ private:
SmNode *pTree;
sal_uInt8 nHAlign;
- sal_uInt8 nVAlign;
int nPendingAttributes;
sal_uLong nInsertion;