tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / dbaccess / source / core / recovery / subcomponentloader.hxx
blob4ab8678809a4246846c5eb4c33f3ad2b87128146
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 #pragma once
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>
29 namespace dbaccess
32 // SubComponentLoader
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
40 public:
41 SubComponentLoader(
42 const css::uno::Reference< css::frame::XController >& i_rApplicationController,
43 const css::uno::Reference< css::ucb::XCommandProcessor >& i_rSubDocumentDefinition
46 SubComponentLoader(
47 const css::uno::Reference< css::frame::XController >& i_rApplicationController,
48 const css::uno::Reference< css::lang::XComponent >& i_rNonDocumentComponent
51 // XWindowListener
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;
57 // XEventListener
58 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
60 protected:
61 virtual ~SubComponentLoader() override;
63 private:
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: */