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>
94 {
u"", 0, css::uno::Type(), 0, 0 }
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;
161 if (aValue >>= aColor)
162 aViewOpt.SetGridColor(aColor, OUString());
172 if (!(aValue >>= n) || n < css::document::LinkUpdateModes::NEVER ||
173 n > css::document::LinkUpdateModes::GLOBAL_SETTING)
175 throw css::lang::IllegalArgumentException(
176 (
"LinkUpdateMode property value must be a SHORT with a value in"
177 " the range of the css::document::LinkUpdateModes constants"),
178 css::uno::Reference<css::uno::XInterface>(), -1);
183 case css::document::LinkUpdateModes::NEVER:
186 case css::document::LinkUpdateModes::MANUAL:
189 case css::document::LinkUpdateModes::AUTO:
192 case css::document::LinkUpdateModes::GLOBAL_SETTING:
194 eMode =
SC_MOD()->GetAppOptions().GetLinkMode();
209 OUString sPrinterName;
210 if ( !(aValue >>= sPrinterName) )
211 throw lang::IllegalArgumentException();
218 throw uno::RuntimeException();
220 if (pPrinter->GetName() != sPrinterName)
223 if (pNewPrinter->IsKnown())
226 pNewPrinter.disposeAndClear();
234 uno::Sequence<sal_Int8> aSequence;
235 if ( aValue >>= aSequence )
237 sal_uInt32 nSize = aSequence.getLength();
241 SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
244 <SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
245 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
246 SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
247 SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>>( *rDoc.
GetPool());
250 bool bPreferPrinterPapersize =
false;
252 bPreferPrinterPapersize = pPrinter->GetPrinterSettingsPreferred();
255 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
262 bool bPreferPrinterPapersize;
263 if( aValue >>= bPreferPrinterPapersize )
269 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
276 if ( aValue >>= bTmp )
294 bUpdateHeights =
true;
299 bUpdateHeights =
true;
304 if ( aValue >>= bTmp )
310 if ( aValue >>= bTmp )
316 if ( aValue >>= bTmp )
321 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
322 bool bDocShared =
false;
323 if ( aValue >>= bDocShared )
331 uno::Sequence< beans::PropertyValue > aInfo;
332 if ( !( aValue >>= aInfo ) )
333 throw lang::IllegalArgumentException(
334 "Value of type Sequence<PropertyValue> expected!",
335 uno::Reference< uno::XInterface >(),
339 throw beans::PropertyVetoException(
340 "The hash is not allowed to be changed now!" );
345 if (!(aValue >>= nHash))
346 throw lang::IllegalArgumentException(
"Value of type sal_Int32 expected!",
347 uno::Reference<uno::XInterface>(), 2);
350 throw beans::PropertyVetoException(
"The hash is not allowed to be changed now!");
354 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
359 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
364 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
369 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
374 bool bVal = aValue.has<
bool>() && aValue.get<
bool>();
382 if( aValue >>= nUno )
390 aCalcConfig.
SetStringRefSyntax( static_cast<formula::FormulaGrammar::AddressConvention>( nUno ) );
402 if (aValue.has<sal_Int32>())
425 throw beans::UnknownPropertyException(aPropertyName);
426 aViewOpt.SetGridOptions(aGridOpt);
434 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
448 throw uno::RuntimeException();
478 nLUM = css::document::LinkUpdateModes::AUTO;
481 nLUM = css::document::LinkUpdateModes::NEVER;
484 nLUM = css::document::LinkUpdateModes::MANUAL;
488 nLUM = css::document::LinkUpdateModes::GLOBAL_SETTING;
507 aRet <<= pPrinter->GetName();
519 pPrinter->
Store( aStream );
520 aRet <<= uno::Sequence< sal_Int8 >(
static_cast< const sal_Int8*
>( aStream.
GetData() ),
524 aRet <<= uno::Sequence<sal_Int8>();
529 aRet <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
552 #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
594 aRet <<= static_cast<sal_Int16>( eConv );
603 aRet <<= sal_Int16(9999);
621 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawX() );
623 aRet <<= static_cast<sal_Int32> ( aGridOpt.
GetFieldDrawY() );
631 throw beans::UnknownPropertyException(aPropertyName);
643 return "ScDocumentConfiguration";
653 return {
"com.sun.star.comp.SpreadsheetSettings",
654 "com.sun.star.document.Settings"};
sal_uInt32 GetFieldDivisionY() const
sal_Int32 GetImagePreferredDPI()
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
void SetEmbedUsedFontsOnly(bool bUse)
bool IsUseUserData() const
#define SC_UNO_RASTERSYNC
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
void SetEmbedFontScriptComplex(bool bUse)
bool HasSharedXMLFlagSet() const
void SetAsianKerning(bool bNew)
#define SC_UNO_RASTERRESX
bool IsEmbedFontScriptLatin() const
sal_uInt32 GetFieldDrawX() const
#define SC_UNO_SAVE_THUMBNAIL
void SetDocumentModified()
sal_uInt64 Seek(sal_uInt64 nPos)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
void SetSharedXMLFlag(bool bFlag) const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ~ScDocumentConfiguration() override
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
#define SC_UNO_LOADREADONLY
#define SC_UNO_PRINTERNAME
#define SC_UNO_MODIFYPASSWORDINFO
virtual sal_uInt64 TellEnd() override
SC_DLLPUBLIC ScDocumentPool * GetPool()
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
void SetEmbedFontScriptLatin(bool bUse)
#define SC_UNO_RASTERRESY
#define SC_UNO_PRINTERSETUP
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC SCTAB GetTableCount() const
void SetEmbedFontScriptAsian(bool bUse)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool IsEmbedUsedFontsOnly() const
#define SC_UNO_RASTERSUBX
#define SC_UNO_SHOWPAGEBR
SfxObjectCreateMode GetCreateMode() const
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
sal_uInt16 SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL)
#define SC_UNO_IMAGE_PREFERRED_DPI
const SfxItemSet & GetOptions() const
#define SC_UNO_RASTERSUBY
void SetImagePreferredDPI(sal_Int32 nValue)
SC_DLLPUBLIC SCCOL MaxCol() const
bool IsImportingXML() const
bool GetUseGridSnap() const
#define STREAM_SEEK_TO_BEGIN
#define SC_UNO_SNAPTORASTER
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
bool Stamp_GetPrintCancelState() const
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
static sal_Int32 GetInt32FromAny(const css::uno::Any &aAny)
const css::uno::Sequence< css::beans::PropertyValue > & GetModifyPasswordInfo() const
static VclPtr< SfxPrinter > Create(SvStream &rStream, std::unique_ptr< SfxItemSet > &&pOptions)
void SetSaveVersionOnClose(bool bSet)
sal_uInt32 GetFieldDivisionX() const
const SfxItemPropertyMap & getPropertyMap() const
bool GetOption(ScViewOption eOpt) const
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
sal_uInt32 GetModifyPasswordHash() const
css::uno::Type const & get()
void SetUseThumbnailSave(bool _bNew)
const ScGridOptions & GetGridOptions() const
void SetUseUserData(bool bNew)
void Store(SvStream &rStream) const
static const SfxItemPropertyMapEntry * lcl_GetConfigPropertyMap()
ScDocumentConfiguration(ScDocShell *pDocShell)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax
bool GetSynchronize() const
static sal_Int16 GetInt16FromAny(const css::uno::Any &aAny)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
constexpr OUStringLiteral SC_UNO_SHAREDOC
void AddUnoObject(SfxListener &rObject)
Configuration options for formula interpreter.
bool SetModifyPasswordHash(sal_uInt32 nHash)
#define SC_UNO_ALLOWPRINTJOBCANCEL
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_COMPLEX
#define SC_UNO_APPLYDOCINF
bool GetAsianKerning() const
bool IsEmbedFonts() const
bool IsUseThumbnailSave() const
bool mbHasStringRefSyntax
bool IsQueryLoadTemplate() const
bool IsSaveVersionOnClose() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const ScCalcConfig & GetCalcConfig() const
void SetEmbedFonts(bool bUse)
void SetUseGridSnap(bool bSet)
bool IsEmbedFontScriptComplex() const
#define SC_UNO_PRINTERPAPER
bool SetModifyPasswordInfo(const css::uno::Sequence< css::beans::PropertyValue > &aInfo)
sal_uInt32 GetFieldDrawY() const
constexpr OUStringLiteral SC_UNO_EMBED_ONLY_USED_FONTS
void RemoveUnoObject(SfxListener &rObject)
constexpr OUStringLiteral SC_UNO_EMBED_FONTS
const ScDocument & GetDocument() const
SfxItemPropertySet aPropSet
Color const & GetGridColor(OUString *pStrName=nullptr) const
void SetLinkMode(ScLkUpdMode nSet)
constexpr OUStringLiteral SCSAVEVERSION
bool IsEmbedFontScriptAsian() const
#define SC_UNO_SYNTAXSTRINGREF
void SetLoadReadonly(bool _bReadonly)
void SetQueryLoadTemplate(bool b)
#define SC_UNONAME_LINKUPD
static bool GetBoolFromAny(const css::uno::Any &aAny)
bool IsLoadReadonly() const
void Stamp_SetPrintCancelState(bool bState)
void SetAsianCompression(CharCompressType nNew)
bool GetGridVisible() const
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_ASIAN
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_LATIN
CharCompressType GetAsianCompression() const
SC_DLLPUBLIC bool GetAutoCalc() const
void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv)
#define SC_UNO_MODIFYPASSWORDHASH