1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef SW_VBA_STYLE_HXX 24 #define SW_VBA_STYLE_HXX 25 #include <ooo/vba/word/XStyle.hpp> 26 #include <vbahelper/vbahelperinterface.hxx> 27 #include <com/sun/star/beans/XPropertySet.hpp> 28 #include <com/sun/star/frame/XModel.hpp> 29 #include <com/sun/star/container/XNameContainer.hpp> 30 #include <com/sun/star/style/XStyle.hpp> 31 #include <ooo/vba/word/XFont.hpp> 32 33 34 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE; 35 36 class SwVbaStyle : public SwVbaStyle_BASE 37 { 38 private: 39 css::uno::Reference< css::beans::XPropertySet > mxStyleProps; 40 css::uno::Reference< css::style::XStyle > mxStyle; 41 public: 42 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 ); ~SwVbaStyle()43 virtual ~SwVbaStyle(){} 44 45 static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, const css::uno::Reference< ooo::vba::word::XStyle >& xStyle ) throw (css::uno::RuntimeException); 46 static rtl::OUString getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType ); 47 static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps ) throw (css::uno::RuntimeException); 48 static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (css::uno::RuntimeException); 49 50 // Attributes 51 virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); 52 virtual void SAL_CALL setName( const rtl::OUString& Name ) throw (css::uno::RuntimeException); 53 virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException); 54 virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException); 55 virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException); 56 virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException); 57 58 // XHelperInterface 59 virtual rtl::OUString& getServiceImplName(); 60 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 61 }; 62 63 #endif //SW_VBA_AXIS_HXX 64