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 #ifndef INCLUDED_DBACCESS_SOURCE_CORE_RECOVERY_SUBCOMPONENTLOADER_HXX
21 #define INCLUDED_DBACCESS_SOURCE_CORE_RECOVERY_SUBCOMPONENTLOADER_HXX
23 #include <dbaccess/dbaccessdllapi.h>
25 #include <com/sun/star/awt/XWindowListener.hpp>
26 #include <com/sun/star/frame/XController.hpp>
27 #include <com/sun/star/lang/XComponent.hpp>
28 #include <com/sun/star/ucb/XCommandProcessor.hpp>
30 #include <cppuhelper/implbase1.hxx>
36 typedef ::cppu::WeakImplHelper1
< ::com::sun::star::awt::XWindowListener
37 > SubComponentLoader_Base
;
38 struct SubComponentLoader_Data
;
39 /** is a helper class which loads/opens a given sub component as soon as the main application
40 window becomes visible.
42 class DBACCESS_DLLPRIVATE SubComponentLoader
: public SubComponentLoader_Base
46 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController
>& i_rApplicationController
,
47 const ::com::sun::star::uno::Reference
< ::com::sun::star::ucb::XCommandProcessor
>& i_rSubDocumentDefinition
51 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController
>& i_rApplicationController
,
52 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& i_rNonDocumentComponent
56 virtual void SAL_CALL
windowResized( const ::com::sun::star::awt::WindowEvent
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 virtual void SAL_CALL
windowMoved( const ::com::sun::star::awt::WindowEvent
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 virtual void SAL_CALL
windowShown( const ::com::sun::star::lang::EventObject
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual void SAL_CALL
windowHidden( const ::com::sun::star::lang::EventObject
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual ~SubComponentLoader();
68 SubComponentLoader_Data
* m_pData
;
71 } // namespace dbaccess
73 #endif // INCLUDED_DBACCESS_SOURCE_CORE_RECOVERY_SUBCOMPONENTLOADER_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */