25#include <osl/diagnose.h>
26#include <com/sun/star/drawing/FillStyle.hpp>
31using ::com::sun::star::uno::Reference;
32using ::com::sun::star::uno::Sequence;
36class lcl_ColorPropertySetInfo :
public ::cppu::WeakImplHelper<
40 explicit lcl_ColorPropertySetInfo(
bool bFillColor );
44 virtual Sequence< Property > SAL_CALL getProperties()
override;
45 virtual Property SAL_CALL getPropertyByName(
const OUString& aName )
override;
46 virtual sal_Bool SAL_CALL hasPropertyByName(
const OUString& Name )
override;
49 OUString m_aColorPropName;
53lcl_ColorPropertySetInfo::lcl_ColorPropertySetInfo(
bool bFillColor ) :
55 m_aColorPropName( (bFillColor ?
"FillColor" :
"LineColor"), 9, RTL_TEXTENCODING_ASCII_US ),
56 m_aColorProp( m_aColorPropName, -1,
57 cppu::UnoType<sal_Int32>::
get(), 0)
60Sequence< Property > SAL_CALL lcl_ColorPropertySetInfo::getProperties()
63 return Sequence< Property >( & m_aColorProp, 1 );
66Property SAL_CALL lcl_ColorPropertySetInfo::getPropertyByName(
const OUString& aName )
68 if( aName == m_aColorPropName )
70 throw UnknownPropertyException( m_aColorPropName, getXWeak());
73sal_Bool SAL_CALL lcl_ColorPropertySetInfo::hasPropertyByName(
const OUString& Name )
75 return Name == m_aColorPropName;
85 m_aColorPropName( (bFillColor ?
"FillColor" :
"LineColor"), 9, RTL_TEXTENCODING_ASCII_US ),
87 m_bIsFillColor( bFillColor ),
88 m_nDefaultColor( 0x0099ccff )
120 return uno::Any(css::drawing::FillStyle_SOLID);
125 throw UnknownPropertyException(aPropertyName);
130 OSL_FAIL(
"Not Implemented" );
135 OSL_FAIL(
"Not Implemented" );
140 OSL_FAIL(
"Not Implemented" );
145 OSL_FAIL(
"Not Implemented" );
152 return PropertyState_DIRECT_VALUE;
157 PropertyState aState = PropertyState_DIRECT_VALUE;
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual ~ColorPropertySet() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
OUString m_aColorPropName
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
ColorPropertySet(::Color nColor, bool bFillColor=true)
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)