summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-06 14:49:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-06 15:15:11 +0100
commitbbda99198c950b6cfe4bab140b9ad676699fef7b (patch)
treee10eb0693e99b6f1ffd3a699850cdfb3ceddf8dc
parent3223306b5c37fd846f52e36020a33c08185e4a79 (diff)
coverity#706056 Unintended sign extension
Change-Id: Iafb36f8135893186710ae3a939e50596a372d065
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 71e6d38623ff..7073d5ad6e24 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2019,9 +2019,10 @@ IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl)
void CustomPropertiesControl::AddLine( const OUString& sName, Any& rAny, bool bInteractive )
{
m_pPropertiesWin->AddLine( sName, rAny );
- m_pVertScroll->SetRangeMax( m_pPropertiesWin->GetVisibleLineCount() + 1 );
- if ( bInteractive && m_pPropertiesWin->GetOutputSizePixel().Height() < m_pPropertiesWin->GetVisibleLineCount() * m_pPropertiesWin->GetLineHeight() )
- m_pVertScroll->DoScroll( m_pPropertiesWin->GetVisibleLineCount() + 1 );
+ long nLineCount = m_pPropertiesWin->GetVisibleLineCount();
+ m_pVertScroll->SetRangeMax(nLineCount + 1);
+ if ( bInteractive && m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() )
+ m_pVertScroll->DoScroll(nLineCount + 1);
}
// class SfxCustomPropertiesPage -----------------------------------------