1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include "datalistener.hxx"
22 #include "datanavi.hxx"
24 using namespace ::com::sun::star::container
;
25 using namespace ::com::sun::star::frame
;
26 using namespace ::com::sun::star::lang
;
27 using namespace ::com::sun::star::uno
;
28 using namespace ::com::sun::star::xml::dom::events
;
35 DataListener::DataListener( DataNavigatorWindow
* pNaviWin
) :
37 m_pNaviWin( pNaviWin
)
40 DBG_ASSERT( m_pNaviWin
, "DataListener::Ctor(): no navigator win" );
43 DataListener::~DataListener()
48 void SAL_CALL
DataListener::elementInserted( const ContainerEvent
& /*Event*/ ) throw (RuntimeException
, std::exception
)
50 m_pNaviWin
->NotifyChanges();
53 void SAL_CALL
DataListener::elementRemoved( const ContainerEvent
& /*Event*/ ) throw (RuntimeException
, std::exception
)
55 m_pNaviWin
->NotifyChanges();
58 void SAL_CALL
DataListener::elementReplaced( const ContainerEvent
& /*Event*/ ) throw (RuntimeException
, std::exception
)
60 m_pNaviWin
->NotifyChanges();
63 // XFrameActionListener
64 void SAL_CALL
DataListener::frameAction( const FrameActionEvent
& rActionEvt
) throw (RuntimeException
, std::exception
)
66 if ( FrameAction_COMPONENT_ATTACHED
== rActionEvt
.Action
||
67 FrameAction_COMPONENT_REATTACHED
== rActionEvt
.Action
)
69 m_pNaviWin
->NotifyChanges( FrameAction_COMPONENT_REATTACHED
== rActionEvt
.Action
);
73 // xml::dom::events::XEventListener
74 void SAL_CALL
DataListener::handleEvent( const Reference
< XEvent
>& /*evt*/ ) throw (RuntimeException
, std::exception
)
76 m_pNaviWin
->NotifyChanges();
79 // lang::XEventListener
80 void SAL_CALL
DataListener::disposing( const EventObject
& /*Source*/ ) throw (RuntimeException
, std::exception
)
82 SAL_WARN( "svx.form", "disposing" );
86 } // namespace svxform
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */