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::shared_ptr<model::ColorSet> 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 UpdateAllRowHeights(const bool bOnlyUsedRows);
271 void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
272
273 void RefreshPivotTables( const ScRange& rSource );
274 void DoConsolidate( const ScConsolidateParam& rParam, bool bRecord = true );
275 void UseScenario( SCTAB nTab, const OUString& rName, bool bRecord = true );
276 SCTAB MakeScenario(SCTAB nTab, const OUString& rName, const OUString& rComment,
277 const Color& rColor, ScScenarioFlags nFlags,
278 ScMarkData& rMark, bool bRecord = true);
279 void ModifyScenario(SCTAB nTab, const OUString& rName, const OUString& rComment,
280 const Color& rColor, ScScenarioFlags nFlags);
281 sal_uLong TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
282 SCTAB nDestPos, bool bInsertNew,
283 bool bNotifyAndPaint );
284
285 bool MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRecord );
286
287 void DoRecalc( bool bApi );
288 void DoHardRecalc();
289
290 void UpdateOle(const ScViewData& rViewData, bool bSnapSize = false);
291 bool IsOle() const;
292
293 void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2 );
294 ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
295 ScDBData* GetAnonymousDBData(const ScRange& rRange);
296 std::unique_ptr<ScDBData> GetOldAutoDBRange();
297 void CancelAutoDBRange(); // called when dialog is cancelled
298
299 virtual void ReconnectDdeLink(SfxObjectShell& rServer) override;
300 void UpdateLinks() override;
301 void SetInitialLinkUpdate( const SfxMedium* pMedium );
302 void AllowLinkUpdate();
303 void ReloadAllLinks();
304 void ReloadTabLinks();
305 ScLkUpdMode GetLinkUpdateModeState() const;
306
307 void SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false );
312 void CheckConfigOptions();
313
314 void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
315
316 void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
317 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart,
318 sal_uInt16 nExtFlags = 0 );
319 void PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sal_uInt16 nExtFlags = 0 );
320
321 void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
322 void PostPaintCell( const ScAddress& rPos );
323 void PostPaintGridAll();
324 void PostPaintExtras();
325
326 bool IsPaintLocked() const { return m_pPaintLockData != nullptr; }
327
328 void PostDataChanged();
329
330 void UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
331 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab );
332 void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange );
333
334 void SetDocumentModified();
335 void SetDrawModified();
336
337 void LockPaint();
338 void UnlockPaint();
339 sal_uInt16 GetLockCount() const { return m_nDocumentLock;}
340 void SetLockCount(sal_uInt16 nNew);
341
342 void LockDocument();
343 void UnlockDocument();
344
346 DECL_DLLPRIVATE_LINK( ReloadAllLinksHdl, weld::Button&, void );
347
348 virtual SfxStyleSheetBasePool* GetStyleSheetPool() override;
349
350 void SetInplace( bool bInplace );
351 bool IsEmpty() const { return m_bIsEmpty; }
352 void SetEmpty(bool bSet);
353
354 bool IsInUndo() const { return m_bIsInUndo; }
355 void SetInUndo(bool bSet);
356
357 void CalcOutputFactor();
358 double GetOutputFactor() const { return m_nPrtToScreenFactor;}
359 void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
360 SCTAB nCurTab,
361 bool& rbHeader,
362 bool& rbFooter );
363
364#if defined(_WIN32)
365 virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType,
366 css::uno::Any & rValue ) override;
367 virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType,
368 const css::uno::Any & rValue ) override;
369#endif
370
371 virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const OUString& rItem ) override;
372
373 const OUString& GetDdeTextFmt() const { return m_aDdeTextFmt; }
374
375 SfxBindings* GetViewBindings();
376
377 ScTabViewShell* GetBestViewShell( bool bOnlyVisible = true );
378
380 { m_bDocumentModifiedPending = bVal; }
382 { return m_bDocumentModifiedPending; }
383
384 bool IsUpdateEnabled() const
385 { return m_bUpdateEnabled; }
386 void SetUpdateEnabled(bool bValue)
387 { m_bUpdateEnabled = bValue; }
388
390 { m_bAreasChangedNeedBroadcast = true; }
391
392 OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
393
394 static ScViewData* GetViewData();
395 static SCTAB GetCurTab();
396
397 static ScDocShell* GetShellByNum( sal_uInt16 nDocNo );
398 static OUString GetOwnFilterName();
399 static OUString GetHtmlFilterName();
400 static OUString GetWebQueryFilterName();
401 static OUString GetAsciiFilterName();
402 static OUString GetLotusFilterName();
403 static OUString GetDBaseFilterName();
404 static OUString GetDifFilterName();
405 static bool HasAutomaticTableName( std::u16string_view rFilter );
406 static void LOKCommentNotify(LOKCommentNotificationType nType, const ScDocument* pDocument, const ScAddress& rPos, const ScPostIt* pNote);
407
408 DECL_DLLPRIVATE_LINK( RefreshDBDataHdl, Timer*, void );
409
410 void BeforeXMLLoading();
411 void AfterXMLLoading(bool bRet);
412
414
415 ScSheetSaveData* GetSheetSaveData();
416 ScFormatSaveData* GetFormatSaveData();
417
418 static void ResetKeyBindings( ScOptionsUtil::KeyBindingType eType );
419
420 // password protection for Calc (derived from SfxObjectShell)
421 // see also: FID_CHG_RECORD, SID_CHG_PROTECT
422 virtual bool IsChangeRecording() const override;
423 virtual bool HasChangeRecordProtection() const override;
424 virtual void SetChangeRecording( bool bActivate, bool bLockAllViews = false ) override;
425 virtual void SetProtectionPassword( const OUString &rPassword ) override;
426 virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
427
428 void SnapVisArea( tools::Rectangle& rRect ) const;
429
430 void RegisterAutomationWorkbookObject(css::uno::Reference< ooo::vba::excel::XWorkbook > const& xWorkbook);
431
432 ScModelObj* GetModel() const { return static_cast<ScModelObj*>(SfxObjectShell::GetModel().get()); }
433};
434
436
438
455{
457 std::unique_ptr<ScRefreshTimerProtector> mpProtector;
460
463
464public:
466 ~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE;
467 void SetDocumentModified();
468};
469
470//#i97876# Spreadsheet data changes are not notified
472{
473 inline bool isDataAreaInvalidateType(std::u16string_view rType)
474 {
475 if (rType == u"delete-content")
476 return true;
477 if (rType == u"delete-rows")
478 return true;
479 if (rType == u"delete-columns")
480 return true;
481 if (rType == u"undo")
482 return true;
483 if (rType == u"redo")
484 return true;
485 if (rType == u"paste")
486 return true;
487 if (rType == u"note")
488 return true;
489
490 return false;
491 }
492
494 {
495 return pModelObj && pModelObj->HasChangesListeners();
496 }
497
498 inline void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges,
499 const OUString &rType = OUString("cell-change"),
500 const css::uno::Sequence< css::beans::PropertyValue >& rProperties =
501 css::uno::Sequence< css::beans::PropertyValue >())
502 {
503 rModelObj.NotifyChanges(rType, rChangeRanges, rProperties);
504 }
505
506 inline void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange,
507 const OUString &rType = OUString("cell-change"))
508 {
509 ScModelObj* pModelObj = rDocShell.GetModel();
510 ScRangeList aChangeRanges(rRange);
511
512 if (getMustPropagateChangesModel(pModelObj))
513 Notify(*pModelObj, aChangeRanges, rType);
514 else if (pModelObj) // possibly need to invalidate getCellArea results
515 {
516 Notify(*pModelObj, aChangeRanges, isDataAreaInvalidateType(rType)
517 ? OUString("data-area-invalidate") : OUString("data-area-extend"));
518 }
519 }
520};
521
522void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const OUString& sModuleSource );
523
524/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Create before modifications of the document and destroy thereafter.
Definition: docsh.hxx:455
std::unique_ptr< ScRefreshTimerProtector > mpProtector
Definition: docsh.hxx:457
ScDocShellModificator(const ScDocShellModificator &)=delete
ScDocShell & rDocShell
Definition: docsh.hxx:456
~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE
Definition: docsh.cxx:3306
ScDocShellModificator & operator=(const ScDocShellModificator &)=delete
bool bAutoCalcShellDisabled
Definition: docsh.hxx:458
void SetDocumentModified()
Definition: docsh.cxx:3315
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:384
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:386
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:339
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:354
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:373
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:381
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:389
ScDocument & GetDocument()
Definition: docsh.hxx:220
void SetDocumentModifiedPending(bool bVal)
Definition: docsh.hxx:379
bool IsPaintLocked() const
Definition: docsh.hxx:326
SAL_DLLPRIVATE void EnableSharedSettings(bool bEnable)
bool IsEmpty() const
Definition: docsh.hxx:351
ScModelObj * GetModel() const
Definition: docsh.hxx:432
bool m_bIsInUndo
Definition: docsh.hxx:94
bool m_bUpdateEnabled
Definition: docsh.hxx:96
double GetOutputFactor() const
Definition: docsh.hxx:358
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:3224
void NotifyChanges(const OUString &rOperation, const ScRangeList &rRanges, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
Definition: docuno.cxx:3275
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 std::shared_ptr< model::ColorSet > GetThemeColors()
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)
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:3439
tools::SvRef< ScDocShell > ScDocShellRef
Definition: docsh.hxx:437
void UpdateAcceptChangesDialog()
Definition: docsh4.cxx:1404
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:473
void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType=OUString("cell-change"))
Definition: docsh.hxx:506
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:498
bool getMustPropagateChangesModel(ScModelObj *pModelObj)
Definition: docsh.hxx:493
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