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_package.hxx"
30*cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
31*cdf0e10cSrcweir #include <com/sun/star/embed/ElementModes.hpp>
32*cdf0e10cSrcweir #include <com/sun/star/embed/XHierarchicalStorageAccess2.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include "ohierarchyholder.hxx"
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir using namespace ::com::sun::star;
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir //===============================================
40*cdf0e10cSrcweir // OHierarchyHolder_Impl
41*cdf0e10cSrcweir //===============================================
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir //-----------------------------------------------
44*cdf0e10cSrcweir uno::Reference< embed::XExtendedStorageStream > OHierarchyHolder_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData )
45*cdf0e10cSrcweir {
46*cdf0e10cSrcweir 	uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir 	if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & embed::ElementModes::WRITE ) )
49*cdf0e10cSrcweir 		throw io::IOException();
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir 	uno::Reference< embed::XExtendedStorageStream > xResult =
52*cdf0e10cSrcweir 		m_xChild->GetStreamHierarchically( nStorageMode, aListPath, nStreamMode, aEncryptionData );
53*cdf0e10cSrcweir 	if ( !xResult.is() )
54*cdf0e10cSrcweir 		throw uno::RuntimeException();
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir 	return xResult;
57*cdf0e10cSrcweir }
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir //-----------------------------------------------
60*cdf0e10cSrcweir void OHierarchyHolder_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath )
61*cdf0e10cSrcweir {
62*cdf0e10cSrcweir 	uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir 	m_xChild->RemoveStreamHierarchically( aListPath );
65*cdf0e10cSrcweir }
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir //-----------------------------------------------
68*cdf0e10cSrcweir // static
69*cdf0e10cSrcweir OStringList_Impl OHierarchyHolder_Impl::GetListPathFromString( const ::rtl::OUString& aPath )
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir 	OStringList_Impl aResult;
72*cdf0e10cSrcweir 	sal_Int32 nIndex = 0;
73*cdf0e10cSrcweir 	do
74*cdf0e10cSrcweir 	{
75*cdf0e10cSrcweir 		::rtl::OUString aName = aPath.getToken( 0, '/', nIndex );
76*cdf0e10cSrcweir 		if ( !aName.getLength() )
77*cdf0e10cSrcweir 			throw lang::IllegalArgumentException();
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir 		aResult.push_back( aName );
80*cdf0e10cSrcweir 	}
81*cdf0e10cSrcweir 	while ( nIndex >= 0 );
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 	return aResult;
84*cdf0e10cSrcweir }
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir //===============================================
87*cdf0e10cSrcweir // OHierarchyElement_Impl
88*cdf0e10cSrcweir //===============================================
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir //-----------------------------------------------
91*cdf0e10cSrcweir uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData )
92*cdf0e10cSrcweir {
93*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir 	if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & embed::ElementModes::WRITE ) )
96*cdf0e10cSrcweir 		throw io::IOException();
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir 	if ( !aListPath.size() )
99*cdf0e10cSrcweir 		throw uno::RuntimeException();
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 	::rtl::OUString aNextName = *(aListPath.begin());
102*cdf0e10cSrcweir 	aListPath.erase( aListPath.begin() );
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	uno::Reference< embed::XExtendedStorageStream > xResult;
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 	uno::Reference< embed::XStorage > xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
107*cdf0e10cSrcweir 				: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), uno::UNO_QUERY );
108*cdf0e10cSrcweir 	if ( !xOwnStor.is() )
109*cdf0e10cSrcweir 		throw uno::RuntimeException();
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir 	if ( !aListPath.size() )
112*cdf0e10cSrcweir 	{
113*cdf0e10cSrcweir 		if ( !aEncryptionData.size() )
114*cdf0e10cSrcweir         {
115*cdf0e10cSrcweir             uno::Reference< embed::XHierarchicalStorageAccess > xHStorage( xOwnStor, uno::UNO_QUERY_THROW );
116*cdf0e10cSrcweir 			xResult = xHStorage->openStreamElementByHierarchicalName( aNextName, nStreamMode );
117*cdf0e10cSrcweir         }
118*cdf0e10cSrcweir 		else
119*cdf0e10cSrcweir         {
120*cdf0e10cSrcweir             uno::Reference< embed::XHierarchicalStorageAccess2 > xHStorage( xOwnStor, uno::UNO_QUERY_THROW );
121*cdf0e10cSrcweir 			xResult = xHStorage->openEncryptedStreamByHierarchicalName( aNextName, nStreamMode, aEncryptionData.getAsConstNamedValueList() );
122*cdf0e10cSrcweir         }
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 		uno::Reference< embed::XTransactedObject > xTransact( xResult, uno::UNO_QUERY );
125*cdf0e10cSrcweir 		if ( xTransact.is() )
126*cdf0e10cSrcweir 		{
127*cdf0e10cSrcweir 			// the existance of the transacted object means that the stream is opened for writing also
128*cdf0e10cSrcweir 			// so the whole chain must be commited
129*cdf0e10cSrcweir 			uno::Reference< embed::XTransactionBroadcaster > xTrBroadcast( xTransact, uno::UNO_QUERY_THROW );
130*cdf0e10cSrcweir 			xTrBroadcast->addTransactionListener( static_cast< embed::XTransactionListener* >( this ) );
131*cdf0e10cSrcweir 		}
132*cdf0e10cSrcweir 		else
133*cdf0e10cSrcweir 		{
134*cdf0e10cSrcweir 			uno::Reference< lang::XComponent > xStreamComp( xResult, uno::UNO_QUERY_THROW );
135*cdf0e10cSrcweir 			xStreamComp->addEventListener( static_cast< lang::XEventListener* >( this ) );
136*cdf0e10cSrcweir 		}
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir 		m_aOpenStreams.push_back( uno::WeakReference< embed::XExtendedStorageStream >( xResult ) );
139*cdf0e10cSrcweir 	}
140*cdf0e10cSrcweir 	else
141*cdf0e10cSrcweir 	{
142*cdf0e10cSrcweir 		sal_Bool bNewElement = sal_False;
143*cdf0e10cSrcweir 		::rtl::Reference< OHierarchyElement_Impl > aElement;
144*cdf0e10cSrcweir 		OHierarchyElementList_Impl::iterator aIter = m_aChildren.find( aNextName );
145*cdf0e10cSrcweir 		if ( aIter != m_aChildren.end() )
146*cdf0e10cSrcweir 			aElement = aIter->second;
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 		if ( !aElement.is() )
149*cdf0e10cSrcweir 		{
150*cdf0e10cSrcweir 			bNewElement = sal_True;
151*cdf0e10cSrcweir 			uno::Reference< embed::XStorage > xChildStorage = xOwnStor->openStorageElement( aNextName, nStorageMode );
152*cdf0e10cSrcweir 			if ( !xChildStorage.is() )
153*cdf0e10cSrcweir 				throw uno::RuntimeException();
154*cdf0e10cSrcweir 
155*cdf0e10cSrcweir 			aElement = new OHierarchyElement_Impl( NULL, xChildStorage );
156*cdf0e10cSrcweir 		}
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 		xResult = aElement->GetStreamHierarchically( nStorageMode, aListPath, nStreamMode, aEncryptionData );
159*cdf0e10cSrcweir 		if ( !xResult.is() )
160*cdf0e10cSrcweir 			throw uno::RuntimeException();
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 		if ( bNewElement )
163*cdf0e10cSrcweir 		{
164*cdf0e10cSrcweir 			m_aChildren[aNextName] = aElement;
165*cdf0e10cSrcweir 			aElement->SetParent( this );
166*cdf0e10cSrcweir 		}
167*cdf0e10cSrcweir 	}
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir 	// the subelement was opened successfuly, remember the storage to let it be locked
170*cdf0e10cSrcweir 	m_xOwnStorage = xOwnStor;
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 	return xResult;
173*cdf0e10cSrcweir }
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir //-----------------------------------------------
176*cdf0e10cSrcweir void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath )
177*cdf0e10cSrcweir {
178*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 	if ( !aListPath.size() )
181*cdf0e10cSrcweir 		throw uno::RuntimeException();
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir 	::rtl::OUString aNextName = *(aListPath.begin());
184*cdf0e10cSrcweir 	aListPath.erase( aListPath.begin() );
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 	uno::Reference< embed::XExtendedStorageStream > xResult;
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 	uno::Reference< embed::XStorage > xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
189*cdf0e10cSrcweir 				: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), uno::UNO_QUERY );
190*cdf0e10cSrcweir 	if ( !xOwnStor.is() )
191*cdf0e10cSrcweir 		throw uno::RuntimeException();
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	if ( !aListPath.size() )
194*cdf0e10cSrcweir 	{
195*cdf0e10cSrcweir 		xOwnStor->removeElement( aNextName );
196*cdf0e10cSrcweir 	}
197*cdf0e10cSrcweir 	else
198*cdf0e10cSrcweir 	{
199*cdf0e10cSrcweir 		sal_Bool bNewElement = sal_False;
200*cdf0e10cSrcweir 		::rtl::Reference< OHierarchyElement_Impl > aElement;
201*cdf0e10cSrcweir 		OHierarchyElementList_Impl::iterator aIter = m_aChildren.find( aNextName );
202*cdf0e10cSrcweir 		if ( aIter != m_aChildren.end() )
203*cdf0e10cSrcweir 			aElement = aIter->second;
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir 		if ( !aElement.is() )
206*cdf0e10cSrcweir 		{
207*cdf0e10cSrcweir 			bNewElement = sal_True;
208*cdf0e10cSrcweir 			uno::Reference< embed::XStorage > xChildStorage = xOwnStor->openStorageElement( aNextName,
209*cdf0e10cSrcweir 																							embed::ElementModes::READWRITE );
210*cdf0e10cSrcweir 			if ( !xChildStorage.is() )
211*cdf0e10cSrcweir 				throw uno::RuntimeException();
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir 			aElement = new OHierarchyElement_Impl( NULL, xChildStorage );
214*cdf0e10cSrcweir 		}
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir 		aElement->RemoveStreamHierarchically( aListPath );
217*cdf0e10cSrcweir 	}
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir 	uno::Reference< embed::XTransactedObject > xTransact( xOwnStor, uno::UNO_QUERY );
220*cdf0e10cSrcweir 	if ( xTransact.is() )
221*cdf0e10cSrcweir 		xTransact->commit();
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 	TestForClosing();
224*cdf0e10cSrcweir }
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir //-----------------------------------------------
227*cdf0e10cSrcweir void OHierarchyElement_Impl::Commit()
228*cdf0e10cSrcweir {
229*cdf0e10cSrcweir 	::rtl::Reference< OHierarchyElement_Impl > aLocker( this );
230*cdf0e10cSrcweir 	::rtl::Reference< OHierarchyElement_Impl > aParent;
231*cdf0e10cSrcweir 	uno::Reference< embed::XStorage > xOwnStor;
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 	{
234*cdf0e10cSrcweir 		::osl::MutexGuard aGuard( m_aMutex );
235*cdf0e10cSrcweir 		aParent = m_rParent;
236*cdf0e10cSrcweir 		xOwnStor = m_xOwnStorage;
237*cdf0e10cSrcweir 	}
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 	if ( xOwnStor.is() )
240*cdf0e10cSrcweir 	{
241*cdf0e10cSrcweir 		uno::Reference< embed::XTransactedObject > xTransact( xOwnStor, uno::UNO_QUERY_THROW );
242*cdf0e10cSrcweir 		xTransact->commit();
243*cdf0e10cSrcweir 		if ( aParent.is() )
244*cdf0e10cSrcweir 			aParent->Commit();
245*cdf0e10cSrcweir 	}
246*cdf0e10cSrcweir }
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir //-----------------------------------------------
249*cdf0e10cSrcweir void OHierarchyElement_Impl::TestForClosing()
250*cdf0e10cSrcweir {
251*cdf0e10cSrcweir 	::rtl::Reference< OHierarchyElement_Impl > aLocker( this );
252*cdf0e10cSrcweir 	{
253*cdf0e10cSrcweir 		::osl::MutexGuard aGuard( m_aMutex );
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir 		if ( !m_aOpenStreams.size() && !m_aChildren.size() )
256*cdf0e10cSrcweir 		{
257*cdf0e10cSrcweir 			if ( m_rParent.is() )
258*cdf0e10cSrcweir 			{
259*cdf0e10cSrcweir 				// only the root storage should not be disposed, other storages can be disposed
260*cdf0e10cSrcweir 				if ( m_xOwnStorage.is() )
261*cdf0e10cSrcweir 				{
262*cdf0e10cSrcweir 					try
263*cdf0e10cSrcweir 					{
264*cdf0e10cSrcweir 						m_xOwnStorage->dispose();
265*cdf0e10cSrcweir 					}
266*cdf0e10cSrcweir 					catch( uno::Exception& )
267*cdf0e10cSrcweir 					{}
268*cdf0e10cSrcweir 				}
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 				m_rParent->RemoveElement( this );
271*cdf0e10cSrcweir 			}
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir 			m_xOwnStorage = uno::Reference< embed::XStorage >();
274*cdf0e10cSrcweir 		}
275*cdf0e10cSrcweir 	}
276*cdf0e10cSrcweir }
277*cdf0e10cSrcweir 
278*cdf0e10cSrcweir //-----------------------------------------------
279*cdf0e10cSrcweir void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source )
280*cdf0e10cSrcweir 		throw ( uno::RuntimeException )
281*cdf0e10cSrcweir {
282*cdf0e10cSrcweir 	uno::Sequence< embed::XStorage > aStoragesToCommit;
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir 	try
285*cdf0e10cSrcweir 	{
286*cdf0e10cSrcweir 		::osl::ClearableMutexGuard aGuard( m_aMutex );
287*cdf0e10cSrcweir 		uno::Reference< embed::XExtendedStorageStream > xStream( Source.Source, uno::UNO_QUERY );
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir 		for ( OWeakStorRefList_Impl::iterator pStorageIter = m_aOpenStreams.begin();
290*cdf0e10cSrcweir 			  pStorageIter != m_aOpenStreams.end(); )
291*cdf0e10cSrcweir 		{
292*cdf0e10cSrcweir 			OWeakStorRefList_Impl::iterator pTmp = pStorageIter++;
293*cdf0e10cSrcweir 			if ( !pTmp->get().is() || pTmp->get() == xStream )
294*cdf0e10cSrcweir 				m_aOpenStreams.erase( pTmp );
295*cdf0e10cSrcweir 		}
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir 		aGuard.clear();
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir 		TestForClosing();
300*cdf0e10cSrcweir 	}
301*cdf0e10cSrcweir 	catch( uno::Exception& )
302*cdf0e10cSrcweir 	{
303*cdf0e10cSrcweir 		throw uno::RuntimeException(); // no exception must happen here, usually an exception means disaster
304*cdf0e10cSrcweir 	}
305*cdf0e10cSrcweir }
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir //-----------------------------------------------
308*cdf0e10cSrcweir void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyElement_Impl >& aRef )
309*cdf0e10cSrcweir {
310*cdf0e10cSrcweir 	{
311*cdf0e10cSrcweir 		::osl::MutexGuard aGuard( m_aMutex );
312*cdf0e10cSrcweir 		for ( OHierarchyElementList_Impl::iterator aIter = m_aChildren.begin();
313*cdf0e10cSrcweir 			  aIter != m_aChildren.end(); /* increment is done in body */)
314*cdf0e10cSrcweir 		{
315*cdf0e10cSrcweir 			OHierarchyElementList_Impl::iterator aTmpIter = aIter;
316*cdf0e10cSrcweir 			aIter++;
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir 			if ( aTmpIter->second == aRef )
319*cdf0e10cSrcweir 				m_aChildren.erase( aTmpIter );
320*cdf0e10cSrcweir 		}
321*cdf0e10cSrcweir 	}
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 	TestForClosing();
324*cdf0e10cSrcweir }
325*cdf0e10cSrcweir 
326*cdf0e10cSrcweir // XTransactionListener
327*cdf0e10cSrcweir //-----------------------------------------------
328*cdf0e10cSrcweir void SAL_CALL OHierarchyElement_Impl::preCommit( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
329*cdf0e10cSrcweir 	throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
330*cdf0e10cSrcweir {
331*cdf0e10cSrcweir }
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir //-----------------------------------------------
334*cdf0e10cSrcweir void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
335*cdf0e10cSrcweir 	throw (::com::sun::star::uno::RuntimeException)
336*cdf0e10cSrcweir {
337*cdf0e10cSrcweir 	try
338*cdf0e10cSrcweir 	{
339*cdf0e10cSrcweir 		Commit();
340*cdf0e10cSrcweir 	}
341*cdf0e10cSrcweir 	catch( uno::Exception& e )
342*cdf0e10cSrcweir 	{
343*cdf0e10cSrcweir 		throw lang::WrappedTargetRuntimeException(
344*cdf0e10cSrcweir 							::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not commit storage sequence!" ) ),
345*cdf0e10cSrcweir 							uno::Reference< uno::XInterface >(),
346*cdf0e10cSrcweir 							uno::makeAny( e ) );
347*cdf0e10cSrcweir 	}
348*cdf0e10cSrcweir }
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir //-----------------------------------------------
351*cdf0e10cSrcweir void SAL_CALL OHierarchyElement_Impl::preRevert( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
352*cdf0e10cSrcweir 	throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
353*cdf0e10cSrcweir {
354*cdf0e10cSrcweir }
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir //-----------------------------------------------
357*cdf0e10cSrcweir void SAL_CALL OHierarchyElement_Impl::reverted( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
358*cdf0e10cSrcweir 	throw (::com::sun::star::uno::RuntimeException)
359*cdf0e10cSrcweir {
360*cdf0e10cSrcweir }
361*cdf0e10cSrcweir 
362