View | Details | Raw Unified | Return to issue 112395
Collapse All | Expand All

(-)a/basctl/source/basicide/baside2b.cxx (-3 / +5 lines)
Lines 29-35 Link Here
29
#include "precompiled_basctl.hxx"
29
#include "precompiled_basctl.hxx"
30
30
31
31
32
#include <svl/svarray.hxx>
32
#ifndef INCLUDED_VECTOR
33
#include <vector>
34
#endif
33
#define _BASIC_TEXTPORTIONS
35
#define _BASIC_TEXTPORTIONS
34
#include <basic/sbdef.hxx>
36
#include <basic/sbdef.hxx>
35
#include <ide_pch.hxx>
37
#include <ide_pch.hxx>
Lines 773-780 Link Here
773
		pEditEngine->RemoveAttribs( nLine, TRUE );
775
		pEditEngine->RemoveAttribs( nLine, TRUE );
774
		HighlightPortions aPortions;
776
		HighlightPortions aPortions;
775
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
777
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
776
		USHORT nCount = aPortions.Count();
778
777
		for ( USHORT i = 0; i < nCount; i++ )
779
		for ( USHORT i = 0; i < aPortions.size(); i++ )
778
		{
780
		{
779
			HighlightPortion& r = aPortions[i];
781
			HighlightPortion& r = aPortions[i];
780
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
782
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
(-)a/basctl/source/basicide/bastype3.cxx (-9 / +8 lines)
Lines 42-55 Link Here
42
#include <basdoc.hxx>
42
#include <basdoc.hxx>
43
#include <com/sun/star/script/XLibraryContainer.hpp>
43
#include <com/sun/star/script/XLibraryContainer.hpp>
44
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
44
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
45
#include <deque>
45
46
46
using namespace ::com::sun::star::uno;
47
using namespace ::com::sun::star::uno;
47
using namespace ::com::sun::star;
48
using namespace ::com::sun::star;
48
49
49
50
50
SV_DECL_VARARR( EntryArray, SvLBoxEntry*, 4, 4 )
51
typedef std::deque< SvLBoxEntry* > EntryArray;
51
52
SV_IMPL_VARARR( EntryArray, SvLBoxEntry*);
53
52
54
53
55
void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
54
void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
Lines 196-202 Link Here
196
            case 2:
195
            case 2:
197
            case 1: 
196
            case 1: 
198
            {
197
            {
199
                aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
198
                aEntries.push_front( pEntry );
200
            }
199
            }
201
            break;
200
            break;
202
            case 0: 
201
            case 0: 
Lines 210-218 Link Here
210
209
211
	SbxVariable* pVar = 0;
210
	SbxVariable* pVar = 0;
212
    bool bDocumentObjects = false;
211
    bool bDocumentObjects = false;
213
	if ( aEntries.Count() )
212
	if ( aEntries.size() )
214
	{
213
	{
215
		for ( USHORT n = 0; n < aEntries.Count(); n++ )
214
		for ( USHORT n = 0; n < aEntries.size(); n++ )
216
		{
215
		{
217
			SvLBoxEntry* pLE = aEntries[n];
216
			SvLBoxEntry* pLE = aEntries[n];
218
			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
217
			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
Lines 301-307 Link Here
301
            case 2:
300
            case 2:
302
            case 1: 
301
            case 1: 
303
            {
302
            {
304
                aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
303
                aEntries.push_front( pEntry );
305
            }
304
            }
306
            break;
305
            break;
307
            case 0: 
306
            case 0: 
Lines 319-327 Link Here
319
        pEntry = GetParent( pEntry );
318
        pEntry = GetParent( pEntry );
320
    }
319
    }
321
320
322
	if ( aEntries.Count() )
321
	if ( aEntries.size() )
323
	{
322
	{
324
		for ( USHORT n = 0; n < aEntries.Count(); n++ )
323
		for ( USHORT n = 0; n < aEntries.size(); n++ )
325
		{
324
		{
326
			SvLBoxEntry* pLE = aEntries[n];
325
			SvLBoxEntry* pLE = aEntries[n];
327
			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
326
			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
(-)a/basic/source/classes/sbxmod.cxx (-1 / +1 lines)
Lines 99-105 Link Here
99
SV_IMPL_VARARR(SbiBreakpoints,USHORT)
99
SV_IMPL_VARARR(SbiBreakpoints,USHORT)
100
100
101
101
102
SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
102
typedef std::vector<HighlightPortion> HighlightPortions;
103
103
104
bool getDefaultVBAMode( StarBASIC* pb )
104
bool getDefaultVBAMode( StarBASIC* pb )
105
{
105
{
(-)a/postprocess/checkdeliver/checkdeliver.pl (-1 / +1 lines)
Lines 177-183 Link Here
177
    close( DELIVERLOG );
177
    close( DELIVERLOG );
178
178
179
    if ( ! $repository ) {
179
    if ( ! $repository ) {
180
        print_logged( "Error parsing \'$listname\': cannot determine repository\n");
180
        print_logged( "Error \'$repository\': parsing \'$listname\': cannot determine repository\n");
181
        $error ++;
181
        $error ++;
182
        return $error;
182
        return $error;
183
    }
183
    }
(-)a/sfx2/source/inc/workwin.hxx (-2 / +2 lines)
Lines 28-33 Link Here
28
#define _SFXWORKWIN_HXX
28
#define _SFXWORKWIN_HXX
29
29
30
#include <vector>
30
#include <vector>
31
#include <deque>
31
#include <com/sun/star/frame/XDispatch.hpp>
32
#include <com/sun/star/frame/XDispatch.hpp>
32
#include <com/sun/star/frame/XFrame.hpp>
33
#include <com/sun/star/frame/XFrame.hpp>
33
#ifndef _COM_SUN_STAR_UI_XUILEMENT_HPP_
34
#ifndef _COM_SUN_STAR_UI_XUILEMENT_HPP_
Lines 175-185 Link Here
175
DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
176
DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
176
DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
177
DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
177
178
178
SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 )
179
179
180
struct SfxObjectBarList_Impl
180
struct SfxObjectBarList_Impl
181
{
181
{
182
	SfxObjectBarArr_Impl	aArr;
182
	std::deque<SfxObjectBar_Impl>	aArr;
183
	USHORT 					nAct;
183
	USHORT 					nAct;
184
184
185
	SfxObjectBar_Impl 		operator[] ( USHORT n )
185
	SfxObjectBar_Impl 		operator[] ( USHORT n )
(-)a/starmath/source/cfgitem.cxx (-31 / +29 lines)
Lines 49-56 Link Here
49
#define SYMBOL_LIST         "SymbolList"
49
#define SYMBOL_LIST         "SymbolList"
50
#define FONT_FORMAT_LIST    "FontFormatList"
50
#define FONT_FORMAT_LIST    "FontFormatList"
51
51
52
SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );
53
54
/////////////////////////////////////////////////////////////////
52
/////////////////////////////////////////////////////////////////
55
53
56
54
Lines 294-303 Link Here
294
292
295
void SmFontFormatList::Clear()
293
void SmFontFormatList::Clear()
296
{
294
{
297
    USHORT nCnt = aEntries.Count();
295
    if (!aEntries.empty())
298
    if (nCnt)
299
    {
296
    {
300
        aEntries.Remove( 0, nCnt );
297
        aEntries.clear();
301
        SetModified( TRUE );
298
        SetModified( TRUE );
302
    }
299
    }
303
}
300
}
Lines 311-317 Link Here
311
    if (!pFntFmt)
308
    if (!pFntFmt)
312
    {
309
    {
313
        SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
310
        SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
314
        aEntries.Insert( aEntry, aEntries.Count() );
311
        aEntries.push_back( aEntry );
315
        SetModified( TRUE );
312
        SetModified( TRUE );
316
    }
313
    }
317
}
314
}
Lines 319-353 Link Here
319
    
316
    
320
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
317
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
321
{
318
{
322
    USHORT nPos = 0xFFFF;
319
    
323
324
    // search for entry
320
    // search for entry
325
    USHORT nCnt = aEntries.Count();
321
    for (USHORT i = 0;  i < aEntries.size();  ++i)
326
    for (USHORT i = 0;  i < nCnt  &&  nPos == 0xFFFF;  ++i)
327
    {
322
    {
328
        if (aEntries[i].aId == rFntFmtId)
323
        if (aEntries[i].aId == rFntFmtId)
329
            nPos = i;
324
        {
330
    }
325
            // remove entry if found
331
326
            aEntries.erase( aEntries.begin() + i );
332
    // remove entry if found
327
            SetModified( TRUE );
333
    if (nPos != 0xFFFF)
328
            break;
334
    {
329
        }
335
        aEntries.Remove( nPos );
336
        SetModified( TRUE );
337
    }
330
    }
338
}
331
}
339
332
340
    
333
    
341
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
334
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
342
{
335
{
343
    SmFontFormat *pRes = 0;
336
    const SmFontFormat *pRes = 0;
344
337
345
    USHORT nCnt = aEntries.Count();
338
    for (USHORT i = 0;  i < aEntries.size();  ++i)
346
    USHORT i;
347
    for (i = 0;  i < nCnt  &&  !pRes;  ++i)
348
    {
339
    {
349
        if (aEntries[i].aId == rFntFmtId)
340
        if (aEntries[i].aId == rFntFmtId)
341
        {
350
            pRes = &aEntries[i].aFntFmt;
342
            pRes = &aEntries[i].aFntFmt;
343
            break;
344
        }
351
    }
345
    }
352
    
346
    
353
    return pRes;
347
    return pRes;
Lines 357-365 Link Here
357
351
358
const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
352
const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
359
{
353
{
360
    SmFontFormat *pRes = 0;
354
    const SmFontFormat *pRes = 0;
361
    if (nPos < aEntries.Count())
355
    if (nPos < aEntries.size())
362
        pRes = &aEntries[ nPos ].aFntFmt;
356
        pRes = &aEntries[nPos].aFntFmt;
363
    return pRes;
357
    return pRes;
364
}
358
}
365
359
Lines 368-379 Link Here
368
{
362
{
369
    String aRes;
363
    String aRes;
370
364
371
    USHORT nCnt = aEntries.Count();
365
    for (USHORT i = 0;  i < aEntries.size();  ++i)
372
    USHORT i;
373
    for (i = 0;  i < nCnt  &&  0 == aRes.Len();  ++i)
374
    {
366
    {
375
        if (aEntries[i].aFntFmt == rFntFmt)
367
        if (aEntries[i].aFntFmt == rFntFmt) 
368
        {
376
            aRes = aEntries[i].aId;
369
            aRes = aEntries[i].aId;
370
            break;
371
        }
377
    }
372
    }
378
    
373
    
379
    return aRes;
374
    return aRes;
Lines 395-401 Link Here
395
const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
390
const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
396
{
391
{
397
    String aRes;
392
    String aRes;
398
    if (nPos < aEntries.Count())
393
    if (nPos < aEntries.size())
399
        aRes = aEntries[nPos].aId;
394
        aRes = aEntries[nPos].aId;
400
    return aRes;
395
    return aRes;
401
}
396
}
Lines 409-420 Link Here
409
404
410
    String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) );
405
    String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) );
411
    INT32 nCnt = GetCount();
406
    INT32 nCnt = GetCount();
412
    for (INT32 i = 1;  i <= nCnt + 1  &&  0 == aRes.Len();  ++i)
407
    for (INT32 i = 1;  i <= nCnt + 1;  ++i)
413
    {
408
    {
414
        String aTmpId( aPrefix );
409
        String aTmpId( aPrefix );
415
        aTmpId += String::CreateFromInt32( i );
410
        aTmpId += String::CreateFromInt32( i );
416
        if (!GetFontFormat( aTmpId ))
411
        if (!GetFontFormat( aTmpId ))
412
        {
417
            aRes = aTmpId;
413
            aRes = aTmpId;
414
            break;
415
        }
418
    }
416
    }
419
    DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" );
417
    DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" );
420
418
(-)a/starmath/source/cfgitem.hxx (-8 / +4 lines)
Lines 32-37 Link Here
32
#ifndef _MATH_CFGITEM_HXX_
32
#ifndef _MATH_CFGITEM_HXX_
33
#define _MATH_CFGITEM_HXX_
33
#define _MATH_CFGITEM_HXX_
34
34
35
#include <deque>
35
#include <vector>
36
#include <vector>
36
37
37
#include <com/sun/star/beans/PropertyValues.hpp>
38
#include <com/sun/star/beans/PropertyValues.hpp>
Lines 41-47 Link Here
41
#include <tools/solar.h>
42
#include <tools/solar.h>
42
#include <rtl/ustring.hxx>
43
#include <rtl/ustring.hxx>
43
#include <unotools/configitem.hxx>
44
#include <unotools/configitem.hxx>
44
#include <svl/svarray.hxx>
45
#include <vcl/timer.hxx>
45
#include <vcl/timer.hxx>
46
46
47
#include <symbol.hxx>
47
#include <symbol.hxx>
Lines 82-95 Link Here
82
    SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
82
    SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
83
};
83
};
84
84
85
86
SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
87
88
89
class SmFontFormatList
85
class SmFontFormatList
90
{
86
{
91
    SmFntFmtListEntryArr    aEntries;
87
    std::deque<SmFntFmtListEntry> aEntries;
92
    BOOL                    bModified;
88
    BOOL                          bModified;
93
89
94
	// disallow copy-constructor and assignment-operator for now
90
	// disallow copy-constructor and assignment-operator for now
95
    SmFontFormatList( const SmFontFormatList & );
91
    SmFontFormatList( const SmFontFormatList & );
Lines 108-114 Link Here
108
    const String            GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd );
104
    const String            GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd );
109
    const String            GetFontFormatId( USHORT nPos ) const;
105
    const String            GetFontFormatId( USHORT nPos ) const;
110
    const String            GetNewFontFormatId() const;
106
    const String            GetNewFontFormatId() const;
111
    USHORT                  GetCount() const    { return aEntries.Count(); }
107
    USHORT                  GetCount() const    { return aEntries.size(); }
112
108
113
    BOOL    IsModified() const          { return bModified; }
109
    BOOL    IsModified() const          { return bModified; }
114
    void    SetModified( BOOL bVal )    { bModified = bVal; }
110
    void    SetModified( BOOL bVal )    { bModified = bVal; }
(-)a/svl/inc/poolcach.hxx (-1 / +12 lines)
Lines 29-41 Link Here
29
29
30
#include "svl/svldllapi.h"
30
#include "svl/svldllapi.h"
31
#include <tools/solar.h>
31
#include <tools/solar.h>
32
#include <vector>
32
33
33
class SfxItemModifyArr_Impl;
34
//------------------------------------------------------------------------
35
34
class SfxItemPool;
36
class SfxItemPool;
35
class SfxItemSet;
37
class SfxItemSet;
36
class SfxPoolItem;
38
class SfxPoolItem;
37
class SfxSetItem;
39
class SfxSetItem;
38
40
41
struct SfxItemModifyImpl
42
{
43
	const SfxSetItem  *pOrigItem;
44
	SfxSetItem		  *pPoolItem;
45
};
46
47
typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl;
48
49
39
class SVL_DLLPUBLIC SfxItemPoolCache
50
class SVL_DLLPUBLIC SfxItemPoolCache
40
{
51
{
41
	SfxItemPool 			*pPool;
52
	SfxItemPool 			*pPool;
(-)a/svl/inc/svl/svarray.hxx (-189 lines)
Lines 39-50 Link Here
39
*			enthaelt. (Sie werden im Speicher verschoben, koennen also
39
*			enthaelt. (Sie werden im Speicher verschoben, koennen also
40
*			z.B. keine String sein)
40
*			z.B. keine String sein)
41
*
41
*
42
*		SV_DECL_OBJARR(nm, AE, IS, GS)
43
*		SV_IMPL_OBJARR( nm, AE )
44
*			definiere/implementiere ein Array das Objecte enthaelt.
45
*			(Hier koennen es auch Strings sein)
46
*
47
*
48
*		SV_DECL_PTRARR(nm, AE, IS, GS)
42
*		SV_DECL_PTRARR(nm, AE, IS, GS)
49
*		SV_IMPL_PTRARR(nm, AE)
43
*		SV_IMPL_PTRARR(nm, AE)
50
*			definiere/implementiere ein Array das Pointer haelt. Diese
44
*			definiere/implementiere ein Array das Pointer haelt. Diese
Lines 332-520 Link Here
332
#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
326
#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
333
SV_IMPL_VARARR_GEN( nm, AE, AE )
327
SV_IMPL_VARARR_GEN( nm, AE, AE )
334
328
335
#if defined(PRODUCT)
336
337
#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem )\
338
ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
339
\
340
void Insert( const nm *pI, USHORT nP,\
341
				USHORT nS = 0, USHORT nE = USHRT_MAX )\
342
{\
343
	if( USHRT_MAX == nE ) \
344
		nE = pI->nA; \
345
	if( nS < nE ) \
346
		Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
347
}
348
349
#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
350
351
#else
352
353
#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem ) \
354
ArrElem& operator[](USHORT nP) const;\
355
void Insert( const nm *pI, USHORT nP,\
356
				USHORT nS = 0, USHORT nE = USHRT_MAX );
357
358
#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
359
ArrElem& nm::operator[](USHORT nP) const\
360
{\
361
	DBG_ASSERT( pData && nP < nA,"Op[]");\
362
	return *(pData+nP);\
363
}\
364
void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE )\
365
{\
366
	DBG_ASSERT( nP <= nA,"Ins,Ar[Start.End]");\
367
	if( USHRT_MAX == nE ) \
368
		nE = pI->nA; \
369
	if( nStt < nE ) \
370
		Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
371
}
372
373
#endif
374
375
#define _SV_DECL_OBJARR(nm, AE, IS, GS)\
376
typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
377
class nm\
378
{\
379
protected:\
380
	AE    *pData;\
381
	USHORT nFree;\
382
	USHORT nA;\
383
\
384
	void _resize(size_t n);\
385
	void _destroy();\
386
\
387
public:\
388
	nm( USHORT= IS, BYTE= GS );\
389
	~nm() { _destroy(); }\
390
\
391
	_SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
392
	AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
393
\
394
	void Insert( const AE &aE, USHORT nP );\
395
	void Insert( const AE *pE, USHORT nL, USHORT nP );\
396
	void Remove( USHORT nP, USHORT nL = 1 );\
397
	USHORT Count() const { return nA; }\
398
	const AE* GetData() const { return (const AE*)pData; }\
399
\
400
	void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
401
	{\
402
		_ForEach( 0, nA, fnForEach, pArgs );\
403
	}\
404
	void ForEach( USHORT nS, USHORT nE, \
405
					CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
406
	{\
407
		_ForEach( nS, nE, fnForEach, pArgs );\
408
	}\
409
\
410
	void _ForEach( USHORT nStt, USHORT nE, \
411
			CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
412
\
413
414
#define SV_DECL_OBJARR(nm, AE, IS, GS)\
415
_SV_DECL_OBJARR(nm, AE, IS, GS)\
416
private:\
417
nm( const nm& );\
418
nm& operator=( const nm& );\
419
};
420
421
#define SV_IMPL_OBJARR( nm, AE )\
422
nm::nm( USHORT nInit, BYTE )\
423
	: pData (0),\
424
	  nFree (nInit),\
425
	  nA    (0)\
426
{\
427
	if( nInit )\
428
	{\
429
		pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
430
		DBG_ASSERT( pData, "CTOR, allocate");\
431
	}\
432
}\
433
\
434
void nm::_destroy()\
435
{\
436
	if(pData)\
437
	{\
438
		AE* pTmp=pData;\
439
		for(USHORT n=0; n < nA; n++,pTmp++ )\
440
		{\
441
			pTmp->~AE();\
442
		}\
443
		rtl_freeMemory(pData);\
444
		pData = 0;\
445
	}\
446
}\
447
\
448
void nm::_resize (size_t n)\
449
{\
450
	USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
451
	AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
452
	if ((pE != 0) || (nL == 0))\
453
	{\
454
		pData = pE;\
455
		nFree = nL - nA;\
456
	}\
457
}\
458
\
459
void nm::Insert( const AE &aE, USHORT nP )\
460
{\
461
	DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
462
	if (nFree < 1)\
463
		_resize (nA + ((nA > 1) ? nA : 1));\
464
	if( pData && nP < nA )\
465
		memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
466
	AE* pTmp = pData+nP;\
467
	new( (DummyType*) pTmp ) AE( (AE&)aE );\
468
	++nA; --nFree;\
469
}\
470
\
471
void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
472
{\
473
	DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
474
	if (nFree < nL)\
475
		_resize (nA + ((nA > nL) ? nA : nL));\
476
	if( pData && nP < nA )\
477
		memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
478
	if( pE )\
479
	{\
480
		AE* pTmp = pData+nP;\
481
		for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
482
		{\
483
			 new( (DummyType*) pTmp ) AE( (AE&)*pE );\
484
		}\
485
	}\
486
	nA = nA + nL; nFree = nFree - nL;\
487
}\
488
\
489
void nm::Remove( USHORT nP, USHORT nL )\
490
{\
491
	if( !nL )\
492
		return;\
493
	DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
494
	AE* pTmp=pData+nP;\
495
	USHORT nCtr = nP;\
496
	for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
497
	{\
498
		if( nCtr < nA )\
499
			pTmp->~AE();\
500
	}\
501
	if( pData && nP+1 < nA )\
502
		memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
503
	nA = nA - nL; nFree = nFree + nL;\
504
	if (nFree > nA) \
505
		_resize (nA);\
506
}\
507
\
508
void nm::_ForEach( USHORT nStt, USHORT nE, \
509
			CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
510
{\
511
	if( nStt >= nE || nE > nA )\
512
		return;\
513
	for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
514
		;\
515
}\
516
\
517
_SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
518
329
519
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
330
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
520
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
331
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
(-)a/svl/source/inc/poolio.hxx (-1 / +1 lines)
Lines 54-60 Link Here
54
};
54
};
55
55
56
SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
56
SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
57
SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 )
57
typedef std::vector<SfxPoolVersion_Impl*> SfxPoolVersionArr_Impl;
58
58
59
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
59
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
60
{
60
{
(-)a/svl/source/items/itempool.cxx (-13 / +6 lines)
Lines 39-51 Link Here
39
#include <svl/smplhint.hxx>
39
#include <svl/smplhint.hxx>
40
#include "poolio.hxx"
40
#include "poolio.hxx"
41
#include <algorithm>
41
#include <algorithm>
42
42
#include <vector>
43
// STATIC DATA -----------------------------------------------------------
44
45
46
//========================================================================
47
48
SV_IMPL_PTRARR( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl* );
49
43
50
//========================================================================
44
//========================================================================
51
45
Lines 275-287 Link Here
275
			(*( ppPoolDefaults + n ))->SetKind( SFX_ITEMS_POOLDEFAULT );
269
			(*( ppPoolDefaults + n ))->SetKind( SFX_ITEMS_POOLDEFAULT );
276
		}
270
		}
277
271
278
	// Version-Map kopieren
272
	// Copy Version-Map
279
	USHORT nVerCount = rPool.pImp->aVersions.Count();
273
	for ( size_t nVer = 0; nVer <rPool.pImp->aVersions.size(); ++nVer )
280
	for ( USHORT nVer = 0; nVer < nVerCount; ++nVer )
281
	{
274
	{
282
		const SfxPoolVersion_Impl *pOld = rPool.pImp->aVersions.GetObject(nVer);
275
		const SfxPoolVersion_Impl* pOld = rPool.pImp->aVersions[nVer];
283
		const SfxPoolVersion_Impl *pNew = new SfxPoolVersion_Impl( *pOld );
276
		SfxPoolVersion_Impl* pNew = new SfxPoolVersion_Impl( *pOld );
284
		pImp->aVersions.Insert( pNew, nVer );
277
		pImp->aVersions.push_back( pNew );
285
	}
278
	}
286
279
287
	// Verkettung wiederherstellen
280
	// Verkettung wiederherstellen
(-)a/svl/source/items/poolcach.cxx (-15 / +3 lines)
Lines 41-58 Link Here
41
41
42
DBG_NAME(SfxItemPoolCache)
42
DBG_NAME(SfxItemPoolCache)
43
43
44
45
//------------------------------------------------------------------------
46
47
struct SfxItemModifyImpl
48
{
49
	const SfxSetItem  *pOrigItem;
50
	SfxSetItem		  *pPoolItem;
51
};
52
53
SV_DECL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl, 8, 8 )
54
SV_IMPL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl);
55
56
//------------------------------------------------------------------------
44
//------------------------------------------------------------------------
57
45
58
SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
46
SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
Lines 84-90 Link Here
84
SfxItemPoolCache::~SfxItemPoolCache()
72
SfxItemPoolCache::~SfxItemPoolCache()
85
{
73
{
86
	DBG_DTOR(SfxItemPoolCache, 0);
74
	DBG_DTOR(SfxItemPoolCache, 0);
87
	for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) {
75
	for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) {
88
		pPool->Remove( *(*pCache)[nPos].pPoolItem );
76
		pPool->Remove( *(*pCache)[nPos].pPoolItem );
89
		pPool->Remove( *(*pCache)[nPos].pOrigItem );
77
		pPool->Remove( *(*pCache)[nPos].pOrigItem );
90
	}
78
	}
Lines 104-110 Link Here
104
				"original not in pool" );
92
				"original not in pool" );
105
93
106
	// Suchen, ob diese Transformations schon einmal vorkam
94
	// Suchen, ob diese Transformations schon einmal vorkam
107
	for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos )
95
	for ( size_t nPos = 0; nPos < pCache->size(); ++nPos )
108
	{
96
	{
109
		SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
97
		SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
110
		if ( rMapEntry.pOrigItem == &rOrigItem )
98
		if ( rMapEntry.pOrigItem == &rOrigItem )
Lines 143-149 Link Here
143
	SfxItemModifyImpl aModify;
131
	SfxItemModifyImpl aModify;
144
	aModify.pOrigItem = &rOrigItem;
132
	aModify.pOrigItem = &rOrigItem;
145
	aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
133
	aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
146
	pCache->Insert( aModify, pCache->Count() );
134
	pCache->push_back( aModify );
147
135
148
	DBG_ASSERT( !pItemToPut ||
136
	DBG_ASSERT( !pItemToPut ||
149
				&pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
137
				&pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
(-)a/svl/source/items/poolio.cxx (-9 / +9 lines)
Lines 178-184 Link Here
178
	// Version-Maps
178
	// Version-Maps
179
	{
179
	{
180
		SfxMultiVarRecordWriter aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP, 0 );
180
		SfxMultiVarRecordWriter aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP, 0 );
181
		for ( USHORT nVerNo = 0; nVerNo < pImp->aVersions.Count(); ++nVerNo )
181
		for ( size_t nVerNo = 0; nVerNo < pImp->aVersions.size(); ++nVerNo )
182
		{
182
		{
183
			aVerRec.NewContent();
183
			aVerRec.NewContent();
184
			SfxPoolVersion_Impl *pVer = pImp->aVersions[nVerNo];
184
			SfxPoolVersion_Impl *pVer = pImp->aVersions[nVerNo];
Lines 611-618 Link Here
611
			rStream >> nVersion >> nHStart >> nHEnd;
611
			rStream >> nVersion >> nHStart >> nHEnd;
612
			USHORT nCount = nHEnd - nHStart + 1;
612
			USHORT nCount = nHEnd - nHStart + 1;
613
613
614
			// Version neuer als bekannt?
614
			// Is new version is known?
615
			if ( nVerNo >= pImp->aVersions.Count() )
615
			if ( nVerNo >= pImp->aVersions.size() )
616
			{
616
			{
617
				// neue Version hinzufuegen
617
				// neue Version hinzufuegen
618
				USHORT *pMap = new USHORT[nCount];
618
				USHORT *pMap = new USHORT[nCount];
Lines 799-806 Link Here
799
			USHORT nCount = nHEnd - nHStart + 1;
799
			USHORT nCount = nHEnd - nHStart + 1;
800
			USHORT nBytes = (nCount)*sizeof(USHORT);
800
			USHORT nBytes = (nCount)*sizeof(USHORT);
801
801
802
			// Version neuer als bekannt?
802
			// Is new version is known?
803
			if ( nVerNo >= pImp->aVersions.Count() )
803
			if ( nVerNo >= pImp->aVersions.size() )
804
			{
804
			{
805
				// neue Version hinzufuegen
805
				// neue Version hinzufuegen
806
				USHORT *pMap = new USHORT[nCount];
806
				USHORT *pMap = new USHORT[nCount];
Lines 1327-1335 Link Here
1327
1327
1328
{
1328
{
1329
	// neuen Map-Eintrag erzeugen und einf"ugen
1329
	// neuen Map-Eintrag erzeugen und einf"ugen
1330
	const SfxPoolVersion_Impl *pVerMap = new SfxPoolVersion_Impl(
1330
	SfxPoolVersion_Impl *pVerMap = new SfxPoolVersion_Impl(
1331
				nVer, nOldStart, nOldEnd, pOldWhichIdTab );
1331
				nVer, nOldStart, nOldEnd, pOldWhichIdTab );
1332
	pImp->aVersions.Insert( pVerMap, pImp->aVersions.Count() );
1332
	pImp->aVersions.push_back( pVerMap );
1333
1333
1334
	DBG_ASSERT( nVer > pImp->nVersion, "Versions not sorted" );
1334
	DBG_ASSERT( nVer > pImp->nVersion, "Versions not sorted" );
1335
	pImp->nVersion = nVer;
1335
	pImp->nVersion = nVer;
Lines 1398-1404 Link Here
1398
	if ( nDiff > 0 )
1398
	if ( nDiff > 0 )
1399
	{
1399
	{
1400
		// von der Top-Version bis runter zur File-Version stufenweise mappen
1400
		// von der Top-Version bis runter zur File-Version stufenweise mappen
1401
		for ( USHORT nMap = pImp->aVersions.Count(); nMap > 0; --nMap )
1401
		for ( size_t nMap = pImp->aVersions.size(); nMap > 0; --nMap )
1402
		{
1402
		{
1403
			SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap-1];
1403
			SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap-1];
1404
			if ( pVerInfo->_nVer > pImp->nVersion )
1404
			if ( pVerInfo->_nVer > pImp->nVersion )
Lines 1424-1430 Link Here
1424
	else if ( nDiff < 0 )
1424
	else if ( nDiff < 0 )
1425
	{
1425
	{
1426
		// von der File-Version bis zur aktuellen Version stufenweise mappen
1426
		// von der File-Version bis zur aktuellen Version stufenweise mappen
1427
		for ( USHORT nMap = 0; nMap < pImp->aVersions.Count(); ++nMap )
1427
		for ( size_t nMap = 0; nMap < pImp->aVersions.size(); ++nMap )
1428
		{
1428
		{
1429
			SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap];
1429
			SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap];
1430
			if ( pVerInfo->_nVer > pImp->nLoadingVersion )
1430
			if ( pVerInfo->_nVer > pImp->nLoadingVersion )
(-)a/svtools/inc/svtools/syntaxhighlight.hxx (-4 / +1 lines)
Lines 57-64 Link Here
57
#include <tools/string.hxx>
57
#include <tools/string.hxx>
58
#include <tools/gen.hxx>
58
#include <tools/gen.hxx>
59
59
60
#include <svl/svarray.hxx>
61
62
60
63
// Token-Typen TT_...
61
// Token-Typen TT_...
64
enum TokenTypes
62
enum TokenTypes
Lines 79-86 Link Here
79
struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; };
77
struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; };
80
78
81
79
82
80
typedef std::vector<HighlightPortion> HighlightPortions;
83
SV_DECL_VARARR(HighlightPortions, HighlightPortion, 0, 16)
84
81
85
/////////////////////////////////////////////////////////////////////////
82
/////////////////////////////////////////////////////////////////////////
86
// Hilfsklasse zur Untersuchung von JavaScript-Modulen, zunaechst zum
83
// Hilfsklasse zur Untersuchung von JavaScript-Modulen, zunaechst zum
(-)a/svtools/source/edit/editsyntaxhighlighter.cxx (-1 / +1 lines)
Lines 193-199 Link Here
193
		GetTextEngine()->RemoveAttribs( nLine, TRUE );
193
		GetTextEngine()->RemoveAttribs( nLine, TRUE );
194
		HighlightPortions aPortions;
194
		HighlightPortions aPortions;
195
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
195
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
196
		for ( USHORT i = 0; i < aPortions.Count(); i++ )
196
		for ( USHORT i = 0; i < aPortions.size(); i++ )
197
		{
197
		{
198
			HighlightPortion& r = aPortions[i];
198
			HighlightPortion& r = aPortions[i];
199
			GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE );
199
			GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE );
(-)a/svtools/source/edit/syntaxhighlight.cxx (-4 / +3 lines)
Lines 33-40 Link Here
33
#include <unotools/charclass.hxx>
33
#include <unotools/charclass.hxx>
34
#include <tools/debug.hxx>
34
#include <tools/debug.hxx>
35
35
36
36
typedef std::vector<HighlightPortion> HighlightPortions;
37
SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
38
37
39
38
40
// ##########################################################################
39
// ##########################################################################
Lines 848-855 Link Here
848
		portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
847
		portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
849
		portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
848
		portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
850
		portion.tokenType = eType;
849
		portion.tokenType = eType;
851
850
        
852
		portions.Insert(portion, portions.Count());
851
        portions.push_back(portion);
853
	}
852
	}
854
}
853
}
855
854
(-)a/svtools/source/edit/textdata.cxx (-5 / +5 lines)
Lines 37-43 Link Here
37
SV_IMPL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo );
37
SV_IMPL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo );
38
38
39
39
40
// -------------------------------------------------------------------------
40
// -------------------------------------------------------------------------
41
// (+) class TextSelection
41
// (+) class TextSelection
42
// -------------------------------------------------------------------------
42
// -------------------------------------------------------------------------
43
43
Lines 66-72 Link Here
66
}
66
}
67
67
68
68
69
// -------------------------------------------------------------------------
69
// -------------------------------------------------------------------------
70
// (+) class TETextPortionList
70
// (+) class TETextPortionList
71
// -------------------------------------------------------------------------
71
// -------------------------------------------------------------------------
72
TETextPortionList::TETextPortionList()
72
TETextPortionList::TETextPortionList()
Lines 129-135 Link Here
129
*/
129
*/
130
130
131
131
132
// -------------------------------------------------------------------------
132
// -------------------------------------------------------------------------
133
// (+) class TEParaPortion
133
// (+) class TEParaPortion
134
// -------------------------------------------------------------------------
134
// -------------------------------------------------------------------------
135
TEParaPortion::TEParaPortion( TextNode* pN )
135
TEParaPortion::TEParaPortion( TextNode* pN )
Lines 254-260 Link Here
254
	}
254
	}
255
}
255
}
256
256
257
// -------------------------------------------------------------------------
257
// -------------------------------------------------------------------------
258
// (+) class TEParaPortions
258
// (+) class TEParaPortions
259
// -------------------------------------------------------------------------
259
// -------------------------------------------------------------------------
260
TEParaPortions::TEParaPortions()
260
TEParaPortions::TEParaPortions()
Lines 274-280 Link Here
274
	clear();
274
	clear();
275
}
275
}
276
276
277
// -------------------------------------------------------------------------
277
// -------------------------------------------------------------------------
278
// (+) class IdleFormatter
278
// (+) class IdleFormatter
279
// -------------------------------------------------------------------------
279
// -------------------------------------------------------------------------
280
IdleFormatter::IdleFormatter()
280
IdleFormatter::IdleFormatter()
(-)a/svx/source/form/fmsrcimp.cxx (-11 / +6 lines)
Lines 82-92 Link Here
82
using namespace ::com::sun::star::beans;
82
using namespace ::com::sun::star::beans;
83
using namespace ::svxform;
83
using namespace ::svxform;
84
84
85
// ***************************************************************************************************
86
87
// ***************************************************************************************************
88
89
SV_IMPL_OBJARR(SvInt32Array, sal_Int32);
90
85
91
//========================================================================
86
//========================================================================
92
// = FmSearchThread
87
// = FmSearchThread
Lines 848-854 Link Here
848
	// analyze the fields
843
	// analyze the fields
849
	// additionally, create the mapping: because the list of used columns can be shorter than the list
844
	// additionally, create the mapping: because the list of used columns can be shorter than the list
850
	// of columns of the cursor, we need a mapping: "used column numer n" -> "cursor column m"
845
	// of columns of the cursor, we need a mapping: "used column numer n" -> "cursor column m"
851
    m_arrFieldMapping.Remove(0, m_arrFieldMapping.Count());
846
    m_arrFieldMapping.clear();
852
847
853
	// important: The case of the columns does not need to be exact - for instance:
848
	// important: The case of the columns does not need to be exact - for instance:
854
	// - a user created a form which works on a table, for which the driver returns a column name "COLUMN"
849
	// - a user created a form which works on a table, for which the driver returns a column name "COLUMN"
Lines 912-918 Link Here
912
            // set the field selection back to the first
907
            // set the field selection back to the first
913
            pFieldNames = seqFieldNames.getArray();;
908
            pFieldNames = seqFieldNames.getArray();;
914
            DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Es wurden ungueltige Feldnamen angegeben !");
909
            DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Es wurden ungueltige Feldnamen angegeben !");
915
            m_arrFieldMapping.Insert(nFoundIndex, m_arrFieldMapping.Count());
910
            m_arrFieldMapping.push_back(nFoundIndex);
916
        }
911
        }
917
    }
912
    }
918
    catch(Exception&)
913
    catch(Exception&)
Lines 1273-1290 Link Here
1273
        return;
1268
        return;
1274
    // (da ich keinen Wechsel des Iterators von aussen zulasse, heisst selber ::com::sun::star::sdbcx::Index auch immer selbe Spalte, also habe ich nix zu tun)
1269
    // (da ich keinen Wechsel des Iterators von aussen zulasse, heisst selber ::com::sun::star::sdbcx::Index auch immer selbe Spalte, also habe ich nix zu tun)
1275
1270
1276
    DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.Count()), "FmSearchEngine::RebuildUsedFields : nFieldIndex ist ungueltig !");
1271
    DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.size()), "FmSearchEngine::RebuildUsedFields : nFieldIndex is invalid!");
1277
    // alle Felder, die ich durchsuchen muss, einsammeln
1272
    // alle Felder, die ich durchsuchen muss, einsammeln
1278
    m_arrUsedFields.clear();
1273
    m_arrUsedFields.clear();
1279
    if (nFieldIndex == -1)
1274
    if (nFieldIndex == -1)
1280
    {
1275
    {
1281
        Reference< ::com::sun::star::container::XIndexAccess >  xFields;
1276
        Reference< ::com::sun::star::container::XIndexAccess >  xFields;
1282
        for (sal_uInt16 i=0; i<m_arrFieldMapping.Count(); ++i)
1277
        for (sal_uInt16 i=0; i<m_arrFieldMapping.size(); ++i)
1283
        {
1278
        {
1284
            Reference< ::com::sun::star::sdbcx::XColumnsSupplier >  xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
1279
            Reference< ::com::sun::star::sdbcx::XColumnsSupplier >  xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
1285
            DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
1280
            DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
1286
            xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
1281
            xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
1287
            BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject(i));
1282
            BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[i]);
1288
        }
1283
        }
1289
    }
1284
    }
1290
    else
1285
    else
Lines 1293-1299 Link Here
1293
        Reference< ::com::sun::star::sdbcx::XColumnsSupplier >  xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
1288
        Reference< ::com::sun::star::sdbcx::XColumnsSupplier >  xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
1294
        DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
1289
        DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
1295
        xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
1290
        xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
1296
        BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject((sal_uInt16)nFieldIndex));
1291
        BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[(sal_uInt16)nFieldIndex]);
1297
    }
1292
    }
1298
1293
1299
    m_nCurrentFieldIndex = nFieldIndex;
1294
    m_nCurrentFieldIndex = nFieldIndex;
(-)a/svx/source/inc/fmsrcimp.hxx (-7 / +3 lines)
Lines 48-60 Link Here
48
48
49
#ifndef _SVSTDARR_ULONGS
49
#ifndef _SVSTDARR_ULONGS
50
#define _SVSTDARR_ULONGS
50
#define _SVSTDARR_ULONGS
51
#include <svl/svstdarr.hxx>
52
#endif
51
#endif
53
52
54
// ===================================================================================================
53
#include <deque>
55
// Hilfsstrukturen
56
57
SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16)
58
54
59
// ===================================================================================================
55
// ===================================================================================================
60
// = class FmSearchThread - wie der Name schon sagt
56
// = class FmSearchThread - wie der Name schon sagt
Lines 189-196 Link Here
189
	enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
185
	enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
190
186
191
	// zugrundeliegende Daten
187
	// zugrundeliegende Daten
192
	CursorWrapper			m_xSearchCursor;
188
	CursorWrapper                   m_xSearchCursor;
193
	SvInt32Array			m_arrFieldMapping;
189
	std::deque<sal_Int32>           m_arrFieldMapping;
194
		// da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
190
		// da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
195
		// muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten
191
		// muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten
196
192
(-)a/sw/source/filter/rtf/wrtrtf.cxx (-12 / +15 lines)
Lines 85-92 Link Here
85
const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012";
85
const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012";
86
#endif
86
#endif
87
87
88
SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 )
89
SV_IMPL_VARARR( RTFColorTbl, Color )
90
88
91
89
92
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) :
90
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) :
Lines 638-650 Link Here
638
636
639
static void InsColor( RTFColorTbl& rTbl, const Color& rCol )
637
static void InsColor( RTFColorTbl& rTbl, const Color& rCol )
640
{
638
{
641
	USHORT n;
639
	for( USHORT n = 0; n < rTbl.size(); ++n )
642
	for( n = 0; n < rTbl.Count(); ++n )
643
		if( rTbl[n] == rCol )
640
		if( rTbl[n] == rCol )
644
			return;			// schon vorhanden, zurueck
641
			return;			// already exists, return
645
642
646
	n = COL_AUTO == rCol.GetColor() ? 0 : rTbl.Count();
643
    if ( COL_AUTO == rCol.GetColor() )
647
	rTbl.Insert( rCol, n );
644
    {
645
        rTbl.push_front( rCol );
646
    }
647
    else
648
    {
649
    	rTbl.push_back( rCol );
650
    }
648
}
651
}
649
652
650
static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox )
653
static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox )
Lines 663-669 Link Here
663
666
664
void SwRTFWriter::OutRTFColorTab()
667
void SwRTFWriter::OutRTFColorTab()
665
{
668
{
666
	ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" );
669
	ASSERT( pColTbl, "Where's table color?" );
667
670
668
	// dann baue die ColorTabelle aus allen Attributen, die Colors
671
	// dann baue die ColorTabelle aus allen Attributen, die Colors
669
	// enthalten und im Pool angemeldet sind auf.
672
	// enthalten und im Pool angemeldet sind auf.
Lines 765-771 Link Here
765
	// und raus damit
768
	// und raus damit
766
	Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
769
	Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
767
770
768
	for( n = 0; n < pColTbl->Count(); n++ )
771
	for( n = 0; n < pColTbl->size(); n++ )
769
	{
772
	{
770
		const Color& rCol = (*pColTbl)[ n ];
773
		const Color& rCol = (*pColTbl)[ n ];
771
		if( n || COL_AUTO != rCol.GetColor() )
774
		if( n || COL_AUTO != rCol.GetColor() )
Lines 1345-1356 Link Here
1345
1348
1346
USHORT SwRTFWriter::GetId( const Color& rColor ) const
1349
USHORT SwRTFWriter::GetId( const Color& rColor ) const
1347
{
1350
{
1348
	ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" );
1351
	ASSERT( pColTbl, "Where's table color?" );
1349
	for( USHORT n = 0; n < pColTbl->Count(); n++ )
1352
	for( USHORT n = 0; n < pColTbl->size(); n++ )
1350
		if( rColor == (*pColTbl)[ n ] )
1353
		if( rColor == (*pColTbl)[ n ] )
1351
			return n;
1354
			return n;
1352
1355
1353
	ASSERT( FALSE, "Color nicht in der Tabelle" );
1356
	ASSERT( FALSE, "Color not exists in the pColTbl table" );
1354
	return 0;
1357
	return 0;
1355
}
1358
}
1356
1359
(-)a/sw/source/filter/rtf/wrtrtf.hxx (-1 / +2 lines)
Lines 30-35 Link Here
30
#include <shellio.hxx>
30
#include <shellio.hxx>
31
#include <wrt_fn.hxx>
31
#include <wrt_fn.hxx>
32
#include "../inc/msfilter.hxx"
32
#include "../inc/msfilter.hxx"
33
#include <deque>
33
34
34
#include <com/sun/star/util/DateTime.hpp>
35
#include <com/sun/star/util/DateTime.hpp>
35
36
Lines 37-43 Link Here
37
class Color;
38
class Color;
38
class Font;
39
class Font;
39
class SvPtrarr;
40
class SvPtrarr;
40
class RTFColorTbl;
41
class SwFmt;
41
class SwFmt;
42
class SwFlyFrmFmt;
42
class SwFlyFrmFmt;
43
class SwPosFlyFrms;
43
class SwPosFlyFrms;
Lines 57-62 Link Here
57
// be used
57
// be used
58
#define DEF_ENCODING		RTL_TEXTENCODING_ASCII_US
58
#define DEF_ENCODING		RTL_TEXTENCODING_ASCII_US
59
59
60
typedef std::deque<Color> RTFColorTbl;
60
61
61
class RTF_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor
62
class RTF_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor
62
{
63
{

Return to issue 112395