summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 21:44:46 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-13 06:22:33 +0000
commited7361ef0bdb6bee4f47a8421221eb7824f02e38 (patch)
treeb745a27d916bb923f01857148e16485ac319f288 /sc
parent239c75ed63fb31cfef9cee13d8d58c4fe9e7a906 (diff)
cppcheck:variableScope
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af Reviewed-on: https://gerrit.libreoffice.org/19329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
-rw-r--r--sc/source/ui/view/output2.cxx3
-rw-r--r--sc/source/ui/view/viewfun2.cxx5
3 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 954da76c3e49..8ee420b4bcc0 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1926,11 +1926,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bool bManaged = false;
// Get the pool item stored it by Conditional Format Manager Dialog.
- const SfxPoolItem* pItem = nullptr;
sal_uInt32 nItems(pTabViewShell->GetPool().GetItemCount2( SCITEM_STRING ));
for( sal_uInt32 nIter = 0; nIter < nItems; ++nIter )
{
- if( nullptr != (pItem = pTabViewShell->GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
+ const SfxPoolItem* pItem = pTabViewShell->GetPool().GetItem2( SCITEM_STRING, nIter );
+ if( pItem != nullptr )
{
if ( ScCondFormatDlg::ParseXmlString(
static_cast<const SfxStringItem*>(pItem)->GetValue(),
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index eaa2eb67d65e..c2690f9bb8ae 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -4699,7 +4699,6 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
long nPosY = nRowPosY;
- bool bVisChanged = false;
//! rest from merged cells further up do not work!
@@ -5084,7 +5083,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
long nClipStartY = nStartY;
- if (nArrY==0 || bVisChanged)
+ if (nArrY==0)
{
if ( nClipStartY < nRowPosY )
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 36b23114e1c5..b3068230e02d 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3078,16 +3078,15 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- const SvxBorderLine* pBoxLine = NULL;
SvxBorderLine aLine;
- // here pBoxLine is used
-
if( pBorderAttr )
{
+ const SvxBorderLine* pBoxLine = NULL;
SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem*>(pBorderAttr) );
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
+ // here pBoxLine is used
SET_LINE_ATTRIBUTES(Top,SvxBoxItemLine::TOP)
SET_LINE_ATTRIBUTES(Bottom,SvxBoxItemLine::BOTTOM)
SET_LINE_ATTRIBUTES(Left,SvxBoxItemLine::LEFT)