diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2014-12-20 20:47:39 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-12-21 19:07:03 +0100 |
commit | 8870e068cc7368ffa14a6938836b370d2a188b64 (patch) | |
tree | de1cc65476db4132af13ca0950af92a65cec6e67 /sc/source/ui/view/viewfun3.cxx | |
parent | 17402c73cfd513ade823a5f26c17371766047b6d (diff) |
fdo#39440 sc: reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: Icd031be4aeec07ba60804923e3506d64cf876dd8
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 562135a0d5e0..ee1d23a4fe5e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1151,15 +1151,13 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, { // "Cell merge not possible if cells already merged" ScDocAttrIterator aIter( pDoc, nStartTab, nStartCol, nStartRow, nUndoEndCol, nUndoEndRow ); const ScPatternAttr* pPattern = NULL; - const ScMergeAttr* pMergeFlag = NULL; - const ScMergeFlagAttr* pMergeFlagAttr = NULL; SCCOL nCol = -1; SCROW nRow1 = -1; SCROW nRow2 = -1; while ( ( pPattern = aIter.GetNext( nCol, nRow1, nRow2 ) ) != NULL ) { - pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) ); - pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) ); + const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) ); + const ScMergeFlagAttr* pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) ); if( ( pMergeFlag && pMergeFlag->IsMerged() ) || ( pMergeFlagAttr && pMergeFlagAttr->IsOverlapped() ) ) { ScRange aRange(nCol, nRow1, nStartTab); |