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 {
76 { SC_UNO_FORBIDDEN, 0, cppu::UnoType<i18n::XForbiddenCharacters>::get(), beans::PropertyAttribute::READONLY, 0},
81 /*Stampit enable/disable print cancel */
94 };
95 return aConfigPropertyMap_Impl;
96}
97
99 : pDocShell(pDocSh) ,
100 aPropSet ( lcl_GetConfigPropertyMap() )
101{
103}
104
106{
108
109 if (pDocShell)
111}
112
114{
115 // reference update does not matter here
116
117 if ( rHint.GetId() == SfxHintId::Dying )
118 {
119 pDocShell = nullptr;
120 }
121}
122
123// XPropertySet
124
125uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDocumentConfiguration::getPropertySetInfo()
126{
127 SolarMutexGuard aGuard;
128 static uno::Reference<beans::XPropertySetInfo> aRef(
130 return aRef;
131}
132
134 const OUString& aPropertyName, const uno::Any& aValue )
135{
136 SolarMutexGuard aGuard;
137
138 if(!pDocShell)
139 throw uno::RuntimeException();
140
142 bool bUpdateHeights = false;
143
144 ScViewOptions aViewOpt(rDoc.GetViewOptions());
145
146 /*Stampit enable/disable print cancel */
147 if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
149 /*Stampit enable/disable print cancel */
150
151 else if ( aPropertyName == SC_UNO_SHOWZERO )
153 else if ( aPropertyName == SC_UNO_SHOWNOTES )
155 else if ( aPropertyName == SC_UNO_SHOWGRID )
157 else if ( aPropertyName == SC_UNO_GRIDCOLOR )
158 {
159 Color aColor;
160 if (aValue >>= aColor)
161 aViewOpt.SetGridColor(aColor, OUString());
162 }
163 else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
165 else if ( aPropertyName == SC_UNONAME_LINKUPD )
166 {
167 // XXX NOTE: this is the css::document::Settings property
168 // LinkUpdateMode, not the css::sheet::XGlobalSheetSettings
169 // attribute LinkUpdateMode.
170 sal_Int16 n;
171 if (!(aValue >>= n) || n < css::document::LinkUpdateModes::NEVER ||
172 n > css::document::LinkUpdateModes::GLOBAL_SETTING)
173 {
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);
178 }
180 switch (n)
181 {
182 case css::document::LinkUpdateModes::NEVER:
183 eMode = LM_NEVER;
184 break;
185 case css::document::LinkUpdateModes::MANUAL:
187 break;
188 case css::document::LinkUpdateModes::AUTO:
190 break;
191 case css::document::LinkUpdateModes::GLOBAL_SETTING:
192 default:
193 eMode = SC_MOD()->GetAppOptions().GetLinkMode();
194 break;
195 }
196 rDoc.SetLinkMode( eMode );
197 }
198 else if ( aPropertyName == SC_UNO_COLROWHDR )
200 else if ( aPropertyName == SC_UNO_SHEETTABS )
202 else if ( aPropertyName == SC_UNO_OUTLSYMB )
204 else if ( aPropertyName == SC_UNO_AUTOCALC )
206 else if ( aPropertyName == SC_UNO_PRINTERNAME )
207 {
208 OUString sPrinterName;
209 if ( !(aValue >>= sPrinterName) )
210 throw lang::IllegalArgumentException();
211
212 // #i75610# if the name is empty, do nothing (don't create any printer)
213 if ( !sPrinterName.isEmpty() && pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
214 {
215 SfxPrinter* pPrinter = pDocShell->GetPrinter();
216 if (!pPrinter)
217 throw uno::RuntimeException();
218
219 if (pPrinter->GetName() != sPrinterName)
220 {
221 VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
222 if (pNewPrinter->IsKnown())
223 pDocShell->SetPrinter( pNewPrinter, SfxPrinterChangeFlags::PRINTER );
224 else
225 pNewPrinter.disposeAndClear();
226 }
227
228 }
229
230 }
231 else if ( aPropertyName == SC_UNO_PRINTERSETUP )
232 {
233 uno::Sequence<sal_Int8> aSequence;
234 if ( aValue >>= aSequence )
235 {
236 sal_uInt32 nSize = aSequence.getLength();
237 // #i75610# if the sequence is empty, do nothing (don't create any printer)
238 if ( nSize != 0 )
239 {
240 SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
241 aStream.Seek ( STREAM_SEEK_TO_BEGIN );
242 auto pSet = std::make_unique<SfxItemSetFixed
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());
247
248 SfxPrinter* pPrinter = pDocShell->GetPrinter();
249 bool bPreferPrinterPapersize = false;
250 if ( pPrinter )
251 bPreferPrinterPapersize = pPrinter->GetPrinterSettingsPreferred();
252
253 VclPtr<SfxPrinter> pTempPrinter = SfxPrinter::Create( aStream, std::move(pSet) );
254 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
255 pDocShell->SetPrinter( pTempPrinter );
256 }
257 }
258 }
259 else if ( aPropertyName == SC_UNO_PRINTERPAPER )
260 {
261 bool bPreferPrinterPapersize;
262 if( aValue >>= bPreferPrinterPapersize )
263 {
264 if( pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
265 {
266 SfxPrinter *pTempPrinter = pDocShell->GetPrinter( true );
267 if (pTempPrinter)
268 pTempPrinter->SetPrinterSettingsPreferred( bPreferPrinterPapersize );
269 }
270 }
271 }
272 else if ( aPropertyName == SC_UNO_APPLYDOCINF )
273 {
274 bool bTmp=true;
275 if ( aValue >>= bTmp )
276 pDocShell->SetUseUserData( bTmp );
277 }
278 else if ( aPropertyName == SC_UNO_SAVE_THUMBNAIL)
279 {
280 bool bTmp = true;
281 if (aValue >>= bTmp)
283 }
284 else if ( aPropertyName == SC_UNO_FORBIDDEN )
285 {
286 // read-only - should not be set
287 }
288 else if ( aPropertyName == SC_UNO_CHARCOMP )
289 {
290 // Int16 contains CharacterCompressionType values
291 sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
292 rDoc.SetAsianCompression( static_cast<CharCompressType>(nUno) );
293 bUpdateHeights = true;
294 }
295 else if ( aPropertyName == SC_UNO_ASIANKERN )
296 {
298 bUpdateHeights = true;
299 }
300 else if ( aPropertyName == SCSAVEVERSION )
301 {
302 bool bTmp=false;
303 if ( aValue >>= bTmp )
305 }
306 else if ( aPropertyName == SC_UNO_UPDTEMPL )
307 {
308 bool bTmp=true;
309 if ( aValue >>= bTmp )
311 }
312 else if ( aPropertyName == SC_UNO_LOADREADONLY )
313 {
314 bool bTmp=false;
315 if ( aValue >>= bTmp )
316 pDocShell->SetLoadReadonly( bTmp );
317 }
318 else if ( aPropertyName == SC_UNO_SHAREDOC )
319 {
320#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
321 bool bDocShared = false;
322 if ( aValue >>= bDocShared )
323 {
324 pDocShell->SetSharedXMLFlag( bDocShared );
325 }
326#endif
327 }
328 else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
329 {
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 >(),
335 2 );
336
337 if ( !pDocShell->SetModifyPasswordInfo( aInfo ) )
338 throw beans::PropertyVetoException(
339 "The hash is not allowed to be changed now!" );
340 }
341 else if (aPropertyName == SC_UNO_MODIFYPASSWORDHASH)
342 {
343 sal_Int32 nHash;
344 if (!(aValue >>= nHash))
345 throw lang::IllegalArgumentException("Value of type sal_Int32 expected!",
346 uno::Reference<uno::XInterface>(), 2);
347
348 if (!pDocShell->SetModifyPasswordHash(nHash))
349 throw beans::PropertyVetoException("The hash is not allowed to be changed now!");
350 }
351 else if (aPropertyName == SC_UNO_EMBED_FONTS)
352 {
353 bool bVal = aValue.has<bool>() && aValue.get<bool>();
354 rDoc.SetEmbedFonts(bVal);
355 }
356 else if (aPropertyName == SC_UNO_EMBED_ONLY_USED_FONTS)
357 {
358 bool bVal = aValue.has<bool>() && aValue.get<bool>();
359 rDoc.SetEmbedUsedFontsOnly(bVal);
360 }
361 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_LATIN)
362 {
363 bool bVal = aValue.has<bool>() && aValue.get<bool>();
364 rDoc.SetEmbedFontScriptLatin(bVal);
365 }
366 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_ASIAN)
367 {
368 bool bVal = aValue.has<bool>() && aValue.get<bool>();
369 rDoc.SetEmbedFontScriptAsian(bVal);
370 }
371 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_COMPLEX)
372 {
373 bool bVal = aValue.has<bool>() && aValue.get<bool>();
374 rDoc.SetEmbedFontScriptComplex(bVal);
375 }
376 else if ( aPropertyName == SC_UNO_SYNTAXSTRINGREF )
377 {
378 ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
379 sal_Int16 nUno = 0;
380
381 if( aValue >>= nUno )
382 {
383 switch (nUno)
384 {
385 case 0: // CONV_OOO
386 case 2: // CONV_XL_A1
387 case 3: // CONV_XL_R1C1
388 case 7: // CONV_A1_XL_A1
389 aCalcConfig.SetStringRefSyntax( static_cast<formula::FormulaGrammar::AddressConvention>( nUno ) );
390 break;
391 default:
393 break;
394
395 }
396 rDoc.SetCalcConfig( aCalcConfig );
397 }
398 }
399 else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
400 {
401 if (aValue.has<sal_Int32>())
402 {
403 rDoc.SetImagePreferredDPI(aValue.get<sal_Int32>());
404 }
405 }
406 else
407 {
408 ScGridOptions aGridOpt(aViewOpt.GetGridOptions());
409 if ( aPropertyName == SC_UNO_SNAPTORASTER )
411 else if ( aPropertyName == SC_UNO_RASTERVIS )
413 else if ( aPropertyName == SC_UNO_RASTERRESX )
414 aGridOpt.SetFieldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
415 else if ( aPropertyName == SC_UNO_RASTERRESY )
416 aGridOpt.SetFieldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
417 else if ( aPropertyName == SC_UNO_RASTERSUBX )
418 aGridOpt.SetFieldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
419 else if ( aPropertyName == SC_UNO_RASTERSUBY )
420 aGridOpt.SetFieldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
421 else if ( aPropertyName == SC_UNO_RASTERSYNC )
423 else
424 throw beans::UnknownPropertyException(aPropertyName);
425 aViewOpt.SetGridOptions(aGridOpt);
426 }
427 rDoc.SetViewOptions(aViewOpt);
428
429 if ( bUpdateHeights && !rDoc.IsImportingXML() )
430 {
431 // update automatic row heights and repaint
432 SCTAB nTabCount = rDoc.GetTableCount();
433 for (SCTAB nTab=0; nTab<nTabCount; nTab++)
434 if ( !pDocShell->AdjustRowHeight( 0, rDoc.MaxRow(), nTab ) )
435 pDocShell->PostPaint(ScRange(0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab), PaintPartFlags::Grid);
437 }
438
439}
440
441uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPropertyName )
442{
443 SolarMutexGuard aGuard;
444 uno::Any aRet;
445
446 if(!pDocShell)
447 throw uno::RuntimeException();
448
450 const ScViewOptions& aViewOpt = rDoc.GetViewOptions();
451
452 /*Stampit enable/disable print cancel */
453 if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
455 /*Stampit enable/disable print cancel */
456
457 else if ( aPropertyName == SC_UNO_SHOWZERO )
458 aRet <<= aViewOpt.GetOption( VOPT_NULLVALS );
459 else if ( aPropertyName == SC_UNO_SHOWNOTES )
460 aRet <<= aViewOpt.GetOption( VOPT_NOTES );
461 else if ( aPropertyName == SC_UNO_SHOWGRID )
462 aRet <<= aViewOpt.GetOption( VOPT_GRID );
463 else if ( aPropertyName == SC_UNO_GRIDCOLOR )
464 {
465 OUString aColorName;
466 Color aColor = aViewOpt.GetGridColor(&aColorName);
467 aRet <<= aColor;
468 }
469 else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
470 aRet <<= aViewOpt.GetOption( VOPT_PAGEBREAKS );
471 else if ( aPropertyName == SC_UNONAME_LINKUPD )
472 {
473 sal_Int16 nLUM;
474 switch (rDoc.GetLinkMode())
475 {
476 case LM_ALWAYS:
477 nLUM = css::document::LinkUpdateModes::AUTO;
478 break;
479 case LM_NEVER:
480 nLUM = css::document::LinkUpdateModes::NEVER;
481 break;
482 case LM_ON_DEMAND:
483 nLUM = css::document::LinkUpdateModes::MANUAL;
484 break;
485 case LM_UNKNOWN:
486 default:
487 nLUM = css::document::LinkUpdateModes::GLOBAL_SETTING;
488 break;
489 }
490 aRet <<= nLUM;
491 }
492 else if ( aPropertyName == SC_UNO_COLROWHDR )
493 aRet <<= aViewOpt.GetOption( VOPT_HEADER );
494 else if ( aPropertyName == SC_UNO_SHEETTABS )
495 aRet <<= aViewOpt.GetOption( VOPT_TABCONTROLS );
496 else if ( aPropertyName == SC_UNO_OUTLSYMB )
497 aRet <<= aViewOpt.GetOption( VOPT_OUTLINER );
498 else if ( aPropertyName == SC_UNO_AUTOCALC )
499 aRet <<= rDoc.GetAutoCalc();
500 else if ( aPropertyName == SC_UNO_PRINTERNAME )
501 {
502 // #i75610# don't create the printer, return empty string if no printer created yet
503 // (as in SwXDocumentSettings)
504 SfxPrinter* pPrinter = rDoc.GetPrinter( false );
505 if (pPrinter)
506 aRet <<= pPrinter->GetName();
507 else
508 aRet <<= OUString();
509 }
510 else if ( aPropertyName == SC_UNO_PRINTERSETUP )
511 {
512 // #i75610# don't create the printer, return empty sequence if no printer created yet
513 // (as in SwXDocumentSettings)
514 SfxPrinter* pPrinter = rDoc.GetPrinter( false );
515 if (pPrinter)
516 {
517 SvMemoryStream aStream;
518 pPrinter->Store( aStream );
519 aRet <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aStream.GetData() ),
520 aStream.TellEnd() );
521 }
522 else
523 aRet <<= uno::Sequence<sal_Int8>();
524 }
525 else if ( aPropertyName == SC_UNO_PRINTERPAPER)
526 {
527 SfxPrinter *pTempPrinter = pDocShell->GetPrinter( false );
528 aRet <<= pTempPrinter && pTempPrinter->GetPrinterSettingsPreferred();
529
530 }
531 else if ( aPropertyName == SC_UNO_APPLYDOCINF )
532 aRet <<= pDocShell->IsUseUserData();
533 else if ( aPropertyName == SC_UNO_SAVE_THUMBNAIL )
534 aRet <<= pDocShell->IsUseThumbnailSave();
535 else if ( aPropertyName == SC_UNO_FORBIDDEN )
536 {
537 aRet <<= uno::Reference<i18n::XForbiddenCharacters>(new ScForbiddenCharsObj( pDocShell ));
538 }
539 else if ( aPropertyName == SC_UNO_CHARCOMP )
540 aRet <<= static_cast<sal_Int16> ( rDoc.GetAsianCompression() );
541 else if ( aPropertyName == SC_UNO_ASIANKERN )
542 aRet <<= rDoc.GetAsianKerning();
543 else if ( aPropertyName == SCSAVEVERSION )
545 else if ( aPropertyName == SC_UNO_UPDTEMPL )
546 aRet <<= pDocShell->IsQueryLoadTemplate();
547 else if ( aPropertyName == SC_UNO_LOADREADONLY )
548 aRet <<= pDocShell->IsLoadReadonly();
549 else if ( aPropertyName == SC_UNO_SHAREDOC )
550 {
551#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
552 aRet <<= pDocShell->HasSharedXMLFlagSet();
553#endif
554 }
555 else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
557 else if (aPropertyName == SC_UNO_MODIFYPASSWORDHASH)
559 else if (aPropertyName == SC_UNO_EMBED_FONTS)
560 aRet <<= rDoc.IsEmbedFonts();
561 else if (aPropertyName == SC_UNO_EMBED_ONLY_USED_FONTS)
562 aRet <<= rDoc.IsEmbedUsedFontsOnly();
563 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_LATIN)
564 aRet <<= rDoc.IsEmbedFontScriptLatin();
565 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_ASIAN)
566 aRet <<= rDoc.IsEmbedFontScriptAsian();
567 else if (aPropertyName == SC_UNO_EMBED_FONT_SCRIPT_COMPLEX)
568 aRet <<= rDoc.IsEmbedFontScriptComplex();
569 else if ( aPropertyName == SC_UNO_SYNTAXSTRINGREF )
570 {
571 ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
573
574 // don't save "unspecified" string ref syntax ... query formula grammar
575 // and save that instead
577 {
578 eConv = rDoc.GetAddressConvention();
579 }
580
581 // write if it has been read|imported or explicitly changed
582 // or if ref syntax isn't what would be native for our file format
583 // i.e. CalcA1 in this case
584 if ( aCalcConfig.mbHasStringRefSyntax ||
586 {
587 switch (eConv)
588 {
593 aRet <<= static_cast<sal_Int16>( eConv );
594 break;
595
601 {
602 aRet <<= sal_Int16(9999);
603 break;
604 }
605 }
606 }
607 }
608 else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
609 {
610 aRet <<= rDoc.GetImagePreferredDPI();
611 }
612 else
613 {
614 const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions();
615 if ( aPropertyName == SC_UNO_SNAPTORASTER )
616 aRet <<= aGridOpt.GetUseGridSnap();
617 else if ( aPropertyName == SC_UNO_RASTERVIS )
618 aRet <<= aGridOpt.GetGridVisible();
619 else if ( aPropertyName == SC_UNO_RASTERRESX )
620 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDrawX() );
621 else if ( aPropertyName == SC_UNO_RASTERRESY )
622 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDrawY() );
623 else if ( aPropertyName == SC_UNO_RASTERSUBX )
624 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDivisionX() );
625 else if ( aPropertyName == SC_UNO_RASTERSUBY )
626 aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFieldDivisionY() );
627 else if ( aPropertyName == SC_UNO_RASTERSYNC )
628 aRet <<= aGridOpt.GetSynchronize();
629 else
630 throw beans::UnknownPropertyException(aPropertyName);
631 }
632
633
634 return aRet;
635}
636
638
639// XServiceInfo
640OUString SAL_CALL ScDocumentConfiguration::getImplementationName()
641{
642 return "ScDocumentConfiguration";
643}
644
645sal_Bool SAL_CALL ScDocumentConfiguration::supportsService( const OUString& rServiceName )
646{
647 return cppu::supportsService(this, rServiceName);
648}
649
651{
652 return {"com.sun.star.comp.SpreadsheetSettings",
653 "com.sun.star.document.Settings"};
654}
655
656/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CharCompressType
void SetDocumentModified()
Definition: docsh.cxx:2959
sal_uInt16 SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL)
Definition: docsh3.cxx:471
const ScDocument & GetDocument() const
Definition: docsh.hxx:220
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:404
ScDocShell * pDocShell
Definition: confuno.hxx:36
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: confuno.cxx:125
ScDocumentConfiguration(ScDocShell *pDocShell)
Definition: confuno.cxx:98
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: confuno.cxx:650
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: confuno.cxx:113
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: confuno.cxx:441
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: confuno.cxx:645
SfxItemPropertySet aPropSet
Definition: confuno.hxx:37
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: confuno.cxx:133
virtual ~ScDocumentConfiguration() override
Definition: confuno.cxx:105
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:583
bool GetAsianKerning() const
Definition: documen9.cxx:657
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2616
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:891
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:592
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6170
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:500
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:892
bool IsEmbedFonts() const
Definition: document.hxx:582
CharCompressType GetAsianCompression() const
Definition: documen9.cxx:635
bool IsEmbedFontScriptComplex() const
Definition: document.hxx:586
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1967
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:907
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:591
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1411
void SetEmbedFonts(bool bUse)
Definition: document.hxx:588
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:665
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1973
sal_Int32 GetImagePreferredDPI()
Definition: document.hxx:595
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
Definition: document10.cxx:203
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
Definition: documen3.cxx:510
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:584
bool IsEmbedFontScriptAsian() const
Definition: document.hxx:585
void SetImagePreferredDPI(sal_Int32 nValue)
Definition: document.hxx:594
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:608
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:915
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:589
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:114
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:590
void SetAsianCompression(CharCompressType nNew)
Definition: documen9.cxx:643
void SetLinkMode(ScLkUpdMode nSet)
Definition: document.hxx:2256
bool IsImportingXML() const
Definition: document.hxx:2222
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:317
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:93
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:87
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:96
bool GetOption(ScViewOption eOpt) const
Definition: viewopti.hxx:88
Color const & GetGridColor(OUString *pStrName=nullptr) const
Definition: viewopti.cxx:118
void SetGridOptions(const ScGridOptions &rNew)
Definition: viewopti.hxx:97
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:409
@ LM_NEVER
Definition: global.hxx:411
@ LM_ON_DEMAND
Definition: global.hxx:412
@ LM_UNKNOWN
Definition: global.hxx:413
@ LM_ALWAYS
Definition: global.hxx:410
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:249
#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:703
constexpr OUStringLiteral SC_UNO_SHOWGRID
Definition: unonames.hxx:550
constexpr OUStringLiteral SC_UNO_AUTOCALC
Definition: unonames.hxx:565
constexpr OUStringLiteral SC_UNONAME_LINKUPD
Definition: unonames.hxx:239
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDINFO
Definition: unonames.hxx:672
constexpr OUStringLiteral SC_UNO_FORBIDDEN
Definition: unonames.hxx:48
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_ASIAN
Definition: unonames.hxx:706
constexpr OUStringLiteral SC_UNO_OUTLSYMB
Definition: unonames.hxx:544
constexpr OUStringLiteral SC_UNO_RASTERVIS
Definition: unonames.hxx:559
constexpr OUStringLiteral SC_UNO_APPLYDOCINF
Definition: unonames.hxx:569
constexpr OUStringLiteral SC_UNO_PRINTERSETUP
Definition: unonames.hxx:567
constexpr OUStringLiteral SC_UNO_ALLOWPRINTJOBCANCEL
Definition: unonames.hxx:583
constexpr OUStringLiteral SC_UNO_SHOWNOTES
Definition: unonames.hxx:552
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_COMPLEX
Definition: unonames.hxx:707
constexpr OUStringLiteral SC_UNO_IMAGE_PREFERRED_DPI
Definition: unonames.hxx:580
constexpr OUStringLiteral SC_UNO_SHOWPAGEBR
Definition: unonames.hxx:554
constexpr OUStringLiteral SC_UNO_SHEETTABS
Definition: unonames.hxx:545
constexpr OUStringLiteral SC_UNO_PRINTERNAME
Definition: unonames.hxx:566
constexpr OUStringLiteral SC_UNO_RASTERSUBX
Definition: unonames.hxx:562
constexpr OUStringLiteral SC_UNO_PRINTERPAPER
Definition: unonames.hxx:568
constexpr OUStringLiteral SC_UNO_SYNTAXSTRINGREF
Definition: unonames.hxx:532
constexpr OUStringLiteral SC_UNO_COLROWHDR
Definition: unonames.hxx:540
constexpr OUStringLiteral SC_UNO_EMBED_FONT_SCRIPT_LATIN
Definition: unonames.hxx:705
constexpr OUStringLiteral SC_UNO_RASTERSUBY
Definition: unonames.hxx:563
constexpr OUStringLiteral SC_UNO_RASTERSYNC
Definition: unonames.hxx:564
constexpr OUStringLiteral SC_UNO_MODIFYPASSWORDHASH
Definition: unonames.hxx:673
constexpr OUStringLiteral SC_UNO_SHAREDOC
Definition: unonames.hxx:694
constexpr OUStringLiteral SC_UNO_CHARCOMP
Definition: unonames.hxx:571
constexpr OUStringLiteral SC_UNO_EMBED_ONLY_USED_FONTS
Definition: unonames.hxx:704
constexpr OUStringLiteral SC_UNO_SAVE_THUMBNAIL
Definition: unonames.hxx:570
constexpr OUStringLiteral SC_UNO_RASTERRESX
Definition: unonames.hxx:560
constexpr OUStringLiteral SC_UNO_UPDTEMPL
Definition: unonames.hxx:576
constexpr OUStringLiteral SC_UNO_GRIDCOLOR
Definition: unonames.hxx:541
constexpr OUStringLiteral SC_UNO_SHOWZERO
Definition: unonames.hxx:555
constexpr OUStringLiteral SC_UNO_ASIANKERN
Definition: unonames.hxx:572
constexpr OUStringLiteral SC_UNO_RASTERRESY
Definition: unonames.hxx:561
constexpr OUStringLiteral SC_UNO_LOADREADONLY
Definition: unonames.hxx:671
constexpr OUStringLiteral SC_UNO_SNAPTORASTER
Definition: unonames.hxx:558
@ VOPT_TABCONTROLS
Definition: viewopti.hxx:38
@ VOPT_NULLVALS
Definition: viewopti.hxx:33
@ VOPT_OUTLINER
Definition: viewopti.hxx:39
@ VOPT_GRID
Definition: viewopti.hxx:41
@ VOPT_NOTES
Definition: viewopti.hxx:35
@ VOPT_HEADER
Definition: viewopti.hxx:40
@ VOPT_PAGEBREAKS
Definition: viewopti.hxx:45