summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-04-15 22:55:48 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-19 13:22:38 +0200
commiteb13c2c5b127910367ed2dac4fd2166a6d9c8a70 (patch)
tree49886071186cdc1abf3cf39e95520348cbc6e4a1 /svx
parent2de57801ed93ef15d8e4e941ff371d3bf703e273 (diff)
Convert SV_DECL_PTRARR to std::vector
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmshimp.cxx9
-rw-r--r--svx/source/inc/fmshimp.hxx4
2 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 29a45c082308..dc33eb00723f 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2305,8 +2305,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
// und zum Feld (dazu habe ich vor dem Start des Suchens die XVclComponent-Interfaces eingesammelt)
DBG_ASSERT(pfriWhere->nFieldPos < m_arrSearchedControls.Count(), "FmXFormShell::OnFoundData : ungueltige Daten uebergeben !");
- SdrObject* pObject = m_arrSearchedControls.GetObject(pfriWhere->nFieldPos);
- DBG_ASSERT(pObject != NULL, "FmXFormShell::OnFoundData : unerwartet : ungueltiges VclControl-Interface");
+ SdrObject* pObject = m_arrSearchedControls.at(pfriWhere->nFieldPos);
m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetSdrPageView());
m_pShell->GetFormView()->MarkObj(pObject, m_pShell->GetFormView()->GetSdrPageView());
@@ -2405,7 +2404,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
// --------------------------------------------------------------------------------------------
// assemble the list of fields to involve (that is, the ControlSources of all fields that have such a property)
UniString strFieldList, sFieldDisplayNames;
- m_arrSearchedControls.Remove(0, m_arrSearchedControls.Count());
+ m_arrSearchedControls.clear();
m_arrRelativeGridColumn.clear();
// small problem: To mark found fields, I need SdrObjects. To determine which controls
@@ -2517,7 +2516,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
pfmscContextInfo->arrFields.push_back(xCurrentColumn);
// and the SdrOject to the Field
- m_arrSearchedControls.C40_INSERT(SdrObject, pCurrent, m_arrSearchedControls.Count());
+ m_arrSearchedControls.push_back(pCurrent);
// the number of the column
m_arrRelativeGridColumn.push_back(nViewPos);
}
@@ -2546,7 +2545,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
sFieldDisplayNames += ';';
// mark the SdrObject (accelerates the treatment in OnFoundData)
- m_arrSearchedControls.C40_INSERT(SdrObject, pCurrent, m_arrSearchedControls.Count());
+ m_arrSearchedControls.push_back(pCurrent);
// the number of the colum (here a dummy, since it is only interesting for GridControls)
m_arrRelativeGridColumn.push_back(-1);
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index e2313e23d14f..26eb304d5325 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -75,11 +75,11 @@
#include <set>
#include <vector>
-SV_DECL_PTRARR(SdrObjArray, SdrObject*, 32)
+typedef std::vector<SdrObject*> SdrObjArray;
// SV_DECL_OBJARR(FmFormArray, ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>, 32, 16);
DECLARE_STL_VECTOR( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > ,FmFormArray);
-// catch databse exceptions if occur
+// catch database exceptions if they occur
#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { OSL_FAIL("unhandled exception (I tried to move a cursor (or something like that).)"); }
#define GA_DISABLE_SYNC 1