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>
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
44class INetURLObject;
45
46class ScViewData;
47class ScDocFunc;
48class ScDrawLayer;
49class ScTabViewShell;
50class ScAutoStyleList;
51class ScMarkData;
52class ScPaintLockData;
53class ScChangeAction;
54class ScImportOptions;
56class ScOptSolverSave;
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;
97 bool m_bUcalcTest:1; // avoid loading the styles in the ucalc test
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
163public:
165 SFX_DECL_OBJECTFACTORY();
166
167private:
169 static void InitInterface_Impl();
170
171public:
172 explicit ScDocShell( const ScDocShell& rDocShell ) = delete;
173 explicit ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT, const std::shared_ptr<ScDocument>& pDoc = {} );
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
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_pDocument; }
221 ScDocument& GetDocument() { return *m_pDocument; }
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
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 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
465
466public:
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 {
495 {
496 ScRangeList aChangeRanges(rRange);
497 Notify(*pModelObj, aChangeRanges, rType);
498 }
499 }
500};
501
502void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const OUString& sModuleSource );
503
504/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Create before modifications of the document and destroy thereafter.
Definition: docsh.hxx:457
std::unique_ptr< ScRefreshTimerProtector > mpProtector
Definition: docsh.hxx:459
ScDocShellModificator(const ScDocShellModificator &)=delete
ScDocShell & rDocShell
Definition: docsh.hxx:458
~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE
Definition: docsh.cxx:3288
ScDocShellModificator & operator=(const ScDocShellModificator &)=delete
bool bAutoCalcShellDisabled
Definition: docsh.hxx:460
void SetDocumentModified()
Definition: docsh.cxx:3297
Do things that need to be done before saving to our own format and necessary clean ups in dtor.
Definition: docsh.hxx:126
css::uno::Reference< css::datatransfer::XTransferable2 > m_xClipData
Definition: docsh.hxx:116
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:112
sal_uInt16 m_nDocumentLock
Definition: docsh.hxx:99
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
std::unique_ptr< ScOptSolverSave > m_pSolverSaveData
Definition: docsh.hxx:106
void SetClipData(const css::uno::Reference< css::datatransfer::XTransferable2 > &xTransferable)
Definition: docsh.hxx:225
bool IsInUndo() const
Definition: docsh.hxx:354
css::uno::Reference< css::datatransfer::XTransferable2 > const & GetClipData() const
Definition: docsh.hxx:224
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > LoadSharedDocument()
std::unique_ptr< ScSheetSaveData > m_pSheetSaveData
Definition: docsh.hxx:107
std::unique_ptr< ScFormatSaveData > m_pFormatSaveData
Definition: docsh.hxx:108
bool m_bAreasChangedNeedBroadcast
Definition: docsh.hxx:98
const ScDocument & GetDocument() const
Definition: docsh.hxx:220
bool m_bUcalcTest
Definition: docsh.hxx:97
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:104
std::unique_ptr< ScPaintLockData > m_pPaintLockData
Definition: docsh.hxx:105
std::unique_ptr< DocShell_Impl > m_pImpl
Definition: docsh.hxx:87
sal_Int16 m_nCanUpdate
Definition: docsh.hxx:100
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:110
bool IsDocumentModifiedPending() const
Definition: docsh.hxx:381
const ScOptSolverSave * GetSolverSaveData() const
Definition: docsh.hxx:415
css::uno::Reference< css::script::vba::XVBAScriptListener > m_xVBAListener
Definition: docsh.hxx:115
std::unique_ptr< ScDBData > m_pOldAutoDBRange
Definition: docsh.hxx:102
void SetAreasChangedNeedBroadcast()
Definition: docsh.hxx:389
ScDocument & GetDocument()
Definition: docsh.hxx:221
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
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:222
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:3175
void NotifyChanges(const OUString &rOperation, const ScRangeList &rRanges, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
Definition: docuno.cxx:3184
All settings from the dialog, saved with the DocShell for the next call.
Definition: optsolver.hxx:60
Additional class containing cell annotation data.
Definition: postit.hxx:161
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 bool ConvertTo(SfxMedium &rMedium)
virtual bool Save()
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect)=0
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:3426
tools::SvRef< ScDocShell > ScDocShellRef
Definition: docsh.hxx:439
void UpdateAcceptChangesDialog()
Definition: docsh4.cxx:1385
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
constexpr OUStringLiteral IsDocument(u"IsDocument")
SotClipboardFormatId
bool KillFile(const INetURLObject &rURL)
ScLkUpdMode
Definition: global.hxx:408
ScGetDBSelection
For ScDBFunc::GetDBData()
Definition: global.hxx:389
PaintPartFlags
Definition: global.hxx:108
ScScenarioFlags
Definition: global.hxx:224
ScGetDBMode
Definition: global.hxx:380
ScModelObj * getMustPropagateChangesModel(const ScDocShell &rDocShell)
Definition: docsh.hxx:475
void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType=OUString("cell-change"))
Definition: docsh.hxx:491
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
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