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 .
22 #include <com/sun/star/awt/XWindowListener.hpp>
23 #include <com/sun/star/frame/XController.hpp>
24 #include <com/sun/star/lang/XComponent.hpp>
25 #include <com/sun/star/ucb/XCommandProcessor.hpp>
27 #include <cppuhelper/implbase.hxx>
33 typedef ::cppu::WeakImplHelper
< css::awt::XWindowListener
34 > SubComponentLoader_Base
;
35 /** is a helper class which loads/opens a given sub component as soon as the main application
36 window becomes visible.
38 class SubComponentLoader
: public SubComponentLoader_Base
42 const css::uno::Reference
< css::frame::XController
>& i_rApplicationController
,
43 const css::uno::Reference
< css::ucb::XCommandProcessor
>& i_rSubDocumentDefinition
47 const css::uno::Reference
< css::frame::XController
>& i_rApplicationController
,
48 const css::uno::Reference
< css::lang::XComponent
>& i_rNonDocumentComponent
52 virtual void SAL_CALL
windowResized( const css::awt::WindowEvent
& e
) override
;
53 virtual void SAL_CALL
windowMoved( const css::awt::WindowEvent
& e
) override
;
54 virtual void SAL_CALL
windowShown( const css::lang::EventObject
& e
) override
;
55 virtual void SAL_CALL
windowHidden( const css::lang::EventObject
& e
) override
;
58 virtual void SAL_CALL
disposing( const css::lang::EventObject
& Source
) override
;
61 virtual ~SubComponentLoader() override
;
64 const css::uno::Reference
< css::ucb::XCommandProcessor
> mxDocDefCommands
;
65 const css::uno::Reference
< css::lang::XComponent
> mxNonDocComponent
;
66 css::uno::Reference
< css::awt::XWindow
> mxAppComponentWindow
;
69 } // namespace dbaccess
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */