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

(-)a/basctl/source/basicide/baside2b.cxx (-4 / +3 lines)
Lines 28-35 Link Here
28
// MARKER(update_precomp.py): autogen include statement, do not remove
28
// MARKER(update_precomp.py): autogen include statement, do not remove
29
#include "precompiled_basctl.hxx"
29
#include "precompiled_basctl.hxx"
30
30
31
31
#include <vector>
32
#include <svl/svarray.hxx>
33
#define _BASIC_TEXTPORTIONS
32
#define _BASIC_TEXTPORTIONS
34
#include <basic/sbdef.hxx>
33
#include <basic/sbdef.hxx>
35
#include <ide_pch.hxx>
34
#include <ide_pch.hxx>
Lines 773-780 Link Here
773
		pEditEngine->RemoveAttribs( nLine, TRUE );
772
		pEditEngine->RemoveAttribs( nLine, TRUE );
774
		HighlightPortions aPortions;
773
		HighlightPortions aPortions;
775
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
774
		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
776
		USHORT nCount = aPortions.Count();
775
777
		for ( USHORT i = 0; i < nCount; i++ )
776
		for ( size_t i = 0; i < aPortions.size(); i++ )
778
		{
777
		{
779
			HighlightPortion& r = aPortions[i];
778
			HighlightPortion& r = aPortions[i];
780
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
779
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
(-)a/basctl/source/basicide/bastype3.cxx (-11 / +10 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-223 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.empty() )
214
	{
213
	{
215
		for ( USHORT n = 0; n < aEntries.Count(); n++ )
214
		for ( size_t 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, "Can not find entry in array" );
219
			BasicEntry* pBE = (BasicEntry*)pLE->GetUserData();
218
			BasicEntry* pBE = (BasicEntry*)pLE->GetUserData();
220
			DBG_ASSERT( pBE, "Keine Daten im Eintrag gefunden!" );
219
			DBG_ASSERT( pBE, "The data in the entry not found!" );
221
			String aName( GetEntryText( pLE ) );
220
			String aName( GetEntryText( pLE ) );
222
221
223
			switch ( pBE->GetType() )
222
			switch ( pBE->GetType() )
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.empty() )
323
	{
322
	{
324
		for ( USHORT n = 0; n < aEntries.Count(); n++ )
323
		for ( size_t 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/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 (-42 / +39 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 (size_t 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 (size_t 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 355-365 Link Here
355
349
356
350
357
351
358
const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
352
const SmFontFormat * SmFontFormatList::GetFontFormat( size_t 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 (size_t 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 392-401 Link Here
392
}
387
}
393
388
394
389
395
const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
390
const String SmFontFormatList::GetFontFormatId( size_t 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
Lines 767-780 Link Here
767
    Sequence< OUString > aNames = lcl_GetFontPropertyNames();
765
    Sequence< OUString > aNames = lcl_GetFontPropertyNames();
768
    INT32 nSymbolProps = aNames.getLength();
766
    INT32 nSymbolProps = aNames.getLength();
769
    
767
    
770
    USHORT nCount = rFntFmtList.GetCount();
768
    size_t nCount = rFntFmtList.GetCount();
771
769
772
    Sequence< PropertyValue > aValues( nCount * nSymbolProps );
770
    Sequence< PropertyValue > aValues( nCount * nSymbolProps );
773
    PropertyValue *pValues = aValues.getArray();
771
    PropertyValue *pValues = aValues.getArray();
774
772
775
    PropertyValue *pVal = pValues;
773
    PropertyValue *pVal = pValues;
776
    OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
774
    OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
777
    for (USHORT i = 0;  i < nCount;  ++i)
775
    for (size_t i = 0;  i < nCount;  ++i)
778
    {
776
    {
779
        String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
777
        String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
780
        const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
778
        const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
Lines 826-838 Link Here
826
824
827
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
825
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
828
{
826
{
829
    size_t nCount = rSymbols.size();
827
    size_t i;
830
    USHORT i;
831
    
828
    
832
    // build list of used font-formats only
829
    // build list of used font-formats only
833
    //!! font-format IDs may be different !!
830
    //!! font-format IDs may be different !!
834
    SmFontFormatList aUsedList;
831
    SmFontFormatList aUsedList;
835
    for (i = 0;  i < nCount;  ++i)
832
    for (i = 0;  i < rSymbols.size();  ++i)
836
    {
833
    {
837
        DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" );
834
        DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" );
838
        aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE );
835
        aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE );
Lines 845-858 Link Here
845
842
846
    // remove unused font-formats from list
843
    // remove unused font-formats from list
847
    SmFontFormatList &rFntFmtList = GetFontFormatList();
844
    SmFontFormatList &rFntFmtList = GetFontFormatList();
848
    USHORT nCnt = rFntFmtList.GetCount();
845
    size_t nCnt = rFntFmtList.GetCount();
849
    SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
846
    SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
850
    String       *pId     = new String      [ nCnt ];
847
    String       *pId     = new String      [ nCnt ];
851
    INT32 k;
848
    size_t k;
852
    for (k = 0;  k < nCnt;  ++k)
849
    for (k = 0;  k < nCnt;  ++k)
853
    {
850
    {
854
        pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k );
851
        pTmpFormat[k] = *rFntFmtList.GetFontFormat( k );
855
        pId[k]     = rFntFmtList.GetFontFormatId( (USHORT) k );
852
        pId[k]     = rFntFmtList.GetFontFormatId( k );
856
    }
853
    }
857
    for (k = 0;  k < nCnt;  ++k)
854
    for (k = 0;  k < nCnt;  ++k)
858
    {
855
    {
(-)a/starmath/source/cfgitem.hxx (-10 / +6 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 103-114 Link Here
103
    void    RemoveFontFormat( const String &rFntFmtId );
99
    void    RemoveFontFormat( const String &rFntFmtId );
104
100
105
    const SmFontFormat *    GetFontFormat( const String &rFntFmtId ) const;
101
    const SmFontFormat *    GetFontFormat( const String &rFntFmtId ) const;
106
    const SmFontFormat *    GetFontFormat( USHORT nPos ) const;
102
    const SmFontFormat *    GetFontFormat( size_t nPos ) const;
107
    const String            GetFontFormatId( const SmFontFormat &rFntFmt ) const;
103
    const String            GetFontFormatId( const SmFontFormat &rFntFmt ) const;
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( size_t nPos ) const;
110
    const String            GetNewFontFormatId() const;
106
    const String            GetNewFontFormatId() const;
111
    USHORT                  GetCount() const    { return aEntries.Count(); }
107
    size_t                  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 / +4 lines)
Lines 25-30 Link Here
25
 *
25
 *
26
 ************************************************************************/
26
 ************************************************************************/
27
#include <svl/brdcst.hxx>
27
#include <svl/brdcst.hxx>
28
#include <boost/shared_ptr.hpp>
28
29
29
30
30
#ifndef DELETEZ
31
#ifndef DELETEZ
Lines 54-60 Link Here
54
};
55
};
55
56
56
SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
57
SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
57
SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 )
58
59
typedef boost::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr;
60
typedef std::vector< SfxPoolVersion_ImplPtr > SfxPoolVersionArr_Impl;
58
61
59
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
62
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
60
{
63
{
(-)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_ImplPtr pOld = rPool.pImp->aVersions[nVer];
283
		const SfxPoolVersion_Impl *pNew = new SfxPoolVersion_Impl( *pOld );
276
		SfxPoolVersion_ImplPtr pNew = SfxPoolVersion_ImplPtr( 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 (-16 / +4 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 103-110 Link Here
103
	DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
91
	DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
104
				"original not in pool" );
92
				"original not in pool" );
105
93
106
	// Suchen, ob diese Transformations schon einmal vorkam
94
	// Find whether this Transformations ever occurred
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 (-16 / +16 lines)
Lines 178-187 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_ImplPtr pVer = pImp->aVersions[nVerNo];
185
			rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
185
			rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
186
			USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
186
			USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
187
			USHORT nNewWhich = 0;
187
			USHORT nNewWhich = 0;
Lines 611-620 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
				// Add new Version
618
				USHORT *pMap = new USHORT[nCount];
618
				USHORT *pMap = new USHORT[nCount];
619
				for ( USHORT n = 0; n < nCount; ++n )
619
				for ( USHORT n = 0; n < nCount; ++n )
620
					rStream >> pMap[n];
620
					rStream >> pMap[n];
Lines 799-808 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
				// Add new Version
806
				USHORT *pMap = new USHORT[nCount];
806
				USHORT *pMap = new USHORT[nCount];
807
				for ( USHORT n = 0; n < nCount; ++n )
807
				for ( USHORT n = 0; n < nCount; ++n )
808
					rStream >> pMap[n];
808
					rStream >> pMap[n];
Lines 1326-1335 Link Here
1326
*/
1326
*/
1327
1327
1328
{
1328
{
1329
	// neuen Map-Eintrag erzeugen und einf"ugen
1329
	// create new map entry to insert
1330
	const SfxPoolVersion_Impl *pVerMap = new SfxPoolVersion_Impl(
1330
	const SfxPoolVersion_ImplPtr pVerMap = SfxPoolVersion_ImplPtr( 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-1406 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_ImplPtr pVerInfo = pImp->aVersions[nMap-1];
1404
			if ( pVerInfo->_nVer > pImp->nVersion )
1404
			if ( pVerInfo->_nVer > pImp->nVersion )
1405
			{	USHORT nOfs;
1405
			{	USHORT nOfs;
1406
				USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
1406
				USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
Lines 1424-1432 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_ImplPtr pVerInfo = pImp->aVersions[nMap];
1430
			if ( pVerInfo->_nVer > pImp->nLoadingVersion )
1430
			if ( pVerInfo->_nVer > pImp->nLoadingVersion )
1431
			{
1431
			{
1432
				DBG_ASSERT( nFileWhich >= pVerInfo->_nStart &&
1432
				DBG_ASSERT( nFileWhich >= pVerInfo->_nStart &&
(-)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 ( size_t 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 (-5 / +2 lines)
Lines 34-42 Link Here
34
#include <tools/debug.hxx>
34
#include <tools/debug.hxx>
35
35
36
36
37
SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
38
39
40
// ##########################################################################
37
// ##########################################################################
41
// ATTENTION: all these words needs to be in small caps
38
// ATTENTION: all these words needs to be in small caps
42
// ##########################################################################
39
// ##########################################################################
Lines 848-855 Link Here
848
		portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
845
		portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
849
		portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
846
		portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
850
		portion.tokenType = eType;
847
		portion.tokenType = eType;
851
848
        
852
		portions.Insert(portion, portions.Count());
849
        portions.push_back(portion);
853
	}
850
	}
854
}
851
}
855
852
(-)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 (size_t 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 (-11 / +3 lines)
Lines 46-60 Link Here
46
#include <unotools/collatorwrapper.hxx>
46
#include <unotools/collatorwrapper.hxx>
47
#include <vos/thread.hxx>
47
#include <vos/thread.hxx>
48
48
49
#ifndef _SVSTDARR_ULONGS
49
#include <deque>
50
#define _SVSTDARR_ULONGS
51
#include <svl/svstdarr.hxx>
52
#endif
53
54
// ===================================================================================================
55
// Hilfsstrukturen
56
57
SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16)
58
50
59
// ===================================================================================================
51
// ===================================================================================================
60
// = class FmSearchThread - wie der Name schon sagt
52
// = class FmSearchThread - wie der Name schon sagt
Lines 189-196 Link Here
189
	enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
181
	enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
190
182
191
	// zugrundeliegende Daten
183
	// zugrundeliegende Daten
192
	CursorWrapper			m_xSearchCursor;
184
	CursorWrapper                   m_xSearchCursor;
193
	SvInt32Array			m_arrFieldMapping;
185
	std::deque<sal_Int32>           m_arrFieldMapping;
194
		// da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
186
		// 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
187
		// muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten
196
188
(-)a/sw/source/core/frmedt/tblsel.cxx (-8 / +7 lines)
Lines 55-60 Link Here
55
// OD 26.08.2003 #i18103#
55
// OD 26.08.2003 #i18103#
56
#include <sectfrm.hxx>
56
#include <sectfrm.hxx>
57
#include <frmtool.hxx>
57
#include <frmtool.hxx>
58
#include <deque>
58
59
59
//siehe auch swtable.cxx
60
//siehe auch swtable.cxx
60
#define COLFUZZY 20L
61
#define COLFUZZY 20L
Lines 152-159 Link Here
152
        : pFrm( &rCFrm ) {}
153
        : pFrm( &rCFrm ) {}
153
};
154
};
154
155
155
SV_DECL_VARARR( _Sort_CellFrms, _Sort_CellFrm, 16, 16 )
156
typedef std::deque< _Sort_CellFrm > _Sort_CellFrms;
156
SV_IMPL_VARARR( _Sort_CellFrms, _Sort_CellFrm )
157
157
158
SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
158
SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
159
SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* );
159
SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* );
Lines 616-624 Link Here
616
								rUnion.Top()  	<= nFrmBottom &&
616
								rUnion.Top()  	<= nFrmBottom &&
617
								nFrmBottom		<= nUnionBottom+ nYFuzzy )
617
								nFrmBottom		<= nUnionBottom+ nYFuzzy )
618
618
619
								aCellFrms.Insert(
619
								aCellFrms.push_back( 
620
                                        _Sort_CellFrm( *(SwCellFrm*)pCell ),
620
                                        _Sort_CellFrm( *(SwCellFrm*)pCell) );
621
										aCellFrms.Count() );
622
							else
621
							else
623
							{
622
							{
624
								bValidChartSel = FALSE;
623
								bValidChartSel = FALSE;
Lines 643-654 Link Here
643
642
644
			// alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob
643
			// alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob
645
			// all huebsch nebeneinander liegen.
644
			// all huebsch nebeneinander liegen.
646
			USHORT n, nEnd, nCellCnt = 0;
645
			size_t n, nCellCnt = 0;
647
            long nYPos = LONG_MAX;
646
            long nYPos = LONG_MAX;
648
            long nXPos = 0;
647
            long nXPos = 0;
649
            long nHeight = 0;
648
            long nHeight = 0;
650
649
651
			for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
650
			for( n = 0 ; n < aCellFrms.size(); ++n )
652
			{
651
			{
653
				const _Sort_CellFrm& rCF = aCellFrms[ n ];
652
				const _Sort_CellFrm& rCF = aCellFrms[ n ];
654
				if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
653
				if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
Lines 699-705 Link Here
699
			{
698
			{
700
				nYPos = LONG_MAX;
699
				nYPos = LONG_MAX;
701
				SwChartBoxes* pBoxes = 0;
700
				SwChartBoxes* pBoxes = 0;
702
				for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
701
				for( n = 0; n < aCellFrms.size(); ++n )
703
				{
702
				{
704
					const _Sort_CellFrm& rCF = aCellFrms[ n ];
703
					const _Sort_CellFrm& rCF = aCellFrms[ n ];
705
					if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
704
					if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
(-)a/sw/source/filter/rtf/wrtrtf.cxx (-13 / +17 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( size_t 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-673 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.
670
	USHORT n, nMaxItem;
673
	size_t n;
674
    USHORT nMaxItem;
671
	const SfxItemPool& rPool = pDoc->GetAttrPool();
675
	const SfxItemPool& rPool = pDoc->GetAttrPool();
672
676
673
	// das Charakter - Color Attribut
677
	// das Charakter - Color Attribut
Lines 765-771 Link Here
765
	// und raus damit
769
	// und raus damit
766
	Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
770
	Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
767
771
768
	for( n = 0; n < pColTbl->Count(); n++ )
772
	for( n = 0; n < pColTbl->size(); n++ )
769
	{
773
	{
770
		const Color& rCol = (*pColTbl)[ n ];
774
		const Color& rCol = (*pColTbl)[ n ];
771
		if( n || COL_AUTO != rCol.GetColor() )
775
		if( n || COL_AUTO != rCol.GetColor() )
Lines 1345-1356 Link Here
1345
1349
1346
USHORT SwRTFWriter::GetId( const Color& rColor ) const
1350
USHORT SwRTFWriter::GetId( const Color& rColor ) const
1347
{
1351
{
1348
	ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" );
1352
	ASSERT( pColTbl, "Where's color table?" );
1349
	for( USHORT n = 0; n < pColTbl->Count(); n++ )
1353
	for( size_t n = 0; n < pColTbl->size(); n++ )
1350
		if( rColor == (*pColTbl)[ n ] )
1354
		if( rColor == (*pColTbl)[ n ] )
1351
			return n;
1355
			return n;
1352
1356
1353
	ASSERT( FALSE, "Color nicht in der Tabelle" );
1357
	ASSERT( FALSE, "Color not exists in the pColTbl table" );
1354
	return 0;
1358
	return 0;
1355
}
1359
}
1356
1360
(-)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
{
(-)a/sw/source/ui/docvw/srcedtw.cxx (-22 / +18 lines)
Lines 62-67 Link Here
62
#ifndef _HELPID_H
62
#ifndef _HELPID_H
63
#include <helpid.h>
63
#include <helpid.h>
64
#endif
64
#endif
65
#include <deque>
66
65
67
66
68
67
struct SwTextPortion
69
struct SwTextPortion
Lines 75-91 Link Here
75
#define MAX_HIGHLIGHTTIME 200
77
#define MAX_HIGHLIGHTTIME 200
76
#define SYNTAX_HIGHLIGHT_TIMEOUT 200
78
#define SYNTAX_HIGHLIGHT_TIMEOUT 200
77
79
78
SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16)
80
typedef std::deque<SwTextPortion> SwTextPortions;
79
81
80
/* -----------------15.01.97 12.07-------------------
81
82
--------------------------------------------------*/
83
84
SV_IMPL_VARARR(SwTextPortions, SwTextPortion)
85
86
/*-----------------15.01.97 12.08-------------------
87
88
--------------------------------------------------*/
89
82
90
static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
83
static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
91
{
84
{
Lines 101-111 Link Here
101
94
102
95
103
	const USHORT nStrLen = rSource.Len();
96
	const USHORT nStrLen = rSource.Len();
104
	USHORT nInsert = 0;			// Anzahl der eingefuegten Portions
97
	USHORT nInsert = 0;				// Number of inserted Portions
105
	USHORT nActPos = 0;			//Position, an der '<' gefunden wurde
98
	USHORT nActPos = 0;				// Position, at the '<' was found
106
	USHORT nOffset = 0; 		//Offset von nActPos zur '<'
99
	USHORT nOffset = 0; 			// Offset of nActPos for '<'
107
	USHORT nPortStart = USHRT_MAX; 	// fuer die TextPortion
100
	USHORT nPortStart = USHRT_MAX; 	// For the TextPortion
108
	USHORT nPortEnd  = 	0;  //
101
	USHORT nPortEnd  = 	0;  		//
109
	SwTextPortion aText;
102
	SwTextPortion aText;
110
	while(nActPos < nStrLen)
103
	while(nActPos < nStrLen)
111
	{
104
	{
Lines 122-128 Link Here
122
					aText.nStart += 1;
115
					aText.nStart += 1;
123
				aText.nEnd = nActPos - 1;
116
				aText.nEnd = nActPos - 1;
124
                aText.eType = svtools::HTMLUNKNOWN;
117
                aText.eType = svtools::HTMLUNKNOWN;
125
				aPortionList.Insert(aText, nInsert++);
118
				aPortionList.push_back( aText );
119
                nInsert++;
126
			}
120
			}
127
			sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
121
			sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
128
			sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
122
			sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
Lines 212-218 Link Here
212
                    aTextPortion.nStart = nPortStart + 1;
206
                    aTextPortion.nStart = nPortStart + 1;
213
                    aTextPortion.nEnd = nPortEnd;
207
                    aTextPortion.nEnd = nPortEnd;
214
                    aTextPortion.eType = eFoundType;
208
                    aTextPortion.eType = eFoundType;
215
                    aPortionList.Insert(aTextPortion, nInsert++);
209
                    aPortionList.push_back( aTextPortion ); 
210
                    nInsert++;
216
                    eFoundType = svtools::HTMLUNKNOWN;
211
                    eFoundType = svtools::HTMLUNKNOWN;
217
				}
212
				}
218
213
Lines 226-232 Link Here
226
		aText.nStart = nPortEnd + 1;
221
		aText.nStart = nPortEnd + 1;
227
		aText.nEnd = nActPos - 1;
222
		aText.nEnd = nActPos - 1;
228
        aText.eType = svtools::HTMLUNKNOWN;
223
        aText.eType = svtools::HTMLUNKNOWN;
229
		aPortionList.Insert(aText, nInsert++);
224
		aPortionList.push_back( aText );
225
        nInsert++;
230
	}
226
	}
231
}
227
}
232
228
Lines 749-755 Link Here
749
	SwTextPortions aPortionList;
745
	SwTextPortions aPortionList;
750
	lcl_Highlight(rSource, aPortionList);
746
	lcl_Highlight(rSource, aPortionList);
751
747
752
	USHORT nCount = aPortionList.Count();
748
	size_t nCount = aPortionList.size();
753
	if ( !nCount )
749
	if ( !nCount )
754
		return;
750
		return;
755
751
Lines 757-763 Link Here
757
	if ( rLast.nStart > rLast.nEnd ) 	// Nur bis Bug von MD behoeben
753
	if ( rLast.nStart > rLast.nEnd ) 	// Nur bis Bug von MD behoeben
758
	{
754
	{
759
		nCount--;
755
		nCount--;
760
		aPortionList.Remove( nCount);
756
		aPortionList.pop_back();
761
		if ( !nCount )
757
		if ( !nCount )
762
			return;
758
			return;
763
	}
759
	}
Lines 777-783 Link Here
777
#ifdef DBG_UTIL
773
#ifdef DBG_UTIL
778
        USHORT nLine = aPortionList[0].nLine;
774
        USHORT nLine = aPortionList[0].nLine;
779
#endif
775
#endif
780
		for ( USHORT i = 0; i < nCount; i++ )
776
		for ( size_t i = 0; i < nCount; i++ )
781
		{
777
		{
782
			SwTextPortion& r = aPortionList[i];
778
			SwTextPortion& r = aPortionList[i];
783
			DBG_ASSERT( r.nLine == nLine, "doch mehrere Zeilen ?" );
779
			DBG_ASSERT( r.nLine == nLine, "doch mehrere Zeilen ?" );
Lines 796-802 Link Here
796
		}
792
		}
797
	}
793
	}
798
794
799
	for ( USHORT i = 0; i < aPortionList.Count(); i++ )
795
	for ( size_t i = 0; i < aPortionList.size(); i++ )
800
	{
796
	{
801
		SwTextPortion& r = aPortionList[i];
797
		SwTextPortion& r = aPortionList[i];
802
		if ( r.nStart > r.nEnd ) 	// Nur bis Bug von MD behoeben
798
		if ( r.nStart > r.nEnd ) 	// Nur bis Bug von MD behoeben

Return to issue 112395