xref: /aoo41x/main/sfx2/source/dialog/itemconnect.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sfx2.hxx"
30*cdf0e10cSrcweir #include <sfx2/itemconnect.hxx>
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
33*cdf0e10cSrcweir #include <list>
34*cdf0e10cSrcweir #include <svl/itempool.hxx>
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir // ============================================================================
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir namespace sfx {
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir // ============================================================================
41*cdf0e10cSrcweir // Helpers
42*cdf0e10cSrcweir // ============================================================================
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir namespace {
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFlag )
47*cdf0e10cSrcweir {
48*cdf0e10cSrcweir     return (bKnown && bIsKnownFlag) ? STATE_CHECK : ((!bKnown && bIsUnknownFlag) ? STATE_NOCHECK : STATE_DONTKNOW);
49*cdf0e10cSrcweir }
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir } // namespace
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir // ----------------------------------------------------------------------------
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
56*cdf0e10cSrcweir {
57*cdf0e10cSrcweir     return rItemSet.GetPool()->GetWhich( nSlot );
58*cdf0e10cSrcweir }
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
61*cdf0e10cSrcweir {
62*cdf0e10cSrcweir     return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), sal_True ) != SFX_ITEM_UNKNOWN;
63*cdf0e10cSrcweir }
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
66*cdf0e10cSrcweir {
67*cdf0e10cSrcweir     sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot );
68*cdf0e10cSrcweir     return (rItemSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, sal_True ) : 0;
69*cdf0e10cSrcweir }
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
72*cdf0e10cSrcweir {
73*cdf0e10cSrcweir     return rItemSet.GetPool()->GetDefaultItem( GetWhichId( rItemSet, nSlot ) );
74*cdf0e10cSrcweir }
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot )
77*cdf0e10cSrcweir {
78*cdf0e10cSrcweir     sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot );
79*cdf0e10cSrcweir     if( rOldSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_DEFAULT )
80*cdf0e10cSrcweir         rDestSet.ClearItem( nWhich );
81*cdf0e10cSrcweir }
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir // ============================================================================
84*cdf0e10cSrcweir // Base control wrapper classes
85*cdf0e10cSrcweir // ============================================================================
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir ControlWrapperBase::~ControlWrapperBase()
88*cdf0e10cSrcweir {
89*cdf0e10cSrcweir }
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir // ============================================================================
92*cdf0e10cSrcweir // Single control wrappers
93*cdf0e10cSrcweir // ============================================================================
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir DummyWindowWrapper::DummyWindowWrapper( Window& rWindow ) :
96*cdf0e10cSrcweir     SingleControlWrapperType( rWindow )
97*cdf0e10cSrcweir {
98*cdf0e10cSrcweir }
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir bool DummyWindowWrapper::IsControlDontKnow() const
101*cdf0e10cSrcweir {
102*cdf0e10cSrcweir     return false;
103*cdf0e10cSrcweir }
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir void DummyWindowWrapper::SetControlDontKnow( bool )
106*cdf0e10cSrcweir {
107*cdf0e10cSrcweir }
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir void* DummyWindowWrapper::GetControlValue() const
110*cdf0e10cSrcweir {
111*cdf0e10cSrcweir     return 0;
112*cdf0e10cSrcweir }
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir void DummyWindowWrapper::SetControlValue( void* )
115*cdf0e10cSrcweir {
116*cdf0e10cSrcweir }
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir // ----------------------------------------------------------------------------
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir CheckBoxWrapper::CheckBoxWrapper( CheckBox& rCheckBox ) :
121*cdf0e10cSrcweir         SingleControlWrapperType( rCheckBox )
122*cdf0e10cSrcweir {
123*cdf0e10cSrcweir }
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir bool CheckBoxWrapper::IsControlDontKnow() const
126*cdf0e10cSrcweir {
127*cdf0e10cSrcweir     return GetControl().GetState() == STATE_DONTKNOW;
128*cdf0e10cSrcweir }
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir void CheckBoxWrapper::SetControlDontKnow( bool bSet )
131*cdf0e10cSrcweir {
132*cdf0e10cSrcweir     GetControl().EnableTriState( bSet );
133*cdf0e10cSrcweir     GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK );
134*cdf0e10cSrcweir }
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir sal_Bool CheckBoxWrapper::GetControlValue() const
137*cdf0e10cSrcweir {
138*cdf0e10cSrcweir     return GetControl().IsChecked();
139*cdf0e10cSrcweir }
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir void CheckBoxWrapper::SetControlValue( sal_Bool bValue )
142*cdf0e10cSrcweir {
143*cdf0e10cSrcweir     GetControl().Check( bValue );
144*cdf0e10cSrcweir }
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir // ----------------------------------------------------------------------------
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir EditWrapper::EditWrapper( Edit& rEdit ) :
149*cdf0e10cSrcweir         SingleControlWrapperType( rEdit )
150*cdf0e10cSrcweir {
151*cdf0e10cSrcweir }
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir bool EditWrapper::IsControlDontKnow() const
154*cdf0e10cSrcweir {
155*cdf0e10cSrcweir     // no "don't know" state - empty string is a valid value of an Edit
156*cdf0e10cSrcweir     return false;
157*cdf0e10cSrcweir }
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir void EditWrapper::SetControlDontKnow( bool bSet )
160*cdf0e10cSrcweir {
161*cdf0e10cSrcweir     if( bSet )
162*cdf0e10cSrcweir         GetControl().SetText( String() );
163*cdf0e10cSrcweir }
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir String EditWrapper::GetControlValue() const
166*cdf0e10cSrcweir {
167*cdf0e10cSrcweir     return GetControl().GetText();
168*cdf0e10cSrcweir }
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir void EditWrapper::SetControlValue( String aValue )
171*cdf0e10cSrcweir {
172*cdf0e10cSrcweir     GetControl().SetText( aValue );
173*cdf0e10cSrcweir }
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir // ----------------------------------------------------------------------------
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir ColorListBoxWrapper::ColorListBoxWrapper(ColorListBox & rListBox):
178*cdf0e10cSrcweir     SingleControlWrapper< ColorListBox, Color >(rListBox)
179*cdf0e10cSrcweir {}
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir ColorListBoxWrapper::~ColorListBoxWrapper()
182*cdf0e10cSrcweir {}
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir bool ColorListBoxWrapper::IsControlDontKnow() const
185*cdf0e10cSrcweir {
186*cdf0e10cSrcweir     return GetControl().GetSelectEntryCount() == 0;
187*cdf0e10cSrcweir }
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir void ColorListBoxWrapper::SetControlDontKnow( bool bSet )
190*cdf0e10cSrcweir {
191*cdf0e10cSrcweir     if( bSet ) GetControl().SetNoSelection();
192*cdf0e10cSrcweir }
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir Color ColorListBoxWrapper::GetControlValue() const
195*cdf0e10cSrcweir {
196*cdf0e10cSrcweir     return GetControl().GetSelectEntryColor();
197*cdf0e10cSrcweir }
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir void ColorListBoxWrapper::SetControlValue( Color aColor )
200*cdf0e10cSrcweir {
201*cdf0e10cSrcweir     GetControl().SelectEntry( aColor );
202*cdf0e10cSrcweir }
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir // ============================================================================
205*cdf0e10cSrcweir // Multi control wrappers
206*cdf0e10cSrcweir // ============================================================================
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir typedef std::vector< ControlWrapperBase* >  ControlWrpVec;
209*cdf0e10cSrcweir typedef ControlWrpVec::iterator             ControlWrpVecI;
210*cdf0e10cSrcweir typedef ControlWrpVec::const_iterator       ControlWrpVecCI;
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir struct MultiControlWrapperHelper_Impl
213*cdf0e10cSrcweir {
214*cdf0e10cSrcweir     ControlWrpVec       maVec;
215*cdf0e10cSrcweir };
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir MultiControlWrapperHelper::MultiControlWrapperHelper() :
218*cdf0e10cSrcweir     mxImpl( new MultiControlWrapperHelper_Impl )
219*cdf0e10cSrcweir {
220*cdf0e10cSrcweir }
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir MultiControlWrapperHelper::~MultiControlWrapperHelper()
223*cdf0e10cSrcweir {
224*cdf0e10cSrcweir }
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir void MultiControlWrapperHelper::RegisterControlWrapper( ControlWrapperBase& rWrapper )
227*cdf0e10cSrcweir {
228*cdf0e10cSrcweir     mxImpl->maVec.push_back( &rWrapper );
229*cdf0e10cSrcweir }
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir void MultiControlWrapperHelper::ModifyControl( TriState eEnable, TriState eShow )
232*cdf0e10cSrcweir {
233*cdf0e10cSrcweir     for( ControlWrpVecI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt )
234*cdf0e10cSrcweir         (*aIt)->ModifyControl( eEnable, eShow );
235*cdf0e10cSrcweir }
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir bool MultiControlWrapperHelper::IsControlDontKnow() const
238*cdf0e10cSrcweir {
239*cdf0e10cSrcweir     bool bIs = !mxImpl->maVec.empty();
240*cdf0e10cSrcweir     for( ControlWrpVecCI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); bIs && (aIt != aEnd); ++aIt )
241*cdf0e10cSrcweir         bIs &= (*aIt)->IsControlDontKnow();
242*cdf0e10cSrcweir     return bIs;
243*cdf0e10cSrcweir }
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir void MultiControlWrapperHelper::SetControlDontKnow( bool bSet )
246*cdf0e10cSrcweir {
247*cdf0e10cSrcweir     for( ControlWrpVecI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt )
248*cdf0e10cSrcweir         (*aIt)->SetControlDontKnow( bSet );
249*cdf0e10cSrcweir }
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir // ============================================================================
252*cdf0e10cSrcweir // Base connection classes
253*cdf0e10cSrcweir // ============================================================================
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir ItemConnectionBase::ItemConnectionBase( ItemConnFlags nFlags ) :
256*cdf0e10cSrcweir     mnFlags( nFlags )
257*cdf0e10cSrcweir {
258*cdf0e10cSrcweir }
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir ItemConnectionBase::~ItemConnectionBase()
261*cdf0e10cSrcweir {
262*cdf0e10cSrcweir }
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir void ItemConnectionBase::Activate( bool bActive )
265*cdf0e10cSrcweir {
266*cdf0e10cSrcweir     if( bActive ) mnFlags &= ~ITEMCONN_INACTIVE; else mnFlags |= ITEMCONN_INACTIVE;
267*cdf0e10cSrcweir }
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir bool ItemConnectionBase::IsActive() const
270*cdf0e10cSrcweir {
271*cdf0e10cSrcweir     return !(mnFlags & ITEMCONN_INACTIVE);
272*cdf0e10cSrcweir }
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir void ItemConnectionBase::DoApplyFlags( const SfxItemSet& rItemSet )
275*cdf0e10cSrcweir {
276*cdf0e10cSrcweir     if( IsActive() )
277*cdf0e10cSrcweir         ApplyFlags( rItemSet );
278*cdf0e10cSrcweir }
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir void ItemConnectionBase::DoReset( const SfxItemSet& rItemSet )
281*cdf0e10cSrcweir {
282*cdf0e10cSrcweir     if( IsActive() )
283*cdf0e10cSrcweir         Reset( rItemSet );
284*cdf0e10cSrcweir }
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir bool ItemConnectionBase::DoFillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
287*cdf0e10cSrcweir {
288*cdf0e10cSrcweir     return IsActive() && FillItemSet( rDestSet, rOldSet );
289*cdf0e10cSrcweir }
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir TriState ItemConnectionBase::GetEnableState( bool bKnown ) const
292*cdf0e10cSrcweir {
293*cdf0e10cSrcweir     return lclConvertToTriState( bKnown, mnFlags & ITEMCONN_ENABLE_KNOWN, mnFlags & ITEMCONN_DISABLE_UNKNOWN );
294*cdf0e10cSrcweir }
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir TriState ItemConnectionBase::GetShowState( bool bKnown ) const
297*cdf0e10cSrcweir {
298*cdf0e10cSrcweir     return lclConvertToTriState( bKnown, mnFlags & ITEMCONN_SHOW_KNOWN, mnFlags & ITEMCONN_HIDE_UNKNOWN );
299*cdf0e10cSrcweir }
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir // ============================================================================
302*cdf0e10cSrcweir // Standard connections
303*cdf0e10cSrcweir // ============================================================================
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir DummyItemConnection::DummyItemConnection( sal_uInt16 nSlot, Window& rWindow, ItemConnFlags nFlags ) :
306*cdf0e10cSrcweir     ItemConnectionBase( nFlags ),
307*cdf0e10cSrcweir     DummyWindowWrapper( rWindow ),
308*cdf0e10cSrcweir     mnSlot( nSlot )
309*cdf0e10cSrcweir {
310*cdf0e10cSrcweir }
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir void DummyItemConnection::ApplyFlags( const SfxItemSet& rItemSet )
313*cdf0e10cSrcweir {
314*cdf0e10cSrcweir     bool bKnown = ItemWrapperHelper::IsKnownItem( rItemSet, mnSlot );
315*cdf0e10cSrcweir     ModifyControl( GetEnableState( bKnown ), GetShowState( bKnown ) );
316*cdf0e10cSrcweir }
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir void DummyItemConnection::Reset( const SfxItemSet& /*rItemSet*/ )
319*cdf0e10cSrcweir {
320*cdf0e10cSrcweir }
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir bool DummyItemConnection::FillItemSet( SfxItemSet& /*rDestSet*/, const SfxItemSet& /*rOldSet*/ )
323*cdf0e10cSrcweir {
324*cdf0e10cSrcweir     return false;   // item set not changed
325*cdf0e10cSrcweir }
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir // ============================================================================
328*cdf0e10cSrcweir // Array of connections
329*cdf0e10cSrcweir // ============================================================================
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir class ItemConnectionArrayImpl
332*cdf0e10cSrcweir {
333*cdf0e10cSrcweir public:
334*cdf0e10cSrcweir     void                        Append( ItemConnectionBase* pConnection );
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     void                        ApplyFlags( const SfxItemSet& rItemSet );
337*cdf0e10cSrcweir     void                        Reset( const SfxItemSet& rItemSet );
338*cdf0e10cSrcweir     bool                        FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir private:
341*cdf0e10cSrcweir     typedef boost::shared_ptr< ItemConnectionBase > ItemConnectionRef;
342*cdf0e10cSrcweir     typedef std::list< ItemConnectionRef >          ItemConnectionList;
343*cdf0e10cSrcweir     typedef ItemConnectionList::iterator            ItemConnectionListIt;
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir     ItemConnectionList          maList;
346*cdf0e10cSrcweir };
347*cdf0e10cSrcweir 
348*cdf0e10cSrcweir void ItemConnectionArrayImpl::Append( ItemConnectionBase* pConnection )
349*cdf0e10cSrcweir {
350*cdf0e10cSrcweir     if( pConnection )
351*cdf0e10cSrcweir         maList.push_back( ItemConnectionRef( pConnection ) );
352*cdf0e10cSrcweir }
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir void ItemConnectionArrayImpl::ApplyFlags( const SfxItemSet& rItemSet )
355*cdf0e10cSrcweir {
356*cdf0e10cSrcweir     for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
357*cdf0e10cSrcweir         (*aIt)->DoApplyFlags( rItemSet );
358*cdf0e10cSrcweir }
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir void ItemConnectionArrayImpl::Reset( const SfxItemSet& rItemSet )
361*cdf0e10cSrcweir {
362*cdf0e10cSrcweir     for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
363*cdf0e10cSrcweir         (*aIt)->DoReset( rItemSet );
364*cdf0e10cSrcweir }
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir bool ItemConnectionArrayImpl::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
367*cdf0e10cSrcweir {
368*cdf0e10cSrcweir     bool bChanged = false;
369*cdf0e10cSrcweir     for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
370*cdf0e10cSrcweir         bChanged |= (*aIt)->DoFillItemSet( rDestSet, rOldSet );
371*cdf0e10cSrcweir     return bChanged;
372*cdf0e10cSrcweir }
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir // ----------------------------------------------------------------------------
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir ItemConnectionArray::ItemConnectionArray() :
377*cdf0e10cSrcweir     mxImpl( new ItemConnectionArrayImpl )
378*cdf0e10cSrcweir {
379*cdf0e10cSrcweir }
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir ItemConnectionArray::~ItemConnectionArray()
382*cdf0e10cSrcweir {
383*cdf0e10cSrcweir }
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir void ItemConnectionArray::AddConnection( ItemConnectionBase* pConnection )
386*cdf0e10cSrcweir {
387*cdf0e10cSrcweir     mxImpl->Append( pConnection );
388*cdf0e10cSrcweir }
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir void ItemConnectionArray::ApplyFlags( const SfxItemSet& rItemSet )
391*cdf0e10cSrcweir {
392*cdf0e10cSrcweir     mxImpl->ApplyFlags( rItemSet );
393*cdf0e10cSrcweir }
394*cdf0e10cSrcweir 
395*cdf0e10cSrcweir void ItemConnectionArray::Reset( const SfxItemSet& rItemSet )
396*cdf0e10cSrcweir {
397*cdf0e10cSrcweir     mxImpl->Reset( rItemSet );
398*cdf0e10cSrcweir }
399*cdf0e10cSrcweir 
400*cdf0e10cSrcweir bool ItemConnectionArray::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
401*cdf0e10cSrcweir {
402*cdf0e10cSrcweir     return mxImpl->FillItemSet( rDestSet, rOldSet );
403*cdf0e10cSrcweir }
404*cdf0e10cSrcweir 
405*cdf0e10cSrcweir // ============================================================================
406*cdf0e10cSrcweir 
407*cdf0e10cSrcweir } // namespace sfx
408*cdf0e10cSrcweir 
409