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 .
20 #include "grideventforwarder.hxx"
21 #include "gridcontrol.hxx"
28 using ::com::sun::star::uno::Reference
;
29 using ::com::sun::star::uno::UNO_QUERY
;
30 using ::com::sun::star::uno::RuntimeException
;
31 using ::com::sun::star::awt::grid::GridDataEvent
;
32 using ::com::sun::star::container::ContainerEvent
;
33 using ::com::sun::star::lang::EventObject
;
36 //= GridEventForwarder
39 GridEventForwarder::GridEventForwarder( UnoGridControl
& i_parent
)
45 GridEventForwarder::~GridEventForwarder()
50 void SAL_CALL
GridEventForwarder::acquire() throw()
56 void SAL_CALL
GridEventForwarder::release() throw()
62 void SAL_CALL
GridEventForwarder::rowsInserted( const GridDataEvent
& i_event
)
64 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
66 xPeer
->rowsInserted( i_event
);
70 void SAL_CALL
GridEventForwarder::rowsRemoved( const GridDataEvent
& i_event
)
72 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
74 xPeer
->rowsRemoved( i_event
);
78 void SAL_CALL
GridEventForwarder::dataChanged( const GridDataEvent
& i_event
)
80 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
82 xPeer
->dataChanged( i_event
);
86 void SAL_CALL
GridEventForwarder::rowHeadingChanged( const GridDataEvent
& i_event
)
88 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
90 xPeer
->rowHeadingChanged( i_event
);
94 void SAL_CALL
GridEventForwarder::elementInserted( const ContainerEvent
& i_event
)
96 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
98 xPeer
->elementInserted( i_event
);
102 void SAL_CALL
GridEventForwarder::elementRemoved( const ContainerEvent
& i_event
)
104 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
106 xPeer
->elementRemoved( i_event
);
110 void SAL_CALL
GridEventForwarder::elementReplaced( const ContainerEvent
& i_event
)
112 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
114 xPeer
->elementReplaced( i_event
);
118 void SAL_CALL
GridEventForwarder::disposing( const EventObject
& i_event
)
120 Reference
< XEventListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
122 xPeer
->disposing( i_event
);
126 } // namespace toolkit
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */