summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-13 10:09:21 +0200
committerNoel Grandin <noel@peralex.com>2015-06-15 13:34:14 +0200
commit4ea281a3ccb5bd21e1808d8cb127a91a1bb72691 (patch)
tree183a2ab634d770b7ef777323fa6851fc38e14011 /sc
parent943f4b4ff1c524c514584c459b899ba3e9dfb71f (diff)
cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx4
-rw-r--r--sc/source/filter/qpro/qproform.cxx3
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx1
6 files changed, 4 insertions, 12 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index be2989021deb..b7c276781096 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5170,7 +5170,7 @@ void Test::testAreasWithNotes()
SCCOL col;
SCROW row;
- bool dataFound = false;
+ bool dataFound;
// only cell notes (empty content)
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 051cad915764..b636aff4ba2f 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -872,8 +872,6 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
rNoRotatedAnchor.maStartOffset = rData.maStartOffset;
rNoRotatedAnchor.maEndOffset = rData.maEndOffset;
- Rectangle aRect = pObj->GetLogicRect();
-
// get bounding rectangle of shape ( include any hidden row/columns ), <sigh> we need to do this
// because if the shape is rotated the anchor from xml is in terms of the unrotated shape, if
// the shape is hidden ( by the rows that contain the shape being hidden ) then our hack of
@@ -893,8 +891,6 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
// resize/position the shape to *full* size e.g. how it would be ( if no hidden rows/cols affected things )
pObj->SetLogicRect(aFullRect);
- // capture rotated shape ( if relevant )
- aRect = pObj->GetSnapRect();
// Ok, here is more nastyness, from xml the Anchor is in terms of the LogicRect which is the
// untransformed unrotated shape, here we swap out that initial anchor and from now on use
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 3d166cb1a89d..b473982b3cb6 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -280,7 +280,6 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
nStrLen = rStrm.ReaduInt32();
if( nStrLen )
{
- nStrLen = 0;
nStrLen = rStrm.ReaduInt32();
nStrLen /= 2; // it's byte count here...
rStrm.Ignore( 2 );
@@ -780,7 +779,6 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
// second formula
::std::unique_ptr< ScTokenArray > xTokArr2;
- nLen = 0;
nLen = rStrm.ReaduInt16();
rStrm.Ignore( 2 );
if( nLen > 0 )
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 698dc1425804..324c0e34c9fd 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -58,7 +58,7 @@ double ScfTools::ReadLongDouble( SvStream& rStrm )
{
/*
-" M a p p i n g - G u i d e " 10-Byte Intel
+"Mapping - Guide" 10-Byte Intel
77777777 77666666 66665555 55555544 44444444 33333333 33222222 22221111 11111100 00000000 x10
98765432 10987654 32109876 54321098 76543210 98765432 10987654 32109876 54321098 76543210 Bit-# total
@@ -69,7 +69,7 @@ SEEEEEEE EEEEEEEE IMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
14321098 76543210 02109876 54321098 76543210 98765432 10987654 32109876 54321098 76543210 Bit in Group
*/
- long double lfDouble = 0.0;
+ long double lfDouble;
long double lfFakt = 256.0;
sal_uInt8 pDouble10[ 10 ];
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 21249ea28bc1..4a70e875e254 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -43,8 +43,7 @@ void QProToSc::ReadSRD( ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sa
if( nRelBit & 0x2000 )
{
- SCROW nRelRow = (~nTmp + 1);
- nRelRow = (sal_Int16)(nTmp << 3); // This looks weird... Mistake?
+ SCROW nRelRow = (sal_Int16)(nTmp << 3); // This looks weird... Mistake?
nRelRow /= 8;
rSRD.SetRelRow(nRelRow);
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index f3f2c70c9be6..693c7d9de4c9 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -304,7 +304,6 @@ void ScSheetLinkObj::setFileName(const OUString& rNewName)
// Links updaten
//! Undo !!!
- pLink = NULL; // wird bei UpdateLinks ungueltig
pDocShell->UpdateLinks(); // alter Link raus, evtl. neuen Link anlegen
// Daten kopieren