tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / toolkit / source / controls / grid / grideventforwarder.cxx
blob5baf5fdda33432f31ec7d94bd294ae41b622296e
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 #include "grideventforwarder.hxx"
21 #include "gridcontrol.hxx"
24 namespace toolkit
28 using ::com::sun::star::uno::Reference;
29 using ::com::sun::star::uno::UNO_QUERY;
30 using ::com::sun::star::awt::grid::GridDataEvent;
31 using ::com::sun::star::container::ContainerEvent;
32 using ::com::sun::star::lang::EventObject;
35 //= GridEventForwarder
38 GridEventForwarder::GridEventForwarder( UnoGridControl& i_parent )
39 :m_parent( i_parent )
44 GridEventForwarder::~GridEventForwarder()
49 void SAL_CALL GridEventForwarder::acquire() noexcept
51 m_parent.acquire();
55 void SAL_CALL GridEventForwarder::release() noexcept
57 m_parent.release();
61 void SAL_CALL GridEventForwarder::rowsInserted( const GridDataEvent& i_event )
63 Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
64 if ( xPeer.is() )
65 xPeer->rowsInserted( i_event );
69 void SAL_CALL GridEventForwarder::rowsRemoved( const GridDataEvent& i_event )
71 Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
72 if ( xPeer.is() )
73 xPeer->rowsRemoved( i_event );
77 void SAL_CALL GridEventForwarder::dataChanged( const GridDataEvent& i_event )
79 Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
80 if ( xPeer.is() )
81 xPeer->dataChanged( i_event );
85 void SAL_CALL GridEventForwarder::rowHeadingChanged( const GridDataEvent& i_event )
87 Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
88 if ( xPeer.is() )
89 xPeer->rowHeadingChanged( i_event );
93 void SAL_CALL GridEventForwarder::elementInserted( const ContainerEvent& i_event )
95 Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
96 if ( xPeer.is() )
97 xPeer->elementInserted( i_event );
101 void SAL_CALL GridEventForwarder::elementRemoved( const ContainerEvent& i_event )
103 Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
104 if ( xPeer.is() )
105 xPeer->elementRemoved( i_event );
109 void SAL_CALL GridEventForwarder::elementReplaced( const ContainerEvent& i_event )
111 Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
112 if ( xPeer.is() )
113 xPeer->elementReplaced( i_event );
117 void SAL_CALL GridEventForwarder::disposing( const EventObject& i_event )
119 Reference< XEventListener > xPeer( m_parent.getPeer(), UNO_QUERY );
120 if ( xPeer.is() )
121 xPeer->disposing( i_event );
125 } // namespace toolkit
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */