24#include <config_features.h>
27#include <unonames.hxx>
37#include <com/sun/star/beans/PropertyAttribute.hpp>
38#include <com/sun/star/document/LinkUpdateModes.hpp>
95 return aConfigPropertyMap_Impl;
117 if ( rHint.
GetId() == SfxHintId::Dying )
128 static uno::Reference<beans::XPropertySetInfo> aRef(
134 const OUString& aPropertyName,
const uno::Any& aValue )
139 throw uno::RuntimeException();
142 bool bUpdateHeights =
false;
160 if (aValue >>= aColor)
171 if (!(aValue >>=
n) ||
n < css::document::LinkUpdateModes::NEVER ||
172 n > css::document::LinkUpdateModes::GLOBAL_SETTING)
174 throw css::lang::IllegalArgumentException(
175 (
"LinkUpdateMode property value must be a SHORT with a value in"
176 " the range of the css::document::LinkUpdateModes constants"),
177 css::uno::Reference<css::uno::XInterface>(), -1);
182 case css::document::LinkUpdateModes::NEVER:
185 case css::document::LinkUpdateModes::MANUAL:
188 case css::document::LinkUpdateModes::AUTO:
191 case css::document::LinkUpdateModes::GLOBAL_SETTING:
208 OUString sPrinterName;
209 if ( !(aValue >>= sPrinterName) )
210 throw lang::IllegalArgumentException();
217 throw uno::RuntimeException();
219 if (pPrinter->GetName() != sPrinterName)
222 if (pNewPrinter->IsKnown())
233 uno::Sequence<sal_Int8> aSequence;
234 if ( aValue >>= aSequence )
236 sal_uInt32 nSize = aSequence.getLength();
240 SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
243 <SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
244 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
245 SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
246 SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>>( *rDoc.
GetPool());
249 bool bPreferPrinterPapersize =
false;
251 bPreferPrinterPapersize = pPrinter->GetPrinterSettingsPreferred();
254 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
261 bool bPreferPrinterPapersize;
262 if( aValue >>= bPreferPrinterPapersize )
268 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
275 if ( aValue >>= bTmp )
293 bUpdateHeights =
true;
298 bUpdateHeights =
true;
303 if ( aValue >>= bTmp )
309 if ( aValue >>= bTmp )
315 if ( aValue >>= bTmp )
320#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
321 bool bDocShared =
false;
322 if ( aValue >>= bDocShared )
330 uno::Sequence< beans::PropertyValue > aInfo;
331 if ( !( aValue >>= aInfo ) )
332 throw lang::IllegalArgumentException(
333 "Value of type Sequence<PropertyValue> expected!",
334 uno::Reference< uno::XInterface >(),
338 throw beans::PropertyVetoException(
339 "The hash is not allowed to be changed now!" );
344 if (!(aValue >>= nHash))
345 throw lang::IllegalArgumentException(
"Value of type sal_Int32 expected!",
346 uno::Reference<uno::XInterface>(), 2);
349 throw beans::PropertyVetoException(
"The hash is not allowed to be changed now!");
353 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
358 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
363 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
368 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
373 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
381 if( aValue >>= nUno )
401 if (aValue.has<sal_Int32>())
424 throw beans::UnknownPropertyException(aPropertyName);
433 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
447 throw uno::RuntimeException();
477 nLUM = css::document::LinkUpdateModes::AUTO;
480 nLUM = css::document::LinkUpdateModes::NEVER;
483 nLUM = css::document::LinkUpdateModes::MANUAL;
487 nLUM = css::document::LinkUpdateModes::GLOBAL_SETTING;
506 aRet <<= pPrinter->GetName();
518 pPrinter->
Store( aStream );
519 aRet <<= uno::Sequence< sal_Int8 >(
static_cast< const sal_Int8*
>( aStream.
GetData() ),
523 aRet <<= uno::Sequence<sal_Int8>();
528 aRet <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
551#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
593 aRet <<= static_cast<sal_Int16>( eConv );
602 aRet <<= sal_Int16(9999);
620 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawX() );
622 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawY() );
630 throw beans::UnknownPropertyException(aPropertyName);
642 return "ScDocumentConfiguration";
652 return {
"com.sun.star.comp.SpreadsheetSettings",
653 "com.sun.star.document.Settings"};
void SetDocumentModified()
sal_uInt16 SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL)
const ScDocument & GetDocument() const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
ScDocumentConfiguration(ScDocShell *pDocShell)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SfxItemPropertySet aPropSet
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual ~ScDocumentConfiguration() override
bool IsEmbedUsedFontsOnly() const
bool GetAsianKerning() const
const ScCalcConfig & GetCalcConfig() const
SC_DLLPUBLIC SCCOL MaxCol() const
void SetEmbedFontScriptComplex(bool bUse)
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
bool IsEmbedFonts() const
CharCompressType GetAsianCompression() const
bool IsEmbedFontScriptComplex() const
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
void AddUnoObject(SfxListener &rObject)
void SetEmbedFontScriptAsian(bool bUse)
SC_DLLPUBLIC bool GetAutoCalc() const
void SetEmbedFonts(bool bUse)
void SetAsianKerning(bool bNew)
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
sal_Int32 GetImagePreferredDPI()
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
bool IsEmbedFontScriptLatin() const
bool IsEmbedFontScriptAsian() const
void SetImagePreferredDPI(sal_Int32 nValue)
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
void RemoveUnoObject(SfxListener &rObject)
void SetEmbedUsedFontsOnly(bool bUse)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
void SetEmbedFontScriptLatin(bool bUse)
void SetAsianCompression(CharCompressType nNew)
void SetLinkMode(ScLkUpdMode nSet)
bool IsImportingXML() const
SC_DLLPUBLIC SCTAB GetTableCount() const
static sal_Int32 GetInt32FromAny(const css::uno::Any &aAny)
static sal_Int16 GetInt16FromAny(const css::uno::Any &aAny)
static bool GetBoolFromAny(const css::uno::Any &aAny)
void SetGridColor(const Color &rCol, const OUString &rName)
void SetOption(ScViewOption eOpt, bool bNew)
const ScGridOptions & GetGridOptions() const
bool GetOption(ScViewOption eOpt) const
Color const & GetGridColor(OUString *pStrName=nullptr) const
void SetGridOptions(const ScGridOptions &rNew)
const SfxItemPropertyMap & getPropertyMap() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
bool SetModifyPasswordInfo(const css::uno::Sequence< css::beans::PropertyValue > &aInfo)
bool IsLoadReadonly() const
sal_uInt32 GetModifyPasswordHash() const
void SetSharedXMLFlag(bool bFlag) const
bool IsUseUserData() const
bool HasSharedXMLFlagSet() const
void SetQueryLoadTemplate(bool b)
void SetSaveVersionOnClose(bool bSet)
void SetUseThumbnailSave(bool _bNew)
void SetUseUserData(bool bNew)
bool IsUseThumbnailSave() const
bool IsSaveVersionOnClose() const
void SetLoadReadonly(bool _bReadonly)
SfxObjectCreateMode GetCreateMode() const
bool Stamp_GetPrintCancelState() const
const css::uno::Sequence< css::beans::PropertyValue > & GetModifyPasswordInfo() const
bool SetModifyPasswordHash(sal_uInt32 nHash)
bool IsQueryLoadTemplate() const
void Stamp_SetPrintCancelState(bool bState)
void Store(SvStream &rStream) const
static VclPtr< SfxPrinter > Create(SvStream &rStream, std::unique_ptr< SfxItemSet > &&pOptions)
const SfxItemSet & GetOptions() const
virtual sal_uInt64 TellEnd() override
sal_uInt64 Seek(sal_uInt64 nPos)
bool GetGridVisible() const
bool GetUseGridSnap() const
void SetFieldDrawX(sal_uInt32 nSet)
void SetUseGridSnap(bool bSet)
void SetFieldDrawY(sal_uInt32 nSet)
sal_uInt32 GetFieldDivisionY() const
bool GetSynchronize() const
void SetSynchronize(bool bSet)
sal_uInt32 GetFieldDrawY() const
void SetGridVisible(bool bSet)
void SetFieldDivisionY(sal_uInt32 nSet)
void SetFieldDivisionX(sal_uInt32 nSet)
sal_uInt32 GetFieldDrawX() const
sal_uInt32 GetFieldDivisionX() const
css::uno::Type const & get()
constexpr OUStringLiteral SCSAVEVERSION
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetConfigPropertyMap()
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define STREAM_SEEK_TO_BEGIN
Configuration options for formula interpreter.
void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv)
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax
bool mbHasStringRefSyntax
constexpr OUStringLiteral SC_UNO_EMBED_FONTS
constexpr OUStringLiteral SC_UNO_SHOWGRID
constexpr OUStringLiteral SC_UNO_AUTOCALC
constexpr OUStringLiteral SC_UNONAME_LINKUPD
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDINFO
constexpr OUStringLiteral SC_UNO_FORBIDDEN
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_ASIAN
constexpr OUStringLiteral SC_UNO_OUTLSYMB
constexpr OUStringLiteral SC_UNO_RASTERVIS
constexpr OUStringLiteral SC_UNO_APPLYDOCINF
constexpr OUStringLiteral SC_UNO_PRINTERSETUP
constexpr OUStringLiteral SC_UNO_ALLOWPRINTJOBCANCEL
constexpr OUStringLiteral SC_UNO_SHOWNOTES
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_COMPLEX
constexpr OUStringLiteral SC_UNO_IMAGE_PREFERRED_DPI
constexpr OUStringLiteral SC_UNO_SHOWPAGEBR
constexpr OUStringLiteral SC_UNO_SHEETTABS
constexpr OUStringLiteral SC_UNO_PRINTERNAME
constexpr OUStringLiteral SC_UNO_RASTERSUBX
constexpr OUStringLiteral SC_UNO_PRINTERPAPER
constexpr OUStringLiteral SC_UNO_SYNTAXSTRINGREF
constexpr OUStringLiteral SC_UNO_COLROWHDR
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_LATIN
constexpr OUStringLiteral SC_UNO_RASTERSUBY
constexpr OUStringLiteral SC_UNO_RASTERSYNC
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDHASH
constexpr OUStringLiteral SC_UNO_SHAREDOC
constexpr OUStringLiteral SC_UNO_CHARCOMP
constexpr OUStringLiteral SC_UNO_EMBED_ONLY_USED_FONTS
constexpr OUStringLiteral SC_UNO_SAVE_THUMBNAIL
constexpr OUStringLiteral SC_UNO_RASTERRESX
constexpr OUStringLiteral SC_UNO_UPDTEMPL
constexpr OUStringLiteral SC_UNO_GRIDCOLOR
constexpr OUStringLiteral SC_UNO_SHOWZERO
constexpr OUStringLiteral SC_UNO_ASIANKERN
constexpr OUStringLiteral SC_UNO_RASTERRESY
constexpr OUStringLiteral SC_UNO_LOADREADONLY
constexpr OUStringLiteral SC_UNO_SNAPTORASTER