21#include <ooo/vba/word/WdStyleType.hpp>
22#include <com/sun/star/lang/Locale.hpp>
23#include <com/sun/star/text/XTextDocument.hpp>
54 xTCProps->getPropertyValue(
"CharLocale") >>= aLocale;
61 xTCProps->setPropertyValue(
"CharLocale",
uno::Any( aLocale ) ) ;
76 sal_Int32
nType = word::WdStyleType::wdStyleTypeParagraph;
77 uno::Reference< lang::XServiceInfo > xServiceInfo(
mxStyle, uno::UNO_QUERY_THROW );
78 if( xServiceInfo->supportsService(
"com.sun.star.style.ParagraphStyle") )
79 nType = word::WdStyleType::wdStyleTypeParagraph;
80 else if( xServiceInfo->supportsService(
"com.sun.star.style.CharacterStyle") )
81 nType = word::WdStyleType::wdStyleTypeCharacter;
83 nType = word::WdStyleType::wdStyleTypeList;
87uno::Reference< word::XFont > SAL_CALL
97 uno::Reference< word::XStyle > xStyle;
98 if( rStyle >>= xStyle )
100 sStyle = xStyle->getName();
107 if( !sStyle.isEmpty() )
109 xParaProps->setPropertyValue(
"ParaStyleName",
uno::Any( sStyle ) );
113 throw uno::RuntimeException();
119 mxStyleProps->getPropertyValue(
"DisplayName") >>= sNameLocal;
130 if( word::WdStyleType::wdStyleTypeParagraph !=
getType() )
132 throw uno::RuntimeException();
135 uno::Reference< text::XTextDocument > xTextDocument(
mxModel, uno::UNO_QUERY_THROW );
141 bool isAutoUpdate =
false;
142 mxStyleProps->getPropertyValue(
"IsAutoUpdate") >>= isAutoUpdate;
155 mxStyleProps->getPropertyValue(
"ParentStyle") >>= sBaseStyle;
156 if( sBaseStyle.isEmpty() )
158 throw uno::RuntimeException();
167 uno::Reference< word::XStyle > xStyle;
168 _basestyle >>= xStyle;
171 throw uno::RuntimeException();
174 OUString sBaseStyle = xStyle->getName();
181 OUString sFollowStyle;
182 mxStyleProps->getPropertyValue(
"FollowStyle") >>= sFollowStyle;
183 if( sFollowStyle.isEmpty() )
185 throw uno::RuntimeException();
194 uno::Reference< word::XStyle > xStyle;
195 _nextparagraphstyle >>= xStyle;
198 throw uno::RuntimeException();
201 OUString sFollowStyle = xStyle->getName();
207 sal_Int16 nNumberingLevel = 0;
208 mxStyleProps->getPropertyValue(
"NumberingLevel") >>= nNumberingLevel;
209 return nNumberingLevel;
218uno::Sequence< OUString >
223 "ooo.vba.word.XStyle"
css::uno::Reference< css::frame::XModel2 > mxModel
css::uno::Reference< css::uno::XComponentContext > mxContext
css::uno::WeakReference< ov::XHelperInterface > mxParent
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
virtual ::sal_Int32 SAL_CALL getType() override
virtual ::sal_Int32 SAL_CALL getLanguageID() override
virtual ::sal_Int32 SAL_CALL getListLevelNumber() override
virtual OUString getServiceImplName() override
virtual css::uno::Any SAL_CALL getBaseStyle() override
css::uno::Reference< css::beans::XPropertySet > mxStyleProps
virtual void SAL_CALL setAutomaticallyUpdate(sal_Bool _automaticallyupdate) override
static void setStyle(const css::uno::Reference< css::beans::XPropertySet > &xParaProps, const css::uno::Any &xStyle)
css::uno::Reference< css::style::XStyle > mxStyle
virtual void SAL_CALL setBaseStyle(const css::uno::Any &_basestyle) override
virtual css::uno::Reference< ::ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() override
virtual css::uno::Any SAL_CALL getNextParagraphStyle() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual void SAL_CALL setName(const OUString &Name) override
css::uno::Reference< css::frame::XModel > mxModel
virtual OUString SAL_CALL getNameLocal() override
virtual void SAL_CALL setNextParagraphStyle(const css::uno::Any &_nextparagraphstyle) override
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() override
virtual void SAL_CALL setNameLocal(const OUString &_namelocal) override
SwVbaStyle(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::frame::XModel > xModel, const css::uno::Reference< css::beans::XPropertySet > &_xPropertySet)
static void setLanguageID(const css::uno::Reference< css::beans::XPropertySet > &xTCProps, LanguageType _languageid)
virtual OUString SAL_CALL getName() override
virtual sal_Bool SAL_CALL getAutomaticallyUpdate() override
const css::uno::Reference< css::container::XIndexAccess > & getPalette() const
Sequence< OUString > aServiceNames
Reference< XPropertySet > _xPropertySet
Reference< XModel > xModel