build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / include / vbahelper / vbaapplicationbase.hxx
blob2dd7035748765edadf3d44c36d7c5f40e88c6403
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 .
19 #ifndef INCLUDED_VBAHELPER_VBAAPPLICATIONBASE_HXX
20 #define INCLUDED_VBAHELPER_VBAAPPLICATIONBASE_HXX
22 #include <exception>
23 #include <memory>
25 #include <com/sun/star/script/BasicErrorException.hpp>
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/XApplicationBase.hpp>
31 #include <rtl/ustring.hxx>
32 #include <sal/types.h>
33 #include <vbahelper/vbadllapi.h>
34 #include <vbahelper/vbahelper.hxx>
35 #include <vbahelper/vbahelperinterface.hxx>
37 namespace com { namespace sun { namespace star {
38 namespace frame { class XModel; }
39 namespace uno { class XComponentContext; }
40 } } }
42 namespace ooo { namespace vba {
43 class XApplicationBase;
44 class XHelperInterface;
45 } }
47 typedef InheritedHelperInterfaceWeakImpl< ov::XApplicationBase > ApplicationBase_BASE;
49 struct VbaApplicationBase_Impl;
51 class VBAHELPER_DLLPUBLIC VbaApplicationBase : public ApplicationBase_BASE
53 std::unique_ptr<VbaApplicationBase_Impl> m_pImpl;
55 protected:
56 VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext );
57 virtual ~VbaApplicationBase() override;
59 virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException) = 0;
60 public:
61 // XHelperInterface ( parent is itself )
62 virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) override { return this; }
64 virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException, std::exception) override;
65 virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException, std::exception) override;
66 virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException, std::exception) override;
67 virtual void SAL_CALL setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (css::uno::RuntimeException, std::exception) override;
68 virtual sal_Bool SAL_CALL getInteractive() throw (css::uno::RuntimeException, std::exception) override;
69 virtual void SAL_CALL setInteractive( sal_Bool bInteractive ) throw (css::uno::RuntimeException, std::exception) override;
70 virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException, std::exception) override;
71 virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException, std::exception) override;
72 virtual void SAL_CALL OnKey( const OUString& Key, const css::uno::Any& Procedure ) throw (css::uno::RuntimeException, std::exception) override;
73 virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException, std::exception) override;
74 virtual OUString SAL_CALL getVersion() throw (css::uno::RuntimeException, std::exception) override;
75 virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException, std::exception) override;
77 virtual css::uno::Any SAL_CALL Run( const OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException, std::exception) override;
78 virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException, std::exception) override;
79 virtual float SAL_CALL CentimetersToPoints( float Centimeters ) throw (css::uno::RuntimeException, std::exception) override;
80 virtual void SAL_CALL Undo() throw (css::uno::RuntimeException, std::exception) override;
81 virtual void SAL_CALL Quit() throw (css::uno::RuntimeException, std::exception) override;
83 // XHelperInterface
84 virtual OUString getServiceImplName() override;
85 virtual css::uno::Sequence<OUString> getServiceNames() override;
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */