xref: /aoo42x/main/sc/source/ui/vba/vbaglobals.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir #ifndef SC_VBA_GLOBALS
24cdf0e10cSrcweir #define SC_VBA_GLOBALS
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
27cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
28cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
29cdf0e10cSrcweir #include <ooo/vba/excel/XGlobals.hpp>
30cdf0e10cSrcweir #include <ooo/vba/excel/XApplication.hpp>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
33cdf0e10cSrcweir #include "excelvbahelper.hxx"
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <vbahelper/vbaglobalbase.hxx>
36cdf0e10cSrcweir     // =============================================================================
37cdf0e10cSrcweir     // class ScVbaGlobals
38cdf0e10cSrcweir     // =============================================================================
39cdf0e10cSrcweir 
40cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > ScVbaGlobals_BASE;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir     class ScVbaGlobals : public ScVbaGlobals_BASE
43cdf0e10cSrcweir     {
44cdf0e10cSrcweir         css::uno::Reference< ov::excel::XApplication > mxApplication;
45cdf0e10cSrcweir         virtual css::uno::Reference<
46cdf0e10cSrcweir  ov::excel::XApplication > SAL_CALL getApplication()
47cdf0e10cSrcweir                         throw (css::uno::RuntimeException);
48cdf0e10cSrcweir     public:
49cdf0e10cSrcweir 
50cdf0e10cSrcweir         ScVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs,
51cdf0e10cSrcweir             css::uno::Reference< css::uno::XComponentContext >const& rxContext );
52cdf0e10cSrcweir         //ScVbaGlobals(
53cdf0e10cSrcweir         //    css::uno::Reference< css::uno::XComponentContext >const& rxContext,  );
54cdf0e10cSrcweir         virtual ~ScVbaGlobals();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir         // XGlobals
57cdf0e10cSrcweir         virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
58cdf0e10cSrcweir         virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
59cdf0e10cSrcweir         virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
60cdf0e10cSrcweir 	virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
61cdf0e10cSrcweir 	virtual void SAL_CALL Calculate(  ) throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::RuntimeException);
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL getSelection() throw (css::uno::RuntimeException);
64cdf0e10cSrcweir         virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() throw (css::uno::RuntimeException);
65cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
66cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any& RowIndex, const css::uno::Any& ColumnIndex ) throw (css::uno::RuntimeException);
67cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
68cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
69cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir         virtual css::uno::Any SAL_CALL WorkSheets(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
72cdf0e10cSrcweir         virtual css::uno::Any SAL_CALL WorkBooks(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
73cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL WorksheetFunction(  ) throw (css::uno::RuntimeException);
74cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
75cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
76cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
77cdf0e10cSrcweir 	virtual css::uno::Reference< ::ooo::vba::excel::XRange > SAL_CALL Rows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
78cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
79cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
80cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
81cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XApplication > SAL_CALL getExcel() throw (css::uno::RuntimeException);
82cdf0e10cSrcweir 	virtual css::uno::Any SAL_CALL getDebug() throw (css::uno::RuntimeException);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     // XMultiServiceFactory
86cdf0e10cSrcweir     virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames(  ) throw (css::uno::RuntimeException);
87cdf0e10cSrcweir     // XHelperInterface
88cdf0e10cSrcweir     virtual rtl::OUString& getServiceImplName();
89cdf0e10cSrcweir     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
90cdf0e10cSrcweir     };
91cdf0e10cSrcweir #endif //
92