xref: /trunk/main/sw/source/ui/vba/vbaapplication.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef SW_VBA_APPLICATION_HXX
28 #define SW_VBA_APPLICATION_HXX
29 
30 #include <ooo/vba/word/XApplication.hpp>
31 #include <ooo/vba/word/XDocument.hpp>
32 #include <ooo/vba/word/XWindow.hpp>
33 #include <ooo/vba/word/XSystem.hpp>
34 #include <ooo/vba/word/XOptions.hpp>
35 #include <ooo/vba/word/XSelection.hpp>
36 #include <ooo/vba/word/XAddins.hpp>
37 #include <vbahelper/vbahelperinterface.hxx>
38 #include <vbahelper/vbaapplicationbase.hxx>
39 #include <cppuhelper/implbase1.hxx>
40 
41 //typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XApplication > SwVbaApplication_BASE;
42 typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ooo::vba::word::XApplication > SwVbaApplication_BASE;
43 
44 class SwVbaApplication : public SwVbaApplication_BASE
45 {
46 public:
47 	SwVbaApplication( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
48 	virtual ~SwVbaApplication();
49 
50     virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
51 
52 	// XApplication
53     virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
54     virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() throw (css::uno::RuntimeException);
55     virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() throw (css::uno::RuntimeException);
56     virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
57     virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException);
58     virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException);
59     virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
60     virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
61     virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
62     virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
63     virtual sal_Bool SAL_CALL getDisplayAutoCompleteTips() throw (css::uno::RuntimeException);
64     virtual void SAL_CALL setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException);
65     virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException);
66     virtual void SAL_CALL setEnableCancelKey( sal_Int32 _enableCancelKey ) throw (css::uno::RuntimeException);
67     virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
68 	// XHelperInterface
69 	virtual rtl::OUString& getServiceImplName();
70 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
71 protected:
72     virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
73 };
74 #endif /* SW_VBA_APPLICATION_HXX */
75