summaryrefslogtreecommitdiff
path: root/svl/source/items/ilstitem.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:56:16 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:56:16 +0200
commita233dac0653f3f3054f7ad2da114ed989747e89a (patch)
treebf1e11438321c06125a94308649c496648061ccb /svl/source/items/ilstitem.cxx
parentacb6133d89abe071108577f821d7eaa381378879 (diff)
parente5647de7dd26775e45af24f11ac4f82a5518bd9e (diff)
resyncing to master
Diffstat (limited to 'svl/source/items/ilstitem.cxx')
-rw-r--r--svl/source/items/ilstitem.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx
index f8d575b52175..dbf8825e90ba 100644
--- a/svl/source/items/ilstitem.cxx
+++ b/svl/source/items/ilstitem.cxx
@@ -35,20 +35,25 @@
#include <svl/ilstitem.hxx>
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-
TYPEINIT1_AUTOFACTORY(SfxIntegerListItem, SfxPoolItem);
SfxIntegerListItem::SfxIntegerListItem()
{
}
-SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const SvULongs& rList )
+SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const ::std::vector < sal_Int32 >& rList )
+ : SfxPoolItem( which )
+{
+ m_aList.realloc( rList.size() );
+ for ( sal_uInt16 n=0; n<rList.size(); ++n )
+ m_aList[n] = rList[n];
+}
+
+SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const ::com::sun::star::uno::Sequence < sal_Int32 >& rList )
: SfxPoolItem( which )
{
- m_aList.realloc( rList.Count() );
- for ( sal_uInt16 n=0; n<rList.Count(); n++ )
+ m_aList.realloc( rList.getLength() );
+ for ( sal_Int32 n=0; n<rList.getLength(); ++n )
m_aList[n] = rList[n];
}
@@ -97,10 +102,11 @@ bool SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 )
return true;
}
-void SfxIntegerListItem::GetList( SvULongs& rList ) const
+void SfxIntegerListItem::GetList( ::std::vector< sal_Int32 >& rList ) const
{
- for ( sal_Int32 n=0; n<m_aList.getLength(); n++ )
- rList.Insert( m_aList[n], sal::static_int_cast< sal_uInt16 >(n) );
+ rList.reserve( m_aList.getLength() );
+ for ( sal_Int32 n=0; n<m_aList.getLength(); ++n )
+ rList.push_back( m_aList[n] );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */