summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@openoffice.org>2010-09-17 19:06:31 +0200
committerBartosz Kosiorek <gang65@openoffice.org>2010-09-17 19:06:31 +0200
commit95a698a2d9babaf9abbd539bdc113ca38dd0c159 (patch)
treeb1e313dc7992a1f6b5961c1743596ce2496c0f39
parent038210175108961fd3244a27ec8e441320580fd5 (diff)
svarray
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--sfx2/source/inc/workwin.hxx4
-rw-r--r--svx/source/form/fmsrcimp.cxx17
-rw-r--r--svx/source/inc/fmsrcimp.hxx14
4 files changed, 12 insertions, 25 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 79ab2071c3..f3c5efd609 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -99,7 +99,7 @@ SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
+typedef std::vector<HighlightPortion> HighlightPortions;
bool getDefaultVBAMode( StarBASIC* pb )
{
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 9e652cfef9..da70b744a4 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -28,6 +28,7 @@
#define _SFXWORKWIN_HXX
#include <vector>
+#include <deque>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#ifndef _COM_SUN_STAR_UI_XUILEMENT_HPP_
@@ -175,11 +176,10 @@ enum SfxDockingConfig
DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
-SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 )
struct SfxObjectBarList_Impl
{
- SfxObjectBarArr_Impl aArr;
+ std::deque<SfxObjectBar_Impl> aArr;
USHORT nAct;
SfxObjectBar_Impl operator[] ( USHORT n )
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 85f6a79b97..f31dbe8711 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -82,11 +82,6 @@ using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::beans;
using namespace ::svxform;
-// ***************************************************************************************************
-
-// ***************************************************************************************************
-
-SV_IMPL_OBJARR(SvInt32Array, sal_Int32);
//========================================================================
// = FmSearchThread
@@ -848,7 +843,7 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields)
// analyze the fields
// additionally, create the mapping: because the list of used columns can be shorter than the list
// of columns of the cursor, we need a mapping: "used column numer n" -> "cursor column m"
- m_arrFieldMapping.Remove(0, m_arrFieldMapping.Count());
+ m_arrFieldMapping.clear();
// important: The case of the columns does not need to be exact - for instance:
// - a user created a form which works on a table, for which the driver returns a column name "COLUMN"
@@ -912,7 +907,7 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields)
// set the field selection back to the first
pFieldNames = seqFieldNames.getArray();;
DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Es wurden ungueltige Feldnamen angegeben !");
- m_arrFieldMapping.Insert(nFoundIndex, m_arrFieldMapping.Count());
+ m_arrFieldMapping.push_back(nFoundIndex);
}
}
catch(Exception&)
@@ -1273,18 +1268,18 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce)
return;
// (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)
- DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.Count()), "FmSearchEngine::RebuildUsedFields : nFieldIndex ist ungueltig !");
+ DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.size()), "FmSearchEngine::RebuildUsedFields : nFieldIndex is invalid!");
// alle Felder, die ich durchsuchen muss, einsammeln
m_arrUsedFields.clear();
if (nFieldIndex == -1)
{
Reference< ::com::sun::star::container::XIndexAccess > xFields;
- for (sal_uInt16 i=0; i<m_arrFieldMapping.Count(); ++i)
+ for (size_t i=0; i<m_arrFieldMapping.size(); ++i)
{
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
- BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject(i));
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[i]);
}
}
else
@@ -1293,7 +1288,7 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce)
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
- BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject((sal_uInt16)nFieldIndex));
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[(sal_uInt16)nFieldIndex]);
}
m_nCurrentFieldIndex = nFieldIndex;
diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/source/inc/fmsrcimp.hxx
index c8cc4972ef..8621ac19e0 100644
--- a/svx/source/inc/fmsrcimp.hxx
+++ b/svx/source/inc/fmsrcimp.hxx
@@ -46,15 +46,7 @@
#include <unotools/collatorwrapper.hxx>
#include <vos/thread.hxx>
-#ifndef _SVSTDARR_ULONGS
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-#endif
-
-// ===================================================================================================
-// Hilfsstrukturen
-
-SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16)
+#include <deque>
// ===================================================================================================
// = class FmSearchThread - wie der Name schon sagt
@@ -189,8 +181,8 @@ class SVX_DLLPUBLIC FmSearchEngine
enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
// zugrundeliegende Daten
- CursorWrapper m_xSearchCursor;
- SvInt32Array m_arrFieldMapping;
+ CursorWrapper m_xSearchCursor;
+ std::deque<sal_Int32> m_arrFieldMapping;
// da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
// muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten