[Libreoffice-commits] .: 14 commits - sd/source svx/inc svx/source tools/Library_tl.mk tools/inc tools/source
Michael Stahl
mst at kemper.freedesktop.org
Thu Aug 16 09:46:33 PDT 2012
sd/source/ui/func/sdundogr.cxx | 20
sd/source/ui/inc/sdundogr.hxx | 6
sd/source/ui/view/sdview3.cxx | 20
svx/inc/svx/fmpage.hxx | 1
svx/inc/svx/svdlayer.hxx | 2
svx/inc/svx/svdmodel.hxx | 18
svx/inc/svx/svdpage.hxx | 35 -
svx/inc/svx/svdundo.hxx | 7
svx/inc/svx/xtable.hxx | 2
svx/source/svdraw/svdfmtf.hxx | 23
svx/source/svdraw/svdlayer.cxx | 6
svx/source/svdraw/svdmodel.cxx | 129 ++--
svx/source/svdraw/svdopath.cxx | 8
svx/source/svdraw/svdotxat.cxx | 32 -
svx/source/svdraw/svdpage.cxx | 2
svx/source/svdraw/svdundo.cxx | 6
tools/Library_tl.mk | 1
tools/inc/impcont.hxx | 106 ---
tools/inc/tools/contnr.hxx | 74 --
tools/source/memtools/contnr.cxx | 1234 ---------------------------------------
tools/source/memtools/unqidx.cxx | 1
21 files changed, 178 insertions(+), 1555 deletions(-)
New commits:
commit ca166a7a42d5c9cde3cf9385e58523168c2f186c
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 15:52:51 2012 +0200
Remove the Container class
Change-Id: I296d2c90af59524280c2582670c6cfe7a10f2269
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index 966a26d..23d534f 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -72,7 +72,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/inet/inetmime \
tools/source/inet/inetmsg \
tools/source/inet/inetstrm \
- tools/source/memtools/contnr \
tools/source/memtools/mempool \
tools/source/memtools/multisel \
tools/source/memtools/unqidx \
diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx
deleted file mode 100644
index 1cfb374..0000000
--- a/tools/inc/impcont.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _IMPCONT_HXX
-#define _IMPCONT_HXX
-
-#include <tools/tools.h>
-#include <tools/contnr.hxx>
-
-typedef void* PVOID;
-
-class CBlock
-{
-private:
- CBlock* pPrev; ///< Previous block
- CBlock* pNext; ///< Next block
- sal_uInt16 nSize; ///< block size
- sal_uInt16 nCount; ///< number of pointers
- void** pNodes; ///< stores node pointers
-
-#if defined DBG_UTIL
- static char const * DbgCheckCBlock(void const *);
-#endif
-
-public:
- /// used for list container
- CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext );
- /// used for array container
- CBlock( sal_uInt16 nSize, CBlock* pPrev );
- /// Copy-Ctor
- CBlock( const CBlock& r, CBlock* pPrev );
- ~CBlock();
-
- void Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
- CBlock* Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
- void* Remove( sal_uInt16 nIndex, sal_uInt16 nReSize );
- void* Replace( void* pNew, sal_uInt16 nIndex );
-
- void** GetNodes() const { return pNodes; }
- void** GetObjectPtr( sal_uInt16 nIndex );
- void* GetObject( sal_uInt16 nIndex ) const;
-
- sal_uInt16 GetSize() const { return nCount; }
- sal_uInt16 Count() const { return nCount; }
- void SetPrevBlock( CBlock* p ) { pPrev = p; }
- void SetNextBlock( CBlock* p ) { pNext = p; }
- CBlock* GetPrevBlock() const { return pPrev; }
- CBlock* GetNextBlock() const { return pNext; }
- void Reset() { nCount = 0; }
-
-private:
- CBlock( const CBlock& r );
-
- friend class Container;
-};
-
-/// @return a node pointer given a block index
-inline void* CBlock::GetObject( sal_uInt16 nIndex ) const
-{
- return pNodes[nIndex];
-}
-
-/** A pointer is often located in the first block, thus check this position
- before calling GetObject.
- */
-inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
-{
- if ( pFirstBlock && (nIndex < pFirstBlock->Count()) )
- // Return item within the found block
- return pFirstBlock->GetObject( (sal_uInt16)nIndex );
- else
- return GetObject( nIndex );
-}
-
-// #i70651#: Prevent warnings on Mac OS X
-#ifdef MACOSX
-#pragma GCC system_header
-#endif
-
-/// If only one block exists, return its data array.
-inline void** Container::ImpGetOnlyNodes() const
-{
- if ( (pFirstBlock == pLastBlock) && pFirstBlock )
- return pFirstBlock->GetNodes();
- else
- return NULL;
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx
index 13e2d34..5b31f68 100644
--- a/tools/inc/tools/contnr.hxx
+++ b/tools/inc/tools/contnr.hxx
@@ -24,84 +24,10 @@
#include <limits.h>
-class CBlock;
-
-#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0)
#define CONTAINER_APPEND ULONG_MAX
#define CONTAINER_ENTRY_NOTFOUND ULONG_MAX
-
#define LIST_APPEND CONTAINER_APPEND
-class TOOLS_DLLPUBLIC Container
-{
-private:
- CBlock* pFirstBlock;
- CBlock* pCurBlock;
- CBlock* pLastBlock;
- sal_uInt16 nCurIndex;
- sal_uInt16 nBlockSize;
- sal_uInt16 nInitSize;
- sal_uInt16 nReSize;
- sal_uIntPtr nCount;
-
- TOOLS_DLLPRIVATE void ImpCopyContainer(Container const *);
-#if defined DBG_UTIL
- TOOLS_DLLPRIVATE static char const * DbgCheckContainer(void const *);
-#endif
-
-protected:
-#ifdef _IMPCONT_HXX
- void ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex );
- void* ImpRemove( CBlock* pBlock, sal_uInt16 nIndex );
- void* ImpGetObject( sal_uIntPtr nIndex ) const;
- void** ImpGetOnlyNodes() const;
-#endif
-
-public:
- Container( sal_uInt16 nBlockSize,
- sal_uInt16 nInitSize,
- sal_uInt16 nReSize );
- Container( sal_uIntPtr nSize );
- Container( const Container& rContainer );
- ~Container();
-
- void Insert( void* p );
- void Insert( void* p, sal_uIntPtr nIndex );
-
- void* Remove();
- void* Remove( sal_uIntPtr nIndex );
- void* Remove( void* p )
- { return Remove( GetPos( p ) ); }
-
- void* Replace( void* p, sal_uIntPtr nIndex );
- void* Replace( void* pNew, void* pOld )
- { return Replace( pNew, GetPos( pOld ) ); }
-
- sal_uIntPtr GetSize() const { return nCount; }
-
- sal_uIntPtr Count() const { return nCount; }
- void Clear();
-
- void* GetCurObject() const;
- sal_uIntPtr GetCurPos() const;
- void* GetObject( sal_uIntPtr nIndex ) const;
- sal_uIntPtr GetPos( const void* p ) const;
-
- void* Seek( sal_uIntPtr nIndex );
- void* Seek( void* p ) { return Seek( GetPos( p ) ); }
-
- void* First();
- void* Last();
- void* Next();
- void* Prev();
-
- Container& operator =( const Container& rContainer );
-
- sal_Bool operator ==( const Container& rContainer ) const;
- sal_Bool operator !=( const Container& rContainer ) const
- { return !(Container::operator==( rContainer )); }
-};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/memtools/contnr.cxx b/tools/source/memtools/contnr.cxx
deleted file mode 100644
index b3232a2..0000000
--- a/tools/source/memtools/contnr.cxx
+++ /dev/null
@@ -1,1234 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <limits.h>
-
-#include <string.h>
-
-#include <stdio.h>
-#include <tools/solar.h>
-#include <impcont.hxx>
-#include <tools/contnr.hxx>
-#include <tools/debug.hxx>
-
-// -----------------------------------------------------------------------
-
-DBG_NAME( CBlock )
-DBG_NAME( Container )
-
-/*************************************************************************
-|*
-|* DbgCheckCBlock()
-|*
-|* Beschreibung Pruefung eines CBlock fuer Debug-Utilities
-|*
-*************************************************************************/
-
-#ifdef DBG_UTIL
-const char* CBlock::DbgCheckCBlock( const void* pBlock )
-{
- CBlock* p = (CBlock*)pBlock;
-
- if ( p->nCount > p->nSize )
- return "nCount > nSize";
-
- if ( p->nSize && !p->pNodes )
- return "nSize > 0 && pNodes == NULL";
-
- return NULL;
-}
-#endif
-
-/*************************************************************************
-|*
-|* CBlock::CBlock()
-|*
-|* Beschreibung Construktor des Verwaltungsblocks
-|*
-*************************************************************************/
-
-CBlock::CBlock( sal_uInt16 nInitSize, CBlock* _pPrev, CBlock* _pNext )
-{
- DBG_CTOR( CBlock, DbgCheckCBlock );
-
- pPrev = _pPrev;
- pNext = _pNext;
- nSize = nInitSize;
- nCount = 0;
-
- // Datenpuffer anlegen
- pNodes = new PVOID[nSize];
-}
-
-/*************************************************************************
-|*
-|* CBlock::CBlock()
-|*
-|* Beschreibung Construktor des Verwaltungsblocks
-|*
-*************************************************************************/
-
-CBlock::CBlock( sal_uInt16 _nSize, CBlock* _pPrev )
-{
- DBG_CTOR( CBlock, DbgCheckCBlock );
- DBG_ASSERT( _nSize, "CBlock::CBlock(): nSize == 0" );
-
- pPrev = _pPrev;
- pNext = NULL;
- nSize = _nSize;
- nCount = _nSize;
-
- // Datenpuffer anlegen und initialisieren
- pNodes = new PVOID[nSize];
- memset( pNodes, 0, nSize*sizeof(PVOID) );
-}
-
-/*************************************************************************
-|*
-|* CBlock::CBlock()
-|*
-|* Beschreibung Copy-Construktor des Verwaltungsblocks
-|*
-*************************************************************************/
-
-CBlock::CBlock( const CBlock& r, CBlock* _pPrev )
-{
- DBG_CTOR( CBlock, DbgCheckCBlock );
- DBG_CHKOBJ( &r, CBlock, DbgCheckCBlock );
-
- pPrev = _pPrev;
- pNext = NULL;
- nSize = r.nSize;
- nCount = r.nCount;
-
- // Datenpuffer anlegen und Daten kopieren
- pNodes = new PVOID[nSize];
- memcpy( pNodes, r.pNodes, nCount*sizeof(PVOID) );
-}
-
-/*************************************************************************
-|*
-|* CBlock::~CBlock()
-|*
-|* Beschreibung Destruktor des Verwaltungsblocks
-|*
-*************************************************************************/
-
-inline CBlock::~CBlock()
-{
- DBG_DTOR( CBlock, DbgCheckCBlock );
-
- // Daten loeschen
- delete[] pNodes;
-}
-
-/*************************************************************************
-|*
-|* CBlock::Insert()
-|*
-|* Beschreibung Fuegt einen Pointer ein
-|*
-*************************************************************************/
-
-void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
-{
- DBG_CHKTHIS( CBlock, DbgCheckCBlock );
- DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" );
-
- // Muss Block realokiert werden
- if ( nCount == nSize )
- {
- // Neue Daten anlegen
- nSize = nSize + nReSize; // MSVC warns here if += is used
- void** pNewNodes = new PVOID[nSize];
-
- // Wird angehaengt
- if ( nCount == nIndex )
- {
- // Daten kopieren
- memcpy( pNewNodes, pNodes, nCount*sizeof(PVOID) );
- }
- else
- {
- // Daten kopieren
- memcpy( pNewNodes, pNodes, nIndex*sizeof(PVOID) );
- memcpy( pNewNodes + nIndex + 1,
- pNodes + nIndex,
- (nCount-nIndex)*sizeof(PVOID) );
- }
-
- // Alte Daten loeschen und neue setzen
- delete[] pNodes;
- pNodes = pNewNodes;
- }
- else
- {
- if ( nIndex < nCount )
- {
- memmove( pNodes + nIndex + 1,
- pNodes + nIndex,
- (nCount-nIndex)*sizeof(PVOID) );
- }
- }
-
- // Neuen Pointer setzen und Elementgroesse erhoehen
- pNodes[nIndex] = p;
- nCount++;
-}
-
-/*************************************************************************
-|*
-|* CBlock::Split()
-|*
-|* Beschreibung Fuegt einen Pointer ein und splittet den Block
-|*
-*************************************************************************/
-
-CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
-{
- DBG_CHKTHIS( CBlock, DbgCheckCBlock );
-
- sal_uInt16 nNewSize;
- sal_uInt16 nMiddle;
- CBlock* pNewBlock;
-
- nMiddle = nCount/2;
-
- if ( ( nIndex == nCount ) || ( nIndex == 0 ) )
- nNewSize = nReSize;
- else
- {
- // Der aktuelle Block wird in der Mitte geteilt
- nNewSize = (nCount+1) / 2;
-
- if ( nNewSize < nReSize )
- nNewSize = nReSize;
- else
- {
- // Neue Groesse muss ein vielfaches von Resize sein
- if ( nNewSize % nReSize )
- nNewSize += nReSize - (nNewSize % nReSize);
- else
- nNewSize = nNewSize + nReSize; // MSVC warns here if += is used
- }
- }
-
- // Vor oder hinter dem aktuellem Block einfuegen?
- if ( nIndex > nMiddle )
- {
- // Neuen Split-Block anlegen und hinter dem aktuellem Block einfuegen
- pNewBlock = new CBlock( nNewSize, this, pNext );
-
- if ( pNext )
- pNext->pPrev = pNewBlock;
- pNext = pNewBlock;
-
- if ( nIndex == nCount )
- {
- // Neuen Pointer einfuegen
- pNewBlock->pNodes[0] = p;
- pNewBlock->nCount = 1;
- }
- else
- {
- nIndex = nIndex - nMiddle; // MSVC warns here if += is used
- // Alles von Mitte bis Index kopieren
- if ( nIndex )
- memcpy( pNewBlock->pNodes, pNodes+nMiddle, nIndex*sizeof(PVOID) );
-
- // Neuen Pointer einfuegen
- pNewBlock->pNodes[nIndex] = p;
-
- // Alles von Mitte bis Ende hinter Index kopieren
- memcpy( pNewBlock->pNodes+nIndex+1,
- pNodes+nMiddle+nIndex,
- (nCount-nMiddle-nIndex) * sizeof(PVOID) );
-
- pNewBlock->nCount = (nCount-nMiddle+1);
- nCount = nMiddle;
-
- // Den aktuellen Datenbereich auch halbieren
- if ( nSize != nNewSize )
- {
- void** pNewNodes = new PVOID[nNewSize];
- memcpy( pNewNodes, pNodes, nCount*sizeof(PVOID) );
- delete[] pNodes;
- pNodes = pNewNodes;
- nSize = nNewSize;
- }
- }
- }
- else
- {
- // Neuen Split-Block anlegen und vor dem aktuellem Block einfuegen
- pNewBlock = new CBlock( nNewSize, pPrev, this );
-
- if ( pPrev )
- pPrev->pNext = pNewBlock;
- pPrev = pNewBlock;
-
- if ( nIndex == 0 )
- {
- // Neuen Pointer einfuegen
- pNewBlock->pNodes[0] = p;
- pNewBlock->nCount = 1;
- }
- else
- {
- // Alles von Anfang bis Index kopieren
- memcpy( pNewBlock->pNodes, pNodes, nIndex*sizeof(PVOID) );
-
- // Neuen Pointer einfuegen
- pNewBlock->pNodes[nIndex] = p;
-
- // Alles von Index bis Mitte hinter Index kopieren
- if ( nIndex != nMiddle )
- {
- memcpy( pNewBlock->pNodes+nIndex+1,
- pNodes+nIndex,
- (nMiddle-nIndex) * sizeof(PVOID) );
- }
-
- pNewBlock->nCount = nMiddle+1;
- nCount = nCount - nMiddle; // MSVC warns here if += is used
-
- // Die zweite Haelfte in einen neuen Block kopieren
- if ( nSize != nNewSize )
- {
- void** pNewNodes = new PVOID[nNewSize];
- memcpy( pNewNodes, pNodes+nMiddle, nCount*sizeof(PVOID) );
- delete[] pNodes;
- pNodes = pNewNodes;
- nSize = nNewSize;
- }
- else
- memmove( pNodes, pNodes+nMiddle, nCount*sizeof(PVOID) );
- }
- }
-
- // Neu angelegten Block zurueckgeben, da gegebenfalls die Blockpointer
- // im Container angepast werden koennen
- return pNewBlock;
-}
-
-/*************************************************************************
-|*
-|* CBlock::Remove()
-|*
-|* Beschreibung Entfernt einen Pointer
-|*
-*************************************************************************/
-
-void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize )
-{
- DBG_CHKTHIS( CBlock, DbgCheckCBlock );
-
- // Alten Pointer sichern
- void* pOld = pNodes[nIndex];
-
- // 1 Element weniger
- nCount--;
-
- // Block verkleinern (wenn Reallokationsgroesse um 4 unterschritten wird)
- if ( nCount == (nSize-nReSize-4) )
- {
- // Neue Daten anlegen
- nSize = nSize - nReSize; // MSVC warns here if += is used
- void** pNewNodes = new PVOID[nSize];
-
- // Wird letzter Eintrag geloescht
- if ( nIndex == nCount )
- {
- // Daten kopieren
- memcpy( pNewNodes, pNodes, nCount*sizeof(PVOID) );
- }
- else
- {
- // Daten kopieren
- memcpy( pNewNodes, pNodes, nIndex*sizeof(PVOID) );
- memcpy( pNewNodes + nIndex, pNodes + nIndex+1,
- (nCount-nIndex)*sizeof(PVOID) );
- }
-
- // Alte Daten loeschen und neue setzen
- delete[] pNodes;
- pNodes = pNewNodes;
- }
- else
- {
- // Wenn nicht das letzte Element, dann zusammenschieben
- if ( nIndex < nCount )
- {
- memmove( pNodes + nIndex, pNodes + nIndex + 1,
- (nCount-nIndex)*sizeof(PVOID) );
- }
- }
-
- // Alten Pointer zurueckgeben
- return pOld;
-}
-
-/*************************************************************************
-|*
-|* CBlock::Replace()
-|*
-|* Beschreibung Ersetzt einen Pointer
-|*
-*************************************************************************/
-
-inline void* CBlock::Replace( void* p, sal_uInt16 nIndex )
-{
- DBG_CHKTHIS( CBlock, DbgCheckCBlock );
-
- // Alten Pointer sichern, neuen setzen und alten zurueckgeben
- void* pOld = pNodes[nIndex];
- pNodes[nIndex] = p;
- return pOld;
-}
-
-/*************************************************************************
-|*
-|* CBlock::GetObjectPtr()
-|*
-|* Beschreibung Gibt einen Pointer auf den Pointer aus dem Block
-|* zurueck
-|*
-*************************************************************************/
-
-inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex )
-{
- DBG_CHKTHIS( CBlock, DbgCheckCBlock );
-
- return &(pNodes[nIndex]);
-}
-
-//------------------------------------------------------------------------
-
-/*************************************************************************
-|*
-|* DbgCheckContainer()
-|*
-|* Beschreibung Pruefung eines Container fuer Debug-Utilities
-|*
-*************************************************************************/
-
-#ifdef DBG_UTIL
-const char* Container::DbgCheckContainer( const void* pCont )
-{
- Container* p = (Container*)pCont;
-
- if ( p->nCount && (!p->pFirstBlock || !p->pLastBlock || !p->pCurBlock) )
- return "nCount > 0 but no CBlocks";
-
- return NULL;
-}
-#endif
-
-/*************************************************************************
-|*
-|* ImpCopyContainer()
-|*
-|* Beschreibung Kopiert alle Daten des Containers
-|*
-*************************************************************************/
-
-void Container::ImpCopyContainer( const Container* pCont2 )
-{
- // Werte vom uebergebenen Container uebernehmen
- nCount = pCont2->nCount;
- nCurIndex = pCont2->nCurIndex;
- nInitSize = pCont2->nInitSize;
- nReSize = pCont2->nReSize;
- nBlockSize = pCont2->nBlockSize;
-
- // Alle Bloecke kopieren
- if ( pCont2->nCount )
- {
- CBlock* pBlock1;
- CBlock* pBlock2;
- CBlock* pTempBlock;
-
- // Erstmal ersten Block kopieren
- pBlock2 = pCont2->pFirstBlock;
- pFirstBlock = new CBlock( *pBlock2, NULL );
- // Ist erster Block der Current-Block, dann Current-Block setzen
- if ( pBlock2 == pCont2->pCurBlock )
- pCurBlock = pFirstBlock;
- pBlock1 = pFirstBlock;
- pBlock2 = pBlock2->GetNextBlock();
- while ( pBlock2 )
- {
- // Neuen Block anlegen und aus der uebergebenen Liste kopieren
- pTempBlock = new CBlock( *pBlock2, pBlock1 );
- pBlock1->SetNextBlock( pTempBlock );
- pBlock1 = pTempBlock;
-
- // Current-Block beruecksichtigen
- if ( pBlock2 == pCont2->pCurBlock )
- pCurBlock = pBlock1;
-
- // Auf naechsten Block weitersetzen
- pBlock2 = pBlock2->GetNextBlock();
- }
-
- // Letzten Block setzen
- pLastBlock = pBlock1;
- }
- else
- {
- pFirstBlock = NULL;
- pLastBlock = NULL;
- pCurBlock = NULL;
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Container()
-|*
-*************************************************************************/
-
-Container::Container( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize )
-{
- DBG_CTOR( Container, DbgCheckContainer );
-
- // BlockSize muss mindestens 4 sein und kleiner als 64 KB
- if ( _nBlockSize < 4 )
- nBlockSize = 4;
- else
- {
- if ( _nBlockSize < CONTAINER_MAXBLOCKSIZE )
- nBlockSize = _nBlockSize;
- else
- nBlockSize = CONTAINER_MAXBLOCKSIZE;
- }
-
- // ReSize muss mindestens 2 sein und kleiner als BlockSize
- if ( _nReSize >= nBlockSize )
- nReSize = nBlockSize;
- else
- {
- if ( _nReSize < 2 )
- nReSize = 2;
- else
- nReSize = _nReSize;
-
- // BlockSize muss ein vielfaches der Resizegroesse sein
- if ( nBlockSize % nReSize )
- nBlockSize -= nReSize - (nBlockSize % nReSize);
- }
-
- // InitSize muss groesser gleich ReSize sein und kleiner als BlockSize
- if ( _nInitSize <= nReSize )
- nInitSize = nReSize;
- else
- {
- if ( _nInitSize >= nBlockSize )
- nInitSize = nBlockSize;
- else
- {
- nInitSize = _nInitSize;
-
- // InitSize muss ein vielfaches der Resizegroesse sein
- if ( nInitSize % nReSize )
- nInitSize -= nReSize - (nInitSize % nReSize);
- }
- }
-
- // Werte initialisieren
- pFirstBlock = NULL;
- pLastBlock = NULL;
- pCurBlock = NULL;
- nCount = 0;
- nCurIndex = 0;
-}
-
-/*************************************************************************
-|*
-|* Container::Container()
-|*
-*************************************************************************/
-
-Container::Container( sal_uIntPtr nSize )
-{
- DBG_CTOR( Container, DbgCheckContainer );
-
- nCount = nSize;
- nCurIndex = 0;
- nBlockSize = CONTAINER_MAXBLOCKSIZE;
- nInitSize = 1;
- nReSize = 1;
-
- if ( !nSize )
- {
- pFirstBlock = NULL;
- pLastBlock = NULL;
- pCurBlock = NULL;
- }
- else
- {
- // Muss mehr als ein Block angelegt werden
- if ( nSize <= nBlockSize )
- {
- pFirstBlock = new CBlock( (sal_uInt16)nSize, NULL );
- pLastBlock = pFirstBlock;
- }
- else
- {
- CBlock* pBlock1;
- CBlock* pBlock2;
-
- pFirstBlock = new CBlock( nBlockSize, NULL );
- pBlock1 = pFirstBlock;
- nSize -= nBlockSize;
-
- // Solange die Blockgroesse ueberschritten wird, neue Bloecke anlegen
- while ( nSize > nBlockSize )
- {
- pBlock2 = new CBlock( nBlockSize, pBlock1 );
- pBlock1->SetNextBlock( pBlock2 );
- pBlock1 = pBlock2;
- nSize -= nBlockSize;
- }
-
- pLastBlock = new CBlock( (sal_uInt16)nSize, pBlock1 );
- pBlock1->SetNextBlock( pLastBlock );
- }
-
- pCurBlock = pFirstBlock;
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Container()
-|*
-*************************************************************************/
-
-Container::Container( const Container& r )
-{
- DBG_CTOR( Container, DbgCheckContainer );
-
- // Daten kopieren
- ImpCopyContainer( &r );
-}
-
-/*************************************************************************
-|*
-|* Container::~Container()
-|*
-*************************************************************************/
-
-Container::~Container()
-{
- DBG_DTOR( Container, DbgCheckContainer );
-
- // Alle Bloecke loeschen
- CBlock* pBlock = pFirstBlock;
- while ( pBlock )
- {
- CBlock* pTemp = pBlock->GetNextBlock();
- delete pBlock;
- pBlock = pTemp;
- }
-}
-
-/*************************************************************************
-|*
-|* Container::ImpInsert()
-|*
-|* Beschreibung Interne Methode zum Einfuegen eines Pointers
-|*
-*************************************************************************/
-
-void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex )
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- if ( !nCount )
- {
- if ( !pBlock )
- {
- pFirstBlock = new CBlock( nInitSize, NULL, NULL );
- pLastBlock = pFirstBlock;
- pCurBlock = pFirstBlock;
- }
- pFirstBlock->Insert( p, nIndex, nReSize );
- }
- else
- {
- // Ist im Block die maximale Blockgroesse erreicht,
- // dann neuen Block anlegen
- if ( pBlock->Count() == nBlockSize )
- {
- // Block auftrennen
- CBlock* pNewBlock = pBlock->Split( p, nIndex, nReSize );
-
- // Wurde Block dahinter angehaegnt
- if ( pBlock->pNext == pNewBlock )
- {
- // Gegebenenfalls LastBlock anpassen
- if ( pBlock == pLastBlock )
- pLastBlock = pNewBlock;
-
- // Current-Position nachfuehren
- if ( pBlock == pCurBlock )
- {
- if ( pBlock->nCount <= nCurIndex )
- {
- if ( nIndex <= nCurIndex )
- nCurIndex++;
- pCurBlock = pNewBlock;
- nCurIndex = nCurIndex - pBlock->nCount; // MSVC warns here if += is used
- }
- }
- }
- else
- {
- // Gegebenenfalls FirstBlock anpassen
- if ( pBlock == pFirstBlock )
- pFirstBlock = pNewBlock;
-
- // Current-Position nachfuehren
- if ( pBlock == pCurBlock )
- {
- if ( nIndex <= nCurIndex )
- nCurIndex++;
- if ( pNewBlock->nCount <= nCurIndex )
- nCurIndex = nCurIndex - pNewBlock->nCount; // MSVC warns here if += is used
- else
- pCurBlock = pNewBlock;
- }
- }
- }
- else
- {
- // Sonst reicht normales einfuegen in den Block
- pBlock->Insert( p, nIndex, nReSize );
-
- // Current-Position nachfuehren
- if ( (pBlock == pCurBlock) && (nIndex <= nCurIndex) )
- nCurIndex++;
- }
- }
-
- // Ein neues Item im Container
- nCount++;
-}
-
-/*************************************************************************
-|*
-|* Container::Insert()
-|*
-*************************************************************************/
-
-void Container::Insert( void* p )
-{
- ImpInsert( p, pCurBlock, nCurIndex );
-}
-
-/*************************************************************************
-|*
-|* Container::Insert()
-|*
-*************************************************************************/
-
-void Container::Insert( void* p, sal_uIntPtr nIndex )
-{
- if ( nCount <= nIndex )
- {
- if ( pLastBlock )
- ImpInsert( p, pLastBlock, pLastBlock->Count() );
- else
- ImpInsert( p, NULL, 0 );
- }
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- while ( pTemp->Count() < nIndex )
- {
- nIndex -= pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- ImpInsert( p, pTemp, (sal_uInt16)nIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::ImpRemove()
-|*
-|* Beschreibung Interne Methode zum Entfernen eines Pointers
-|*
-*************************************************************************/
-
-void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex )
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- void* pOld;
-
- // Ist Liste danach leer
- if ( nCount == 1 )
- {
- // Block und CurIndex zuruecksetzen
- pOld = pBlock->GetObject( nIndex );
- pBlock->Reset();
- nCurIndex = 0;
- }
- else
- {
- // Ist Block nach Remove leer
- if ( pBlock->Count() == 1 )
- {
- // dann Block entfernen und Block-Pointer umsetzen
- if ( pBlock->GetPrevBlock() )
- (pBlock->GetPrevBlock())->SetNextBlock( pBlock->GetNextBlock() );
- else
- pFirstBlock = pBlock->GetNextBlock();
-
- if ( pBlock->GetNextBlock() )
- (pBlock->GetNextBlock())->SetPrevBlock( pBlock->GetPrevBlock() );
- else
- pLastBlock = pBlock->GetPrevBlock();
-
- // Current-Position nachfuehren
- if ( pBlock == pCurBlock )
- {
- if ( pBlock->GetNextBlock() )
- {
- pCurBlock = pBlock->GetNextBlock();
- nCurIndex = 0;
- }
- else
- {
- pCurBlock = pBlock->GetPrevBlock();
- nCurIndex = pCurBlock->Count()-1;
- }
- }
-
- pOld = pBlock->GetObject( nIndex );
- delete pBlock;
- }
- else
- {
- // Sonst Item aus dem Block entfernen
- pOld = pBlock->Remove( nIndex, nReSize );
-
- // Current-Position nachfuehren
- if ( (pBlock == pCurBlock) &&
- ((nIndex < nCurIndex) || ((nCurIndex == pBlock->Count()) && nCurIndex)) )
- nCurIndex--;
- }
- }
-
- // Jetzt gibt es ein Item weniger
- nCount--;
-
- // Und den Pointer zurueckgeben, der entfernt wurde
- return pOld;
-}
-
-/*************************************************************************
-|*
-|* Container::Remove()
-|*
-*************************************************************************/
-
-void* Container::Remove()
-{
- // Wenn kein Item vorhanden ist, NULL zurueckgeben
- if ( !nCount )
- return NULL;
- else
- return ImpRemove( pCurBlock, nCurIndex );
-}
-
-/*************************************************************************
-|*
-|* Container::Remove()
-|*
-*************************************************************************/
-
-void* Container::Remove( sal_uIntPtr nIndex )
-{
- // Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
- if ( nCount <= nIndex )
- return NULL;
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- while ( pTemp->Count() <= nIndex )
- {
- nIndex -= pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- return ImpRemove( pTemp, (sal_uInt16)nIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Replace()
-|*
-*************************************************************************/
-
-void* Container::Replace( void* p, sal_uIntPtr nIndex )
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
- if ( nCount <= nIndex )
- return NULL;
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- while ( pTemp->Count() <= nIndex )
- {
- nIndex -= pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- return pTemp->Replace( p, (sal_uInt16)nIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Clear()
-|*
-*************************************************************************/
-
-void Container::Clear()
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Erst alle Bloecke loeschen
- CBlock* pBlock = pFirstBlock;
- while ( pBlock )
- {
- CBlock* pTemp = pBlock->GetNextBlock();
- delete pBlock;
- pBlock = pTemp;
- }
-
- // Werte zuruecksetzen
- pFirstBlock = NULL;
- pLastBlock = NULL;
- pCurBlock = NULL;
- nCount = 0;
- nCurIndex = 0;
-}
-
-/*************************************************************************
-|*
-|* Container::GetCurObject()
-|*
-*************************************************************************/
-
-void* Container::GetCurObject() const
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // NULL, wenn Container leer
- if ( !nCount )
- return NULL;
- else
- return pCurBlock->GetObject( nCurIndex );
-}
-
-/*************************************************************************
-|*
-|* Container::GetCurPos()
-|*
-*************************************************************************/
-
-sal_uIntPtr Container::GetCurPos() const
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // CONTAINER_ENTRY_NOTFOUND, wenn Container leer
- if ( !nCount )
- return CONTAINER_ENTRY_NOTFOUND;
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- sal_uIntPtr nTemp = 0;
- while ( pTemp != pCurBlock )
- {
- nTemp += pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- return nTemp+nCurIndex;
- }
-}
-
-/*************************************************************************
-|*
-|* Container::GetObject()
-|*
-*************************************************************************/
-
-void* Container::GetObject( sal_uIntPtr nIndex ) const
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
- if ( nCount <= nIndex )
- return NULL;
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- while ( pTemp->Count() <= nIndex )
- {
- nIndex -= pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- // Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObject( (sal_uInt16)nIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::GetPos()
-|*
-*************************************************************************/
-
-sal_uIntPtr Container::GetPos( const void* p ) const
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- void** pNodes;
- CBlock* pTemp;
- sal_uIntPtr nTemp;
- sal_uInt16 nBlockCount;
- sal_uInt16 i;
-
- // Block suchen
- pTemp = pFirstBlock;
- nTemp = 0;
- while ( pTemp )
- {
- pNodes = pTemp->GetNodes();
- i = 0;
- nBlockCount = pTemp->Count();
- while ( i < nBlockCount )
- {
- if ( p == *pNodes )
- return nTemp+i;
- pNodes++;
- i++;
- }
- nTemp += nBlockCount;
- pTemp = pTemp->GetNextBlock();
- }
-
- return CONTAINER_ENTRY_NOTFOUND;
-}
-
-/*************************************************************************
-|*
-|* Container::Seek()
-|*
-*************************************************************************/
-
-void* Container::Seek( sal_uIntPtr nIndex )
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist der Container leer, dann NULL zurueckgeben
- if ( nCount <= nIndex )
- return NULL;
- else
- {
- // Block suchen
- CBlock* pTemp = pFirstBlock;
- while ( pTemp->Count() <= nIndex )
- {
- nIndex -= pTemp->Count();
- pTemp = pTemp->GetNextBlock();
- }
-
- // Item innerhalb des gefundenen Blocks zurueckgeben
- pCurBlock = pTemp;
- nCurIndex = (sal_uInt16)nIndex;
- return pCurBlock->GetObject( nCurIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::First()
-|*
-*************************************************************************/
-
-void* Container::First()
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Container leer, dann NULL zurueckgeben
- if ( !nCount )
- return NULL;
- else
- {
- // Block und Index setzen und ersten Pointer zurueckgeben
- pCurBlock = pFirstBlock;
- nCurIndex = 0;
- return pCurBlock->GetObject( nCurIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Last()
-|*
-*************************************************************************/
-
-void* Container::Last()
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Container leer, dann NULL zurueckgeben
- if ( !nCount )
- return NULL;
- else
- {
- // Block und Index setzen und ersten Pointer zurueckgeben
- pCurBlock = pLastBlock;
- nCurIndex = pCurBlock->Count()-1;
- return pCurBlock->GetObject( nCurIndex );
- }
-}
-
-/*************************************************************************
-|*
-|* Container::Next()
-|*
-*************************************************************************/
-
-void* Container::Next()
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Container leer, dann NULL zurueckgeben, ansonsten preufen ob
- // naechste Position noch im aktuellen Block ist. Falls nicht, dann
- // einen Block weiterschalten (geht ohne Gefahr, da leere Bloecke
- // nicht vorkommen duerfen, es sein denn, es ist der einzige).
- if ( !nCount )
- return NULL;
- else if ( (nCurIndex+1) < pCurBlock->Count() )
- return pCurBlock->GetObject( ++nCurIndex );
- else if ( pCurBlock->GetNextBlock() )
- {
- pCurBlock = pCurBlock->GetNextBlock();
- nCurIndex = 0;
- return pCurBlock->GetObject( nCurIndex );
- }
- else
- return NULL;
-}
-
-/*************************************************************************
-|*
-|* Container::Prev()
-|*
-*************************************************************************/
-
-void* Container::Prev()
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Ist Container leer, dann NULL zurueckgeben, ansonsten preufen ob
- // vorherige Position noch im aktuellen Block ist. Falls nicht, dann
- // einen Block zurueckschalten (geht ohne Gefahr, da leere Bloecke
- // nicht vorkommen duerfen, es sein denn, es ist der einzige).
- if ( !nCount )
- return NULL;
- else if ( nCurIndex )
- return pCurBlock->GetObject( --nCurIndex );
- else if ( pCurBlock->GetPrevBlock() )
- {
- pCurBlock = pCurBlock->GetPrevBlock();
- nCurIndex = pCurBlock->Count() - 1;
- return pCurBlock->GetObject( nCurIndex );
- }
- else
- return NULL;
-}
-
-/*************************************************************************
-|*
-|* Container::operator =()
-|*
-*************************************************************************/
-
-Container& Container::operator =( const Container& r )
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- // Erst alle Bloecke loeschen
- CBlock* pBlock = pFirstBlock;
- while ( pBlock )
- {
- CBlock* pTemp = pBlock->GetNextBlock();
- delete pBlock;
- pBlock = pTemp;
- }
-
- // Daten kopieren
- ImpCopyContainer( &r );
- return *this;
-}
-
-/*************************************************************************
-|*
-|* Container::operator ==()
-|*
-*************************************************************************/
-
-sal_Bool Container::operator ==( const Container& r ) const
-{
- DBG_CHKTHIS( Container, DbgCheckContainer );
-
- if ( nCount != r.nCount )
- return sal_False;
-
- sal_uIntPtr i = 0;
- while ( i < nCount )
- {
- if ( GetObject( i ) != r.GetObject( i ) )
- return sal_False;
- i++;
- }
-
- return sal_True;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx
index 59a212a..c6224ad 100644
--- a/tools/source/memtools/unqidx.cxx
+++ b/tools/source/memtools/unqidx.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <impcont.hxx>
#include <tools/unqidx.hxx>
commit 0331e26fc6304dc16c876cde0e9a939cfe56bd53
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 15:34:15 2012 +0200
Convert from Container to std::vector
Change-Id: I329867ff6719a2c5a8fd4dca0a4907551be450e2
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 511dde2..80c408d 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -112,12 +112,12 @@ struct ImpRememberOrigAndClone
SdrObject* pClone;
};
-SdrObject* ImpGetClone(Container& aConnectorContainer, SdrObject* pConnObj)
+SdrObject* ImpGetClone(std::vector<ImpRememberOrigAndClone*>& aConnectorContainer, SdrObject* pConnObj)
{
- for(sal_uInt32 a(0); a < aConnectorContainer.Count(); a++)
+ for(sal_uInt32 a(0); a < aConnectorContainer.size(); a++)
{
- if(pConnObj == ((ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a))->pOrig)
- return ((ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a))->pClone;
+ if(pConnObj == aConnectorContainer[a]->pOrig)
+ return aConnectorContainer[a]->pClone;
}
return 0L;
}
@@ -438,7 +438,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
pMarkList->ForceSort();
// stuff to remember originals and clones
- Container aConnectorContainer(0);
+ std::vector<ImpRememberOrigAndClone*> aConnectorContainer;
sal_uInt32 a, nConnectorCount(0L);
Point aCurPos;
@@ -483,7 +483,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
ImpRememberOrigAndClone* pRem = new ImpRememberOrigAndClone;
pRem->pOrig = pM->GetMarkedSdrObj();
pRem->pClone = pObj;
- aConnectorContainer.Insert(pRem, CONTAINER_APPEND);
+ aConnectorContainer.push_back(pRem);
if(pObj->ISA(SdrEdgeObj))
nConnectorCount++;
@@ -493,9 +493,9 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
// try to re-establish connections at clones
if(nConnectorCount)
{
- for(a = 0; a < aConnectorContainer.Count(); a++)
+ for(a = 0; a < aConnectorContainer.size(); a++)
{
- ImpRememberOrigAndClone* pRem = (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
+ ImpRememberOrigAndClone* pRem = aConnectorContainer[a];
if(pRem->pClone->ISA(SdrEdgeObj))
{
@@ -570,8 +570,8 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
}
// cleanup remember classes
- for(a = 0; a < aConnectorContainer.Count(); a++)
- delete (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
+ for(a = 0; a < aConnectorContainer.size(); a++)
+ delete aConnectorContainer[a];
if( pMarkList != mpDragSrcMarkList )
delete pMarkList;
commit f482c9fdf3656d4ee80cfb48e342dbedfcab2467
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 15:21:27 2012 +0200
Convert local variable from Container to std::vector and std::set
Change-Id: I0b15939e1d04a3a2a5f8a4e2df8f0826903a8811
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 1357330..9a6338f 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -231,7 +231,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
if (pStylePool!=NULL)
{
- Container aStyles(1024,64,64);
+ std::vector<XubString*> aStyleNames;
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if (pOutlinerParaObject!=NULL)
{
@@ -256,28 +256,28 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
aStyleName += aFam;
sal_Bool bFnd(sal_False);
- sal_uInt32 nNum(aStyles.Count());
+ sal_uInt32 nNum(aStyleNames.size());
while(!bFnd && nNum > 0)
{
// we don't want duplicate stylesheets
nNum--;
- bFnd = (aStyleName.Equals(*(XubString*)aStyles.GetObject(nNum)));
+ bFnd = aStyleName.Equals(*aStyleNames[nNum]);
}
if(!bFnd)
{
- aStyles.Insert(new XubString(aStyleName), CONTAINER_APPEND);
+ aStyleNames.push_back(new XubString(aStyleName));
}
}
}
}
- // now replace the strings in the container by StyleSheet*
- sal_uIntPtr nNum=aStyles.Count();
- while (nNum>0) {
- nNum--;
- XubString* pName=(XubString*)aStyles.GetObject(nNum);
+ // now convert the strings in the vector from names to StyleSheet*
+ std::set<SfxStyleSheet*> aStyleSheets;
+ while (!aStyleNames.empty()) {
+ XubString* pName=aStyleNames.back();
+ aStyleNames.pop_back();
String aFam = pName->Copy(0, pName->Len() - 6);
@@ -291,28 +291,24 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pStyleBase);
delete pName;
if (pStyle!=NULL && pStyle!=GetStyleSheet()) {
- aStyles.Replace(pStyle,nNum);
- } else {
- aStyles.Remove(nNum);
+ aStyleSheets.insert(pStyle);
}
}
// now remove all superfluous stylesheets
- nNum=GetBroadcasterCount();
+ sal_uIntPtr nNum=GetBroadcasterCount();
while (nNum>0) {
nNum--;
SfxBroadcaster* pBroadcast=GetBroadcasterJOE((sal_uInt16)nNum);
SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pBroadcast);
if (pStyle!=NULL && pStyle!=GetStyleSheet()) { // special case for stylesheet of the object
- if (aStyles.GetPos(pStyle)==CONTAINER_ENTRY_NOTFOUND) {
+ if (aStyleSheets.find(pStyle)==aStyleSheets.end()) {
EndListening(*pStyle);
}
}
}
// and finally, merge all stylesheets that are contained in aStyles with previous broadcasters
- nNum=aStyles.Count();
- while (nNum>0) {
- nNum--;
- SfxStyleSheet* pStyle=(SfxStyleSheet*)aStyles.GetObject(nNum);
+ for(std::set<SfxStyleSheet*>::const_iterator it = aStyleSheets.begin(); it != aStyleSheets.end(); ++it) {
+ SfxStyleSheet* pStyle=*it;
// let StartListening see for itself if there's already a listener registered
StartListening(*pStyle,sal_True);
}
commit f23f1418071042787f3cfa33c97e7b228a02f3c7
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 15:20:34 2012 +0200
Convert maHandles field from Container to std::vector
Change-Id: I28d96586e7e48209021abed73959e8a5e6dc2d61
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index c5f5c2a..c314267 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -120,7 +120,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData
sal_Bool mbMultiPointDrag;
const XPolyPolygon maOrig;
XPolyPolygon maMove;
- Container maHandles;
+ std::vector<SdrHdl*> maHandles;
public:
ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl, sal_Bool bMuPoDr, const SdrDragStat& rDrag);
@@ -147,7 +147,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
if(pTestHdl && pTestHdl->IsSelected() && pTestHdl->GetObj() == pInteractionObject)
{
- maHandles.Insert(pTestHdl, CONTAINER_APPEND);
+ maHandles.push_back(pTestHdl);
}
}
@@ -611,9 +611,9 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
if(aDelta.X() || aDelta.Y())
{
- for(sal_uInt32 a(0); a < mpSdrPathDragData->maHandles.Count(); a++)
+ for(sal_uInt32 a(0); a < mpSdrPathDragData->maHandles.size(); a++)
{
- SdrHdl* pHandle = (SdrHdl*)mpSdrPathDragData->maHandles.GetObject(a);
+ SdrHdl* pHandle = mpSdrPathDragData->maHandles[a];
const sal_uInt16 nPolyIndex((sal_uInt16)pHandle->GetPolyNum());
const sal_uInt16 nPointIndex((sal_uInt16)pHandle->GetPointNum());
const XPolygon& rOrig = mpSdrPathDragData->maOrig[nPolyIndex];
commit 32b2f88ad6e18ea061418a9092672f6ac8fcfb36
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 14:41:01 2012 +0200
Convert class SdUndoGroup from Container to std::vector
Change-Id: I303dd2f5ce5ac7f08727777ca03e4de0cfdabfcc
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index 4a2a275..29d4f53 100644
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -30,12 +30,12 @@ TYPEINIT1(SdUndoGroup, SdUndoAction);
SdUndoGroup::~SdUndoGroup()
{
- sal_uLong nLast = aCtn.Count();
- for (sal_uLong nAction = 0; nAction < nLast; nAction++)
+ size_t nLast = aCtn.size();
+ for (size_t nAction = 0; nAction < nLast; nAction++)
{
- delete (SdUndoAction*) aCtn.GetObject(nAction);
+ delete aCtn[nAction];
}
- aCtn.Clear();
+ aCtn.clear();
}
/*************************************************************************
@@ -70,10 +70,10 @@ sal_Bool SdUndoGroup::Merge( SfxUndoAction* pNextAction )
void SdUndoGroup::Undo()
{
- long nLast = aCtn.Count();
+ long nLast = aCtn.size();
for (long nAction = nLast - 1; nAction >= 0; nAction--)
{
- ((SdUndoAction*)aCtn.GetObject((sal_uLong)nAction))->Undo();
+ aCtn[nAction]->Undo();
}
}
@@ -86,10 +86,10 @@ void SdUndoGroup::Undo()
void SdUndoGroup::Redo()
{
- sal_uLong nLast = aCtn.Count();
- for (sal_uLong nAction = 0; nAction < nLast; nAction++)
+ size_t nLast = aCtn.size();
+ for (size_t nAction = 0; nAction < nLast; nAction++)
{
- ((SdUndoAction*)aCtn.GetObject(nAction))->Redo();
+ aCtn[nAction]->Redo();
}
}
@@ -102,7 +102,7 @@ void SdUndoGroup::Redo()
void SdUndoGroup::AddAction(SdUndoAction* pAction)
{
- aCtn.Insert(pAction, CONTAINER_APPEND);
+ aCtn.push_back(pAction);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx
index 4386601..e12d433 100644
--- a/sd/source/ui/inc/sdundogr.hxx
+++ b/sd/source/ui/inc/sdundogr.hxx
@@ -26,12 +26,12 @@
class SD_DLLPUBLIC SdUndoGroup : public SdUndoAction
{
- Container aCtn;
+ std::vector<SdUndoAction*> aCtn;
public:
TYPEINFO();
SdUndoGroup(SdDrawDocument* pSdDrawDocument)
: SdUndoAction(pSdDrawDocument),
- aCtn(16, 16, 16) {}
+ aCtn() {}
virtual ~SdUndoGroup();
virtual sal_Bool Merge( SfxUndoAction* pNextAction );
@@ -40,7 +40,7 @@ public:
virtual void Redo();
void AddAction(SdUndoAction* pAction);
- sal_uLong Count() const { return aCtn.Count(); }
+ sal_uLong Count() const { return aCtn.size(); }
};
commit c4984cbfafae189a4675e8619ba836f2ab2adb38
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 14:15:40 2012 +0200
Convert aList in SdrObjRefList class from Container to std::vector
Change-Id: Iee505825f46434b09c73679e1439f99afc631336
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index 85bebfb..ceead0d 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -51,19 +51,26 @@ class SvdProgressInfo;
class SdrObjRefList
{
- Container aList;
+ std::vector<SdrObject*> aList;
public:
SdrObjRefList()
- : aList(1024,64,64)
+ : aList()
{}
- void Clear() { aList.Clear(); }
- sal_uLong GetObjCount() const { return aList.Count(); }
- SdrObject* GetObj(sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); }
- SdrObject* operator[](sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); }
- void InsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND) { aList.Insert(pObj,nPos); }
- void RemoveObject(sal_uLong nPos) { aList.Remove(nPos); }
+ void Clear() { aList.clear(); }
+ sal_uLong GetObjCount() const { return aList.size(); }
+ SdrObject* GetObj(sal_uLong nNum) const { return aList[nNum]; }
+ SdrObject* operator[](sal_uLong nNum) const { return aList[nNum]; }
+ void InsertObject(SdrObject* pObj) { aList.push_back(pObj); }
+ void InsertObject(SdrObject* pObj, sal_uLong nPos)
+ {
+ if(nPos==CONTAINER_APPEND)
+ aList.push_back(pObj);
+ else
+ aList.insert(aList.begin() + nPos, pObj);
+ }
+ void RemoveObject(sal_uLong nPos) { aList.erase(aList.begin()+nPos); }
};
//************************************************************
commit d3bdadad61d95cc802c869d989ed94326a7066de
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 14:09:51 2012 +0200
Convert pRedoStack in SdrModel class from Container to std::deque
Change-Id: I0535175c4881a1ea55d7cb7361ae78bb81aa10c6
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 2f1ad6b..dd2919c 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -193,7 +193,7 @@ protected:
SfxStyleSheet* pDefaultStyleSheet;
sfx2::LinkManager* pLinkManager; // LinkManager
std::deque<SfxUndoAction*>* pUndoStack;
- Container* pRedoStack;
+ std::deque<SfxUndoAction*>* pRedoStack;
SdrUndoGroup* pAktUndoGroup; // Fuer mehrstufige
sal_uInt16 nUndoLevel; // Undo-Klammerung
sal_uInt16 nProgressPercent; // fuer den ProgressBar-Handler
@@ -579,8 +579,8 @@ public:
sal_uIntPtr GetUndoActionCount() const { return pUndoStack!=NULL ? pUndoStack->size() : 0; }
const SfxUndoAction* GetUndoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pUndoStack!=NULL ? (*pUndoStack)[nNum] : NULL); }
// RedoAction(0) ist die aktuelle (also die des letzten Undo)
- sal_uIntPtr GetRedoActionCount() const { return pRedoStack!=NULL ? pRedoStack->Count() : 0; }
- const SfxUndoAction* GetRedoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pRedoStack!=NULL ? pRedoStack->GetObject(nNum) : NULL); }
+ sal_uIntPtr GetRedoActionCount() const { return pRedoStack!=NULL ? pRedoStack->size() : 0; }
+ const SfxUndoAction* GetRedoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pRedoStack!=NULL ? (*pRedoStack)[nNum] : NULL); }
bool Undo();
bool Redo();
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index d3c0c38..14d45d6 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -422,8 +422,9 @@ void SdrModel::ClearUndoBuffer()
pUndoStack=NULL;
}
if (pRedoStack!=NULL) {
- while (pRedoStack->Count()!=0) {
- delete (SfxUndoAction*) pRedoStack->Remove(pRedoStack->Count()-1);
+ while (!pRedoStack->empty()) {
+ delete pRedoStack->back();
+ pRedoStack->pop_back();
}
delete pRedoStack;
pRedoStack=NULL;
@@ -446,10 +447,10 @@ bool SdrModel::Undo()
mbUndoEnabled = false;
pDo->Undo();
if(pRedoStack==NULL)
- pRedoStack=new Container(1024,16,16);
+ pRedoStack=new std::deque<SfxUndoAction*>;
SfxUndoAction* p = pUndoStack->front();
pUndoStack->pop_front();
- pRedoStack->Insert(p,(sal_uIntPtr)0);
+ pRedoStack->push_front(p);
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -473,7 +474,9 @@ bool SdrModel::Redo()
pDo->Redo();
if(pUndoStack==NULL)
pUndoStack=new std::deque<SfxUndoAction*>;
- pUndoStack->push_front((SfxUndoAction*) pRedoStack->Remove((sal_uIntPtr)0));
+ SfxUndoAction* p = pRedoStack->front();
+ pRedoStack->pop_front();
+ pUndoStack->push_front(p);
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -522,7 +525,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
pUndoStack->pop_back();
}
if (pRedoStack!=NULL)
- pRedoStack->Clear();
+ pRedoStack->clear();
}
}
else
commit aa2d9729bdac0173349a5f76e2346b8335de565f
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 13:57:45 2012 +0200
Convert pUndoStack in SdrModel class from Container to std::deque
Change-Id: I59425c7d1e8603f45d193ae5e3498f8671510bc5
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 39daffe..2f1ad6b 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -52,6 +52,7 @@ class OutputDevice;
#include "svx/svxdllapi.h"
#include <rtl/ref.hxx>
+#include <deque>
#if defined(UNX) || defined(WNT)
#define DEGREE_CHAR ((sal_Unicode)176) /* 0xB0 = Ansi */
@@ -191,7 +192,7 @@ protected:
rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool;
SfxStyleSheet* pDefaultStyleSheet;
sfx2::LinkManager* pLinkManager; // LinkManager
- Container* pUndoStack;
+ std::deque<SfxUndoAction*>* pUndoStack;
Container* pRedoStack;
SdrUndoGroup* pAktUndoGroup; // Fuer mehrstufige
sal_uInt16 nUndoLevel; // Undo-Klammerung
@@ -575,8 +576,8 @@ public:
sal_uIntPtr GetMaxUndoActionCount() const { return nMaxUndoCount; }
void ClearUndoBuffer();
// UndoAction(0) ist die aktuelle (also die zuletzt eingegangene)
- sal_uIntPtr GetUndoActionCount() const { return pUndoStack!=NULL ? pUndoStack->Count() : 0; }
- const SfxUndoAction* GetUndoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pUndoStack!=NULL ? pUndoStack->GetObject(nNum) : NULL); }
+ sal_uIntPtr GetUndoActionCount() const { return pUndoStack!=NULL ? pUndoStack->size() : 0; }
+ const SfxUndoAction* GetUndoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pUndoStack!=NULL ? (*pUndoStack)[nNum] : NULL); }
// RedoAction(0) ist die aktuelle (also die des letzten Undo)
sal_uIntPtr GetRedoActionCount() const { return pRedoStack!=NULL ? pRedoStack->Count() : 0; }
const SfxUndoAction* GetRedoAction(sal_uIntPtr nNum) const { return (SfxUndoAction*)(pRedoStack!=NULL ? pRedoStack->GetObject(nNum) : NULL); }
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 6a3de9e..d3c0c38 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -404,8 +404,9 @@ void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nAnz)
if (nAnz<1) nAnz=1;
nMaxUndoCount=nAnz;
if (pUndoStack!=NULL) {
- while (pUndoStack->Count()>nMaxUndoCount) {
- delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count());
+ while (pUndoStack->size()>nMaxUndoCount) {
+ delete pUndoStack->back();
+ pUndoStack->pop_back();
}
}
}
@@ -413,8 +414,9 @@ void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nAnz)
void SdrModel::ClearUndoBuffer()
{
if (pUndoStack!=NULL) {
- while (pUndoStack->Count()!=0) {
- delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count()-1);
+ while (!pUndoStack->empty()) {
+ delete pUndoStack->back();
+ pUndoStack->pop_back();
}
delete pUndoStack;
pUndoStack=NULL;
@@ -445,7 +447,9 @@ bool SdrModel::Undo()
pDo->Undo();
if(pRedoStack==NULL)
pRedoStack=new Container(1024,16,16);
- pRedoStack->Insert(pUndoStack->Remove((sal_uIntPtr)0),(sal_uIntPtr)0);
+ SfxUndoAction* p = pUndoStack->front();
+ pUndoStack->pop_front();
+ pRedoStack->Insert(p,(sal_uIntPtr)0);
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -468,8 +472,8 @@ bool SdrModel::Redo()
mbUndoEnabled = false;
pDo->Redo();
if(pUndoStack==NULL)
- pUndoStack=new Container(1024,16,16);
- pUndoStack->Insert(pRedoStack->Remove((sal_uIntPtr)0),(sal_uIntPtr)0);
+ pUndoStack=new std::deque<SfxUndoAction*>;
+ pUndoStack->push_front((SfxUndoAction*) pRedoStack->Remove((sal_uIntPtr)0));
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -510,11 +514,12 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
else
{
if (pUndoStack==NULL)
- pUndoStack=new Container(1024,16,16);
- pUndoStack->Insert(pUndo,(sal_uIntPtr)0);
- while (pUndoStack->Count()>nMaxUndoCount)
+ pUndoStack=new std::deque<SfxUndoAction*>;
+ pUndoStack->push_front(pUndo);
+ while (pUndoStack->size()>nMaxUndoCount)
{
- delete (SfxUndoAction*)pUndoStack->Remove(pUndoStack->Count()-1);
+ delete pUndoStack->back();
+ pUndoStack->pop_back();
}
if (pRedoStack!=NULL)
pRedoStack->Clear();
commit 80f8d9f9f19f590f79be58965f30d2aea8d52c26
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 13:42:54 2012 +0200
replace LIST_APPEND usage with CONTAINER_APPEND
Change-Id: Ifc65ac24b04ac3d8fb0a4325cfe552ed6d5752d6
diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index 2f76330..b26b1dc 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -244,7 +244,7 @@ public:
XPropertyListType Type() const { return eType; }
long Count() const;
- void Insert( XPropertyEntry* pEntry, long nIndex = LIST_APPEND );
+ void Insert( XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND );
XPropertyEntry* Replace( XPropertyEntry* pEntry, long nIndex );
XPropertyEntry* Remove( long nIndex );
commit cdd4c1558390efd8a3740ad8fc248248972d9250
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 13:39:56 2012 +0200
Convert aBuf in SdrUndoGroup class from Container to std::vector
Change-Id: I0635ed333033ce37eb86b360fd0ee0d77b8dc47a
diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx
index 3b0436a..5451441 100644
--- a/svx/inc/svx/svdundo.hxx
+++ b/svx/inc/svx/svdundo.hxx
@@ -31,7 +31,6 @@
#include <svl/solar.hrc>
#include <svl/undo.hxx>
-#include <tools/contnr.hxx>
#include <tools/gen.hxx>
#include <svx/svdtypes.hxx> // fuer enum RepeatFuncts
#include <svx/svdsob.hxx>
@@ -96,7 +95,7 @@ public:
class SVX_DLLPUBLIC SdrUndoGroup : public SdrUndoAction
{
protected:
- Container aBuf;
+ std::vector<SdrUndoAction*> aBuf;
// Beschreibung der Action, nicht expandiert (beinhaltet %O)
String aComment;
@@ -109,8 +108,8 @@ public:
virtual ~SdrUndoGroup();
void Clear();
- sal_uIntPtr GetActionCount() const { return aBuf.Count(); }
- SdrUndoAction* GetAction(sal_uIntPtr nNum) const { return (SdrUndoAction*)(aBuf.GetObject(nNum)); }
+ sal_uIntPtr GetActionCount() const { return aBuf.size(); }
+ SdrUndoAction* GetAction(sal_uIntPtr nNum) const { return aBuf[nNum]; }
void AddAction(SdrUndoAction* pAct);
void SetComment(const String& rStr) { aComment=rStr; }
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index b3fca80..0a793f2 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -103,7 +103,7 @@ XubString SdrUndoAction::GetSdrRepeatComment(SdrView& /*rView*/) const
SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod)
: SdrUndoAction(rNewMod),
- aBuf(1024,32,32),
+ aBuf(),
eFunction(SDRREPFUNC_OBJ_NONE)
{}
@@ -118,12 +118,12 @@ void SdrUndoGroup::Clear()
SdrUndoAction* pAct=GetAction(nu);
delete pAct;
}
- aBuf.Clear();
+ aBuf.clear();
}
void SdrUndoGroup::AddAction(SdrUndoAction* pAct)
{
- aBuf.Insert(pAct,CONTAINER_APPEND);
+ aBuf.push_back(pAct);
}
void SdrUndoGroup::Undo()
commit e5da8190e0edc476eecfe4f49aae4b50a480e414
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 13:29:19 2012 +0200
Convert field from Container to std::vector in SdrPageGridFrameList
Change-Id: I5940936e986b2f6580ca9ce973359d8179631f8c
diff --git a/svx/inc/svx/fmpage.hxx b/svx/inc/svx/fmpage.hxx
index 0b25888..7341063 100644
--- a/svx/inc/svx/fmpage.hxx
+++ b/svx/inc/svx/fmpage.hxx
@@ -32,6 +32,7 @@
#include <svx/svdpage.hxx>
#include <comphelper/uno3.hxx>
#include "svx/svxdllapi.h"
+#include <tools/contnr.hxx>
class StarBASIC;
class FmFormModel;
diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx
index 892e758..5ab0f5a 100644
--- a/svx/inc/svx/svdpage.hxx
+++ b/svx/inc/svx/svdpage.hxx
@@ -33,7 +33,6 @@
#include <vcl/print.hxx>
#include <vcl/gdimtf.hxx>
#include <tools/weakbase.hxx>
-#include <tools/contnr.hxx>
#include <cppuhelper/weakref.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svdlayer.hxx>
@@ -133,10 +132,10 @@ public:
// Neuberechnung der Objekt-Ordnungsnummern
void RecalcObjOrdNums();
bool IsObjOrdNumsDirty() const { return bObjOrdNumsDirty; }
- virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
, const SdrInsertReason* pReason=NULL
);
- virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
+ virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
, const SdrInsertReason* pReason=NULL
);
// aus Liste entfernen ohne delete
@@ -338,20 +337,37 @@ public:
};
class SVX_DLLPUBLIC SdrPageGridFrameList {
- Container aList;
+ std::vector<SdrPageGridFrame*> aList;
private:
SVX_DLLPRIVATE SdrPageGridFrameList(const SdrPageGridFrameList& rSrcList); // never implemented
SVX_DLLPRIVATE void operator=(const SdrPageGridFrameList& rSrcList); // never implemented
protected:
- SdrPageGridFrame* GetObject(sal_uInt16 i) const { return (SdrPageGridFrame*)(aList.GetObject(i)); }
+ SdrPageGridFrame* GetObject(sal_uInt16 i) const { return aList[i]; }
public:
- SdrPageGridFrameList(): aList(1024,4,4) {}
+ SdrPageGridFrameList(): aList() {}
~SdrPageGridFrameList() { Clear(); }
void Clear();
- sal_uInt16 GetCount() const { return sal_uInt16(aList.Count()); }
- void Insert(const SdrPageGridFrame& rGF, sal_uInt16 nPos=0xFFFF) { aList.Insert(new SdrPageGridFrame(rGF),nPos); }
- void Delete(sal_uInt16 nPos) { delete (SdrPageGridFrame*)aList.Remove(nPos); }
- void Move(sal_uInt16 nPos, sal_uInt16 nNewPos) { aList.Insert(aList.Remove(nPos),nNewPos); }
+ sal_uInt16 GetCount() const { return sal_uInt16(aList.size()); }
+ void Insert(const SdrPageGridFrame& rGF) { aList.push_back(new SdrPageGridFrame(rGF)); }
+ void Insert(const SdrPageGridFrame& rGF, sal_uInt16 nPos)
+ {
+ if(nPos==0xFFFF)
+ aList.push_back(new SdrPageGridFrame(rGF));
+ else
+ aList.insert(aList.begin()+nPos,new SdrPageGridFrame(rGF));
+ }
+ void Delete(sal_uInt16 nPos)
+ {
+ SdrPageGridFrame* p = aList[nPos];
+ aList.erase(aList.begin()+nPos);
+ delete p;
+ }
+ void Move(sal_uInt16 nPos, sal_uInt16 nNewPos)
+ {
+ SdrPageGridFrame* p = aList[nPos];
+ aList.erase(aList.begin()+nPos);
+ aList.insert(aList.begin()+nNewPos,p);
+ }
SdrPageGridFrame& operator[](sal_uInt16 nPos) { return *GetObject(nPos); }
const SdrPageGridFrame& operator[](sal_uInt16 nPos) const { return *GetObject(nPos); }
};
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index db88eb3..fffb8ed 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1088,7 +1088,7 @@ void SdrPageGridFrameList::Clear()
for (sal_uInt16 i=0; i<nAnz; i++) {
delete GetObject(i);
}
- aList.Clear();
+ aList.clear();
}
//////////////////////////////////////////////////////////////////////////////
commit 17afe4cea7e01aef1e5270cc09f438bc6fde3211
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 13:04:30 2012 +0200
Convert maPages field in SdrModel class from Container to std::vector
Change-Id: Id36c3c414429d8f0e16f8e479f9946511b1e377f
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 22926d5..39daffe 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -33,7 +33,6 @@
#include <cppuhelper/weakref.hxx>
#include <sot/storage.hxx>
#include <tools/link.hxx>
-#include <tools/contnr.hxx>
#include <tools/weakbase.hxx>
#include <vcl/mapmod.hxx>
#include <svl/brdcst.hxx>
@@ -165,7 +164,7 @@ class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< Sd
protected:
DateTime aReadDate; // Datum des Einstreamens
std::vector<SdrPage*> maMaPag; // StammSeiten (Masterpages)
- Container maPages;
+ std::vector<SdrPage*> maPages;
Link aUndoLink; // Link fuer einen NotifyUndo-Handler
Link aIOProgressLink;
String aTablePath;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 7bae583..6a3de9e 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -227,7 +227,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
maMaPag(),
- maPages(1024,32,32)
+ maPages()
{
#ifdef TIMELOG
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
@@ -240,7 +240,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
maMaPag(),
- maPages(1024,32,32),
+ maPages(),
aTablePath(rPath)
{
#ifdef TIMELOG
@@ -254,7 +254,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
maMaPag(),
- maPages(1024,32,32)
+ maPages()
{
#ifdef TIMELOG
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
@@ -267,7 +267,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, boo
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
maMaPag(),
- maPages(1024,32,32),
+ maPages(),
aTablePath(rPath)
{
#ifdef TIMELOG
@@ -283,7 +283,7 @@ SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
tools::WeakBase< SdrModel >(),
aReadDate( DateTime::EMPTY ),
maMaPag(),
- maPages(1024,32,32)
+ maPages()
{
#ifdef TIMELOG
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
@@ -732,7 +732,7 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
{
DeletePage( (sal_uInt16)i );
}
- maPages.Clear();
+ maPages.clear();
PageListChanged();
// delete all Masterpages
@@ -1427,11 +1427,10 @@ void SdrModel::RecalcPageNums(bool bMaster)
}
else
{
- Container& rPL=maPages;
- sal_uInt16 nAnz=sal_uInt16(rPL.Count());
+ sal_uInt16 nAnz=sal_uInt16(maPages.size());
sal_uInt16 i;
for (i=0; i<nAnz; i++) {
- SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
+ SdrPage* pPg=maPages[i];
pPg->SetPageNum(i);
}
bPagNumsDirty=sal_False;
@@ -1442,7 +1441,7 @@ void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
{
sal_uInt16 nAnz=GetPageCount();
if (nPos>nAnz) nPos=nAnz;
- maPages.Insert(pPage,nPos);
+ maPages.insert(maPages.begin()+nPos,pPage);
PageListChanged();
pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
@@ -1462,7 +1461,8 @@ void SdrModel::DeletePage(sal_uInt16 nPgNum)
SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
{
- SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
+ SdrPage* pPg=maPages[nPgNum];
+ maPages.erase(maPages.begin()+nPgNum);
PageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
@@ -1477,7 +1477,8 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
- SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
+ SdrPage* pPg=maPages[nPgNum];
+ maPages.erase(maPages.begin()+nPgNum);
PageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
@@ -1986,19 +1987,19 @@ SvxNumType SdrModel::GetPageNumType() const
const SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum) const
{
- DBG_ASSERT(nPgNum < maPages.Count(), "SdrModel::GetPage: Access out of range (!)");
- return (SdrPage*)(maPages.GetObject(nPgNum));
+ DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
+ return maPages[nPgNum];
}
SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum)
{
- DBG_ASSERT(nPgNum < maPages.Count(), "SdrModel::GetPage: Access out of range (!)");
- return (SdrPage*)(maPages.GetObject(nPgNum));
+ DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
+ return maPages[nPgNum];
}
sal_uInt16 SdrModel::GetPageCount() const
{
- return sal_uInt16(maPages.Count());
+ return sal_uInt16(maPages.size());
}
void SdrModel::PageListChanged()
commit ed04025e10815c89fe02d0cf823253d540e21635
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 12:38:45 2012 +0200
Convert maMaPag field in class SdrModel from Container to std::vector
Change-Id: I232ad32be90d93fe35a6cf089373e5a830e62113
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 87a0965..22926d5 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -164,7 +164,7 @@ class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< Sd
{
protected:
DateTime aReadDate; // Datum des Einstreamens
- Container maMaPag; // StammSeiten (Masterpages)
+ std::vector<SdrPage*> maMaPag; // StammSeiten (Masterpages)
Container maPages;
Link aUndoLink; // Link fuer einen NotifyUndo-Handler
Link aIOProgressLink;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 3caa86a..7bae583 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -226,7 +226,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
- maMaPag(1024,32,32),
+ maMaPag(),
maPages(1024,32,32)
{
#ifdef TIMELOG
@@ -239,7 +239,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
- maMaPag(1024,32,32),
+ maMaPag(),
maPages(1024,32,32),
aTablePath(rPath)
{
@@ -253,7 +253,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
- maMaPag(1024,32,32),
+ maMaPag(),
maPages(1024,32,32)
{
#ifdef TIMELOG
@@ -266,7 +266,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, boo
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
aReadDate( DateTime::EMPTY ),
- maMaPag(1024,32,32),
+ maMaPag(),
maPages(1024,32,32),
aTablePath(rPath)
{
@@ -282,7 +282,7 @@ SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
SfxBroadcaster(),
tools::WeakBase< SdrModel >(),
aReadDate( DateTime::EMPTY ),
- maMaPag(1024,32,32),
+ maMaPag(),
maPages(1024,32,32)
{
#ifdef TIMELOG
@@ -741,7 +741,7 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
{
DeleteMasterPage( (sal_uInt16)i );
}
- maMaPag.Clear();
+ maMaPag.clear();
MasterPageListChanged();
pLayerAdmin->ClearLayer();
@@ -1415,15 +1415,27 @@ void SdrModel::SetChanged(sal_Bool bFlg)
void SdrModel::RecalcPageNums(bool bMaster)
{
- Container& rPL=*(bMaster ? &maMaPag : &maPages);
- sal_uInt16 nAnz=sal_uInt16(rPL.Count());
- sal_uInt16 i;
- for (i=0; i<nAnz; i++) {
- SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
- pPg->SetPageNum(i);
+ if(bMaster)
+ {
+ sal_uInt16 nAnz=sal_uInt16(maMaPag.size());
+ sal_uInt16 i;
+ for (i=0; i<nAnz; i++) {
+ SdrPage* pPg=maMaPag[i];
+ pPg->SetPageNum(i);
+ }
+ bMPgNumsDirty=sal_False;
+ }
+ else
+ {
+ Container& rPL=maPages;
+ sal_uInt16 nAnz=sal_uInt16(rPL.Count());
+ sal_uInt16 i;
+ for (i=0; i<nAnz; i++) {
+ SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
+ pPg->SetPageNum(i);
+ }
+ bPagNumsDirty=sal_False;
}
- if (bMaster) bMPgNumsDirty=sal_False;
- else bPagNumsDirty=sal_False;
}
void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
@@ -1477,7 +1489,7 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
{
sal_uInt16 nAnz=GetMasterPageCount();
if (nPos>nAnz) nPos=nAnz;
- maMaPag.Insert(pPage,nPos);
+ maMaPag.insert(maMaPag.begin()+nPos,pPage);
MasterPageListChanged();
pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
@@ -1499,7 +1511,8 @@ void SdrModel::DeleteMasterPage(sal_uInt16 nPgNum)
SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
{
- SdrPage* pRetPg=(SdrPage*)maMaPag.Remove(nPgNum);
+ SdrPage* pRetPg=maMaPag[nPgNum];
+ maMaPag.erase(maMaPag.begin()+nPgNum);
MasterPageListChanged();
if(pRetPg)
@@ -1525,11 +1538,12 @@ SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
- SdrPage* pPg=(SdrPage*)maMaPag.Remove(nPgNum);
+ SdrPage* pPg=maMaPag[nPgNum];
+ maMaPag.erase(maMaPag.begin()+nPgNum);
MasterPageListChanged();
if (pPg!=NULL) {
pPg->SetInserted(sal_False);
- maMaPag.Insert(pPg,nNewPos);
+ maMaPag.insert(maMaPag.begin()+nNewPos,pPg);
MasterPageListChanged();
}
bMPgNumsDirty=sal_True;
@@ -1700,7 +1714,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
// Now append all of them to the end of the DstModel.
// Don't use InsertMasterPage(), because everything is
// inconsistent until all are in.
- maMaPag.Insert(pPg,nDstMasterPageAnz);
+ maMaPag.insert(maMaPag.begin()+nDstMasterPageAnz, pPg);
MasterPageListChanged();
pPg->SetInserted(sal_True);
pPg->SetModel(this);
@@ -1993,19 +2007,19 @@ void SdrModel::PageListChanged()
const SdrPage* SdrModel::GetMasterPage(sal_uInt16 nPgNum) const
{
- DBG_ASSERT(nPgNum < maMaPag.Count(), "SdrModel::GetMasterPage: Access out of range (!)");
- return (SdrPage*)(maMaPag.GetObject(nPgNum));
+ DBG_ASSERT(nPgNum < maMaPag.size(), "SdrModel::GetMasterPage: Access out of range (!)");
+ return maMaPag[nPgNum];
}
SdrPage* SdrModel::GetMasterPage(sal_uInt16 nPgNum)
{
- DBG_ASSERT(nPgNum < maMaPag.Count(), "SdrModel::GetMasterPage: Access out of range (!)");
- return (SdrPage*)(maMaPag.GetObject(nPgNum));
+ DBG_ASSERT(nPgNum < maMaPag.size(), "SdrModel::GetMasterPage: Access out of range (!)");
+ return maMaPag[nPgNum];
}
sal_uInt16 SdrModel::GetMasterPageCount() const
{
- return sal_uInt16(maMaPag.Count());
+ return sal_uInt16(maMaPag.size());
}
void SdrModel::MasterPageListChanged()
commit dd3b0fa68b9e850ed8df34094c21abfbd8c6f61b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 15 12:28:36 2012 +0200
Remove unused field
Change-Id: I962c2bbd29b2ce2e39bf0f9db4c12fc5535cf4f6
diff --git a/svx/inc/svx/svdlayer.hxx b/svx/inc/svx/svdlayer.hxx
index f0b468b..b4ed6ee 100644
--- a/svx/inc/svx/svdlayer.hxx
+++ b/svx/inc/svx/svdlayer.hxx
@@ -31,7 +31,6 @@
#include <tools/string.hxx>
#include <tools/stream.hxx>
-#include <tools/contnr.hxx>
#include <svx/svdsob.hxx>
#include <svx/svdtypes.hxx> // fuer typedef SdrLayerID
#include "svx/svxdllapi.h"
@@ -86,7 +85,6 @@ friend class SdrPage;
protected:
std::vector<SdrLayer*> aLayer;
- Container aLSets;
SdrLayerAdmin* pParent; // Der Admin der Seite kennt den Admin des Docs
SdrModel* pModel; // zum Broadcasten
String aControlLayerName;
diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx
index e700f29..892e758 100644
--- a/svx/inc/svx/svdpage.hxx
+++ b/svx/inc/svx/svdpage.hxx
@@ -33,6 +33,7 @@
#include <vcl/print.hxx>
#include <vcl/gdimtf.hxx>
#include <tools/weakbase.hxx>
+#include <tools/contnr.hxx>
#include <cppuhelper/weakref.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svdlayer.hxx>
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 4b02822..5ede97f 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -160,7 +160,6 @@ bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const
SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
aLayer(),
- aLSets(1024,16,16),
pModel(NULL)
{
aControlLayerName = String(RTL_CONSTASCII_USTRINGPARAM("Controls"));
@@ -169,7 +168,6 @@ SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin):
aLayer(),
- aLSets(1024,16,16),
pParent(NULL),
pModel(NULL)
{
@@ -204,8 +202,8 @@ const SdrLayerAdmin& SdrLayerAdmin::operator=(const SdrLayerAdmin& rSrcLayerAdmi
bool SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const
{
if (pParent!=rCmpLayerAdmin.pParent ||
- aLayer.size()!=rCmpLayerAdmin.aLayer.size() ||
- aLSets.Count()!=rCmpLayerAdmin.aLSets.Count()) return sal_False;
+ aLayer.size()!=rCmpLayerAdmin.aLayer.size())
+ return sal_False;
bool bOk = true;
sal_uInt16 nAnz=GetLayerCount();
sal_uInt16 i=0;
More information about the Libreoffice-commits
mailing list