[Libreoffice-commits] core.git: comphelper/source tools/source
Fridrich Å trba
fridrich.strba at bluewin.ch
Tue Jun 4 06:19:38 PDT 2013
comphelper/source/misc/numberedcollection.cxx | 8 ++++----
tools/source/rc/resmgr.cxx | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit dbd675df91406b0542743fd86d0a0c732aba694a
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Jun 4 15:19:01 2013 +0200
Some "cast from ... to ... loses precision fixes"
Change-Id: Ib1d827bfa224e8708fd1e41b1ad213bcfef9a012
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index f7f4d12..2f3e357 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -74,8 +74,8 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix)
if ( ! xComponent.is ())
throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
- long pComponent = (long) xComponent.get ();
- TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent);
+ sal_IntPtr pComponent = (sal_IntPtr) xComponent.get ();
+ TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent);
// a) component already exists - return it's number directly
if (pIt != m_lComponents.end())
@@ -150,8 +150,8 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe
if ( ! xComponent.is ())
throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
- long pComponent = (long) xComponent.get ();
- TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent);
+ sal_IntPtr pComponent = (sal_IntPtr) xComponent.get ();
+ TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent);
// a) component exists and will be removed
if (pIt != m_lComponents.end())
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 519dcea..d18835c 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1235,9 +1235,9 @@ sal_uInt32 ResMgr::GetRemainSize()
return pFallbackResMgr->GetRemainSize();
const ImpRCStack& rTop = aStack[nCurStack];
- return (sal_uInt32)((long)(sal_uInt8 *)rTop.pResource +
+ return (sal_uInt32)((sal_IntPtr)(sal_uInt8 *)rTop.pResource +
rTop.pResource->GetLocalOff() -
- (long)(sal_uInt8 *)rTop.pClassRes);
+ (sal_IntPtr)(sal_uInt8 *)rTop.pClassRes);
}
void* ResMgr::Increment( sal_uInt32 nSize )
More information about the Libreoffice-commits
mailing list