[Libreoffice-commits] core.git: svx/source

Stephan Bergmann sbergman at redhat.com
Sun Feb 26 19:02:17 UTC 2017


 svx/source/form/fmshimp.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 8828d57dc72514deef8e0df8c4e7f2e90cdce018
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Feb 26 20:01:38 2017 +0100

    Clean up use of integer types
    
    Change-Id: I99b9094524ec00231a3471a5373bd164d61bb2da

diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 42dfa92..892b3e2 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -311,14 +311,14 @@ namespace
     }
 
 
-    sal_Int16 GridView2ModelPos(const Reference< XIndexAccess>& rColumns, sal_Int16 nViewPos)
+    sal_Int32 GridView2ModelPos(const Reference< XIndexAccess>& rColumns, sal_Int16 nViewPos)
     {
         try
         {
             if (rColumns.is())
             {
                 // loop through all columns
-                sal_Int16 i;
+                sal_Int32 i;
                 Reference< XPropertySet> xCur;
                 for (i=0; i<rColumns->getCount(); ++i)
                 {
@@ -341,7 +341,7 @@ namespace
         {
             DBG_UNHANDLED_EXCEPTION();
         }
-        return (sal_Int16)-1;
+        return -1;
     }
 
 
@@ -1518,7 +1518,7 @@ void FmXFormShell::ExecuteSearch()
                     xColumns.set(xGridPeer->getColumns(),UNO_QUERY);
 
                 sal_Int16 nViewCol = xGrid->getCurrentColumnPosition();
-                sal_Int16 nModelCol = GridView2ModelPos(xColumns, nViewCol);
+                sal_Int32 nModelCol = GridView2ModelPos(xColumns, nViewCol);
                 Reference< XPropertySet> xCurrentCol;
                 if(xColumns.is())
                     xColumns->getByIndex(nModelCol) >>= xCurrentCol;
@@ -2394,7 +2394,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
                         if (!IsSearchableControl(xCurrentColumn))
                             continue;
 
-                        sal_Int16 nModelPos = GridView2ModelPos(xModelColumns, nViewPos);
+                        sal_Int32 nModelPos = GridView2ModelPos(xModelColumns, nViewPos);
                         Reference< XPropertySet> xCurrentColModel;
                         xModelColumns->getByIndex(nModelPos) >>= xCurrentColModel;
                         aName = ::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_CONTROLSOURCE));


More information about the Libreoffice-commits mailing list