From eb13c2c5b127910367ed2dac4fd2166a6d9c8a70 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Apr 2012 22:55:48 +0200 Subject: Convert SV_DECL_PTRARR to std::vector --- svx/source/form/fmshimp.cxx | 9 ++++----- svx/source/inc/fmshimp.hxx | 4 ++-- 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 #include -SV_DECL_PTRARR(SdrObjArray, SdrObject*, 32) +typedef std::vector 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 -- cgit v1.2.3