summaryrefslogtreecommitdiff
path: root/svl/inc/svl
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-11-26 15:27:38 +0100
committerMathias Bauer <mba@openoffice.org>2010-11-26 15:27:38 +0100
commit186123da28d0f0b21cf2255d50b6bd69ca38e37e (patch)
tree325408d9812d751085d543b8681c6ed4a5ab049a /svl/inc/svl
parentd2e5e59c6b28235a832cdc06480e30f0ed96b580 (diff)
parent8dc3743ca56382374183bec5cd1a11d53f3085b8 (diff)
CWS gnumake2: resync to m94
Diffstat (limited to 'svl/inc/svl')
-rw-r--r--svl/inc/svl/itempool.hxx8
-rw-r--r--svl/inc/svl/poolcach.hxx13
-rw-r--r--svl/inc/svl/poolitem.hxx5
-rw-r--r--svl/inc/svl/svarray.hxx264
-rw-r--r--svl/inc/svl/svstdarr.hxx36
5 files changed, 24 insertions, 302 deletions
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index cbc6b7c4dd11..daaa2b481ba3 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -104,7 +104,7 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, USHORT nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, USHORT nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
@@ -208,9 +208,9 @@ public:
const SfxPoolItem &rItem,
FASTBOOL bDirect = FALSE ) const;
- USHORT GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem(USHORT nWhich, USHORT nSurrogate) const;
- USHORT GetItemCount(USHORT nWhich) const;
+ sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
+ const SfxPoolItem * GetItem2(USHORT nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(USHORT nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
USHORT &rWhich, USHORT nSlotId,
const SfxItemPool* pRefPool = 0 );
diff --git a/svl/inc/svl/poolcach.hxx b/svl/inc/svl/poolcach.hxx
index 949c0aee5bad..78bdca8177e6 100644
--- a/svl/inc/svl/poolcach.hxx
+++ b/svl/inc/svl/poolcach.hxx
@@ -29,13 +29,24 @@
#include "svl/svldllapi.h"
#include <tools/solar.h>
+#include <vector>
+
+//------------------------------------------------------------------------
-class SfxItemModifyArr_Impl;
class SfxItemPool;
class SfxItemSet;
class SfxPoolItem;
class SfxSetItem;
+struct SfxItemModifyImpl
+{
+ const SfxSetItem *pOrigItem;
+ SfxSetItem *pPoolItem;
+};
+
+typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl;
+
+
class SVL_DLLPUBLIC SfxItemPoolCache
{
SfxItemPool *pPool;
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index c0cf53fb6ded..d78e32877440 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -50,8 +50,9 @@ class IntlWrapper;
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
-#define SFX_ITEMS_DIRECT 0xffff
-#define SFX_ITEMS_NULL 0xfff0 // anstelle StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DIRECT= 0xffffffff;
+static const sal_uInt32 SFX_ITEMS_NULL= 0xfffffff0; // instead StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DEFAULT= 0xfffffffe;
#define SFX_ITEMS_POOLDEFAULT 0xffff
#define SFX_ITEMS_STATICDEFAULT 0xfffe
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 99b2901b95f9..d48998247eeb 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -39,12 +39,6 @@
* enthaelt. (Sie werden im Speicher verschoben, koennen also
* z.B. keine String sein)
*
-* SV_DECL_OBJARR(nm, AE, IS, GS)
-* SV_IMPL_OBJARR( nm, AE )
-* definiere/implementiere ein Array das Objecte enthaelt.
-* (Hier koennen es auch Strings sein)
-*
-*
* SV_DECL_PTRARR(nm, AE, IS, GS)
* SV_IMPL_PTRARR(nm, AE)
* definiere/implementiere ein Array das Pointer haelt. Diese
@@ -86,10 +80,6 @@
* Basiert auf einem VARARR.
* Sortierung mit Hilfe der Object-operatoren "<" und "=="
*
-* JP 23.12.94 neu:
-* SV_DECL_PTRARR_STACK(nm, AE, IS, GS)
-* ein Stack mit einem PtrArray als Grundlage.
-*
* JP 09.10.96: vordefinierte Arrays:
* VarArr: SvBools, SvULongs, SvUShorts, SvLongs, SvShorts
* PtrArr: SvStrings, SvStringsDtor
@@ -207,8 +197,6 @@ public:\
#define _SV_DECL_VARARR(nm, AE, IS, GS ) \
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE & )
-#define _SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE )
#define SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
@@ -219,15 +207,10 @@ nm& operator=( const nm& );\
#define SV_DECL_VARARR(nm, AE, IS, GS ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
-#define SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, )
#define SV_DECL_VARARR_VISIBILITY(nm, AE, IS, GS, vis ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
-#define SV_DECL_VARARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, vis )
-
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
nm::nm( USHORT nInit, BYTE )\
: pData (0),\
@@ -329,192 +312,6 @@ _SVVARARR_IMPL_GET_OP_INLINE(nm, AE )\
#define SV_IMPL_VARARR( nm, AE ) \
SV_IMPL_VARARR_GEN( nm, AE, AE & )
-#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
-SV_IMPL_VARARR_GEN( nm, AE, AE )
-
-#if defined(PRODUCT)
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
-\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
-{\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
-}
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
-
-#else
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem ) \
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
-{\
- DBG_ASSERT( pData && nP < nA,"Op[]");\
- return *(pData+nP);\
-}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE )\
-{\
- DBG_ASSERT( nP <= nA,"Ins,Ar[Start.End]");\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
-}
-
-#endif
-
-#define _SV_DECL_OBJARR(nm, AE, IS, GS)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
-class nm\
-{\
-protected:\
- AE *pData;\
- USHORT nFree;\
- USHORT nA;\
-\
- void _resize(size_t n);\
- void _destroy();\
-\
-public:\
- nm( USHORT= IS, BYTE= GS );\
- ~nm() { _destroy(); }\
-\
- _SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
- AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
-\
- void Insert( const AE &aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- USHORT Count() const { return nA; }\
- const AE* GetData() const { return (const AE*)pData; }\
-\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, fnForEach, pArgs );\
- }\
- void ForEach( USHORT nS, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, fnForEach, pArgs );\
- }\
-\
- void _ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
-\
-
-#define SV_DECL_OBJARR(nm, AE, IS, GS)\
-_SV_DECL_OBJARR(nm, AE, IS, GS)\
-private:\
-nm( const nm& );\
-nm& operator=( const nm& );\
-};
-
-#define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( USHORT nInit, BYTE )\
- : pData (0),\
- nFree (nInit),\
- nA (0)\
-{\
- if( nInit )\
- {\
- pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
- DBG_ASSERT( pData, "CTOR, allocate");\
- }\
-}\
-\
-void nm::_destroy()\
-{\
- if(pData)\
- {\
- AE* pTmp=pData;\
- for(USHORT n=0; n < nA; n++,pTmp++ )\
- {\
- pTmp->~AE();\
- }\
- rtl_freeMemory(pData);\
- pData = 0;\
- }\
-}\
-\
-void nm::_resize (size_t n)\
-{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
- AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
- if ((pE != 0) || (nL == 0))\
- {\
- pData = pE;\
- nFree = nL - nA;\
- }\
-}\
-\
-void nm::Insert( const AE &aE, USHORT nP )\
-{\
- DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
- if (nFree < 1)\
- _resize (nA + ((nA > 1) ? nA : 1));\
- if( pData && nP < nA )\
- memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
- AE* pTmp = pData+nP;\
- new( (DummyType*) pTmp ) AE( (AE&)aE );\
- ++nA; --nFree;\
-}\
-\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
-{\
- DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
- if (nFree < nL)\
- _resize (nA + ((nA > nL) ? nA : nL));\
- if( pData && nP < nA )\
- memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
- if( pE )\
- {\
- AE* pTmp = pData+nP;\
- for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
- {\
- new( (DummyType*) pTmp ) AE( (AE&)*pE );\
- }\
- }\
- nA = nA + nL; nFree = nFree - nL;\
-}\
-\
-void nm::Remove( USHORT nP, USHORT nL )\
-{\
- if( !nL )\
- return;\
- DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- AE* pTmp=pData+nP;\
- USHORT nCtr = nP;\
- for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
- {\
- if( nCtr < nA )\
- pTmp->~AE();\
- }\
- if( pData && nP+1 < nA )\
- memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
- nA = nA - nL; nFree = nFree + nL;\
- if (nFree > nA) \
- _resize (nA);\
-}\
-\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
-{\
- if( nStt >= nE || nE > nA )\
- return;\
- for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
- ;\
-}\
-\
-_SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
@@ -523,8 +320,6 @@ USHORT GetPos( const AERef aE ) const;\
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
-#define _SV_DECL_PTRARR_DEF_PLAIN( nm, AE, IS, GS, vis )\
-_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -580,13 +375,9 @@ private:\
#define SV_DECL_PTRARR(nm, AE, IS, GS )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
-#define SV_DECL_PTRARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -643,13 +434,9 @@ private:\
#define SV_DECL_PTRARR_DEL(nm, AE, IS, GS )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_DEL_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_DEL_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
-#define SV_DECL_PTRARR_DEL_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
@@ -664,12 +451,9 @@ void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
#define SV_IMPL_PTRARR(nm, AE )\
SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarr )
-#define SV_IMPL_PTRARR_PLAIN(nm, AE )\
-SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarrPlain )
typedef void* VoidPtr;
_SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
-_SV_DECL_PTRARR_DEF_PLAIN( SvPtrarrPlain, VoidPtr, 0, 1, SVL_DLLPUBLIC )
// SORTARR - Begin
@@ -983,69 +767,21 @@ SV_IMPL_VARARR(nm##_SAR, AE)\
_SV_IMPL_SORTAR_ALG( nm,AE )\
_SV_SEEK_OBJECT( nm,AE )
-#define SV_DECL_PTRARR_STACK(nm, AE, IS, GS)\
-class nm: private SvPtrarr \
-{\
-public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
- : SvPtrarr(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
- SvPtrarr::Insert( pI, nP, nS, nE ); \
- }\
- void Remove( USHORT nP, USHORT nL = 1 ) {\
- SvPtrarr::Remove( nP, nL ); \
- }\
- void Push( const AE &aE ) {\
- SvPtrarr::Insert( (const VoidPtr &)aE, SvPtrarr::Count() );\
- }\
- USHORT Count() const { return SvPtrarr::Count(); }\
- AE operator[](USHORT nP) const {\
- return (AE)SvPtrarr::operator[]( nP );\
- }\
- AE GetObject(USHORT nP) const {\
- return (AE)SvPtrarr::GetObject( nP );\
- }\
- AE Pop(){\
- AE pRet = 0;\
- if( SvPtrarr::Count() ){\
- pRet = GetObject( SvPtrarr::Count()-1 );\
- SvPtrarr::Remove(Count()-1);\
- }\
- return pRet;\
- }\
- AE Top() const {\
- AE pRet = 0;\
- if( SvPtrarr::Count() )\
- pRet = GetObject( SvPtrarr::Count()-1 ); \
- return pRet;\
- }\
-};
-
#if defined (C40) || defined (C41) || defined (C42) || defined(C50) || defined(C52)
#define C40_INSERT( c, p, n) Insert( (c const *) p, n )
-#define C40_PUSH( c, p) Push( (c const *) p )
#define C40_PTR_INSERT( c, p) Insert( (c const *) p )
-#define C40_REMOVE( c, p ) Remove( (c const *) p )
#define C40_REPLACE( c, p, n) Replace( (c const *) p, n )
-#define C40_PTR_REPLACE( c, p) Replace( (c const *) p )
#define C40_GETPOS( c, r) GetPos( (c const *)r )
#else
#if defined WTC || defined ICC || defined HPUX || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400)
#define C40_INSERT( c, p, n ) Insert( (c const *&) p, n )
-#define C40_PUSH( c, p) Push( (c const *&) p )
#define C40_PTR_INSERT( c, p ) Insert( (c const *&) p )
-#define C40_REMOVE( c, p ) Remove( (c const *&) p )
#define C40_REPLACE( c, p, n ) Replace( (c const *&) p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( (c const *&) p )
#define C40_GETPOS( c, r) GetPos( (c const *&) r )
#else
#define C40_INSERT( c, p, n ) Insert( p, n )
-#define C40_PUSH( c, p) Push( p )
#define C40_PTR_INSERT( c, p ) Insert( p )
-#define C40_REMOVE( c, p) Remove( p )
#define C40_REPLACE( c, p, n ) Replace( p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( p )
#define C40_GETPOS( c, r) GetPos( r )
#endif
#endif
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index fa3c94034256..608705dca43d 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -42,20 +42,11 @@
#include "svl/svldllapi.h"
#include <svl/svarray.hxx>
+#include <deque>
-//#ifdef _SVSTDARR_BOOLS
-#ifndef _SVSTDARR_BOOLS_DECL
-SV_DECL_VARARR_VISIBILITY( SvBools, BOOL, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BOOLS_DECL
-#endif
-//#endif
+typedef std::deque< BOOL > SvBools;
-//#ifdef _SVSTDARR_BYTES
-#ifndef _SVSTDARR_BYTES_DECL
-SV_DECL_VARARR_VISIBILITY( SvBytes, BYTE, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BYTES_DECL
-#endif
-//#endif
+typedef std::deque< BYTE > SvBytes;
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
@@ -139,12 +130,7 @@ SV_DECL_VARARR_SORT_VISIBILITY( SvLongsSort, long, 1, 1, SVL_DLLPUBLIC )
#endif
//#endif
-//#ifdef _SVSTDARR_SHORTS
-#ifndef _SVSTDARR_SHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvShorts, short, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_SHORTS_DECL
-#endif
-//#endif
+typedef std::deque< short > SvShorts;
/*
form here all Arrays for Strings, ByteString and then
@@ -255,17 +241,5 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1,
#endif
//#endif
-//#ifdef _SVSTDARR_XUB_STRLEN
-#ifndef _SVSTDARR_XUB_STRLEN_DECL
-SV_DECL_VARARR_VISIBILITY( SvXub_StrLens, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLEN_DECL
-#endif
-//#endif
-
-//#ifdef _SVSTDARR_XUB_STRLENSORT
-#ifndef _SVSTDARR_XUB_STRLENSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvXub_StrLensSort, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLENSORT_DECL
-#endif
-//#endif
+typedef std::deque< xub_StrLen > SvXub_StrLens;