summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rw-r--r--forms/source/runtime/formoperations.cxx11
-rw-r--r--forms/source/runtime/formoperations.hxx2
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.