containermultiplexer.cxx (dde7d3fa) containermultiplexer.cxx (e2530cf9)
1/**************************************************************
1/**************************************************************
2 *
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_comphelper.hxx"
26#include "comphelper/containermultiplexer.hxx"
27#include "comphelper/uno3.hxx"

--- 65 unchanged lines hidden (view full) ---

93 }
94 }
95
96 //=====================================================================
97 //= OContainerListenerAdapter
98 //=====================================================================
99 //---------------------------------------------------------------------
100 OContainerListenerAdapter::OContainerListenerAdapter(OContainerListener* _pListener,
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_comphelper.hxx"
26#include "comphelper/containermultiplexer.hxx"
27#include "comphelper/uno3.hxx"

--- 65 unchanged lines hidden (view full) ---

93 }
94 }
95
96 //=====================================================================
97 //= OContainerListenerAdapter
98 //=====================================================================
99 //---------------------------------------------------------------------
100 OContainerListenerAdapter::OContainerListenerAdapter(OContainerListener* _pListener,
101 const Reference< XContainer >& _rxContainer)
101 const Reference< XContainer >& _rxContainer)
102 :m_xContainer(_rxContainer)
103 ,m_pListener(_pListener)
104 ,m_nLockCount(0)
105 {
106 if (m_pListener)
107 m_pListener->setAdapter(this);
108
109 ::comphelper::increment(m_refCount);

--- 41 unchanged lines hidden (view full) ---

151 OSL_ENSURE(0,"Exception catched!");
152 }
153 m_xContainer = NULL;
154 m_pListener = NULL;
155 }
156 }
157
158 //------------------------------------------------------------------
102 :m_xContainer(_rxContainer)
103 ,m_pListener(_pListener)
104 ,m_nLockCount(0)
105 {
106 if (m_pListener)
107 m_pListener->setAdapter(this);
108
109 ::comphelper::increment(m_refCount);

--- 41 unchanged lines hidden (view full) ---

151 OSL_ENSURE(0,"Exception catched!");
152 }
153 m_xContainer = NULL;
154 m_pListener = NULL;
155 }
156 }
157
158 //------------------------------------------------------------------
159 void SAL_CALL OContainerListenerAdapter::disposing( const EventObject& _rSource) throw(RuntimeException)
159 void SAL_CALL OContainerListenerAdapter::disposing( const EventObject& _rSource) throw(RuntimeException)
160 {
161 if (m_pListener)
162 {
163 // tell the listener
164 if (!locked())
165 m_pListener->_disposing(_rSource);
166 // disconnect the listener
160 {
161 if (m_pListener)
162 {
163 // tell the listener
164 if (!locked())
165 m_pListener->_disposing(_rSource);
166 // disconnect the listener
167 if ( m_pListener )
168 m_pListener->setAdapter(NULL);
167 if ( m_pListener )
168 m_pListener->setAdapter(NULL);
169 }
170
171 m_xContainer = NULL;
172 m_pListener = NULL;
173 }
174
175 //------------------------------------------------------------------
176 void SAL_CALL OContainerListenerAdapter::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)

--- 14 unchanged lines hidden (view full) ---

191 {
192 if (m_pListener && !locked())
193 m_pListener->_elementReplaced(_rEvent);
194 }
195
196//.........................................................................
197} // namespace comphelper
198//.........................................................................
169 }
170
171 m_xContainer = NULL;
172 m_pListener = NULL;
173 }
174
175 //------------------------------------------------------------------
176 void SAL_CALL OContainerListenerAdapter::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)

--- 14 unchanged lines hidden (view full) ---

191 {
192 if (m_pListener && !locked())
193 m_pListener->_elementReplaced(_rEvent);
194 }
195
196//.........................................................................
197} // namespace comphelper
198//.........................................................................
199