update dev300-m58
[ooovba.git] / sw / source / ui / vba / vbasystem.hxx
blob59281b171cfb3f0613315758b68639aad952088e
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: vbasystem.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_SYSTEM_HXX
31 #define SW_VBA_SYSTEM_HXX
33 #include <ooo/vba/word/XSystem.hpp>
34 #include <vbahelper/vbahelperinterface.hxx>
35 #include <cppuhelper/implbase1.hxx>
36 #include <vbahelper/vbapropvalue.hxx>
38 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XSystem > SwVbaSystem_BASE;
40 class PrivateProfileStringListener : public PropListener
42 private:
43 rtl::OUString maFileName;
44 ByteString maGroupName;
45 ByteString maKey;
46 public:
47 PrivateProfileStringListener(){};
48 PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
49 virtual ~PrivateProfileStringListener();
50 void Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
52 //PropListener
53 virtual void setValueEvent( const css::uno::Any& value );
54 virtual css::uno::Any getValueEvent();
57 class SwVbaSystem : public SwVbaSystem_BASE
59 private:
60 PrivateProfileStringListener maPrivateProfileStringListener;
62 public:
63 SwVbaSystem( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
64 virtual ~SwVbaSystem();
66 // XSystem
67 virtual sal_Int32 SAL_CALL getCursor() throw ( css::uno::RuntimeException );
68 virtual void SAL_CALL setCursor( sal_Int32 _cursor ) throw ( css::uno::RuntimeException );
69 virtual css::uno::Any SAL_CALL PrivateProfileString( const rtl::OUString& rFilename, const rtl::OUString& rSection, const rtl::OUString& rKey ) throw ( css::uno::RuntimeException );
71 // XHelperInterface
72 virtual rtl::OUString& getServiceImplName();
73 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
75 #endif /* SW_VBA_SYSTEM_HXX */