merge the formfield patch from ooo-build
[ooovba.git] / sw / source / ui / vba / vbaapplication.hxx
blob935a03cb10bd3dc79517e0ce835b939e38191a92
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: vbaapplication.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_APPLICATION_HXX
31 #define SW_VBA_APPLICATION_HXX
33 #include <ooo/vba/word/XApplication.hpp>
34 #include <ooo/vba/word/XDocument.hpp>
35 #include <ooo/vba/word/XWindow.hpp>
36 #include <ooo/vba/word/XSystem.hpp>
37 #include <ooo/vba/word/XOptions.hpp>
38 #include <ooo/vba/word/XSelection.hpp>
39 #include <ooo/vba/word/XAddins.hpp>
40 #include <vbahelper/vbahelperinterface.hxx>
41 #include <vbahelper/vbaapplicationbase.hxx>
42 #include <cppuhelper/implbase1.hxx>
44 //typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XApplication > SwVbaApplication_BASE;
45 typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ooo::vba::word::XApplication > SwVbaApplication_BASE;
47 class SwVbaApplication : public SwVbaApplication_BASE
49 public:
50 SwVbaApplication( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
51 virtual ~SwVbaApplication();
53 virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
55 // XApplication
56 virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
57 virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() throw (css::uno::RuntimeException);
58 virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() throw (css::uno::RuntimeException);
59 virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
60 virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException);
61 virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException);
62 virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
63 virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
64 virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
65 virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
66 virtual sal_Bool SAL_CALL getDisplayAutoCompleteTips() throw (css::uno::RuntimeException);
67 virtual void SAL_CALL setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException);
68 virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException);
69 virtual void SAL_CALL setEnableCancelKey( sal_Int32 _enableCancelKey ) throw (css::uno::RuntimeException);
70 virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
71 // XHelperInterface
72 virtual rtl::OUString& getServiceImplName();
73 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
74 protected:
75 virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
77 #endif /* SW_VBA_APPLICATION_HXX */