Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dbaccess / source / core / recovery / subcomponentloader.hxx
blob73285a8fbd7b55cb0bfd34fa85e06debeda4e915
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 #ifndef SUBCOMPONENTLOADER_HXX
21 #define SUBCOMPONENTLOADER_HXX
23 #include "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>
32 //........................................................................
33 namespace dbaccess
35 //........................................................................
37 //====================================================================
38 //= SubComponentLoader
39 //====================================================================
40 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XWindowListener
41 > SubComponentLoader_Base;
42 struct SubComponentLoader_Data;
43 /** is a helper class which loads/opens a given sub component as soon as the main application
44 window becomes visible.
46 class DBACCESS_DLLPRIVATE SubComponentLoader : public SubComponentLoader_Base
48 public:
49 SubComponentLoader(
50 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& i_rApplicationController,
51 const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandProcessor >& i_rSubDocumentDefinition
54 SubComponentLoader(
55 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& i_rApplicationController,
56 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& i_rNonDocumentComponent
59 // XWindowListener
60 virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
61 virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
62 virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
63 virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
65 // XEventListener
66 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
68 protected:
69 virtual ~SubComponentLoader();
71 private:
72 SubComponentLoader_Data* m_pData;
75 //........................................................................
76 } // namespace dbaccess
77 //........................................................................
79 #endif // SUBCOMPONENTLOADER_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */