diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 14:49:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 15:15:11 +0100 |
commit | bbda99198c950b6cfe4bab140b9ad676699fef7b (patch) | |
tree | e10eb0693e99b6f1ffd3a699850cdfb3ceddf8dc /sfx2/source | |
parent | 3223306b5c37fd846f52e36020a33c08185e4a79 (diff) |
coverity#706056 Unintended sign extension
Change-Id: Iafb36f8135893186710ae3a939e50596a372d065
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 7 |
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 ----------------------------------------- |