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>
24 #include <sfx2/sfxmodelfactory.hxx>
25 #include <sfx2/viewsh.hxx>
26 #include <o3tl/deleter.hxx>
28 
29 #include <scdllapi.h>
30 #include <document.hxx>
31 #include <shellids.hxx>
32 #include <optutil.hxx>
33 #include <docuno.hxx>
34 
35 #include <memory>
36 #include <string_view>
37 #include <unordered_map>
38 #include <map>
39 
43 class SfxStyleSheetHint;
44 class INetURLObject;
45 
46 class ScViewData;
47 class ScDocFunc;
48 class ScDrawLayer;
49 class ScTabViewShell;
50 class ScAutoStyleList;
51 class ScMarkData;
52 class ScPaintLockData;
53 class ScChangeAction;
54 class ScImportOptions;
56 class ScOptSolverSave;
57 class ScSheetSaveData;
59 struct ScColWidthParam;
60 class ScFormulaOptions;
61 namespace com::sun::star::script::vba { class XVBAScriptListener; }
62 namespace ooo::vba::excel { class XWorkbook; }
63 namespace com::sun::star::datatransfer { class XTransferable2; }
64 namespace sfx2 { class FileDialogHelper; }
66 
67 typedef std::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
68 
69 //enum ScDBFormat { SC_FORMAT_SDF, SC_FORMAT_DBF };
70 
72 
73 extern "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 {
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;
94  bool m_bIsInUndo:1;
95  bool m_bDocumentModifiedPending:1;
96  bool m_bUpdateEnabled:1;
97  bool m_bUcalcTest:1; // avoid loading the styles in the ucalc test
98  bool m_bAreasChangedNeedBroadcast:1;
99  sal_uInt16 m_nDocumentLock;
100  sal_Int16 m_nCanUpdate; // stores the UpdateDocMode from loading a document till update links
101 
102  std::unique_ptr<ScDBData> m_pOldAutoDBRange;
103 
104  std::unique_ptr<ScAutoStyleList> m_pAutoStyleList;
105  std::unique_ptr<ScPaintLockData> m_pPaintLockData;
106  std::unique_ptr<ScOptSolverSave> m_pSolverSaveData;
107  std::unique_ptr<ScSheetSaveData> m_pSheetSaveData;
108  std::unique_ptr<ScFormatSaveData> m_pFormatSaveData;
109 
110  std::unique_ptr<ScDocShellModificator, o3tl::default_delete<ScDocShellModificator>> m_pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
111 
112  css::uno::Reference< ooo::vba::excel::XWorkbook> mxAutomationWorkbookObject;
113 
114  // Only used by Vba helper functions
115  css::uno::Reference<css::script::vba::XVBAScriptListener> m_xVBAListener;
116  css::uno::Reference<css::datatransfer::XTransferable2> m_xClipData;
117 
118  SAL_DLLPRIVATE void InitItems();
119  SAL_DLLPRIVATE void DoEnterHandler();
120  SAL_DLLPRIVATE void InitOptions(bool bForLoading);
121  SAL_DLLPRIVATE void ResetDrawObjectShell();
122 
125  class SAL_DLLPRIVATE PrepareSaveGuard
126  {
127  public:
128  explicit PrepareSaveGuard( ScDocShell & rDocShell );
129  ~PrepareSaveGuard() COVERITY_NOEXCEPT_FALSE;
130  private:
132  };
133 
134  SAL_DLLPRIVATE bool LoadXML( SfxMedium* pMedium, const css::uno::Reference< css::embed::XStorage >& );
135  SAL_DLLPRIVATE bool SaveXML( SfxMedium* pMedium, const css::uno::Reference< css::embed::XStorage >& );
136  SAL_DLLPRIVATE SCTAB GetSaveTab();
137 
138  friend bool TestImportDBF(SvStream &rStream);
139 
140  SAL_DLLPRIVATE ErrCode DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet,
141  std::map<SCCOL, ScColWidthParam>& aColWidthParam, ScFlatBoolRowSegments& rRowHeightsRecalc );
142  SAL_DLLPRIVATE ErrCode DBaseExport(
143  const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo );
144 
145  SAL_DLLPRIVATE static bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
146  SAL_DLLPRIVATE static bool KillFile( const INetURLObject& rURL );
147  SAL_DLLPRIVATE static bool IsDocument( const INetURLObject& rURL );
148 
149  SAL_DLLPRIVATE void LockPaint_Impl(bool bDoc);
150  SAL_DLLPRIVATE void UnlockPaint_Impl(bool bDoc);
151  SAL_DLLPRIVATE void LockDocument_Impl(sal_uInt16 nNew);
152  SAL_DLLPRIVATE void UnlockDocument_Impl(sal_uInt16 nNew);
153 
154  SAL_DLLPRIVATE void EnableSharedSettings( bool bEnable );
155  SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument();
156 
157  SAL_DLLPRIVATE void UseSheetSaveEntries();
158 
159  SAL_DLLPRIVATE std::unique_ptr<ScDocFunc> CreateDocFunc();
160 
161  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
162 
163 public:
165  SFX_DECL_OBJECTFACTORY();
166 
167 private:
169  static void InitInterface_Impl();
170 
171 public:
172  explicit ScDocShell( const ScDocShell& rDocShell ) = delete;
173  explicit ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT );
174  virtual ~ScDocShell() override;
175 
176  virtual SfxUndoManager*
177  GetUndoManager() override;
178 
179  virtual void FillClass( SvGlobalName * pClassName,
180  SotClipboardFormatId * pFormat,
181  OUString * pFullTypeName,
182  sal_Int32 nFileFormat,
183  bool bTemplate = false ) const override;
184 
185  virtual std::set<Color> GetDocColors() override;
186 
187  virtual bool InitNew( const css::uno::Reference< css::embed::XStorage >& ) override;
188  virtual bool Load( SfxMedium& rMedium ) override;
189  virtual bool LoadFrom( SfxMedium& rMedium ) override;
190  virtual bool ConvertFrom( SfxMedium &rMedium ) override;
191  virtual bool LoadExternal( SfxMedium& rMedium ) override;
192  virtual bool Save() override;
193  virtual bool SaveAs( SfxMedium& rMedium ) override;
194  virtual bool ConvertTo( SfxMedium &rMedium ) override;
195  virtual bool PrepareClose( bool bUI = true ) override;
196  virtual void LoadStyles( SfxObjectShell &rSource ) override;
197 
198  virtual bool DoSaveCompleted( SfxMedium * pNewStor=nullptr, bool bRegisterRecent=true ) override; // SfxObjectShell
199  virtual bool QuerySlotExecutable( sal_uInt16 nSlotId ) override;
200 
201  virtual void Draw( OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect ) override;
202 
203  virtual void SetVisArea( const tools::Rectangle & rVisArea ) override;
204 
205  virtual void TerminateEditing() override;
206 
207  using SfxObjectShell::GetVisArea;
208  virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override;
209 
210  virtual Printer* GetDocumentPrinter() override;
211 
212  virtual void SetModified( bool = true ) override;
213 
214  void SetVisAreaOrSize( const tools::Rectangle& rVisArea );
215 
216  virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override;
217 
218  void GetDocStat( ScDocStat& rDocStat );
219 
220  const ScDocument& GetDocument() const { return m_aDocument; }
221  ScDocument& GetDocument() { return m_aDocument; }
222  ScDocFunc& GetDocFunc() { return *m_pDocFunc; }
223 
224  css::uno::Reference<css::datatransfer::XTransferable2> const & GetClipData() const { return m_xClipData; }
225  void SetClipData(const css::uno::Reference<css::datatransfer::XTransferable2>& xTransferable) { m_xClipData = xTransferable; }
226 
227  SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
228  sal_uInt16 SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL );
229 
230  void UpdateFontList();
231 
232  ScDrawLayer* MakeDrawLayer();
233 
234  void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt, SCTAB nTab );
235 
236  void Execute( SfxRequest& rReq );
237  void GetState( SfxItemSet &rSet );
238  void ExecutePageStyle ( const SfxViewShell& rCaller, SfxRequest& rReq, SCTAB nCurTab );
239  void GetStatePageStyle( SfxItemSet& rSet, SCTAB nCurTab );
240 
241  void CompareDocument( ScDocument& rOtherDoc );
242  void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = nullptr, bool bInverseMap = false );
243  bool MergeSharedDocument( ScDocShell* pSharedDocShell );
244 
245  ScChangeAction* GetChangeAction( const ScAddress& rPos );
246  void SetChangeComment( ScChangeAction* pAction, const OUString& rComment );
247  void ExecuteChangeCommentDialog( ScChangeAction* pAction, weld::Window* pParent, bool bPrevNext = true );
253  bool ExecuteChangeProtectionDialog( bool bJustQueryIfProtected = false );
254 
255  void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages );
256  bool AdjustPrintZoom( const ScRange& rRange );
257 
258  void LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellStyles, bool bPageStyles );
259 
260  void PageStyleModified( std::u16string_view rStyleName, bool bApi );
261 
262  void NotifyStyle( const SfxStyleSheetHint& rHint );
263  void DoAutoStyle( const ScRange& rRange, const OUString& rStyle );
264 
265  static weld::Window* GetActiveDialogParent();
266  void ErrorMessage(TranslateId pGlobStrId);
267  bool IsEditable() const;
268 
269  bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
270  void UpdateAllRowHeights( const ScMarkData* pTabMark = nullptr );
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 
345  DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper*, void );
346  DECL_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 
379  void SetDocumentModifiedPending( bool bVal )
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_LINK( RefreshDBDataHdl, Timer*, void );
409 
410  void BeforeXMLLoading();
411  void AfterXMLLoading(bool bRet);
412 
414 
415  const ScOptSolverSave* GetSolverSaveData() const { return m_pSolverSaveData.get(); } // may be null
416  void SetSolverSaveData( std::unique_ptr<ScOptSolverSave> pData );
417  ScSheetSaveData* GetSheetSaveData();
418  ScFormatSaveData* GetFormatSaveData();
419 
420  static void ResetKeyBindings( ScOptionsUtil::KeyBindingType eType );
421 
422  // password protection for Calc (derived from SfxObjectShell)
423  // see also: FID_CHG_RECORD, SID_CHG_PROTECT
424  virtual bool IsChangeRecording() const override;
425  virtual bool HasChangeRecordProtection() const override;
426  virtual void SetChangeRecording( bool bActivate, bool bLockAllViews = false ) override;
427  virtual void SetProtectionPassword( const OUString &rPassword ) override;
428  virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
429 
430  void SnapVisArea( tools::Rectangle& rRect ) const;
431 
432  void SetIsInUcalc();
433 
434  void RegisterAutomationWorkbookObject(css::uno::Reference< ooo::vba::excel::XWorkbook > const& xWorkbook);
435 };
436 
438 
440 
457 {
459  std::unique_ptr<ScRefreshTimerProtector> mpProtector;
462 
463  ScDocShellModificator( const ScDocShellModificator& ) = delete;
465 
466 public:
467  explicit ScDocShellModificator( ScDocShell& );
468  ~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE;
469  void SetDocumentModified();
470 };
471 
472 //#i97876# Spreadsheet data changes are not notified
474 {
476  {
477  ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(rDocShell.GetModel());
478  if (pModelObj && pModelObj->HasChangesListeners())
479  return pModelObj;
480  return nullptr;
481  }
482 
483  inline void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges,
484  const OUString &rType = OUString("cell-change"),
485  const css::uno::Sequence< css::beans::PropertyValue >& rProperties =
486  css::uno::Sequence< css::beans::PropertyValue >())
487  {
488  rModelObj.NotifyChanges(rType, rChangeRanges, rProperties);
489  }
490 
491  inline void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange,
492  const OUString &rType = OUString("cell-change"))
493  {
494  if (ScModelObj* pModelObj = getMustPropagateChangesModel(rDocShell))
495  {
496  ScRangeList aChangeRanges(rRange);
497  Notify(*pModelObj, aChangeRanges, rType);
498  }
499  }
500 };
501 
502 void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const OUString& sModuleSource );
503 
504 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void UpdateAcceptChangesDialog()
Definition: docsh4.cxx:1371
constexpr OUStringLiteral IsDocument(u"IsDocument")
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
std::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap
Definition: docsh.hxx:65
std::unique_ptr< ScDBData > m_pOldAutoDBRange
Definition: docsh.hxx:102
virtual void UpdateLinks()
double m_nPrtToScreenFactor
Definition: docsh.hxx:86
ScScenarioFlags
Definition: global.hxx:236
css::uno::Reference< css::datatransfer::XTransferable2 > const & GetClipData() const
Definition: docsh.hxx:224
sal_uIntPtr sal_uLong
Do things that need to be done before saving to our own format and necessary clean ups in dtor...
Definition: docsh.hxx:125
bool IsUpdateEnabled() const
Definition: docsh.hxx:384
double GetOutputFactor() const
Definition: docsh.hxx:358
css::uno::Reference< css::frame::XModel3 > GetModel() const
ScDocShell & rDocShell
Definition: docsh.hxx:458
const ::avmedia::MediaItem * Execute(const SdrMarkView *pSdrView, SfxRequest const &rReq)
css::uno::Reference< css::script::vba::XVBAScriptListener > m_xVBAListener
Definition: docsh.hxx:115
~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE
Definition: docsh.cxx:3270
ScGetDBMode
Definition: global.hxx:391
sal_uInt16 GetLockCount() const
Definition: docsh.hxx:339
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
SfxPrinterChangeFlags
ScDocument & GetDocument()
Definition: docsh.hxx:221
Additional class containing cell annotation data.
Definition: postit.hxx:161
void GetState(const SdrMarkView *pSdrView, SfxItemSet &rSet)
ScLkUpdMode
Definition: global.hxx:419
std::unique_ptr< ScPaintLockData > m_pPaintLockData
Definition: docsh.hxx:105
SAL_DLLPUBLIC_EXPORT bool TestImportDBF(SvStream &rStream)
Definition: docsh.cxx:3408
std::unique_ptr< ScDocFunc > m_pDocFunc
Definition: docsh.hxx:88
const OUString & GetDdeTextFmt() const
Definition: docsh.hxx:373
SotClipboardFormatId
void SetClipData(const css::uno::Reference< css::datatransfer::XTransferable2 > &xTransferable)
Definition: docsh.hxx:225
bool IsDocumentModifiedPending() const
Definition: docsh.hxx:381
virtual void ReconnectDdeLink(SfxObjectShell &rServer)
virtual bool IsChangeRecording() const
virtual bool HasChangeRecordProtection() const
std::unique_ptr< ScAutoStyleList > m_pAutoStyleList
Definition: docsh.hxx:104
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:483
std::unique_ptr< ScDocShellModificator, o3tl::default_delete< ScDocShellModificator > > m_pModificator
Definition: docsh.hxx:110
sal_Int16 SCCOL
Definition: types.hxx:21
sal_uInt16 m_nDocumentLock
Definition: docsh.hxx:99
#define static
Definition: arraysum.hxx:27
void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell *pViewShell, uno::Reference< office::XAnnotation > const &rxAnnotation)
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem)
sal_Int16 m_nCanUpdate
Definition: docsh.hxx:100
void SetPrinter(IDocumentDeviceAccess *, SfxPrinter const *, bool bWeb)
bool KillFile(const INetURLObject &rURL)
void SetAreasChangedNeedBroadcast()
Definition: docsh.hxx:389
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates)
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false)
#define SCID_DOC_SHELL
Definition: shellids.hxx:24
bool m_bFooterOn
Definition: docsh.hxx:91
void SetUpdateEnabled(bool bValue)
Definition: docsh.hxx:386
bool IsPaintLocked() const
Definition: docsh.hxx:326
ScModelObj * getMustPropagateChangesModel(const ScDocShell &rDocShell)
Definition: docsh.hxx:475
std::unique_ptr< ScRefreshTimerProtector > mpProtector
Definition: docsh.hxx:459
void NotifyChanges(const OUString &rOperation, const ScRangeList &rRanges, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
Definition: docuno.cxx:3155
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
std::unique_ptr< ScOptSolverSave > m_pSolverSaveData
Definition: docsh.hxx:106
sal_Int32 SCROW
Definition: types.hxx:17
void VBA_InsertModule(ScDocument &rDoc, SCTAB nTab, const OUString &sModuleSource)
Definition: docfunc.cxx:3190
std::unique_ptr< ScSheetSaveData > m_pSheetSaveData
Definition: docsh.hxx:107
css::uno::Reference< css::datatransfer::XTransferable2 > m_xClipData
Definition: docsh.hxx:116
ScGetDBSelection
For ScDBFunc::GetDBData()
Definition: global.hxx:400
ScDocShellModificator & operator=(const ScDocShellModificator &)=delete
std::unique_ptr< ScFormatSaveData > m_pFormatSaveData
Definition: docsh.hxx:108
const ScOptSolverSave * GetSolverSaveData() const
Definition: docsh.hxx:415
All settings from the dialog, saved with the DocShell for the next call.
Definition: optsolver.hxx:59
tools::SvRef< ScDocShell > ScDocShellRef
Definition: docsh.hxx:439
virtual bool GetProtectionHash(css::uno::Sequence< sal_Int8 > &rPasswordHash)
SfxModelFlags
bool m_bHeaderOn
Definition: docsh.hxx:90
LOKCommentNotificationType
Definition: docsh.hxx:71
std::unique_ptr< DocShell_Impl > m_pImpl
Definition: docsh.hxx:87
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
css::uno::Reference< ooo::vba::excel::XWorkbook > mxAutomationWorkbookObject
Definition: docsh.hxx:112
void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType=OUString("cell-change"))
Definition: docsh.hxx:491
ScDocShellModificator(const ScDocShellModificator &)=delete
void SetDocumentModified()
Definition: docsh.cxx:3279
bool IsInUndo() const
Definition: docsh.hxx:354
ScDocument m_aDocument
Definition: docsh.hxx:82
virtual void SetProtectionPassword(const OUString &rPassword)
bool IsEmpty() const
Definition: docsh.hxx:351
OUString m_aDdeTextFmt
Definition: docsh.hxx:84
ScDocFunc & GetDocFunc()
Definition: docsh.hxx:222
bool HasChangesListeners() const
Definition: docuno.cxx:3146
void SetDocumentModifiedPending(bool bVal)
Definition: docsh.hxx:379
PaintPartFlags
Definition: global.hxx:119
DECL_LINK(SignDocumentHandler, weld::Button &, void)
HiddenInformation
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
Create before modifications of the document and destroy thereafter.
Definition: docsh.hxx:456
sal_Int16 SCTAB
Definition: types.hxx:22
bool bAutoCalcShellDisabled
Definition: docsh.hxx:460
#define SFX_DECL_INTERFACE(nId)