LibreOffice Module sc (master) 1
confuno.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <utility>
23
24#include <config_features.h>
25
26#include <confuno.hxx>
27#include <unonames.hxx>
28#include <docsh.hxx>
29#include <miscuno.hxx>
30#include <forbiuno.hxx>
31#include <appoptio.hxx>
32#include <viewopti.hxx>
33#include <docpool.hxx>
34#include <sc.hrc>
35#include <scmod.hxx>
36
37#include <com/sun/star/beans/PropertyAttribute.hpp>
38#include <com/sun/star/document/LinkUpdateModes.hpp>
40#include <formula/grammar.hxx>
41#include <sfx2/printer.hxx>
42#include <svl/itemset.hxx>
43#include <vcl/svapp.hxx>
44#include <tools/stream.hxx>
45
46using namespace com::sun::star;
47
48constexpr OUStringLiteral SCSAVEVERSION = u"SaveVersionOnClose";
49
51{
52 static const SfxItemPropertyMapEntry aConfigPropertyMap_Impl[] =
53 {
77 { SC_UNO_FORBIDDEN, 0, cppu::UnoType<i18n::XForbiddenCharacters>::get(), beans::PropertyAttribute::READONLY, 0},
82 /*Stampit enable/disable print cancel */
95 };
96 return aConfigPropertyMap_Impl;
97}
98
100 : pDocShell(pDocSh) ,
101 aPropSet ( lcl_GetConfigPropertyMap() )
102{
104}
105
107{
109
110 if (pDocShell)
112}
113
115{
116 // reference update does not matter here
117
118 if ( rHint.GetId() == SfxHintId::Dying )
119 {
120 pDocShell = nullptr;
121 }
122}
123
124// XPropertySet
125
126uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDocumentConfiguration::getPropertySetInfo()
127{
128 SolarMutexGuard aGuard;
129 static uno::Reference<beans::XPropertySetInfo> aRef(
131 return aRef;
132}
133
135 const OUString& aPropertyName, const uno::Any& aValue )
136{
137 SolarMutexGuard aGuard;
138
139 if(!pDocShell)
140 throw uno::RuntimeException();
141
143 bool bUpdateHeights = false;
144
145 ScViewOptions aViewOpt(rDoc.GetViewOptions());
146
147 /*Stampit enable/disable print cancel */
148 if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
150 /*Stampit enable/disable print cancel */
151
152 else if ( aPropertyName == SC_UNO_SHOWZERO )
154 else if ( aPropertyName == SC_UNO_SHOWNOTES )
156 else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS )
158 else if ( aPropertyName == SC_UNO_SHOWGRID )
160 else if ( aPropertyName == SC_UNO_GRIDCOLOR )
161 {
162 Color aColor;
163 if (aValue >>= aColor)
164 aViewOpt.SetGridColor(aColor, OUString());
165 }
166 else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
168 else if ( aPropertyName == SC_UNONAME_LINKUPD )
169 {
170 // XXX NOTE: this is the css::document::Settings property
171 // LinkUpdateMode, not the css::sheet::XGlobalSheetSettings
172 // attribute LinkUpdateMode.
173 sal_Int16 n;
174 if (!(aValue >>= n) || n < css::document::LinkUpdateModes::NEVER ||
175 n > css::document::LinkUpdateModes::GLOBAL_SETTING)
176 {
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);
181 }
183 switch (n)
184 {
185 case css::document::LinkUpdateModes::NEVER:
186 eMode = LM_NEVER;
187 break;
188 case css::document::LinkUpdateModes::MANUAL:
190 break;
191 case css::document::LinkUpdateModes::AUTO:
193 break;
194 case css::document::LinkUpdateModes::GLOBAL_SETTING:
195 default:
196 eMode = SC_MOD()->GetAppOptions().GetLinkMode();
197 break;
198 }
199 rDoc.SetLinkMode( eMode );
200 }
201 else if ( aPropertyName == SC_UNO_COLROWHDR )
203 else if ( aPropertyName == SC_UNO_SHEETTABS )
205 else if ( aPropertyName == SC_UNO_OUTLSYMB )
207 else if ( aPropertyName == SC_UNO_AUTOCALC )
209 else if ( aPropertyName == SC_UNO_PRINTERNAME )
210 {
211 OUString sPrinterName;
212 if ( !(aValue >>= sPrinterName) )
213 throw lang::IllegalArgumentException();
214
215 // #i75610# if the name is empty, do nothing (don't create any printer)
216 if ( !sPrinterName.isEmpty() && pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
217 {
218 SfxPrinter* pPrinter = pDocShell->GetPrinter();
219 if (!pPrinter)
220 throw uno::RuntimeException();
221
222 if (pPrinter->GetName() != sPrinterName)
223 {
224 VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
225 if (pNewPrinter->IsKnown())
226 pDocShell->SetPrinter( pNewPrinter, SfxPrinterChangeFlags::PRINTER );
227 else
228 pNewPrinter.disposeAndClear();
229 }
230
231 }
232
233 }
234 else if ( aPropertyName == SC_UNO_PRINTERSETUP )
235 {
236 uno::Sequence<sal_Int8> aSequence;
237 if ( aValue >>= aSequence )
238 {
239 sal_uInt32 nSize = aSequence.getLength();
240 // #i75610# if the sequence is empty, do nothing (don't create any printer)
241 if ( nSize != 0 )
242 {
243 SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
244 aStream.Seek ( STREAM_SEEK_TO_BEGIN );
245 auto pSet = std::make_unique<SfxItemSetFixed
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());
250
251 SfxPrinter* pPrinter = pDocShell->GetPrinter();
252 bool bPreferPrinterPapersize = false;
253 if ( pPrinter )
254 bPreferPrinterPapersize = pPrinter->GetPrinterSettingsPreferred();
255
256 VclPtr<SfxPrinter> pTempPrinter = SfxPrinter::Create( aStream, std::move(pSet) );
257 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
258 pDocShell->SetPrinter( pTempPrinter );
259 }
260 }
261 }
262 else if ( aPropertyName == SC_UNO_PRINTERPAPER )
263 {
264 bool bPreferPrinterPapersize;
265 if( aValue >>= bPreferPrinterPapersize )
266 {
267 if( pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
268 {
269 SfxPrinter *pTempPrinter = pDocShell->GetPrinter( true );
270 if (pTempPrinter)
271 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
272 }
273 }
274 }
275 else if ( aPropertyName == SC_UNO_APPLYDOCINF )
276 {
277 bool bTmp=true;
278 if ( aValue >>= bTmp )
279 pDocShell->SetUseUserData( bTmp );
280 }
281 else if ( aPropertyName == SC_UNO_SAVE_THUMBNAIL)
282 {
283 bool bTmp = true;
284 if (aValue >>= bTmp)
286 }
287 else if ( aPropertyName == SC_UNO_FORBIDDEN )
288 {
289 // read-only - should not be set
290 }
291 else if ( aPropertyName == SC_UNO_CHARCOMP )
292 {
293 // Int16 contains CharacterCompressionType values
294 sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
295 rDoc.SetAsianCompression( static_cast<CharCompressType>(nUno) );
296 bUpdateHeights = true;
297 }
298 else if ( aPropertyName == SC_UNO_ASIANKERN )
299 {
301 bUpdateHeights = true;
302 }
303 else if ( aPropertyName == SCSAVEVERSION )
304 {
305 bool bTmp=false;
306 if ( aValue >>= bTmp )
308 }
309 else if ( aPropertyName == SC_UNO_UPDTEMPL )
310 {
311 bool bTmp=true;
312 if ( aValue >>= bTmp )
314 }
315 else if ( aPropertyName == SC_UNO_LOADREADONLY )
316 {
317 bool bTmp=false;
318 if ( aValue >>= bTmp )
319 pDocShell->SetLoadReadonly( bTmp );
320 }
321 else if ( aPropertyName == SC_UNO_SHAREDOC )
322 {
323#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
324 bool bDocShared = false;
325 if ( aValue >>= bDocShared )
326 {
327 pDocShell->SetSharedXMLFlag( bDocShared );
328 }
329#endif
330 }
331 else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
332 {
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 >(),
338 2 );
339
340 if ( !pDocShell->SetModifyPasswordInfo( aInfo ) )
341 throw beans::PropertyVetoException(
342 "The hash is not allowed to be changed now!" );
343 }
344 else if (aPropertyName == SC_UNO_MODIFYPASSWORDHASH)
345 {
346 sal_Int32 nHash;
347 if (!(aValue >>= nHash))
348 throw lang::IllegalArgumentException("Value of type sal_Int32 expected!",
349 uno::Reference<uno::XInterface>(), 2);
350
351 if (!pDocShell->SetModifyPasswordHash(nHash))
352 throw beans::PropertyVetoException("The hash is not allowed to be changed now!");
353 }
354 else if (aPropertyName == SC_UNO_EMBED_FONTS)
355 {
356 bool bVal = aValue.has<bool>() && aValue.get<bool>();
357 rDoc.SetEmbedFonts(bVal);
358 }
359 else if (aPropertyName == SC_UNO_EMBED_ONLY_USED_FONTS)
360 {
361 bool bVal = aValue.has<bool>() && aValue.get<bool>();
362 rDoc.SetEmbedUsedFontsOnly(bVal);
363 }
364 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_LATIN)
365 {
366 bool bVal = aValue.has<bool>() && aValue.get<bool>();
367 rDoc.SetEmbedFontScriptLatin(bVal);
368 }
369 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_ASIAN)
370 {
371 bool bVal = aValue.has<bool>() && aValue.get<bool>();
372 rDoc.SetEmbedFontScriptAsian(bVal);
373 }
374 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_COMPLEX)
375 {
376 bool bVal = aValue.has<bool>() && aValue.get<bool>();
377 rDoc.SetEmbedFontScriptComplex(bVal);
378 }
379 else if ( aPropertyName == SC_UNO_SYNTAXSTRINGREF )
380 {
381 ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
382 sal_Int16 nUno = 0;
383
384 if( aValue >>= nUno )
385 {
386 switch (nUno)
387 {
388 case 0: // CONV_OOO
389 case 2: // CONV_XL_A1
390 case 3: // CONV_XL_R1C1
391 case 7: // CONV_A1_XL_A1
392 aCalcConfig.SetStringRefSyntax( static_cast<formula::FormulaGrammar::AddressConvention>( nUno ) );
393 break;
394 default:
396 break;
397
398 }
399 rDoc.SetCalcConfig( aCalcConfig );
400 }
401 }
402 else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
403 {
404 if (aValue.has<sal_Int32>())
405 {
406 rDoc.SetImagePreferredDPI(aValue.get<sal_Int32>());
407 }
408 }
409 else
410 {
411 ScGridOptions aGridOpt(aViewOpt.GetGridOptions());
412 if ( aPropertyName == SC_UNO_SNAPTORASTER )
414 else if ( aPropertyName == SC_UNO_RASTERVIS )
416 else if ( aPropertyName == SC_UNO_RASTERRESX )
417 aGridOpt.SetFieldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
418 else if ( aPropertyName == SC_UNO_RASTERRESY )
419 aGridOpt.SetFieldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
420 else if ( aPropertyName == SC_UNO_RASTERSUBX )
421 aGridOpt.SetFieldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
422 else if ( aPropertyName == SC_UNO_RASTERSUBY )
423 aGridOpt.SetFieldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
424 else if ( aPropertyName == SC_UNO_RASTERSYNC )
426 else
427 throw beans::UnknownPropertyException(aPropertyName);
428 aViewOpt.SetGridOptions(aGridOpt);
429 }
430 rDoc.SetViewOptions(aViewOpt);
431
432 if ( bUpdateHeights && !rDoc.IsImportingXML() )
433 {
434 // update automatic row heights and repaint
435 SCTAB nTabCount = rDoc.GetTableCount();
436 for (SCTAB nTab=0; nTab<nTabCount; nTab++)
437 if ( !pDocShell->AdjustRowHeight( 0, rDoc.MaxRow(), nTab ) )
438 pDocShell->PostPaint(ScRange(0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab), PaintPartFlags::Grid);
440 }
441
442}
443
444uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPropertyName )
445{
446 SolarMutexGuard aGuard;
447 uno::Any aRet;
448
449 if(!pDocShell)
450 throw uno::RuntimeException();
451
453 const ScViewOptions& aViewOpt = rDoc.GetViewOptions();
454
455 /*Stampit enable/disable print cancel */
456 if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
458 /*Stampit enable/disable print cancel */
459
460 else if ( aPropertyName == SC_UNO_SHOWZERO )
461 aRet <<= aViewOpt.GetOption( VOPT_NULLVALS );
462 else if ( aPropertyName == SC_UNO_SHOWNOTES )
463 aRet <<= aViewOpt.GetOption( VOPT_NOTES );
464 else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS )
465 aRet <<= aViewOpt.GetOption( VOPT_FORMULAS_MARKS );
466 else if ( aPropertyName == SC_UNO_SHOWGRID )
467 aRet <<= aViewOpt.GetOption( VOPT_GRID );
468 else if ( aPropertyName == SC_UNO_GRIDCOLOR )
469 {
470 OUString aColorName;
471 Color aColor = aViewOpt.GetGridColor(&aColorName);
472 aRet <<= aColor;
473 }
474 else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
475 aRet <<= aViewOpt.GetOption( VOPT_PAGEBREAKS );
476 else if ( aPropertyName == SC_UNONAME_LINKUPD )
477 {
478 sal_Int16 nLUM;
479 switch (rDoc.GetLinkMode())
480 {
481 case LM_ALWAYS:
482 nLUM = css::document::LinkUpdateModes::AUTO;
483 break;
484 case LM_NEVER:
485 nLUM = css::document::LinkUpdateModes::NEVER;
486 break;
487 case LM_ON_DEMAND:
488 nLUM = css::document::LinkUpdateModes::MANUAL;
489 break;
490 case LM_UNKNOWN:
491 default:
492 nLUM = css::document::LinkUpdateModes::GLOBAL_SETTING;
493 break;
494 }
495 aRet <<= nLUM;
496 }
497 else if ( aPropertyName == SC_UNO_COLROWHDR )
498 aRet <<= aViewOpt.GetOption( VOPT_HEADER );
499 else if ( aPropertyName == SC_UNO_SHEETTABS )
500 aRet <<= aViewOpt.GetOption( VOPT_TABCONTROLS );
501 else if ( aPropertyName == SC_UNO_OUTLSYMB )
502 aRet <<= aViewOpt.GetOption( VOPT_OUTLINER );
503 else if ( aPropertyName == SC_UNO_AUTOCALC )
504 aRet <<= rDoc.GetAutoCalc();
505 else if ( aPropertyName == SC_UNO_PRINTERNAME )
506 {
507 // #i75610# don't create the printer, return empty string if no printer created yet
508 // (as in SwXDocumentSettings)
509 SfxPrinter* pPrinter = rDoc.GetPrinter( false );
510 if (pPrinter)
511 aRet <<= pPrinter->GetName();
512 else
513 aRet <<= OUString();
514 }
515 else if ( aPropertyName == SC_UNO_PRINTERSETUP )
516 {
517 // #i75610# don't create the printer, return empty sequence if no printer created yet
518 // (as in SwXDocumentSettings)
519 SfxPrinter* pPrinter = rDoc.GetPrinter( false );
520 if (pPrinter)
521 {
522 SvMemoryStream aStream;
523 pPrinter->Store( aStream );
524 aRet <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aStream.GetData() ),
525 aStream.TellEnd() );
526 }
527 else
528 aRet <<= uno::Sequence<sal_Int8>();
529 }
530 else if ( aPropertyName == SC_UNO_PRINTERPAPER)
531 {
532 SfxPrinter *pTempPrinter = pDocShell->GetPrinter( false );
533 aRet <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
534
535 }
536 else if ( aPropertyName == SC_UNO_APPLYDOCINF )
537 aRet <<= pDocShell->IsUseUserData();
538 else if ( aPropertyName == SC_UNO_SAVE_THUMBNAIL )
539 aRet <<= pDocShell->IsUseThumbnailSave();
540 else if ( aPropertyName == SC_UNO_FORBIDDEN )
541 {
542 aRet <<= uno::Reference<i18n::XForbiddenCharacters>(new ScForbiddenCharsObj( pDocShell ));
543 }
544 else if ( aPropertyName == SC_UNO_CHARCOMP )
545 aRet <<= static_cast<sal_Int16> ( rDoc.GetAsianCompression() );
546 else if ( aPropertyName == SC_UNO_ASIANKERN )
547 aRet <<= rDoc.GetAsianKerning();
548 else if ( aPropertyName == SCSAVEVERSION )
550 else if ( aPropertyName == SC_UNO_UPDTEMPL )
551 aRet <<= pDocShell->IsQueryLoadTemplate();
552 else if ( aPropertyName == SC_UNO_LOADREADONLY )
553 aRet <<= pDocShell->IsLoadReadonly();
554 else if ( aPropertyName == SC_UNO_SHAREDOC )
555 {
556#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
557 aRet <<= pDocShell->HasSharedXMLFlagSet();
558#endif
559 }
560 else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
562 else if (aPropertyName == SC_UNO_MODIFYPASSWORDHASH)
564 else if (aPropertyName == SC_UNO_EMBED_FONTS)
565 aRet <<= rDoc.IsEmbedFonts();
566 else if (aPropertyName == SC_UNO_EMBED_ONLY_USED_FONTS)
567 aRet <<= rDoc.IsEmbedUsedFontsOnly();
568 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_LATIN)
569 aRet <<= rDoc.IsEmbedFontScriptLatin();
570 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_ASIAN)
571 aRet <<= rDoc.IsEmbedFontScriptAsian();
572 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_COMPLEX)
573 aRet <<= rDoc.IsEmbedFontScriptComplex();
574 else if ( aPropertyName == SC_UNO_SYNTAXSTRINGREF )
575 {
576 ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
578
579 // don't save "unspecified" string ref syntax ... query formula grammar
580 // and save that instead
582 {
583 eConv = rDoc.GetAddressConvention();
584 }
585
586 // write if it has been read|imported or explicitly changed
587 // or if ref syntax isn't what would be native for our file format
588 // i.e. CalcA1 in this case
589 if ( aCalcConfig.mbHasStringRefSyntax ||
591 {
592 switch (eConv)
593 {
598 aRet <<= static_cast<sal_Int16>( eConv );
599 break;
600
606 {
607 aRet <<= sal_Int16(9999);
608 break;
609 }
610 }
611 }
612 }
613 else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
614 {
615 aRet <<= rDoc.GetImagePreferredDPI();
616 }
617 else
618 {
619 const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions();
620 if ( aPropertyName == SC_UNO_SNAPTORASTER )
621 aRet <<= aGridOpt.GetUseGridSnap();
622 else if ( aPropertyName == SC_UNO_RASTERVIS )
623 aRet <<= aGridOpt.GetGridVisible();
624 else if ( aPropertyName == SC_UNO_RASTERRESX )
625 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDrawX() );
626 else if ( aPropertyName == SC_UNO_RASTERRESY )
627 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDrawY() );
628 else if ( aPropertyName == SC_UNO_RASTERSUBX )
629 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDivisionX() );
630 else if ( aPropertyName == SC_UNO_RASTERSUBY )
631 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDivisionY() );
632 else if ( aPropertyName == SC_UNO_RASTERSYNC )
633 aRet <<= aGridOpt.GetSynchronize();
634 else
635 throw beans::UnknownPropertyException(aPropertyName);
636 }
637
638
639 return aRet;
640}
641
643
644// XServiceInfo
645OUString SAL_CALL ScDocumentConfiguration::getImplementationName()
646{
647 return "ScDocumentConfiguration";
648}
649
650sal_Bool SAL_CALL ScDocumentConfiguration::supportsService( const OUString& rServiceName )
651{
652 return cppu::supportsService(this, rServiceName);
653}
654
656{
657 return {"com.sun.star.comp.SpreadsheetSettings",
658 "com.sun.star.document.Settings"};
659}
660
661/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CharCompressType
void SetDocumentModified()
Definition: docsh.cxx:2982
sal_uInt16 SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL)
Definition: docsh3.cxx:471
const ScDocument & GetDocument() const
Definition: docsh.hxx:219
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:101
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: docsh3.cxx:451
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
Definition: docsh5.cxx:405
ScDocShell * pDocShell
Definition: confuno.hxx:36
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: confuno.cxx:126
ScDocumentConfiguration(ScDocShell *pDocShell)
Definition: confuno.cxx:99
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: confuno.cxx:655
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: confuno.cxx:114
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: confuno.cxx:444
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: confuno.cxx:650
SfxItemPropertySet aPropSet
Definition: confuno.hxx:37
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: confuno.cxx:134
virtual ~ScDocumentConfiguration() override
Definition: confuno.cxx:106
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:584
bool GetAsianKerning() const
Definition: documen9.cxx:645
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2619
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:892
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:593
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6050
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:492
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
bool IsEmbedFonts() const
Definition: document.hxx:583
CharCompressType GetAsianCompression() const
Definition: documen9.cxx:623
bool IsEmbedFontScriptComplex() const
Definition: document.hxx:587
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1951
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:901
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:592
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1413
void SetEmbedFonts(bool bUse)
Definition: document.hxx:589
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:653
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1957
sal_Int32 GetImagePreferredDPI()
Definition: document.hxx:596
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
Definition: document10.cxx:205
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
Definition: documen3.cxx:502
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:585
bool IsEmbedFontScriptAsian() const
Definition: document.hxx:586
void SetImagePreferredDPI(sal_Int32 nValue)
Definition: document.hxx:595
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:602
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:909
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:590
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:114
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:591
void SetAsianCompression(CharCompressType nNew)
Definition: documen9.cxx:631
void SetLinkMode(ScLkUpdMode nSet)
Definition: document.hxx:2261
bool IsImportingXML() const
Definition: document.hxx:2227
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:297
static sal_Int32 GetInt32FromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:153
static sal_Int16 GetInt16FromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:145
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:139
void SetGridColor(const Color &rCol, const OUString &rName)
Definition: viewopti.hxx:91
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:85
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:94
bool GetOption(ScViewOption eOpt) const
Definition: viewopti.hxx:86
Color const & GetGridColor(OUString *pStrName=nullptr) const
Definition: viewopti.cxx:123
void SetGridOptions(const ScGridOptions &rNew)
Definition: viewopti.hxx:95
SfxHintId GetId() const
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
const void * GetData()
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
void disposeAndClear()
css::uno::Type const & get()
constexpr OUStringLiteral SCSAVEVERSION
Definition: confuno.cxx:48
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetConfigPropertyMap()
Definition: confuno.cxx:50
float u
ScLkUpdMode
Definition: global.hxx:410
@ LM_NEVER
Definition: global.hxx:412
@ LM_ON_DEMAND
Definition: global.hxx:413
@ LM_UNKNOWN
Definition: global.hxx:414
@ LM_ALWAYS
Definition: global.hxx:411
Mode eMode
sal_Int64 n
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define SC_MOD()
Definition: scmod.hxx:247
#define STREAM_SEEK_TO_BEGIN
Configuration options for formula interpreter.
Definition: calcconfig.hxx:44
void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv)
Definition: calcconfig.cxx:163
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax
Definition: calcconfig.hxx:53
bool mbHasStringRefSyntax
Definition: calcconfig.hxx:56
unsigned char sal_Bool
signed char sal_Int8
sal_Int16 SCTAB
Definition: types.hxx:22
constexpr OUStringLiteral SC_UNO_EMBED_FONTS
Definition: unonames.hxx:712
constexpr OUStringLiteral SC_UNO_SHOWGRID
Definition: unonames.hxx:558
constexpr OUStringLiteral SC_UNO_AUTOCALC
Definition: unonames.hxx:574
constexpr OUStringLiteral SC_UNONAME_LINKUPD
Definition: unonames.hxx:247
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDINFO
Definition: unonames.hxx:681
constexpr OUStringLiteral SC_UNO_FORBIDDEN
Definition: unonames.hxx:48
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_ASIAN
Definition: unonames.hxx:715
constexpr OUStringLiteral SC_UNO_OUTLSYMB
Definition: unonames.hxx:552
constexpr OUStringLiteral SC_UNO_RASTERVIS
Definition: unonames.hxx:568
constexpr OUStringLiteral SC_UNO_APPLYDOCINF
Definition: unonames.hxx:578
constexpr OUStringLiteral SC_UNO_PRINTERSETUP
Definition: unonames.hxx:576
constexpr OUStringLiteral SC_UNO_SHOWFORMULASMARKS
Definition: unonames.hxx:561
constexpr OUStringLiteral SC_UNO_ALLOWPRINTJOBCANCEL
Definition: unonames.hxx:592
constexpr OUStringLiteral SC_UNO_SHOWNOTES
Definition: unonames.hxx:560
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_COMPLEX
Definition: unonames.hxx:716
constexpr OUStringLiteral SC_UNO_IMAGE_PREFERRED_DPI
Definition: unonames.hxx:589
constexpr OUStringLiteral SC_UNO_SHOWPAGEBR
Definition: unonames.hxx:563
constexpr OUStringLiteral SC_UNO_SHEETTABS
Definition: unonames.hxx:553
constexpr OUStringLiteral SC_UNO_PRINTERNAME
Definition: unonames.hxx:575
constexpr OUStringLiteral SC_UNO_RASTERSUBX
Definition: unonames.hxx:571
constexpr OUStringLiteral SC_UNO_PRINTERPAPER
Definition: unonames.hxx:577
constexpr OUStringLiteral SC_UNO_SYNTAXSTRINGREF
Definition: unonames.hxx:540
constexpr OUStringLiteral SC_UNO_COLROWHDR
Definition: unonames.hxx:548
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_LATIN
Definition: unonames.hxx:714
constexpr OUStringLiteral SC_UNO_RASTERSUBY
Definition: unonames.hxx:572
constexpr OUStringLiteral SC_UNO_RASTERSYNC
Definition: unonames.hxx:573
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDHASH
Definition: unonames.hxx:682
constexpr OUStringLiteral SC_UNO_SHAREDOC
Definition: unonames.hxx:703
constexpr OUStringLiteral SC_UNO_CHARCOMP
Definition: unonames.hxx:580
constexpr OUStringLiteral SC_UNO_EMBED_ONLY_USED_FONTS
Definition: unonames.hxx:713
constexpr OUStringLiteral SC_UNO_SAVE_THUMBNAIL
Definition: unonames.hxx:579
constexpr OUStringLiteral SC_UNO_RASTERRESX
Definition: unonames.hxx:569
constexpr OUStringLiteral SC_UNO_UPDTEMPL
Definition: unonames.hxx:585
constexpr OUStringLiteral SC_UNO_GRIDCOLOR
Definition: unonames.hxx:549
constexpr OUStringLiteral SC_UNO_SHOWZERO
Definition: unonames.hxx:564
constexpr OUStringLiteral SC_UNO_ASIANKERN
Definition: unonames.hxx:581
constexpr OUStringLiteral SC_UNO_RASTERRESY
Definition: unonames.hxx:570
constexpr OUStringLiteral SC_UNO_LOADREADONLY
Definition: unonames.hxx:680
constexpr OUStringLiteral SC_UNO_SNAPTORASTER
Definition: unonames.hxx:567
@ VOPT_TABCONTROLS
Definition: viewopti.hxx:39
@ VOPT_NULLVALS
Definition: viewopti.hxx:33
@ VOPT_OUTLINER
Definition: viewopti.hxx:40
@ VOPT_FORMULAS_MARKS
Definition: viewopti.hxx:36
@ VOPT_GRID
Definition: viewopti.hxx:42
@ VOPT_NOTES
Definition: viewopti.hxx:35
@ VOPT_HEADER
Definition: viewopti.hxx:41
@ VOPT_PAGEBREAKS
Definition: viewopti.hxx:46