[Libreoffice-commits] .: 3 commits - basic/source sfx2/inc
David Tardon
dtardon at kemper.freedesktop.org
Wed May 18 05:59:56 PDT 2011
basic/source/classes/propacc.cxx | 4 ++--
sfx2/inc/sfx2/minarray.hxx | 6 ------
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 678457f397261d7a33213ec8c1ef05339439c531
Author: David Tardon <dtardon at redhat.com>
Date: Wed May 18 14:12:56 2011 +0200
remove unused (and wrong :) code
diff --git a/sfx2/inc/sfx2/minarray.hxx b/sfx2/inc/sfx2/minarray.hxx
index e3acd69..9b40dac 100644
--- a/sfx2/inc/sfx2/minarray.hxx
+++ b/sfx2/inc/sfx2/minarray.hxx
@@ -60,7 +60,6 @@ public:\
const T& GetObject( sal_uInt16 nPos ) const; \
T& GetObject( sal_uInt16 nPos ); \
\
- void Insert( sal_uInt16 nPos, ARR& rIns, sal_uInt16 nStart = 0, sal_uInt16 nEnd = USHRT_MAX );\
void Insert( sal_uInt16 nPos, const T& rElem );\
void Insert( sal_uInt16 nPos, const T& rElems, sal_uInt16 nLen );\
void Append( const T& rElem );\
@@ -77,11 +76,6 @@ public:\
void Clear() { Remove( 0, Count() ); }\
};\
\
-inline void ARR::Insert( sal_uInt16 nPos, ARR& rIns, sal_uInt16 nStart, sal_uInt16 nEnd )\
-{\
- Insert( nPos, *(rIns.pData+(sizeof(T)*nStart)), nStart-nEnd+1 );\
-}\
-\
inline void ARR::Insert( sal_uInt16 nPos, const T& rElem )\
{\
Insert( nPos, rElem, 1 );\
commit c10f1ec5ba6f36e436537e278a19dfcb394d6f65
Author: David Tardon <dtardon at redhat.com>
Date: Wed May 18 13:57:48 2011 +0200
pointer diff. _is_ the index already
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 69c0e7e..1105584 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -239,7 +239,7 @@ sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName )
bsearch( &rPropName, _aProps.getConstArray(), _aProps.getLength(),
sizeof( Property ),
SbCompare_UString_Property_Impl );
- return pP ? sal::static_int_cast<sal_Int32>( (pP-_aProps.getConstArray()) / sizeof(pP) ) : -1;
+ return pP ? sal::static_int_cast<sal_Int32>( pP - _aProps.getConstArray() ) : -1;
}
Sequence< Property > PropertySetInfoImpl::getProperties(void) throw()
commit 9a2ae1d3b297b8137a8384f553ba859c34a12e96
Author: David Tardon <dtardon at redhat.com>
Date: Wed May 18 13:56:57 2011 +0200
pointer diff. _is_ the index already
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 90532e1..69c0e7e 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -120,7 +120,7 @@ sal_Int32 SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) co
bsearch( &rPropName, _aPropVals.GetData(), _aPropVals.Count(),
sizeof( PropertyValue* ),
SbCompare_UString_PropertyValue_Impl );
- return ppPV ? ( (ppPV-_aPropVals.GetData()) / sizeof(ppPV) ) : USHRT_MAX;
+ return ppPV ? ppPV - _aPropVals.GetData() : USHRT_MAX;
}
//----------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list