merge the formfield patch from ooo-build
[ooovba.git] / svx / source / form / datalistener.cxx
blob595054855dd07f0cd23eda92bfb455ea418ac849
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: datalistener.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #include "datalistener.hxx"
35 #include "datanavi.hxx"
37 using namespace ::com::sun::star::container;
38 using namespace ::com::sun::star::frame;
39 using namespace ::com::sun::star::lang;
40 using namespace ::com::sun::star::uno;
41 using namespace ::com::sun::star::xml::dom::events;
43 //............................................................................
44 namespace svxform
46 //............................................................................
48 DataListener::DataListener( DataNavigatorWindow* pNaviWin ) :
50 m_pNaviWin( pNaviWin )
53 DBG_ASSERT( m_pNaviWin, "DataListener::Ctor(): no navigator win" );
56 DataListener::~DataListener()
60 // XContainerListener
61 void SAL_CALL DataListener::elementInserted( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
63 m_pNaviWin->NotifyChanges();
66 void SAL_CALL DataListener::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
68 m_pNaviWin->NotifyChanges();
71 void SAL_CALL DataListener::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
73 m_pNaviWin->NotifyChanges();
76 // XFrameActionListener
77 void SAL_CALL DataListener::frameAction( const FrameActionEvent& rActionEvt ) throw (RuntimeException)
79 if ( FrameAction_COMPONENT_ATTACHED == rActionEvt.Action ||
80 FrameAction_COMPONENT_REATTACHED == rActionEvt.Action )
82 m_pNaviWin->NotifyChanges( FrameAction_COMPONENT_REATTACHED == rActionEvt.Action );
86 // xml::dom::events::XEventListener
87 void SAL_CALL DataListener::handleEvent( const Reference< XEvent >& /*evt*/ ) throw (RuntimeException)
89 m_pNaviWin->NotifyChanges();
92 // lang::XEventListener
93 void SAL_CALL DataListener::disposing( const EventObject& /*Source*/ ) throw (RuntimeException)
95 DBG_ERRORFILE( "disposing" );
98 //............................................................................
99 } // namespace svxform
100 //............................................................................