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>
96 return aConfigPropertyMap_Impl;
100 : pDocShell(pDocSh) ,
118 if ( rHint.
GetId() == SfxHintId::Dying )
129 static uno::Reference<beans::XPropertySetInfo> aRef(
135 const OUString& aPropertyName,
const uno::Any& aValue )
140 throw uno::RuntimeException();
143 bool bUpdateHeights =
false;
163 if (aValue >>= aColor)
174 if (!(aValue >>=
n) ||
n < css::document::LinkUpdateModes::NEVER ||
175 n > css::document::LinkUpdateModes::GLOBAL_SETTING)
177 throw css::lang::IllegalArgumentException(
178 (
"LinkUpdateMode property value must be a SHORT with a value in"
179 " the range of the css::document::LinkUpdateModes constants"),
180 css::uno::Reference<css::uno::XInterface>(), -1);
185 case css::document::LinkUpdateModes::NEVER:
188 case css::document::LinkUpdateModes::MANUAL:
191 case css::document::LinkUpdateModes::AUTO:
194 case css::document::LinkUpdateModes::GLOBAL_SETTING:
211 OUString sPrinterName;
212 if ( !(aValue >>= sPrinterName) )
213 throw lang::IllegalArgumentException();
220 throw uno::RuntimeException();
222 if (pPrinter->GetName() != sPrinterName)
225 if (pNewPrinter->IsKnown())
236 uno::Sequence<sal_Int8> aSequence;
237 if ( aValue >>= aSequence )
239 sal_uInt32 nSize = aSequence.getLength();
243 SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
246 <SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
247 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
248 SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
249 SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>>( *rDoc.
GetPool());
252 bool bPreferPrinterPapersize =
false;
254 bPreferPrinterPapersize = pPrinter->GetPrinterSettingsPreferred();
257 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
264 bool bPreferPrinterPapersize;
265 if( aValue >>= bPreferPrinterPapersize )
271 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
278 if ( aValue >>= bTmp )
296 bUpdateHeights =
true;
301 bUpdateHeights =
true;
306 if ( aValue >>= bTmp )
312 if ( aValue >>= bTmp )
318 if ( aValue >>= bTmp )
323#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
324 bool bDocShared =
false;
325 if ( aValue >>= bDocShared )
333 uno::Sequence< beans::PropertyValue > aInfo;
334 if ( !( aValue >>= aInfo ) )
335 throw lang::IllegalArgumentException(
336 "Value of type Sequence<PropertyValue> expected!",
337 uno::Reference< uno::XInterface >(),
341 throw beans::PropertyVetoException(
342 "The hash is not allowed to be changed now!" );
347 if (!(aValue >>= nHash))
348 throw lang::IllegalArgumentException(
"Value of type sal_Int32 expected!",
349 uno::Reference<uno::XInterface>(), 2);
352 throw beans::PropertyVetoException(
"The hash is not allowed to be changed now!");
356 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
361 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
366 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
371 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
376 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
384 if( aValue >>= nUno )
404 if (aValue.has<sal_Int32>())
427 throw beans::UnknownPropertyException(aPropertyName);
436 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
450 throw uno::RuntimeException();
482 nLUM = css::document::LinkUpdateModes::AUTO;
485 nLUM = css::document::LinkUpdateModes::NEVER;
488 nLUM = css::document::LinkUpdateModes::MANUAL;
492 nLUM = css::document::LinkUpdateModes::GLOBAL_SETTING;
511 aRet <<= pPrinter->GetName();
523 pPrinter->
Store( aStream );
524 aRet <<= uno::Sequence< sal_Int8 >(
static_cast< const sal_Int8*
>( aStream.
GetData() ),
528 aRet <<= uno::Sequence<sal_Int8>();
533 aRet <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
556#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
598 aRet <<= static_cast<sal_Int16>( eConv );
607 aRet <<= sal_Int16(9999);
625 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawX() );
627 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawY() );
635 throw beans::UnknownPropertyException(aPropertyName);
647 return "ScDocumentConfiguration";
657 return {
"com.sun.star.comp.SpreadsheetSettings",
658 "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_SHOWFORMULASMARKS
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