Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SW_SOURCE_UI_VBA_VBASTYLE_HXX
20 : #define INCLUDED_SW_SOURCE_UI_VBA_VBASTYLE_HXX
21 : #include <ooo/vba/word/XStyle.hpp>
22 : #include <vbahelper/vbahelperinterface.hxx>
23 : #include <com/sun/star/beans/XPropertySet.hpp>
24 : #include <com/sun/star/frame/XModel.hpp>
25 : #include <com/sun/star/container/XNameContainer.hpp>
26 : #include <com/sun/star/style/XStyle.hpp>
27 : #include <ooo/vba/word/XFont.hpp>
28 : #include <ooo/vba/word/XListTemplate.hpp>
29 :
30 : typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE;
31 :
32 : class SwVbaStyle : public SwVbaStyle_BASE
33 : {
34 : private:
35 : css::uno::Reference< css::frame::XModel > mxModel;
36 : css::uno::Reference< css::beans::XPropertySet > mxStyleProps;
37 : css::uno::Reference< css::style::XStyle > mxStyle;
38 : public:
39 : SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
40 0 : virtual ~SwVbaStyle(){}
41 :
42 : static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::uno::Any& xStyle ) throw (css::uno::RuntimeException);
43 : static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps ) throw (css::uno::RuntimeException);
44 : static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (css::uno::RuntimeException);
45 :
46 : // Attributes
47 : virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
48 : virtual void SAL_CALL setName( const OUString& Name ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
49 : virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
50 : virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
51 : virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
52 : virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
53 : virtual OUString SAL_CALL getNameLocal() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
54 : virtual void SAL_CALL setNameLocal( const OUString& _namelocal ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
55 : virtual css::uno::Reference< ::ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
56 : virtual sal_Bool SAL_CALL getAutomaticallyUpdate() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 : virtual void SAL_CALL setAutomaticallyUpdate( sal_Bool _automaticallyupdate ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 : virtual css::uno::Any SAL_CALL getBaseStyle() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 : virtual void SAL_CALL setBaseStyle( const css::uno::Any& _basestyle ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 : virtual css::uno::Any SAL_CALL getNextParagraphStyle() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 : virtual void SAL_CALL setNextParagraphStyle( const css::uno::Any& _nextparagraphstyle ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 : virtual ::sal_Int32 SAL_CALL getListLevelNumber() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 :
64 : //XDefaultProperty
65 0 : virtual OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return OUString("Name"); }
66 :
67 : // XHelperInterface
68 : virtual OUString getServiceImplName() SAL_OVERRIDE;
69 : virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
70 : };
71 :
72 : #endif //SW_VBA_AXIS_HXX
73 :
74 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|