diff options
author | Nigel Hawkins <n.hawkins-KK0ffGbhmjU@public.gmane.org> | 2011-02-09 14:32:28 +0000 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-10 09:43:28 +0100 |
commit | fbe3120f137f1a2295df6ba17edf611cc4631f90 (patch) | |
tree | d23a264a2fd0f9a12ae6634967028099e2254561 | |
parent | eb24bd1241a03ab488853d8f3030de1cd4f11148 (diff) |
Remove InvalidSlot svArray stuff in FmXFormShell
-rw-r--r-- | svx/source/form/fmshimp.cxx | 19 | ||||
-rw-r--r-- | svx/source/inc/fmshimp.hxx | 8 |
2 files changed, 12 insertions, 15 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index cf39a32ca903..90c9225be87f 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -116,6 +116,7 @@ #include <algorithm> #include <functional> +#include <vector> // wird fuer Invalidate verwendet -> mitpflegen sal_uInt16 DatabaseSlotMap[] = @@ -1050,9 +1051,8 @@ void FmXFormShell::InvalidateSlot( sal_Int16 nId, sal_Bool bWithId ) ::osl::MutexGuard aGuard(m_aInvalidationSafety); if (m_nLockSlotInvalidation) { - m_arrInvalidSlots.Insert(nId, m_arrInvalidSlots.Count()); BYTE nFlags = ( bWithId ? 0x01 : 0 ); - m_arrInvalidSlots_Flags.Insert(nFlags, m_arrInvalidSlots_Flags.Count()); + m_arrInvalidSlots.push_back( InvalidSlotInfo(nId, nFlags) ); } else if (nId) @@ -1090,21 +1090,14 @@ IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG) ::osl::MutexGuard aGuard(m_aInvalidationSafety); m_nInvalidationEvent = 0; - DBG_ASSERT(m_arrInvalidSlots.Count() == m_arrInvalidSlots_Flags.Count(), - "FmXFormShell::OnInvalidateSlots : inconsistent slot arrays !"); - BYTE nFlags; - for (sal_Int16 i=0; i<m_arrInvalidSlots.Count(); ++i) + for (std::vector<InvalidSlotInfo>::const_iterator i = m_arrInvalidSlots.begin(); i < m_arrInvalidSlots.end(); ++i) { - nFlags = m_arrInvalidSlots_Flags[i]; - - if (m_arrInvalidSlots[i]) - m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(m_arrInvalidSlots[i], sal_True, (nFlags & 0x01)); + if (i->id) + m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(i->id, sal_True, (i->flags & 0x01)); else m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell); } - - m_arrInvalidSlots.Remove(0, m_arrInvalidSlots.Count()); - m_arrInvalidSlots_Flags.Remove(0, m_arrInvalidSlots_Flags.Count()); + m_arrInvalidSlots.clear(); return 0L; } diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 09e1f1563ab8..dacd329cf8b7 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -180,8 +180,12 @@ class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE // We enable a permanent cursor for the grid we found a searched text, it's disabled in the next "found" event. FmFormArray m_aSearchForms; - SvUShorts m_arrInvalidSlots; - SvBytes m_arrInvalidSlots_Flags; + struct InvalidSlotInfo { + USHORT id; + BYTE flags; + inline InvalidSlotInfo(USHORT slotId, BYTE flgs) : id(slotId), flags(flgs) {}; + }; + std::vector<InvalidSlotInfo> m_arrInvalidSlots; // we explicitly switch off the propbrw before leaving the design mode // this flag tells us if we have to switch it on again when reentering |