diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 14:48:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 15:15:11 +0100 |
commit | 3223306b5c37fd846f52e36020a33c08185e4a79 (patch) | |
tree | 7a23a3ab56d45c2caca3936c2d36d2c046a6ac36 | |
parent | 6db415b15085d5058c805a7bbaa5d34acfba7c1b (diff) |
coverity#706055 Unintended sign extension
Change-Id: Ie917cfd5f41a6f5e58a4c629a6a5b800e2e0b42f
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 0cd33f9244b0..71e6d38623ff 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2009,8 +2009,9 @@ IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl) { - m_pVertScroll->SetRangeMax( m_pPropertiesWin->GetVisibleLineCount() + 1 ); - if ( m_pPropertiesWin->GetOutputSizePixel().Height() < m_pPropertiesWin->GetVisibleLineCount() * m_pPropertiesWin->GetLineHeight() ) + long nLineCount = m_pPropertiesWin->GetVisibleLineCount(); + m_pVertScroll->SetRangeMax(nLineCount + 1); + if ( m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() ) m_pVertScroll->DoScrollAction ( SCROLL_LINEUP ); return 0; } |