LibreOffice Module sc (master) 1
docsh.hxx
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#pragma once
21
22#include <sfx2/objsh.hxx>
23#include <sfx2/docfac.hxx>
25#include <sfx2/viewsh.hxx>
26#include <o3tl/deleter.hxx>
27#include <comphelper/lok.hxx>
29
30#include <scdllapi.h>
31#include <document.hxx>
32#include <shellids.hxx>
33#include <optutil.hxx>
34#include <docuno.hxx>
35
36#include <memory>
37#include <string_view>
38#include <unordered_map>
39#include <map>
40
45class INetURLObject;
46
47class ScViewData;
48class ScDocFunc;
49class ScDrawLayer;
50class ScTabViewShell;
51class ScAutoStyleList;
52class ScMarkData;
53class ScPaintLockData;
54class ScChangeAction;
55class ScImportOptions;
57class ScSheetSaveData;
59struct ScColWidthParam;
61namespace com::sun::star::script::vba { class XVBAScriptListener; }
62namespace ooo::vba::excel { class XWorkbook; }
63namespace com::sun::star::datatransfer { class XTransferable2; }
64namespace sfx2 { class FileDialogHelper; }
65struct DocShell_Impl;
66
67typedef std::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
68
69//enum ScDBFormat { SC_FORMAT_SDF, SC_FORMAT_DBF };
70
72
73extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDBF(SvStream &rStream);
74
75 // Extra flags for Repaint
76#define SC_PF_LINES 1
77#define SC_PF_TESTMERGE 2
78#define SC_PF_WHOLEROWS 4
79
81{
82 std::shared_ptr<ScDocument> m_pDocument;
83
84 OUString m_aDdeTextFmt;
85
87 std::unique_ptr<DocShell_Impl> m_pImpl;
88 std::unique_ptr<ScDocFunc> m_pDocFunc;
89
92 bool m_bIsInplace:1; // Is set by the View
93 bool m_bIsEmpty:1;
98 sal_uInt16 m_nDocumentLock;
99 sal_Int16 m_nCanUpdate; // stores the UpdateDocMode from loading a document till update links
100
101 std::unique_ptr<ScDBData> m_pOldAutoDBRange;
102
103 std::unique_ptr<ScAutoStyleList> m_pAutoStyleList;
104 std::unique_ptr<ScPaintLockData> m_pPaintLockData;
105 std::unique_ptr<ScSheetSaveData> m_pSheetSaveData;
106 std::unique_ptr<ScFormatSaveData> m_pFormatSaveData;
107
108 std::unique_ptr<ScDocShellModificator, o3tl::default_delete<ScDocShellModificator>> m_pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
109
110 css::uno::Reference< ooo::vba::excel::XWorkbook> mxAutomationWorkbookObject;
111
112 // Only used by Vba helper functions
113 css::uno::Reference<css::script::vba::XVBAScriptListener> m_xVBAListener;
114 css::uno::Reference<css::datatransfer::XTransferable2> m_xClipData;
115
116 SAL_DLLPRIVATE void InitItems();
117 SAL_DLLPRIVATE void DoEnterHandler();
118 SAL_DLLPRIVATE void InitOptions(bool bForLoading);
119 SAL_DLLPRIVATE void ResetDrawObjectShell();
120
123 class SAL_DLLPRIVATE PrepareSaveGuard
124 {
125 public:
126 explicit PrepareSaveGuard( ScDocShell & rDocShell );
127 ~PrepareSaveGuard() COVERITY_NOEXCEPT_FALSE;
128 private:
130 };
131
132 SAL_DLLPRIVATE bool LoadXML( SfxMedium* pMedium, const css::uno::Reference< css::embed::XStorage >& );
133 SAL_DLLPRIVATE bool SaveXML( SfxMedium* pMedium, const css::uno::Reference< css::embed::XStorage >& );
134 SAL_DLLPRIVATE SCTAB GetSaveTab();
135
136 friend bool TestImportDBF(SvStream &rStream);
137
138 SAL_DLLPRIVATE ErrCode DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet,
139 std::map<SCCOL, ScColWidthParam>& aColWidthParam, ScFlatBoolRowSegments& rRowHeightsRecalc );
140 SAL_DLLPRIVATE ErrCode DBaseExport(
141 const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo );
142
143 SAL_DLLPRIVATE static bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
144 SAL_DLLPRIVATE static bool KillFile( const INetURLObject& rURL );
145 SAL_DLLPRIVATE static bool IsDocument( const INetURLObject& rURL );
146
147 SAL_DLLPRIVATE void LockPaint_Impl(bool bDoc);
148 SAL_DLLPRIVATE void UnlockPaint_Impl(bool bDoc);
149 SAL_DLLPRIVATE void LockDocument_Impl(sal_uInt16 nNew);
150 SAL_DLLPRIVATE void UnlockDocument_Impl(sal_uInt16 nNew);
151
152 SAL_DLLPRIVATE void EnableSharedSettings( bool bEnable );
153 SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument();
154
155 SAL_DLLPRIVATE void UseSheetSaveEntries();
156
157 SAL_DLLPRIVATE std::unique_ptr<ScDocFunc> CreateDocFunc();
158
159 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
160
161public:
163 SFX_DECL_OBJECTFACTORY();
164
165private:
167 static void InitInterface_Impl();
168
169public:
170 explicit ScDocShell( const ScDocShell& rDocShell ) = delete;
171 explicit ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT, const std::shared_ptr<ScDocument>& pDoc = {} );
172 virtual ~ScDocShell() override;
173
174 virtual SfxUndoManager*
175 GetUndoManager() override;
176
177 virtual void FillClass( SvGlobalName * pClassName,
178 SotClipboardFormatId * pFormat,
179 OUString * pFullTypeName,
180 sal_Int32 nFileFormat,
181 bool bTemplate = false ) const override;
182
183 virtual std::set<Color> GetDocColors() override;
184 virtual std::vector<Color> GetThemeColors() override;
185
186 virtual bool InitNew( const css::uno::Reference< css::embed::XStorage >& ) override;
187 virtual bool Load( SfxMedium& rMedium ) override;
188 virtual bool LoadFrom( SfxMedium& rMedium ) override;
189 virtual bool ConvertFrom( SfxMedium &rMedium ) override;
190 virtual bool LoadExternal( SfxMedium& rMedium ) override;
191 virtual bool Save() override;
192 virtual bool SaveAs( SfxMedium& rMedium ) override;
193 virtual bool ConvertTo( SfxMedium &rMedium ) override;
194 virtual bool PrepareClose( bool bUI = true ) override;
195 virtual void LoadStyles( SfxObjectShell &rSource ) override;
196
197 virtual bool DoSaveCompleted( SfxMedium * pNewStor=nullptr, bool bRegisterRecent=true ) override; // SfxObjectShell
198 virtual bool QuerySlotExecutable( sal_uInt16 nSlotId ) override;
199
200 virtual void Draw(OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect, bool bOutputForScreen) override;
201
202 virtual void SetVisArea( const tools::Rectangle & rVisArea ) override;
203
204 virtual void TerminateEditing() override;
205
207 virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override;
208
209 virtual Printer* GetDocumentPrinter() override;
210
211 virtual void SetModified( bool = true ) override;
212
213 void SetVisAreaOrSize( const tools::Rectangle& rVisArea );
214
215 virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override;
216
217 void GetDocStat( ScDocStat& rDocStat );
218
219 const ScDocument& GetDocument() const { return *m_pDocument; }
220 ScDocument& GetDocument() { return *m_pDocument; }
221 ScDocFunc& GetDocFunc() { return *m_pDocFunc; }
222
223 css::uno::Reference<css::datatransfer::XTransferable2> const & GetClipData() const { return m_xClipData; }
224 void SetClipData(const css::uno::Reference<css::datatransfer::XTransferable2>& xTransferable) { m_xClipData = xTransferable; }
225
226 SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
227 sal_uInt16 SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL );
228
229 void UpdateFontList();
230
231 ScDrawLayer* MakeDrawLayer();
232
233 void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt, SCTAB nTab );
234
235 void Execute( SfxRequest& rReq );
236 void GetState( SfxItemSet &rSet );
237 void ExecutePageStyle ( const SfxViewShell& rCaller, SfxRequest& rReq, SCTAB nCurTab );
238 void GetStatePageStyle( SfxItemSet& rSet, SCTAB nCurTab );
239
240 void CompareDocument( ScDocument& rOtherDoc );
241 void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = nullptr, bool bInverseMap = false );
242 bool MergeSharedDocument( ScDocShell* pSharedDocShell );
243
244 ScChangeAction* GetChangeAction( const ScAddress& rPos );
245 void SetChangeComment( ScChangeAction* pAction, const OUString& rComment );
246 void ExecuteChangeCommentDialog( ScChangeAction* pAction, weld::Window* pParent, bool bPrevNext = true );
252 bool ExecuteChangeProtectionDialog( bool bJustQueryIfProtected = false );
253
254 void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages );
255 bool AdjustPrintZoom( const ScRange& rRange );
256
257 void LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellStyles, bool bPageStyles );
258
259 void PageStyleModified( std::u16string_view rStyleName, bool bApi );
260
261 void NotifyStyle( const SfxStyleSheetHint& rHint );
262 void DoAutoStyle( const ScRange& rRange, const OUString& rStyle );
263
264 static weld::Window* GetActiveDialogParent();
265 void ErrorMessage(TranslateId pGlobStrId);
266 bool IsEditable() const;
267
268 bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
269 void UpdateAllRowHeights( const ScMarkData* pTabMark = nullptr );
270 void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
271
272 void RefreshPivotTables( const ScRange& rSource );
273 void DoConsolidate( const ScConsolidateParam& rParam, bool bRecord = true );
274 void UseScenario( SCTAB nTab, const OUString& rName, bool bRecord = true );
275 SCTAB MakeScenario(SCTAB nTab, const OUString& rName, const OUString& rComment,
276 const Color& rColor, ScScenarioFlags nFlags,
277 ScMarkData& rMark, bool bRecord = true);
278 void ModifyScenario(SCTAB nTab, const OUString& rName, const OUString& rComment,
279 const Color& rColor, ScScenarioFlags nFlags);
280 sal_uLong TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
281 SCTAB nDestPos, bool bInsertNew,
282 bool bNotifyAndPaint );
283
284 bool MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRecord );
285
286 void DoRecalc( bool bApi );
287 void DoHardRecalc();
288
289 void UpdateOle(const ScViewData& rViewData, bool bSnapSize = false);
290 bool IsOle() const;
291
292 void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2 );
293 ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
294 ScDBData* GetAnonymousDBData(const ScRange& rRange);
295 std::unique_ptr<ScDBData> GetOldAutoDBRange();
296 void CancelAutoDBRange(); // called when dialog is cancelled
297
298 virtual void ReconnectDdeLink(SfxObjectShell& rServer) override;
299 void UpdateLinks() override;
300 void SetInitialLinkUpdate( const SfxMedium* pMedium );
301 void AllowLinkUpdate();
302 void ReloadAllLinks();
303 void ReloadTabLinks();
304 ScLkUpdMode GetLinkUpdateModeState() const;
305
306 void SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false );
311 void CheckConfigOptions();
312
313 void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
314
315 void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
316 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart,
317 sal_uInt16 nExtFlags = 0 );
318 void PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sal_uInt16 nExtFlags = 0 );
319
320 void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
321 void PostPaintCell( const ScAddress& rPos );
322 void PostPaintGridAll();
323 void PostPaintExtras();
324
325 bool IsPaintLocked() const { return m_pPaintLockData != nullptr; }
326
327 void PostDataChanged();
328
329 void UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
330 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab );
331 void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange );
332
333 void SetDocumentModified();
334 void SetDrawModified();
335
336 void LockPaint();
337 void UnlockPaint();
338 sal_uInt16 GetLockCount() const { return m_nDocumentLock;}
339 void SetLockCount(sal_uInt16 nNew);
340
341 void LockDocument();
342 void UnlockDocument();
343
345 DECL_DLLPRIVATE_LINK( ReloadAllLinksHdl, weld::Button&, void );
346
347 virtual SfxStyleSheetBasePool* GetStyleSheetPool() override;
348
349 void SetInplace( bool bInplace );
350 bool IsEmpty() const { return m_bIsEmpty; }
351 void SetEmpty(bool bSet);
352
353 bool IsInUndo() const { return m_bIsInUndo; }
354 void SetInUndo(bool bSet);
355
356 void CalcOutputFactor();
357 double GetOutputFactor() const { return m_nPrtToScreenFactor;}
358 void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
359 SCTAB nCurTab,
360 bool& rbHeader,
361 bool& rbFooter );
362
363#if defined(_WIN32)
364 virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType,
365 css::uno::Any & rValue ) override;
366 virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType,
367 const css::uno::Any & rValue ) override;
368#endif
369
370 virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ) override;
371
372 const OUString& GetDdeTextFmt() const { return m_aDdeTextFmt; }
373
374 SfxBindings* GetViewBindings();
375
376 ScTabViewShell* GetBestViewShell( bool bOnlyVisible = true );
377
379 { m_bDocumentModifiedPending = bVal; }
381 { return m_bDocumentModifiedPending; }
382
383 bool IsUpdateEnabled() const
384 { return m_bUpdateEnabled; }
385 void SetUpdateEnabled(bool bValue)
386 { m_bUpdateEnabled = bValue; }
387
389 { m_bAreasChangedNeedBroadcast = true; }
390
391 OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
392
393 static ScViewData* GetViewData();
394 static SCTAB GetCurTab();
395
396 static ScDocShell* GetShellByNum( sal_uInt16 nDocNo );
397 static OUString GetOwnFilterName();
398 static OUString GetHtmlFilterName();
399 static OUString GetWebQueryFilterName();
400 static OUString GetAsciiFilterName();
401 static OUString GetLotusFilterName();
402 static OUString GetDBaseFilterName();
403 static OUString GetDifFilterName();
404 static bool HasAutomaticTableName( std::u16string_view rFilter );
405 static void LOKCommentNotify(LOKCommentNotificationType nType, const ScDocument* pDocument, const ScAddress& rPos, const ScPostIt* pNote);
406
407 DECL_DLLPRIVATE_LINK( RefreshDBDataHdl, Timer*, void );
408
409 void BeforeXMLLoading();
410 void AfterXMLLoading(bool bRet);
411
413
414 ScSheetSaveData* GetSheetSaveData();
415 ScFormatSaveData* GetFormatSaveData();
416
417 static void ResetKeyBindings( ScOptionsUtil::KeyBindingType eType );
418
419 // password protection for Calc (derived from SfxObjectShell)
420 // see also: FID_CHG_RECORD, SID_CHG_PROTECT
421 virtual bool IsChangeRecording() const override;
422 virtual bool HasChangeRecordProtection() const override;
423 virtual void SetChangeRecording( bool bActivate, bool bLockAllViews = false ) override;
424 virtual void SetProtectionPassword( const OUString &rPassword ) override;
425 virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
426
427 void SnapVisArea( tools::Rectangle& rRect ) const;
428
429 void RegisterAutomationWorkbookObject(css::uno::Reference< ooo::vba::excel::XWorkbook > const& xWorkbook);
430
431 ScModelObj* GetModel() const { return static_cast<ScModelObj*>(SfxObjectShell::GetModel().get()); }
432};
433
435
437
454{
456 std::unique_ptr<ScRefreshTimerProtector> mpProtector;
459
462
463public:
465 ~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE;
466 void SetDocumentModified();
467};
468
469//#i97876# Spreadsheet data changes are not notified
471{
472 inline bool isDataAreaInvalidateType(std::u16string_view rType)
473 {
474 if (rType == u"delete-content")
475 return true;
476 if (rType == u"delete-rows")
477 return true;
478 if (rType == u"delete-columns")
479 return true;
480 if (rType == u"undo")
481 return true;
482 if (rType == u"redo")
483 return true;
484 if (rType == u"paste")
485 return true;
486 if (rType == u"note")
487 return true;
488
489 return false;
490 }
491
493 {
494 return pModelObj && pModelObj->HasChangesListeners();
495 }
496
497 inline void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges,
498 const OUString &rType = OUString("cell-change"),
499 const css::uno::Sequence< css::beans::PropertyValue >& rProperties =
500 css::uno::Sequence< css::beans::PropertyValue >())
501 {
502 rModelObj.NotifyChanges(rType, rChangeRanges, rProperties);
503 }
504
505 inline void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange,
506 const OUString &rType = OUString("cell-change"))
507 {
508 ScModelObj* pModelObj = rDocShell.GetModel();
509 ScRangeList aChangeRanges(rRange);
510
511 if (getMustPropagateChangesModel(pModelObj))
512 Notify(*pModelObj, aChangeRanges, rType);
513 else if (pModelObj) // possibly need to invalidate getCellArea results
514 {
515 Notify(*pModelObj, aChangeRanges, isDataAreaInvalidateType(rType)
516 ? OUString("data-area-invalidate") : OUString("data-area-extend"));
517 }
518 }
519};
520
521void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const OUString& sModuleSource );
522
523/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Create before modifications of the document and destroy thereafter.
Definition: docsh.hxx:454
std::unique_ptr< ScRefreshTimerProtector > mpProtector
Definition: docsh.hxx:456
ScDocShellModificator(const ScDocShellModificator &)=delete
ScDocShell & rDocShell
Definition: docsh.hxx:455
~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE
Definition: docsh.cxx:3322
ScDocShellModificator & operator=(const ScDocShellModificator &)=delete
bool bAutoCalcShellDisabled
Definition: docsh.hxx:457
void SetDocumentModified()
Definition: docsh.cxx:3331
Do things that need to be done before saving to our own format and necessary clean ups in dtor.
Definition: docsh.hxx:124
css::uno::Reference< css::datatransfer::XTransferable2 > m_xClipData
Definition: docsh.hxx:114
bool IsUpdateEnabled() const
Definition: docsh.hxx:383
double m_nPrtToScreenFactor
Definition: docsh.hxx:86
DECL_DLLPRIVATE_LINK(DialogClosedHdl, sfx2::FileDialogHelper *, void)
bool m_bIsInplace
Definition: docsh.hxx:92
void SetUpdateEnabled(bool bValue)
Definition: docsh.hxx:385
css::uno::Reference< ooo::vba::excel::XWorkbook > mxAutomationWorkbookObject
Definition: docsh.hxx:110
sal_uInt16 m_nDocumentLock
Definition: docsh.hxx:98
OUString m_aDdeTextFmt
Definition: docsh.hxx:84
bool m_bDocumentModifiedPending
Definition: docsh.hxx:95
std::unique_ptr< ScDocFunc > m_pDocFunc
Definition: docsh.hxx:88
sal_uInt16 GetLockCount() const
Definition: docsh.hxx:338
bool m_bHeaderOn
Definition: docsh.hxx:90
void SetClipData(const css::uno::Reference< css::datatransfer::XTransferable2 > &xTransferable)
Definition: docsh.hxx:224
bool IsInUndo() const
Definition: docsh.hxx:353
css::uno::Reference< css::datatransfer::XTransferable2 > const & GetClipData() const
Definition: docsh.hxx:223
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument()
std::unique_ptr< ScSheetSaveData > m_pSheetSaveData
Definition: docsh.hxx:105
std::unique_ptr< ScFormatSaveData > m_pFormatSaveData
Definition: docsh.hxx:106
bool m_bAreasChangedNeedBroadcast
Definition: docsh.hxx:97
const ScDocument & GetDocument() const
Definition: docsh.hxx:219
std::shared_ptr< ScDocument > m_pDocument
Definition: docsh.hxx:82
const OUString & GetDdeTextFmt() const
Definition: docsh.hxx:372
DECL_DLLPRIVATE_LINK(ReloadAllLinksHdl, weld::Button &, void)
std::unique_ptr< ScAutoStyleList > m_pAutoStyleList
Definition: docsh.hxx:103
std::unique_ptr< ScPaintLockData > m_pPaintLockData
Definition: docsh.hxx:104
std::unique_ptr< DocShell_Impl > m_pImpl
Definition: docsh.hxx:87
sal_Int16 m_nCanUpdate
Definition: docsh.hxx:99
bool m_bFooterOn
Definition: docsh.hxx:91
bool m_bIsEmpty
Definition: docsh.hxx:93
std::unique_ptr< ScDocShellModificator, o3tl::default_delete< ScDocShellModificator > > m_pModificator
Definition: docsh.hxx:108
bool IsDocumentModifiedPending() const
Definition: docsh.hxx:380
css::uno::Reference< css::script::vba::XVBAScriptListener > m_xVBAListener
Definition: docsh.hxx:113
std::unique_ptr< ScDBData > m_pOldAutoDBRange
Definition: docsh.hxx:101
void SetAreasChangedNeedBroadcast()
Definition: docsh.hxx:388
ScDocument & GetDocument()
Definition: docsh.hxx:220
void SetDocumentModifiedPending(bool bVal)
Definition: docsh.hxx:378
bool IsPaintLocked() const
Definition: docsh.hxx:325
SAL_DLLPRIVATE void EnableSharedSettings(bool bEnable)
bool IsEmpty() const
Definition: docsh.hxx:350
ScModelObj * GetModel() const
Definition: docsh.hxx:431
bool m_bIsInUndo
Definition: docsh.hxx:94
bool m_bUpdateEnabled
Definition: docsh.hxx:96
double GetOutputFactor() const
Definition: docsh.hxx:357
ScDocFunc & GetDocFunc()
Definition: docsh.hxx:221
DECL_DLLPRIVATE_LINK(RefreshDBDataHdl, Timer *, void)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
bool HasChangesListeners() const
Definition: docuno.cxx:3209
void NotifyChanges(const OUString &rOperation, const ScRangeList &rRanges, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
Definition: docuno.cxx:3260
Additional class containing cell annotation data.
Definition: postit.hxx:58
virtual bool HasChangeRecordProtection() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
virtual bool InitNew(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual bool PrepareClose(bool bUI=true)
virtual bool ConvertFrom(SfxMedium &rMedium)
virtual void ReconnectDdeLink(SfxObjectShell &rServer)
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem)
virtual bool GetProtectionHash(css::uno::Sequence< sal_Int8 > &rPasswordHash)
virtual bool DoSaveCompleted(SfxMedium *pNewStor=nullptr, bool bRegisterRecent=true)
virtual bool LoadFrom(SfxMedium &rMedium)
virtual bool Load(SfxMedium &rMedium)
virtual std::shared_ptr< SfxDocumentInfoDialog > CreateDocumentInfoDialog(weld::Window *pParent, const SfxItemSet &rItemSet)
virtual bool SaveAs(SfxMedium &rMedium)
virtual void SetVisArea(const tools::Rectangle &rVisArea)
virtual bool IsChangeRecording() const
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect, bool bOutputForScreen)=0
virtual bool ConvertTo(SfxMedium &rMedium)
virtual bool Save()
virtual void SetProtectionPassword(const OUString &rPassword)
virtual bool QuerySlotExecutable(sal_uInt16 nSlotId)
virtual std::vector< Color > GetThemeColors()
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual std::set< Color > GetDocColors()
virtual void LoadStyles(SfxObjectShell &rSource)
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates)
const tools::Rectangle & GetVisArea() const
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false)
virtual Printer * GetDocumentPrinter()
virtual bool LoadExternal(SfxMedium &rMedium)
virtual void FillClass(SvGlobalName *pClassName, SotClipboardFormatId *pFormat, OUString *pFullTypeName, sal_Int32 nVersion, bool bTemplate=false) const=0
virtual void UpdateLinks()
virtual void TerminateEditing()
virtual void SetModified(bool bModified=true)
virtual SfxUndoManager * GetUndoManager()
LOKCommentNotificationType
Definition: docsh.hxx:71
SAL_DLLPUBLIC_EXPORT bool TestImportDBF(SvStream &rStream)
Definition: docsh.cxx:3455
tools::SvRef< ScDocShell > ScDocShellRef
Definition: docsh.hxx:436
void UpdateAcceptChangesDialog()
Definition: docsh4.cxx:1405
std::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap
Definition: docsh.hxx:65
void VBA_InsertModule(ScDocument &rDoc, SCTAB nTab, const OUString &sModuleSource)
Definition: docfunc.cxx:3197
float u
constexpr OUStringLiteral IsDocument(u"IsDocument")
SotClipboardFormatId
bool KillFile(const INetURLObject &rURL)
ScLkUpdMode
Definition: global.hxx:410
ScGetDBSelection
For ScDBFunc::GetDBData()
Definition: global.hxx:391
PaintPartFlags
Definition: global.hxx:109
ScScenarioFlags
Definition: global.hxx:226
ScGetDBMode
Definition: global.hxx:382
bool isDataAreaInvalidateType(std::u16string_view rType)
Definition: docsh.hxx:472
void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType=OUString("cell-change"))
Definition: docsh.hxx:505
void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges, const OUString &rType=OUString("cell-change"), const css::uno::Sequence< css::beans::PropertyValue > &rProperties=css::uno::Sequence< css::beans::PropertyValue >())
Definition: docsh.hxx:497
bool getMustPropagateChangesModel(ScModelObj *pModelObj)
Definition: docsh.hxx:492
void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell *pViewShell, css::uno::Reference< css::office::XAnnotation > const &rxAnnotation)
const ::avmedia::MediaItem * Execute(const SdrMarkView *pSdrView, SfxRequest const &rReq)
void GetState(const SdrMarkView *pSdrView, SfxItemSet &rSet)
HiddenInformation
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
SfxModelFlags
#define SFX_DECL_INTERFACE(nId)
#define SCID_DOC_SHELL
Definition: shellids.hxx:24
sal_uIntPtr sal_uLong
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
void SetPrinter(IDocumentDeviceAccess *, SfxPrinter const *, bool bWeb)
SfxPrinterChangeFlags