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_STYLE_HXX 28 #define SW_VBA_STYLE_HXX 29 #include <ooo/vba/word/XStyle.hpp> 30 #include <vbahelper/vbahelperinterface.hxx> 31 #include <com/sun/star/beans/XPropertySet.hpp> 32 #include <com/sun/star/frame/XModel.hpp> 33 #include <com/sun/star/container/XNameContainer.hpp> 34 #include <com/sun/star/style/XStyle.hpp> 35 #include <ooo/vba/word/XFont.hpp> 36 37 38 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE; 39 40 class SwVbaStyle : public SwVbaStyle_BASE 41 { 42 private: 43 css::uno::Reference< css::beans::XPropertySet > mxStyleProps; 44 css::uno::Reference< css::style::XStyle > mxStyle; 45 public: 46 SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); 47 virtual ~SwVbaStyle(){} 48 49 static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, const css::uno::Reference< ooo::vba::word::XStyle >& xStyle ) throw (css::uno::RuntimeException); 50 static rtl::OUString getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType ); 51 static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps ) throw (css::uno::RuntimeException); 52 static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (css::uno::RuntimeException); 53 54 // Attributes 55 virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); 56 virtual void SAL_CALL setName( const rtl::OUString& Name ) throw (css::uno::RuntimeException); 57 virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException); 58 virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException); 59 virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException); 60 virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException); 61 62 // XHelperInterface 63 virtual rtl::OUString& getServiceImplName(); 64 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 65 }; 66 67 #endif //SW_VBA_AXIS_HXX 68