LibreOffice Module vbahelper (master) 1
vbawindowbase.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_VBAHELPER_VBAWINDOWBASE_HXX
21#define INCLUDED_VBAHELPER_VBAWINDOWBASE_HXX
22
23#include <exception>
24
26#include <com/sun/star/uno/Any.hxx>
27#include <com/sun/star/uno/Reference.hxx>
28#include <com/sun/star/uno/RuntimeException.hpp>
29#include <com/sun/star/uno/Sequence.hxx>
30#include <ooo/vba/XWindowBase.hpp>
31#include <rtl/ustring.hxx>
32#include <sal/types.h>
33#include <vbahelper/vbadllapi.h>
36
37namespace com::sun::star {
38 namespace awt { class XWindow2; }
39 namespace awt { class XWindow; }
40 namespace frame { class XController; }
41 namespace frame { class XModel; }
42 namespace uno { class XComponentContext; }
43}
44
45namespace ooo::vba {
46 class XHelperInterface;
47}
48
50
52{
53public:
56 const css::uno::Reference< ov::XHelperInterface >& xParent,
57 const css::uno::Reference< css::uno::XComponentContext >& xContext,
58 const css::uno::Reference< css::frame::XModel >& xModel,
59 const css::uno::Reference< css::frame::XController >& xController );
62 css::uno::Sequence< css::uno::Any > const& aArgs,
63 css::uno::Reference< css::uno::XComponentContext > const& xContext );
64
65 // XWindowBase
66 virtual sal_Int32 SAL_CALL getHeight() override ;
67 virtual void SAL_CALL setHeight( sal_Int32 _height ) override ;
68 virtual sal_Int32 SAL_CALL getLeft() override ;
69 virtual void SAL_CALL setLeft( sal_Int32 _left ) override ;
70 virtual sal_Int32 SAL_CALL getTop() override ;
71 virtual void SAL_CALL setTop( sal_Int32 _top ) override ;
72 virtual sal_Bool SAL_CALL getVisible() override;
73 virtual void SAL_CALL setVisible( sal_Bool _visible ) override;
74 virtual sal_Int32 SAL_CALL getWidth() override ;
75 virtual void SAL_CALL setWidth( sal_Int32 _width ) override ;
76
77 // XHelperInterface
78 virtual OUString getServiceImplName() override;
79 virtual css::uno::Sequence<OUString> getServiceNames() override;
80
81protected:
83 css::uno::Reference< css::frame::XController > getController() const;
85 css::uno::Reference< css::awt::XWindow > getWindow() const;
87 css::uno::Reference< css::awt::XWindow2 > getWindow2() const;
88
89 css::uno::Reference< css::frame::XModel > m_xModel;
90
91private:
93 void construct( const css::uno::Reference< css::frame::XController >& xController );
94
95 css::uno::WeakReference< css::frame::XController > m_xController;
96 css::uno::WeakReference< css::awt::XWindow > m_xWindow;
97};
98
99#endif // INCLUDED_VBAHELPER_VBAWINDOWBASE_HXX
100
101/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< OUString > getServiceNames()=0
VbaWindowBase(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Reference< css::frame::XController > &xController)
css::uno::WeakReference< css::awt::XWindow > m_xWindow
css::uno::WeakReference< css::frame::XController > m_xController
VbaWindowBase(css::uno::Sequence< css::uno::Any > const &aArgs, css::uno::Reference< css::uno::XComponentContext > const &xContext)
css::uno::Reference< css::frame::XModel > m_xModel
unsigned char sal_Bool
#define VBAHELPER_DLLPUBLIC
Definition: vbadllapi.h:28
InheritedHelperInterfaceWeakImpl< ov::XWindowBase > WindowBaseImpl_BASE