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

(-)a/basctl/source/basicide/baside2b.cxx (-4 / +6 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-782 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.at(i);
780
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
782
			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
781
			pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, TRUE );
783
			pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, TRUE );
782
		}
784
		}
(-)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 / +3 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 )
Lines 365-370 Link Here
365
	void					SetActiveChild_Impl( Window *pChild );
365
	void					SetActiveChild_Impl( Window *pChild );
366
	Window*					GetActiveChild_Impl();
366
	Window*					GetActiveChild_Impl();
367
	virtual BOOL			ActivateNextChild_Impl( BOOL bForward = TRUE );
367
	virtual BOOL			ActivateNextChild_Impl( BOOL bForward = TRUE );
368
    bool                    AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
368
369
369
	// Methoden f"ur StatusBar
370
	// Methoden f"ur StatusBar
370
    void                    SetTempStatusBar_Impl( BOOL bSet );
371
    void                    SetTempStatusBar_Impl( BOOL bSet );
(-)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/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/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 ist ungueltig !");
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

Return to issue 112395