diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 19:54:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 19:54:08 +0100 |
commit | 6551a14138d8b0626837debdc00924402df9ac23 (patch) | |
tree | 6864d82328f103a037ab44cecf05cb005f723cf6 /forms | |
parent | f33f9bb8d3c4e61320efd954c1b96ab88a661640 (diff) |
loplugin:loopvartoosmall
Change-Id: Ic85cce722a0c1702ffbb7a45001fdf869ca6accf
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 11 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.hxx | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index cf0571314994..a0c48f5fbe7a 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1364,10 +1364,9 @@ namespace frm if ( xGrid.is() ) { Reference< XIndexAccess > xColumns( xControl->getModel(), UNO_QUERY_THROW ); - sal_Int16 nCurrentPos = xGrid->getCurrentColumnPosition(); - nCurrentPos = impl_gridView2ModelPos_nothrow( xColumns, nCurrentPos ); + sal_Int32 nCurrentPos = impl_gridView2ModelPos_nothrow( xColumns, xGrid->getCurrentColumnPosition() ); - if ( nCurrentPos != (sal_Int16)-1 ) + if ( nCurrentPos != -1 ) xColumns->getByIndex( nCurrentPos ) >>= xControlModel; } else if ( xControl.is() ) @@ -1402,13 +1401,13 @@ namespace frm } - sal_Int16 FormOperations::impl_gridView2ModelPos_nothrow( const Reference< XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) + sal_Int32 FormOperations::impl_gridView2ModelPos_nothrow( const Reference< XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) { OSL_PRECOND( _rxColumns.is(), "FormOperations::impl_gridView2ModelPos_nothrow: invalid columns container!" ); try { // loop through all columns - sal_Int16 col = 0; + sal_Int32 col = 0; Reference< XPropertySet > xCol; bool bHidden( false ); for ( col = 0; col < _rxColumns->getCount(); ++col ) @@ -1432,7 +1431,7 @@ namespace frm { DBG_UNHANDLED_EXCEPTION(); } - return (sal_Int16)-1; + return -1; } diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx index 0f09ba2591e1..233d59c50015 100644 --- a/forms/source/runtime/formoperations.hxx +++ b/forms/source/runtime/formoperations.hxx @@ -235,7 +235,7 @@ namespace frm A grid control can have columns which are currently hidden, so the index of a column in the view is not necessarily the same as its index in the model. */ - static sal_Int16 impl_gridView2ModelPos_nothrow( const css::uno::Reference< css::container::XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ); + static sal_Int32 impl_gridView2ModelPos_nothrow( const css::uno::Reference< css::container::XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ); /** moves our cursor one position to the left, caring for different possible cursor states. |