diff options
author | Daniel Di Marco <d.dimarco@gmx.de> | 2011-10-29 13:24:48 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-01 12:19:05 +0000 |
commit | f7303fcac779f99931bfba48e8bfcf9c081af67f (patch) | |
tree | 2ebd76bd8d6d8db36bc87020accf5b22e05afec9 /cui | |
parent | cca7126c2908c5b9b6693326a3861bb96fae1be3 (diff) |
eliminate SvUShorts type
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/iconcdlg.cxx | 29 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 3 | ||||
-rw-r--r-- | cui/source/inc/selector.hxx | 3 |
3 files changed, 8 insertions, 27 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 51e9f1d91bbb..99e0c6d7e7ce 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -30,8 +30,6 @@ #include <tools/rc.h> #include <tools/shl.hxx> -#define _SVSTDARR_USHORTS -#include <svl/svstdarr.hxx> #include <dialmgr.hxx> #include "iconcdlg.hxx" @@ -45,11 +43,6 @@ using ::std::vector; -int SAL_CALL IconcDlgCmpUS_Impl( const void* p1, const void* p2 ) -{ - return *(sal_uInt16*)p1 - *(sal_uInt16*)p2; -} - // some stuff for easier changes for SvtViewOptions static const sal_Char* pViewOptDataName = "dialog data"; #define VIEWOPT_DATANAME ::rtl::OUString::createFromAscii( pViewOptDataName ) @@ -962,7 +955,7 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) if ( pRanges ) return pRanges; - SvUShorts aUS( 16, 16 ); + std::vector<sal_uInt16> aUS; size_t nCount = maPageList.size(); for ( size_t i = 0; i < nCount; ++i ) @@ -976,32 +969,26 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) sal_uInt16 nLen; for( nLen = 0; *pIter; ++nLen, ++pIter ) ; - aUS.Insert( pTmpRanges, nLen, aUS.Count() ); + aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen ); } } // remove double Id's { - nCount = aUS.Count(); + nCount = aUS.size(); for ( size_t i = 0; i < nCount; ++i ) aUS[i] = rPool.GetWhich( aUS[i] ); } // sortieren - if ( aUS.Count() > 1 ) + if ( aUS.size() > 1 ) { -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), IconcDlgCmpUS_Impl ); -#if defined __SUNPRO_CC -#pragma enable_warn -#endif + std::sort( aUS.begin(), aUS.end() ); } - pRanges = new sal_uInt16[aUS.Count() + 1]; - memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count()); - pRanges[aUS.Count()] = 0; + pRanges = new sal_uInt16[aUS.size() + 1]; + std::copy( aUS.begin(), aUS.end(), pRanges ); + pRanges[aUS.size()] = 0; return pRanges; } diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index dfcbc59da534..9bb95b62eafe 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -49,9 +49,6 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XSingleComponentFactory.hpp> -#define _SVSTDARR_USHORTS -#define _SVSTDARR_STRINGSDTOR -#include <svl/svstdarr.hxx> // SvUShorts #include <sfx2/minarray.hxx> #include <sfx2/tabdlg.hxx> #include <vector> diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 2959b0e7bfb6..d7c6641f2367 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -39,9 +39,6 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/script/browse/XBrowseNode.hpp> -#define _SVSTDARR_USHORTS -#define _SVSTDARR_STRINGSDTOR -#include <svl/svstdarr.hxx> // SvUShorts #include <sfx2/minarray.hxx> #define SVX_CFGGROUP_FUNCTION 1 |