1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
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_STYLE_HXX
31 #define SW_VBA_STYLE_HXX
32 #include <ooo/vba/word/XStyle.hpp>
33 #include <vbahelper/vbahelperinterface.hxx>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/container/XNameContainer.hpp>
37 #include <com/sun/star/style/XStyle.hpp>
38 #include <ooo/vba/word/XFont.hpp>
41 typedef InheritedHelperInterfaceImpl1
< ooo::vba::word::XStyle
> SwVbaStyle_BASE
;
43 class SwVbaStyle
: public SwVbaStyle_BASE
46 css::uno::Reference
< css::beans::XPropertySet
> mxStyleProps
;
47 css::uno::Reference
< css::style::XStyle
> mxStyle
;
49 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
);
50 virtual ~SwVbaStyle(){}
52 static void setStyle( const css::uno::Reference
< css::beans::XPropertySet
>& xTCProps
, const css::uno::Reference
< ooo::vba::word::XStyle
>& xStyle
) throw (css::uno::RuntimeException
);
53 static rtl::OUString
getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType
);
54 static sal_Int32
getLanguageID( const css::uno::Reference
< css::beans::XPropertySet
>& xTCProps
) throw (css::uno::RuntimeException
);
55 static void setLanguageID( const css::uno::Reference
< css::beans::XPropertySet
>& xTCProps
, sal_Int32 _languageid
) throw (css::uno::RuntimeException
);
58 virtual rtl::OUString SAL_CALL
getName() throw (css::uno::RuntimeException
);
59 virtual void SAL_CALL
setName( const rtl::OUString
& Name
) throw (css::uno::RuntimeException
);
60 virtual ::sal_Int32 SAL_CALL
getLanguageID( ) throw (css::uno::RuntimeException
);
61 virtual void SAL_CALL
setLanguageID( ::sal_Int32 _languageid
) throw (css::uno::RuntimeException
);
62 virtual ::sal_Int32 SAL_CALL
getType() throw (css::uno::RuntimeException
);
63 virtual css::uno::Reference
< ooo::vba::word::XFont
> SAL_CALL
getFont() throw (css::uno::RuntimeException
);
66 virtual rtl::OUString
& getServiceImplName();
67 virtual css::uno::Sequence
<rtl::OUString
> getServiceNames();
70 #endif //SW_VBA_AXIS_HXX