1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SVTOOLS_DIALOGCLOSEDLISTENER_HXX 25 #define _SVTOOLS_DIALOGCLOSEDLISTENER_HXX 26 27 #include "svtools/svtdllapi.h" 28 #include <cppuhelper/implbase1.hxx> 29 #include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp> 30 #include <tools/link.hxx> 31 32 //......................................................................... 33 namespace svt 34 { 35 //......................................................................... 36 37 //===================================================================== 38 //= ODialogClosedListener 39 //===================================================================== 40 /** 41 C++ class to implement a ::com::sun::star::ui::dialogs::XDialogClosedListener 42 */ 43 class SVT_DLLPUBLIC DialogClosedListener : 44 public ::cppu::WeakImplHelper1< ::com::sun::star::ui::dialogs::XDialogClosedListener > 45 { 46 private: 47 /** 48 This link will be called when the dialog was closed. 49 50 The link must have the type: 51 DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); 52 */ 53 Link m_aDialogClosedLink; 54 55 public: 56 DialogClosedListener(); 57 DialogClosedListener( const Link& rLink ); 58 SetDialogClosedLink(const Link & rLink)59 inline void SetDialogClosedLink( const Link& rLink ) { m_aDialogClosedLink = rLink; } 60 61 // XDialogClosedListener methods 62 virtual void SAL_CALL dialogClosed( const ::com::sun::star::ui::dialogs::DialogClosedEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException); 63 64 // XEventListener methods 65 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException ); 66 }; 67 68 //......................................................................... 69 } // namespace svt 70 //......................................................................... 71 72 #endif// COMPHELPER_DIALOGCLOSEDLISTENER_HXX 73 74