1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef VBA_APPLICATION_BASE_HXX 24 #define VBA_APPLICATION_BASE_HXX 25 26 #include <ooo/vba/XHelperInterface.hpp> 27 #include <ooo/vba/XApplicationBase.hpp> 28 #include <vbahelper/vbahelperinterface.hxx> 29 #include <sfx2/objsh.hxx> 30 31 typedef InheritedHelperInterfaceImpl1< ov::XApplicationBase > ApplicationBase_BASE; 32 33 struct VbaApplicationBase_Impl; 34 35 class VBAHELPER_DLLPUBLIC VbaApplicationBase : public ApplicationBase_BASE 36 { 37 VbaApplicationBase_Impl* m_pImpl; 38 39 protected: 40 VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext ); 41 virtual ~VbaApplicationBase(); 42 43 virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException) = 0; 44 public: 45 // XHelperInterface ( parent is itself ) getParent()46 virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; } 47 48 virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException); 49 virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException); 50 virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException); 51 virtual void SAL_CALL setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (css::uno::RuntimeException); 52 virtual ::sal_Bool SAL_CALL getInteractive() throw (css::uno::RuntimeException); 53 virtual void SAL_CALL setInteractive( ::sal_Bool bInteractive ) throw (css::uno::RuntimeException); 54 virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); 55 virtual void SAL_CALL setVisible( ::sal_Bool bVisible ) throw (css::uno::RuntimeException); 56 virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); 57 virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException); 58 virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException); 59 60 virtual css::uno::Any SAL_CALL Run( const ::rtl::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); 61 virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException); 62 virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException); 63 virtual void SAL_CALL Undo() throw (css::uno::RuntimeException); 64 virtual void SAL_CALL Quit() throw (css::uno::RuntimeException); 65 66 // XHelperInterface 67 virtual rtl::OUString& getServiceImplName(); 68 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 69 }; 70 #endif 71