sd: keep a non-owning pointer to the OverridingShell
[LibreOffice.git] / svx / source / form / datalistener.cxx
blobfda74a92c416819d3f69da1eb1626280deb7fa12
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #include <sal/log.hxx>
26 using namespace ::com::sun::star::container;
27 using namespace ::com::sun::star::frame;
28 using namespace ::com::sun::star::lang;
29 using namespace ::com::sun::star::uno;
30 using namespace ::com::sun::star::xml::dom::events;
33 namespace svxform
37 DataListener::DataListener( DataNavigatorWindow* pNaviWin ) :
39 m_pNaviWin( pNaviWin )
42 DBG_ASSERT( m_pNaviWin, "DataListener::Ctor(): no navigator win" );
45 DataListener::~DataListener()
49 // XContainerListener
50 void SAL_CALL DataListener::elementInserted( const ContainerEvent& /*Event*/ )
52 m_pNaviWin->NotifyChanges();
55 void SAL_CALL DataListener::elementRemoved( const ContainerEvent& /*Event*/ )
57 m_pNaviWin->NotifyChanges();
60 void SAL_CALL DataListener::elementReplaced( const ContainerEvent& /*Event*/ )
62 m_pNaviWin->NotifyChanges();
65 // XFrameActionListener
66 void SAL_CALL DataListener::frameAction( const FrameActionEvent& rActionEvt )
68 if ( FrameAction_COMPONENT_ATTACHED == rActionEvt.Action ||
69 FrameAction_COMPONENT_REATTACHED == rActionEvt.Action )
71 m_pNaviWin->NotifyChanges( FrameAction_COMPONENT_REATTACHED == rActionEvt.Action );
75 // xml::dom::events::XEventListener
76 void SAL_CALL DataListener::handleEvent( const Reference< XEvent >& /*evt*/ )
78 m_pNaviWin->NotifyChanges();
81 // lang::XEventListener
82 void SAL_CALL DataListener::disposing( const EventObject& /*Source*/ )
84 SAL_WARN( "svx.form", "disposing" );
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */