diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2006-12-19 13:08:37 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2006-12-19 13:08:37 +0000 |
commit | dd8063c2f819f2d13441e99cbdd252e2ae3d0c32 (patch) | |
tree | fc6f239ade24c69c6820cad3b26240516891cf34 /sfx2 | |
parent | 445f3cf9e28d3f9b21a76c63611d79df6cccbff1 (diff) |
INTEGRATION: CWS fwk56 (1.7.52); FILE MERGED
2006/12/01 16:00:00 mav 1.7.52.2: RESYNC: (1.7-1.8); FILE MERGED
2006/11/28 09:45:59 mav 1.7.52.1: #i68367# check the consistency, since the call might clean the array
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/linksrc.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index bbf7179cf92a..a68fc25cf37e 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: linksrc.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: vg $ $Date: 2006-11-22 10:55:33 $ + * last change: $Author: ihi $ $Date: 2006-12-19 14:08:37 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,7 +36,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" - #include "linksrc.hxx" #include "lnkbase.hxx" //#include <sot/exchange.hxx> @@ -127,6 +126,7 @@ public: SvLinkSource_Entry_Impl* Curr() { return nPos < aArr.Count() ? aArr[ nPos ] : 0; } SvLinkSource_Entry_Impl* Next(); + sal_Bool IsValidCurrValue( SvLinkSource_Entry_Impl* pEntry ); }; SvLinkSource_EntryIter_Impl::SvLinkSource_EntryIter_Impl( @@ -140,6 +140,11 @@ SvLinkSource_EntryIter_Impl::~SvLinkSource_EntryIter_Impl() aArr.Remove( 0, aArr.Count() ); } +sal_Bool SvLinkSource_EntryIter_Impl::IsValidCurrValue( SvLinkSource_Entry_Impl* pEntry ) +{ + return ( nPos < aArr.Count() && aArr[nPos] == pEntry && USHRT_MAX != rOrigArr.GetPos( pEntry ) ); +} + SvLinkSource_Entry_Impl* SvLinkSource_EntryIter_Impl::Next() { SvLinkSource_Entry_ImplPtr pRet = 0; @@ -249,6 +254,9 @@ void SvLinkSource::SendDataChanged() { p->xSink->DataChanged( sDataMimeType, aVal ); + if ( !aIter.IsValidCurrValue( p ) ) + continue; + if( p->nAdviseModes & ADVISEMODE_ONLYONCE ) { USHORT nFndPos = pImpl->aArr.GetPos( p ); @@ -283,6 +291,9 @@ void SvLinkSource::NotifyDataChanged() { p->xSink->DataChanged( p->aDataMimeType, aVal ); + if ( !aIter.IsValidCurrValue( p ) ) + continue; + if( p->nAdviseModes & ADVISEMODE_ONLYONCE ) { USHORT nFndPos = pImpl->aArr.GetPos( p ); @@ -320,6 +331,9 @@ void SvLinkSource::DataChanged( const String & rMimeType, { p->xSink->DataChanged( rMimeType, rVal ); + if ( !aIter.IsValidCurrValue( p ) ) + continue; + if( p->nAdviseModes & ADVISEMODE_ONLYONCE ) { USHORT nFndPos = pImpl->aArr.GetPos( p ); |