20#include <com/sun/star/beans/PropertyAttribute.hpp>
23#include <osl/diagnose.h>
69 throw UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
70 if ( pMap->
nFlags & PropertyAttribute::READONLY)
71 throw PropertyVetoException (
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
85 if(!(aValue >>= uStyle))
86 throw lang::IllegalArgumentException();
92 std::unique_ptr<SwFormatDrop> pDrop;
93 std::unique_ptr<SwFormatCharFormat> pCharFormat;
95 throw lang::IllegalArgumentException();
104 pDrop->SetCharFormat(xStyle->GetCharFormat());
110 pCharFormat->SetCharFormat(xStyle->GetCharFormat());
116 std::unique_ptr<SfxPoolItem> pNewItem(rItem.
Clone());
117 pNewItem->PutValue( aValue, pMap->
nMemberId);
129 throw UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
138 OSL_FAIL (
"not implemented" );
143 OSL_FAIL (
"not implemented" );
148 OSL_FAIL (
"not implemented" );
153 OSL_FAIL (
"not implemented" );
160 PropertyState eRet = PropertyState_DIRECT_VALUE;
165 throw UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
169 eRet = PropertyState_DEFAULT_VALUE;
175 const sal_Int32
nCount = rPropertyNames.getLength();
176 Sequence < PropertyState > aRet (
nCount );
178 std::transform(rPropertyNames.begin(), rPropertyNames.end(), aRet.getArray(),
179 [
this](
const OUString& rName) -> PropertyState { return getPropertyState(rName); });
190 throw UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
191 if ( pMap->
nFlags & PropertyAttribute::READONLY)
194 rSet.ResetPoolDefaultItem ( pMap->
nWID );
203 throw UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
216 return "SwXTextDefaults";
226 return {
"com.sun.star.text.Defaults",
227 "com.sun.star.style.CharacterProperties",
228 "com.sun.star.style.CharacterPropertiesAsian",
229 "com.sun.star.style.CharacterPropertiesComplex",
230 "com.sun.star.style.ParagraphProperties",
231 "com.sun.star.style.ParagraphPropertiesAsian",
232 "com.sun.star.style.ParagraphPropertiesComplex" };
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
const SwCharFormat * GetDfltCharFormat() const
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
const SwAttrPool & GetAttrPool() const
SwDocShell * GetDocShell()
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
SwXTextDefaults(SwDoc *pNewDoc)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual ~SwXTextDefaults() override
const SfxItemPropertySet * m_pPropSet
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
bool SetPageDesc(const css::uno::Any &rValue, SwDoc &rDoc, SfxItemSet &rSet)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool IsStaticDefaultItem(const SfxPoolItem *pItem)
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_TEXT_DEFAULT
#define MID_PAGEDESC_PAGEDESCNAME
#define MID_DROPCAP_CHAR_STYLE_NAME