diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-04-18 09:19:37 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-19 13:11:03 +0000 |
commit | 5353d0a9a30cff4a17e883887688511ab21c416f (patch) | |
tree | e3a5a34081bc8fba0b549438a82fddf788fca450 /sc | |
parent | ce12a5021a080cc1781e0e0256af5e0085e11ef2 (diff) |
cppcheck: silence known conditions warnings in sc
Change-Id: Ibb9f05d2166d75c50f91f65905b3018a5fdb2455
Reviewed-on: https://gerrit.libreoffice.org/24203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/markdata.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 2 |
3 files changed, 4 insertions, 10 deletions
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 53a5023677ae..9cb5329b8531 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -518,7 +518,7 @@ void ScMarkData::InsertTab( SCTAB nTab ) { if (*itr < nTab) tabMarked.insert(*itr); - else if (*itr >= nTab) + else tabMarked.insert(*itr + 1); } maTabMarked.swap(tabMarked); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 8a4a0f0641aa..44983e8ba3df 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1534,10 +1534,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, case SID_STATUS_PAGESTYLE: // Click auf StatusBar-Control case SID_FORMATPAGE: { - if ( pReqArgs != nullptr ) - { - } - else if ( pReqArgs == nullptr ) + if ( pReqArgs == nullptr ) { OUString aOldName = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); @@ -1608,10 +1605,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, case SID_HFEDIT: { - if ( pReqArgs != nullptr ) - { - } - else if ( pReqArgs == nullptr ) + if ( pReqArgs == nullptr ) { OUString aStr( aDocument.GetPageStyle( nCurTab ) ); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index cc7dc339d9e8..288c945ab503 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -344,7 +344,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) rReq.Done(); } - else if ( pReqArgs == nullptr ) + else { pTabViewShell->ExecuteCellFormatDlg( rReq ); } |