Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / toolkit / source / controls / grid / grideventforwarder.hxx
blob50a3fd4501da9b23b5612d1f1f4040c300aa9319
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 .
20 #ifndef INCLUDED_TOOLKIT_SOURCE_CONTROLS_GRID_GRIDEVENTFORWARDER_HXX
21 #define INCLUDED_TOOLKIT_SOURCE_CONTROLS_GRID_GRIDEVENTFORWARDER_HXX
23 #include <com/sun/star/awt/grid/XGridDataListener.hpp>
24 #include <com/sun/star/awt/grid/XGridColumnListener.hpp>
25 #include <com/sun/star/container/XContainerListener.hpp>
27 #include <cppuhelper/implbase2.hxx>
30 namespace toolkit
34 class UnoGridControl;
37 //= GridEventForwarder
39 typedef ::cppu::ImplHelper2 < css::awt::grid::XGridDataListener
40 , css::container::XContainerListener
41 > GridEventForwarder_Base;
43 class GridEventForwarder : public GridEventForwarder_Base
45 public:
46 explicit GridEventForwarder( UnoGridControl& i_parent );
47 virtual ~GridEventForwarder();
49 public:
50 // XInterface
51 virtual void SAL_CALL acquire() throw() override;
52 virtual void SAL_CALL release() throw() override;
54 // XGridDataListener
55 virtual void SAL_CALL rowsInserted( const css::awt::grid::GridDataEvent& Event ) override;
56 virtual void SAL_CALL rowsRemoved( const css::awt::grid::GridDataEvent& Event ) override;
57 virtual void SAL_CALL dataChanged( const css::awt::grid::GridDataEvent& Event ) override;
58 virtual void SAL_CALL rowHeadingChanged( const css::awt::grid::GridDataEvent& Event ) override;
60 // XContainerListener
61 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
62 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
63 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
65 // XEventListener
66 virtual void SAL_CALL disposing( const css::lang::EventObject& i_event ) override;
68 private:
69 UnoGridControl& m_parent;
73 } // namespace toolkit
76 #endif // INCLUDED_TOOLKIT_SOURCE_CONTROLS_GRID_GRIDEVENTFORWARDER_HXX
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */