20#include <com/sun/star/lang/XServiceInfo.hpp>
21#include <com/sun/star/beans/PropertyState.hpp>
34#include <editeng/editeng.hxx>
40using namespace ::
cppu;
43: PropertySetHelper( xDefaults ), mpModel( pModel )
67 return &mpModel->GetItemPool();
72 return mpDefaultsPool.get();
86 rValue <<= drawing::BitmapMode_REPEAT;
90 rValue <<= drawing::BitmapMode_STRETCH;
94 rValue <<= drawing::BitmapMode_NO_REPEAT;
103 if( eMapUnit == MapUnit::Map100thMM )
104 nMemberId &= (~CONVERT_TWIPS);
115 if(pEntry->
mnMoreFlags & PropertyMoreFlags::METRIC_ITEM && eMapUnit != MapUnit::Map100thMM)
134 if(pEntry->
mnMoreFlags & PropertyMoreFlags::METRIC_ITEM && eMapUnit != MapUnit::Map100thMM)
141 const sal_uInt16 nWhich = pPool->
GetWhich(
static_cast<sal_uInt16
>(pEntry->
mnHandle) );
147 drawing::BitmapMode
eMode;
148 if(!(aValue >>=
eMode) )
151 if(!(aValue >>= nMode))
152 throw lang::IllegalArgumentException();
154 eMode =
static_cast<drawing::BitmapMode
>(nMode);
167 if( pPool->
GetMetric(nWhich) == MapUnit::Map100thMM )
168 nMemberId &= (~CONVERT_TWIPS);
170 if( !pNewItem->PutValue( aValue, nMemberId ) )
171 throw lang::IllegalArgumentException();
185 if(
nullptr == pPool )
186 throw beans::UnknownPropertyException(
"no pool, no properties..", getXWeak());
199 if(
nullptr == pPool )
200 throw beans::UnknownPropertyException(
"no pool, no properties..", getXWeak());
203 getAny( pPool, *ppEntries++, *pValue++ );
218 const sal_uInt16 nWhich = pPool->
GetWhich(
static_cast<sal_uInt16
>((*ppEntries)->mnHandle) );
229 *pStates = beans::PropertyState_DEFAULT_VALUE;
233 *pStates = beans::PropertyState_DIRECT_VALUE;
240 *pStates = beans::PropertyState_DEFAULT_VALUE;
242 *pStates = beans::PropertyState_DIRECT_VALUE;
253 *pStates = beans::PropertyState_DEFAULT_VALUE;
257 *pStates = beans::PropertyState_DIRECT_VALUE;
268 while( *ppEntries++ )
269 *pStates++ = beans::PropertyState_DEFAULT_VALUE;
282 const sal_uInt16 nWhich = pPool->
GetWhich(
static_cast<sal_uInt16
>(pEntry->
mnHandle) );
297 const sal_uInt16 nWhich = pPool->
GetWhich(
static_cast<sal_uInt16
>(pEntry->
mnHandle) );
311 return OWeakAggObject::queryInterface( rType );
319 aAny <<= uno::Reference< lang::XServiceInfo >(
this);
321 aAny <<= uno::Reference< lang::XTypeProvider >(
this);
323 aAny <<= uno::Reference< beans::XPropertySet >(
this);
325 aAny <<= uno::Reference< beans::XPropertyState >(
this);
327 aAny <<= uno::Reference< beans::XMultiPropertySet >(
this);
329 aAny = OWeakAggObject::queryAggregation( rType );
336 static const uno::Sequence
aTypes {
348 return css::uno::Sequence<sal_Int8>();
359 return "SvxUnoDrawPool";
364 uno::Sequence<OUString> aSNS {
"com.sun.star.drawing.Defaults" };
const PropertyValue * pValues
static rtl::Reference< SfxItemPool > CreatePool()
void SetTextDefaults() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
void ResetPoolDefaultItem(sal_uInt16 nWhich)
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
void SetPoolDefaultItem(const SfxPoolItem &)
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
SvxUnoDrawPool(SdrModel *pModel, rtl::Reference< comphelper::PropertySetInfo > const &xDefaults)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void putAny(SfxItemPool *pPool, const comphelper::PropertyMapEntry *pEntry, const css::uno::Any &rValue)
virtual SfxItemPool * getModelPool(bool bReadOnly) noexcept
This returns the item pool from the given model, or the default pool if there is no model and bReadOn...
static void getAny(SfxItemPool const *pPool, const comphelper::PropertyMapEntry *pEntry, css::uno::Any &rValue)
virtual void _getPropertyStates(const comphelper::PropertyMapEntry **ppEntries, css::beans::PropertyState *pStates) override
virtual void _getPropertyValues(const comphelper::PropertyMapEntry **ppEntries, css::uno::Any *pValue) override
virtual void _setPropertyToDefault(const comphelper::PropertyMapEntry *pEntry) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
virtual OUString SAL_CALL getImplementationName() override
virtual ~SvxUnoDrawPool() noexcept override
virtual void _setPropertyValues(const comphelper::PropertyMapEntry **ppEntries, const css::uno::Any *pValues) override
virtual css::uno::Any _getPropertyDefault(const comphelper::PropertyMapEntry *pEntry) override
rtl::Reference< SfxItemPool > mpDefaultsPool
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Type const & get()
#define DBG_ASSERT(sCon, aError)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool IsStaticDefaultItem(const SfxPoolItem *pItem)
PropertyMoreFlags mnMoreFlags
void setValue(Type type, object value)
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
void SvxUnoConvertToMM(const MapUnit eSourceMapUnit, uno::Any &rMetric) noexcept
void SvxUnoConvertFromMM(const MapUnit eDestinationMapUnit, uno::Any &rMetric) noexcept
#define OWN_ATTR_FILLBMP_MODE
#define OWN_ATTR_TEXTCOLUMNS
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)