update dev300-m58
[ooovba.git] / sw / source / ui / vba / vbaglobals.hxx
blob066282e35e375923419598a5250c2ff874cd84d0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbaglobals.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SW_VBA_GLOBALS_HXX
31 #define SW_VBA_GLOBALS_HXX
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/lang/XInitialization.hpp>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <ooo/vba/word/XGlobals.hpp>
37 #include <ooo/vba/word/XApplication.hpp>
38 #include <ooo/vba/word/XSystem.hpp>
39 #include <ooo/vba/word/XOptions.hpp>
40 #include <ooo/vba/word/XSelection.hpp>
41 #include <cppuhelper/implbase1.hxx>
42 #include <vbahelper/vbahelper.hxx>
43 #include <vbahelper/vbaglobalbase.hxx>
45 // =============================================================================
46 // class SwVbaGlobals
47 // =============================================================================
50 typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::word::XGlobals > SwVbaGlobals_BASE;
52 class SwVbaGlobals : public SwVbaGlobals_BASE
54 private:
55 css::uno::Reference< ooo::vba::word::XApplication > mxApplication;
57 virtual css::uno::Reference< ooo::vba::word::XApplication > getApplication() throw (css::uno::RuntimeException);
59 public:
61 SwVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& rxContext );
62 virtual ~SwVbaGlobals();
64 // XGlobals
65 virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
66 virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() throw (css::uno::RuntimeException);
67 virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() throw (css::uno::RuntimeException);
68 virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
69 virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException);
70 virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException);
71 virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
72 virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
73 virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
74 virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
75 virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
76 // XMultiServiceFactory
77 virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw (css::uno::RuntimeException);
79 // XHelperInterface
80 virtual rtl::OUString& getServiceImplName();
81 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
83 #endif /* SW_VBA_GLOBALS_HXX */