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"
23 //......................................................................................................................
26 //......................................................................................................................
28 /** === begin UNO using === **/
29 using ::com::sun::star::uno::Reference
;
30 using ::com::sun::star::uno::XInterface
;
31 using ::com::sun::star::uno::UNO_QUERY
;
32 using ::com::sun::star::uno::UNO_QUERY_THROW
;
33 using ::com::sun::star::uno::UNO_SET_THROW
;
34 using ::com::sun::star::uno::Exception
;
35 using ::com::sun::star::uno::RuntimeException
;
36 using ::com::sun::star::uno::Any
;
37 using ::com::sun::star::uno::makeAny
;
38 using ::com::sun::star::uno::Sequence
;
39 using ::com::sun::star::uno::Type
;
40 using ::com::sun::star::awt::grid::GridDataEvent
;
41 using ::com::sun::star::container::ContainerEvent
;
42 using ::com::sun::star::lang::EventObject
;
43 /** === end UNO using === **/
45 //==================================================================================================================
46 //= GridEventForwarder
47 //==================================================================================================================
48 //------------------------------------------------------------------------------------------------------------------
49 GridEventForwarder::GridEventForwarder( UnoGridControl
& i_parent
)
54 //------------------------------------------------------------------------------------------------------------------
55 GridEventForwarder::~GridEventForwarder()
59 //------------------------------------------------------------------------------------------------------------------
60 void SAL_CALL
GridEventForwarder::acquire() throw()
65 //------------------------------------------------------------------------------------------------------------------
66 void SAL_CALL
GridEventForwarder::release() throw()
71 //------------------------------------------------------------------------------------------------------------------
72 void SAL_CALL
GridEventForwarder::rowsInserted( const GridDataEvent
& i_event
) throw (RuntimeException
)
74 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
76 xPeer
->rowsInserted( i_event
);
79 //------------------------------------------------------------------------------------------------------------------
80 void SAL_CALL
GridEventForwarder::rowsRemoved( const GridDataEvent
& i_event
) throw (RuntimeException
)
82 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
84 xPeer
->rowsRemoved( i_event
);
87 //------------------------------------------------------------------------------------------------------------------
88 void SAL_CALL
GridEventForwarder::dataChanged( const GridDataEvent
& i_event
) throw (RuntimeException
)
90 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
92 xPeer
->dataChanged( i_event
);
95 //------------------------------------------------------------------------------------------------------------------
96 void SAL_CALL
GridEventForwarder::rowHeadingChanged( const GridDataEvent
& i_event
) throw (RuntimeException
)
98 Reference
< XGridDataListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
100 xPeer
->rowHeadingChanged( i_event
);
103 //------------------------------------------------------------------------------------------------------------------
104 void SAL_CALL
GridEventForwarder::elementInserted( const ContainerEvent
& i_event
) throw (RuntimeException
)
106 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
108 xPeer
->elementInserted( i_event
);
111 //------------------------------------------------------------------------------------------------------------------
112 void SAL_CALL
GridEventForwarder::elementRemoved( const ContainerEvent
& i_event
) throw (RuntimeException
)
114 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
116 xPeer
->elementRemoved( i_event
);
119 //------------------------------------------------------------------------------------------------------------------
120 void SAL_CALL
GridEventForwarder::elementReplaced( const ContainerEvent
& i_event
) throw (RuntimeException
)
122 Reference
< XContainerListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
124 xPeer
->elementReplaced( i_event
);
127 //------------------------------------------------------------------------------------------------------------------
128 void SAL_CALL
GridEventForwarder::disposing( const EventObject
& i_event
) throw (RuntimeException
)
130 Reference
< XEventListener
> xPeer( m_parent
.getPeer(), UNO_QUERY
);
132 xPeer
->disposing( i_event
);
135 //......................................................................................................................
136 } // namespace toolkit
137 //......................................................................................................................
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */