From 541c40f8d8ed36a8d16593f4a496cea568362b78 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Sat, 16 Oct 2010 21:21:14 +0200 Subject: svarray: #i112395# #i84159# handle 2^32 numbers --- svx/source/unodraw/unomtabl.cxx | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'svx/source/unodraw/unomtabl.cxx') diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index dbb7269c1318..60d19e8d13a9 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -276,11 +276,11 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const // if it is not in our own sets, modify the pool! sal_Bool bFound = sal_False; - USHORT nSurrogate; - const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0; + sal_uInt32 nSurrogate; + const sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0; for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate); if( pItem && pItem->GetName() == aSearchName ) { pItem->PutValue( aElement ); @@ -289,10 +289,10 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const } } - const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0; + const sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0; for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate); if( pItem && pItem->GetName() == aSearchName ) { pItem->PutValue( aElement ); @@ -310,10 +310,10 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool, USHORT nWhich, uno::Any& rAny ) { NameOrIndex *pItem; - const sal_Int32 nSurrogateCount = pPool ? (sal_Int32)pPool->GetItemCount( nWhich ) : 0; - for( sal_Int32 nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ ) + const sal_uInt32 nSurrogateCount = pPool ? pPool->GetItemCount2( nWhich ) : 0; + for( sal_uInt32 nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ ) { - pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate ); + pItem = (NameOrIndex*)pPool->GetItem2( nWhich, nSurrogate ); if( pItem && pItem->GetName() == rSearchName ) { @@ -357,15 +357,15 @@ uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName ) static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUString, comphelper::UStringLess >& rNameSet ) { - const sal_Int32 nSuroCount = pPool->GetItemCount( nWhich ); - sal_Int32 nSurrogate; + const sal_uInt32 nSuroCount = pPool->GetItemCount2( nWhich ); + sal_uInt32 nSurrogate; - NameOrIndex *pItem; + NameOrIndex* pItem; OUString aName; for( nSurrogate = 0; nSurrogate < nSuroCount; nSurrogate++ ) { - pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate ); + pItem = (NameOrIndex*)pPool->GetItem2( nWhich, nSurrogate ); if( pItem == NULL || pItem->GetName().Len() == 0 ) continue; @@ -415,20 +415,20 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName ) NameOrIndex *pItem; SvxUnogetInternalNameForItem( XATTR_LINESTART, aName, aSearchName ); - USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0; - USHORT nSurrogate; + sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0; + sal_uInt32 nSurrogate; for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate); if( pItem && pItem->GetName() == aSearchName ) return sal_True; } SvxUnogetInternalNameForItem( XATTR_LINEEND, aName, aSearchName ); - USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0; + sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0; for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate); if( pItem && pItem->GetName() == aSearchName ) return sal_True; } @@ -450,19 +450,19 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( ) NameOrIndex *pItem; - const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0; - USHORT nSurrogate; + const sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0; + sal_uInt32 nSurrogate; for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate); if( pItem && pItem->GetName().Len() != 0 ) return sal_True; } - const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0; + const sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0; for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ ) { - pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate); + pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate); if( pItem && pItem->GetName().Len() != 0 ) return sal_True; } -- cgit v1.2.3