LibreOffice Module sw (master)  1
vbaglobals.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 #ifndef INCLUDED_SW_SOURCE_UI_VBA_VBAGLOBALS_HXX
20 #define INCLUDED_SW_SOURCE_UI_VBA_VBAGLOBALS_HXX
21 
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <ooo/vba/word/XGlobals.hpp>
24 #include <ooo/vba/word/XApplication.hpp>
25 #include <ooo/vba/word/XSystem.hpp>
26 #include <ooo/vba/word/XOptions.hpp>
27 #include <ooo/vba/word/XSelection.hpp>
28 #include <cppuhelper/implbase.hxx>
30 
31 typedef ::cppu::ImplInheritanceHelper<VbaGlobalsBase, ov::word::XGlobals> SwVbaGlobals_BASE;
32 
34 {
35 private:
36  css::uno::Reference<ooo::vba::word::XApplication> mxApplication;
37 
39  css::uno::Reference<ooo::vba::word::XApplication> const& getApplication();
40 
41 public:
42  SwVbaGlobals(css::uno::Sequence<css::uno::Any> const& aArgs,
43  css::uno::Reference<css::uno::XComponentContext> const& rxContext);
44  virtual ~SwVbaGlobals() override;
45 
46  // XGlobals
47  virtual OUString SAL_CALL getName() override;
48  virtual css::uno::Reference<ooo::vba::word::XSystem> SAL_CALL getSystem() override;
49  virtual css::uno::Reference<ov::word::XDocument> SAL_CALL getActiveDocument() override;
50  virtual css::uno::Reference<ov::word::XWindow> SAL_CALL getActiveWindow() override;
51  virtual css::uno::Reference<ooo::vba::word::XOptions> SAL_CALL getOptions() override;
52  virtual css::uno::Reference<ooo::vba::word::XSelection> SAL_CALL getSelection() override;
53  virtual css::uno::Any SAL_CALL CommandBars(const css::uno::Any& aIndex) override;
54  virtual css::uno::Any SAL_CALL Documents(const css::uno::Any& aIndex) override;
55  virtual css::uno::Any SAL_CALL Addins(const css::uno::Any& aIndex) override;
56  virtual css::uno::Any SAL_CALL Dialogs(const css::uno::Any& aIndex) override;
57  virtual css::uno::Any SAL_CALL ListGalleries(const css::uno::Any& aIndex) override;
58  virtual float SAL_CALL CentimetersToPoints(float Centimeters) override;
59  // XMultiServiceFactory
60  virtual css::uno::Sequence<OUString> SAL_CALL getAvailableServiceNames() override;
61 
62  // XHelperInterface
63  virtual OUString getServiceImplName() override;
64  virtual css::uno::Sequence<OUString> getServiceNames() override;
65 };
66 #endif // INCLUDED_SW_SOURCE_UI_VBA_VBAGLOBALS_HXX
67 
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() override
Definition: vbaglobals.cxx:68
virtual OUString SAL_CALL getName() override
Definition: vbaglobals.cxx:80
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: vbaglobals.cxx:145
virtual float SAL_CALL CentimetersToPoints(float Centimeters) override
Definition: vbaglobals.cxx:127
SwVbaGlobals(css::uno::Sequence< css::uno::Any > const &aArgs, css::uno::Reference< css::uno::XComponentContext > const &rxContext)
Definition: vbaglobals.cxx:29
virtual css::uno::Any SAL_CALL Addins(const css::uno::Any &aIndex) override
Definition: vbaglobals.cxx:104
virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() override
Definition: vbaglobals.cxx:122
virtual css::uno::Any SAL_CALL ListGalleries(const css::uno::Any &aIndex) override
Definition: vbaglobals.cxx:116
css::uno::Reference< ooo::vba::word::XApplication > mxApplication
Definition: vbaglobals.hxx:36
css::uno::Reference< ooo::vba::word::XApplication > const & getApplication()
Definition: vbaglobals.cxx:52
virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() override
Definition: vbaglobals.cxx:74
virtual ~SwVbaGlobals() override
Definition: vbaglobals.cxx:44
virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() override
Definition: vbaglobals.cxx:86
virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() override
Definition: vbaglobals.cxx:62
::cppu::ImplInheritanceHelper< VbaGlobalsBase, ov::word::XGlobals > SwVbaGlobals_BASE
Definition: vbaglobals.hxx:31
virtual css::uno::Any SAL_CALL CommandBars(const css::uno::Any &aIndex) override
Definition: vbaglobals.cxx:92
virtual css::uno::Any SAL_CALL Documents(const css::uno::Any &aIndex) override
Definition: vbaglobals.cxx:98
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbaglobals.cxx:139
virtual css::uno::Any SAL_CALL Dialogs(const css::uno::Any &aIndex) override
Definition: vbaglobals.cxx:110
virtual OUString getServiceImplName() override
Definition: vbaglobals.cxx:133