basic/source/basmgr/basicmanagerrepository.cxx        |    2 -
 basic/source/classes/image.cxx                        |   28 +++++++++---------
 basic/source/classes/sb.cxx                           |    6 +--
 basic/source/inc/iosys.hxx                            |    8 ++---
 connectivity/source/drivers/dbase/DIndex.cxx          |    4 +-
 cppcanvas/source/mtfrenderer/implrenderer.cxx         |    2 -
 framework/source/uielement/newmenucontroller.cxx      |    6 +--
 framework/source/uielement/toolbarsmenucontroller.cxx |    2 -
 8 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit bccd83ea5434f945c22d0c45dbc2c3d13efdffee
Author: Johannes Hauf <hauf.johan...@gmail.com>
Date:   Thu Dec 31 10:58:37 2015 +0100

    Some cleanup for sal_uIntPtr usage
    
    Change-Id: Ia9779e6477d8848588f3543d09ea6b4477f594a2
    Reviewed-on: https://gerrit.libreoffice.org/21022
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/basic/source/basmgr/basicmanagerrepository.cxx 
b/basic/source/basmgr/basicmanagerrepository.cxx
index de559e9..fd2dc80 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -599,7 +599,7 @@ namespace basic
 
     void BasicManagerRepository::resetApplicationBasicManager()
     {
-        return ImplRepository::Instance().setApplicationBasicManager( nullptr 
);
+        ImplRepository::Instance().setApplicationBasicManager( nullptr );
     }
 
 
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index a487e62..d79c21c 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -83,17 +83,17 @@ bool SbiGood( SvStream& r )
 }
 
 // Open Record
-sal_uIntPtr SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 
nElem )
+sal_uInt64 SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 nElem 
)
 {
-    sal_Size nPos = r.Tell();
+    sal_uInt64 nPos = r.Tell();
     r.WriteUInt16( nSignature ).WriteInt32( 0 ).WriteUInt16( nElem );
     return nPos;
 }
 
 // Close Record
-void SbiCloseRecord( SvStream& r, sal_Size nOff )
+void SbiCloseRecord( SvStream& r, sal_uInt64 nOff )
 {
-    sal_Size nPos = r.Tell();
+    sal_uInt64 nPos = r.Tell();
     r.Seek( nOff + 2 );
     r.WriteInt32(nPos - nOff - 8 );
     r.Seek( nPos );
@@ -114,7 +114,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
     Clear();
     // Read Master-Record
     r.ReadUInt16( nSign ).ReadUInt32( nLen ).ReadUInt16( nCount );
-    sal_Size nLast = r.Tell() + nLen;
+    sal_uInt64 nLast = r.Tell() + nLen;
     sal_uInt32 nCharSet;               // System charset
     sal_uInt32 lDimBase;
     sal_uInt16 nReserved1;
@@ -135,7 +135,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
 
     bool bLegacy = ( nVersion < B_EXT_IMG_VERSION );
 
-    sal_Size nNext;
+    sal_uInt64 nNext;
     while( ( nNext = r.Tell() ) < nLast )
     {
 
@@ -160,7 +160,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
             {
                 //assuming an empty string with just the lead 32bit/16bit len 
indicator
                 const size_t nMinStringSize = (eCharSet == 
RTL_TEXTENCODING_UNICODE) ? 4 : 2;
-                const size_t nMaxStrings = r.remainingSize() / nMinStringSize;
+                const sal_uInt64 nMaxStrings = r.remainingSize() / 
nMinStringSize;
                 if (nCount > nMaxStrings)
                 {
                     SAL_WARN("basic", "Parsing error: " << nMaxStrings <<
@@ -207,8 +207,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
             {
                 if( bBadVer ) break;
                 //assuming an empty string with just the lead 32bit len 
indicator
-                const size_t nMinStringSize = 4;
-                const size_t nMaxStrings = r.remainingSize() / nMinStringSize;
+                const sal_uInt64 nMinStringSize = 4;
+                const sal_uInt64 nMaxStrings = r.remainingSize() / 
nMinStringSize;
                 if (nCount > nMaxStrings)
                 {
                     SAL_WARN("basic", "Parsing error: " << nMaxStrings <<
@@ -244,8 +244,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
             {
                 //assuming an empty string with just the lead 32bit/16bit len 
indicator
                 const size_t nMinStringSize = (eCharSet == 
RTL_TEXTENCODING_UNICODE) ? 4 : 2;
-                const size_t nMinRecordSize = nMinStringSize + 
sizeof(sal_Int16);
-                const size_t nMaxRecords = r.remainingSize() / nMinRecordSize;
+                const sal_uInt64 nMinRecordSize = nMinStringSize + 
sizeof(sal_Int16);
+                const sal_uInt64 nMaxRecords = r.remainingSize() / 
nMinRecordSize;
                 if (nCount > nMaxRecords)
                 {
                     SAL_WARN("basic", "Parsing error: " << nMaxRecords <<
@@ -261,7 +261,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
                     sal_uInt16 nTypeMembers;
                     r.ReadUInt16(nTypeMembers);
 
-                    const size_t nMaxTypeMembers = r.remainingSize() / 8;
+                    const sal_uInt64 nMaxTypeMembers = r.remainingSize() / 8;
                     if (nTypeMembers > nMaxTypeMembers)
                     {
                         SAL_WARN("basic", "Parsing error: " << nMaxTypeMembers 
<<
@@ -375,8 +375,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
         return true;
     }
     // First of all the header
-    sal_uIntPtr nStart = SbiOpenRecord( r, B_MODULE, 1 );
-    sal_uIntPtr nPos;
+    sal_uInt64 nStart = SbiOpenRecord( r, B_MODULE, 1 );
+    sal_uInt64 nPos;
 
     eCharSet = GetSOStoreTextEncoding( eCharSet );
     if ( bLegacy )
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 6b2a78d..cd713e4 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1679,7 +1679,7 @@ bool StarBASIC::CError( SbError code, const OUString& 
rMsg,
     // Implementation of the code for the string transport to SFX-Error
     if( !rMsg.isEmpty() )
     {
-        code = (sal_uIntPtr)*new StringErrorInfo( code, rMsg );
+        code = (SbError)*new StringErrorInfo( code, rMsg );
     }
     SetErrorData( code, l, c1, c2 );
     GetSbData()->bCompiler = true;
@@ -1723,11 +1723,11 @@ bool StarBASIC::RTError( SbError code, const OUString& 
rMsg, sal_Int32 l, sal_In
         {
             OUString aTmp = "\'" + 
OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) +
                             "\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() 
? GetSbData()->aErrMsg : rMsg);
-            code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
+            code = (SbError)*new StringErrorInfo( code, aTmp );
         }
         else
         {
-            code = (sal_uIntPtr)*new StringErrorInfo( code, rMsg );
+            code = (SbError)*new StringErrorInfo( code, rMsg );
         }
     }
 
diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx
index a7e7398..1b9964b 100644
--- a/basic/source/inc/iosys.hxx
+++ b/basic/source/inc/iosys.hxx
@@ -48,9 +48,9 @@ namespace o3tl
 class SbiStream
 {
     SvStream* pStrm;
-    sal_uIntPtr  nExpandOnWriteTo;  // during writing access expand the stream 
to this size
+    sal_uInt64  nExpandOnWriteTo;  // during writing access expand the stream 
to this size
     OString aLine;
-    sal_uIntPtr  nLine;
+    sal_uInt64  nLine;
     short  nLen;                    // buffer length
     SbiStreamFlags  nMode;
     short  nChan;
@@ -73,8 +73,8 @@ public:
     bool IsAppend() const   { return bool(nMode & SbiStreamFlags::Append); }
     short GetBlockLen() const          { return nLen;           }
     SbiStreamFlags GetMode() const              { return nMode;          }
-    sal_uIntPtr GetLine() const            { return nLine;          }
-    void SetExpandOnWriteTo( sal_uIntPtr n ) { nExpandOnWriteTo = n;    }
+    sal_uInt64 GetLine() const            { return nLine;          }
+    void SetExpandOnWriteTo( sal_uInt64 n ) { nExpandOnWriteTo = n;    }
     void ExpandFile();
     SvStream* GetStrm()                { return pStrm;          }
 };
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index f325fea..9e8ee7c 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -301,8 +301,8 @@ void ODbaseIndex::Release(bool bSave)
         m_aRoot.Clear();
     }
     // Release all references, before the FileStream will be closed
-    for (sal_uIntPtr i = 0; i < m_aCollector.size(); i++)
-        m_aCollector[i]->QueryDelete();
+    for (auto& i : m_aCollector)
+        i->QueryDelete();
 
     m_aCollector.clear();
 
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 7fbabf6..4a3dae4 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -452,7 +452,7 @@ namespace cppcanvas
 
             // at least _one_ call to GDIMetaFile::NextAction() is
             // executed
-            sal_uIntPtr nPos( 1 );
+            size_t nPos( 1 );
 
             MetaAction* pCurrAct;
             while( (pCurrAct=rMtf.NextAction()) != nullptr )
diff --git a/framework/source/uielement/newmenucontroller.cxx 
b/framework/source/uielement/newmenucontroller.cxx
index 3bf7343..b9f64b6 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -83,7 +83,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, 
bool bSetImages )
                 bool        bImageSet( false );
                 OUString aImageId;
 
-                sal_uIntPtr nAttributePtr = 
pPopupMenu->GetUserValue(sal::static_int_cast<sal_uInt16>(i));
+                sal_uLong nAttributePtr = 
pPopupMenu->GetUserValue(sal::static_int_cast<sal_uInt16>(i));
                 MenuAttributes* pAttributes = reinterpret_cast<MenuAttributes 
*>(nAttributePtr);
                 if (pAttributes)
                     aImageId = pAttributes->aImageId;
@@ -346,7 +346,7 @@ void NewMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu >& rPopup
             if (( nItemId != 0 ) &&
                 ( pSubMenu->GetItemType( nItemId ) != MenuItemType::SEPARATOR 
))
             {
-                sal_uIntPtr nAttributePtr = pSubMenu->GetUserValue(nItemId);
+                sal_uLong nAttributePtr = pSubMenu->GetUserValue(nItemId);
                 if (nAttributePtr)
                 {
                     MenuAttributes* pAttributes = 
reinterpret_cast<MenuAttributes *>(nAttributePtr);
@@ -411,7 +411,7 @@ void SAL_CALL NewMenuController::itemSelected( const 
css::awt::MenuEvent& rEvent
                 SolarMutexGuard aSolarMutexGuard;
                 PopupMenu* pVCLPopupMenu = static_cast<PopupMenu 
*>(pPopupMenu->GetMenu());
                 aTargetURL.Complete = 
pVCLPopupMenu->GetItemCommand(rEvent.MenuId);
-                sal_uIntPtr nAttributePtr = 
pVCLPopupMenu->GetUserValue(rEvent.MenuId);
+                sal_uLong nAttributePtr = 
pVCLPopupMenu->GetUserValue(rEvent.MenuId);
                 MenuAttributes* pAttributes = reinterpret_cast<MenuAttributes 
*>(nAttributePtr);
                 if (pAttributes)
                     aTargetFrame = pAttributes->aTargetFrame;
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx 
b/framework/source/uielement/toolbarsmenucontroller.cxx
index 0353c89..a963e9e 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -446,7 +446,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu >& r
                 PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu 
*>(pXPopupMenu->GetMenu()) : nullptr;
                 assert(pVCLPopupMenu);
                 if (pVCLPopupMenu)
-                    pVCLPopupMenu->SetUserValue( nIndex, sal_uIntPtr( 
aSortedTbs[i].bContextSensitive ? 1L : 0L ));
+                    pVCLPopupMenu->SetUserValue( nIndex, sal_uLong( 
aSortedTbs[i].bContextSensitive ? 1L : 0L ));
             }
 
             // use VCL popup menu pointer to set vital information that are 
not part of the awt implementation
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to