31 #include <unonames.hxx>
63 {
u"", 0, css::uno::Type(), 0, 0 }
65 return aDocDefaultsMap_Impl;
77 pDocShell->GetDocument().AddUnoObject(*
this);
90 if ( rHint.
GetId() == SfxHintId::Dying )
117 const OUString& aPropertyName,
const uno::Any& aValue )
122 throw uno::RuntimeException();
126 throw beans::UnknownPropertyException(aPropertyName);
134 if (aValue >>= nValue)
136 aDocOpt.SetStdPrecision(static_cast<sal_uInt16> (nValue));
145 if (aValue >>= nValue)
147 aDocOpt.SetTabDistance(static_cast<sal_uInt16>(
HMMToTwips(nValue)));
159 lang::Locale aLocale;
160 if ( aValue >>= aLocale )
163 if (!aLocale.Language.isEmpty() || !aLocale.Country.isEmpty())
187 if( !pNewItem->PutValue( aValue, pEntry->
nMemberId ) )
188 throw lang::IllegalArgumentException();
203 throw uno::RuntimeException();
208 throw beans::UnknownPropertyException(aPropertyName);
220 if (nPrec <= ::std::numeric_limits<sal_Int16>::max())
221 aRet <<= static_cast<sal_Int16> (nPrec);
244 beans::PropertyState SAL_CALL
ScDocDefaultsObj::getPropertyState( const OUString& aPropertyName )
249 throw uno::RuntimeException();
253 throw beans::UnknownPropertyException(aPropertyName);
255 beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE;
257 sal_uInt16 nWID = pEntry->
nWID;
263 eRet = beans::PropertyState_DIRECT_VALUE;
271 eRet = beans::PropertyState_DIRECT_VALUE;
278 const uno::Sequence<OUString>& aPropertyNames )
283 uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
284 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aRet.begin(),
285 [
this](
const OUString& rName) -> beans::PropertyState {
return getPropertyState(rName); });
294 throw uno::RuntimeException();
298 throw beans::UnknownPropertyException(aPropertyName);
316 throw uno::RuntimeException();
320 throw beans::UnknownPropertyException(aPropertyName);
#define SC_UNO_CJK_CFSTYLE
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
virtual ~ScDocDefaultsObj() override
#define SC_UNO_CTL_CFFAMIL
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
#define SC_UNO_CJK_CFNAME
#define SC_UNO_TABSTOPDIS
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
const SfxPoolItem * GetItem2Default(sal_uInt16 nWhich) const
#define SC_UNO_CJK_CLOCAL
SC_DLLPUBLIC ScDocumentPool * GetPool()
#define SC_UNO_CJK_CFPITCH
#define SC_UNO_CTL_CFCHARS
#define MID_FONT_FAMILY_NAME
#define SC_UNO_CJK_CFFAMIL
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
static const SfxItemPropertyMapEntry * lcl_GetDocDefaultsMap()
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
#define SC_UNO_CTL_CFNAME
#define SC_UNONAME_CFNAME
#define SC_UNO_CTL_CFSTYLE
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
#define SC_UNONAME_CFPITCH
#define SC_UNONAME_CFCHARS
sal_uInt16 GetTabDistance() const
#define SC_UNONAME_CLOCAL
inline::tools::Long HMMToTwips(::tools::Long nHMM)
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
#define SC_UNONAME_CFSTYLE
#define SC_UNO_STANDARDDEC
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
#define MID_FONT_STYLE_NAME
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
void ResetPoolDefaultItem(sal_uInt16 nWhich)
#define SC_UNONAME_CFFAMIL
void RemoveUnoObject(SfxListener &rObject)
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
SfxItemPropertyMap aPropertyMap
const ScDocument & GetDocument() const
sal_uInt16 GetStdPrecision() const
inline::tools::Long TwipsToEvenHMM(::tools::Long nTwips)
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
#define SC_UNO_CTL_CFPITCH
#define SC_UNO_CJK_CFCHARS
void SetPoolDefaultItem(const SfxPoolItem &)
#define MID_FONT_CHAR_SET
#define SC_UNO_CTL_CLOCAL