20#include <com/sun/star/drawing/BitmapMode.hpp>
45 return &aPageBackgroundPropertySet_Impl;
57 mpSet = std::make_unique<SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>>( pDoc->
GetPool() );
74 if (rHint.
GetId() != SfxHintId::ThisIsAnSdrHint)
80 if( pSdrHint->
GetKind() == SdrHintKind::ModelCleared )
91 if(
mpSet ==
nullptr )
96 mpSet = std::make_unique<SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>>( *
rSet.
GetPool() );
105 const OUString & aPropertyName = pProp->aName;
106 switch( pProp->nWID )
166 return "SdUnoPageBackground";
191 if( pEntry ==
nullptr )
193 throw beans::UnknownPropertyException( aPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
200 drawing::BitmapMode
eMode;
201 if( aValue >>=
eMode )
207 throw lang::IllegalArgumentException();
220 if(!(aValue >>=
aName ))
221 throw lang::IllegalArgumentException();
246 if( pEntry ==
nullptr )
248 throw beans::UnknownPropertyException( PropertyName,
static_cast<cppu::OWeakObject*
>(
this));
258 if( pStretchItem && pTileItem )
260 if( pTileItem->GetValue() )
261 aAny <<= drawing::BitmapMode_REPEAT;
262 else if( pStretchItem->GetValue() )
263 aAny <<= drawing::BitmapMode_STRETCH;
265 aAny <<= drawing::BitmapMode_NO_REPEAT;
301 if( pEntry ==
nullptr )
302 throw beans::UnknownPropertyException( PropertyName,
static_cast<cppu::OWeakObject*
>(
this));
311 return beans::PropertyState_DIRECT_VALUE;
315 return beans::PropertyState_AMBIGUOUS_VALUE;
319 switch(
mpSet->GetItemState( pEntry->
nWID,
false ) )
321 case SfxItemState::SET:
322 return beans::PropertyState_DIRECT_VALUE;
323 case SfxItemState::DEFAULT:
324 return beans::PropertyState_DEFAULT_VALUE;
328 return beans::PropertyState_AMBIGUOUS_VALUE;
334 return beans::PropertyState_DEFAULT_VALUE;
336 return beans::PropertyState_DIRECT_VALUE;
344 sal_Int32
nCount = aPropertyName.getLength();
346 uno::Sequence< beans::PropertyState > aPropertyStateSequence(
nCount );
348 std::transform(aPropertyName.begin(), aPropertyName.end(), aPropertyStateSequence.getArray(),
349 [
this](
const OUString& rName) -> beans::PropertyState { return getPropertyState(rName); });
351 return aPropertyStateSequence;
360 if( pEntry ==
nullptr )
361 throw beans::UnknownPropertyException( PropertyName,
static_cast<cppu::OWeakObject*
>(
this));
382 if( pEntry ==
nullptr ||
mpSet ==
nullptr )
383 throw beans::UnknownPropertyException( aPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
388 aAny <<= drawing::BitmapMode_REPEAT;
404 return mpPropSet->getPropertyMap().getByName(rPropertyName);
SAL_DLLPRIVATE SfxItemPool & GetPool()
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual ~SdUnoPageBackground() noexcept override
SvxItemPropertySetUsrAnys maUsrAnys
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
SdUnoPageBackground(SdDrawDocument *pDoc=nullptr, const SfxItemSet *pSet=nullptr)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
const SvxItemPropertySet * mpPropSet
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rPropertyName) const noexcept
this is used because our property map is not sorted yet
std::unique_ptr< SfxItemSet > mpSet
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void fillItemSet(SdDrawDocument *pDoc, SfxItemSet &rSet)
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual OUString SAL_CALL getImplementationName() override
SdrHintKind GetKind() const
static SdrItemPool & GetGlobalDrawObjectItemPool()
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const o3tl::sorted_vector< const SfxItemPropertyMapEntry *, SfxItemPropertyMapCompare > & getPropertyEntries() const
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
css::uno::Any * GetUsrAnyForID(SfxItemPropertyMapEntry const &entry) const
bool AreThereOwnUsrAnys() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
static void setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet, bool bDontConvertNegativeValues)
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Any getPropertyValue(const SfxItemPropertyMapEntry *pMap, SvxItemPropertySetUsrAnys &rAnys) const
static bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName, SfxItemSet &rSet, SdrModel const *pModel)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral sUNO_Service_PageBackground
constexpr OUStringLiteral sUNO_Service_FillProperties
#define OWN_ATTR_FILLBMP_MODE
const SvxItemPropertySet * ImplGetPageBackgroundPropertySet()
void SVXCORE_DLLPUBLIC SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet)
css::uno::Any SVXCORE_DLLPUBLIC SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)