19#ifndef INCLUDED_SW_INC_DOCSH_HXX
20#define INCLUDED_SW_INC_DOCSH_HXX
25#include <com/sun/star/uno/Sequence.h>
45typedef std::unique_ptr<SwReader, o3tl::default_delete<SwReader>>
SwReaderPtr;
57class EmbeddedObjectRef;
60namespace ooo::vba {
class XSinkCaller; }
98 SAL_DLLPRIVATE
void AddLink();
99 SAL_DLLPRIVATE
void RemoveLink();
105 SAL_DLLPRIVATE
virtual bool InitNew(
const css::uno::Reference< css::embed::XStorage >& xStorage )
override;
106 SAL_DLLPRIVATE
virtual bool Load(
SfxMedium& rMedium )
override;
111 SAL_DLLPRIVATE
virtual bool SaveCompleted(
const css::uno::Reference< css::embed::XStorage >& xStorage )
override;
113 SAL_DLLPRIVATE
virtual bool PrepareClose(
bool bUI =
true )
override;
116 css::uno::Reference<css::text::XTextRange>
const& xInsertPosition)
123 SAL_DLLPRIVATE
virtual void Draw(
OutputDevice*,
const JobSetup&, sal_uInt16 nAspect,
bool bOutputToWindow)
override;
130 SAL_DLLPRIVATE
void Edit(
132 const OUString &rName,
133 const OUString& rParent,
137 const OUString& sPageId,
140 sal_uInt16 nSlot = 0);
143 SAL_DLLPRIVATE
void Hide(
const OUString &rName,
SfxStyleFamily nFamily,
bool bHidden);
150 SAL_DLLPRIVATE
void MakeByExample(
const OUString &rName,
153 SAL_DLLPRIVATE
void SubInitNew();
155 SAL_DLLPRIVATE
void RemoveOLEObjects();
156 SAL_DLLPRIVATE
void CalcLayoutForOLEObjects();
158 SAL_DLLPRIVATE
void Init_Impl();
173 static
void InitInterface_Impl();
176 static OUString GetEventName( sal_Int32 nId );
185 DECL_DLLPRIVATE_LINK( Ole2ModifiedHdl,
bool,
void );
188 virtual
void SetVisArea( const
tools::Rectangle &rRect ) override;
189 virtual
tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override;
190 virtual
Printer *GetDocumentPrinter() override;
192 virtual
void OnDocumentPrinterChanged(
Printer * pNewPrinter ) override;
194 virtual
void SetModified(
bool = true ) override;
204 SwDoc* GetDoc() {
return m_xDoc.get(); }
209 void UpdateFontList();
210 void UpdateChildWindows();
213 virtual bool Save()
override;
220 void SetView(
SwView* pVw);
234 {
return const_cast<SwDocShell*
>(
this)->GetFEShell(); }
241 virtual bool DdeGetData(
const OUString& rItem,
const OUString& rMimeType,
242 css::uno::Any & rValue )
override;
243 virtual bool DdeSetData(
const OUString& rItem,
const OUString& rMimeType,
244 const css::uno::Any & rValue )
override;
251 OUString * pLongUserName,
252 sal_Int32 nFileFormat,
253 bool bTemplate =
false )
const override;
257 virtual std::shared_ptr<model::ColorSet>
GetThemeColors()
override;
263 void LoadStyles_(
SfxObjectShell& rSource,
bool bPreserveCurrentDocument );
270 const OUString& rPage,
271 const OUString& rPageId,
280 void LoadingFinished();
286 void ReloadFromHtml(
const OUString& rStreamName,
SwSrcView* pSrcView );
290 void ToggleLayoutMode(
SwView* pView);
293 void InvalidateModel();
294 void ReactivateModel();
296 virtual css::uno::Sequence< OUString >
GetEventNames()
override;
306 css::uno::Reference< css::frame::XController >
310 SAL_DLLPRIVATE
bool IsTemplate()
const {
return m_IsATemplate; }
311 SAL_DLLPRIVATE
void SetIsTemplate(
bool bValue ) { m_IsATemplate = bValue; }
319 virtual void SetChangeRecording(
bool bActivate,
bool bLockAllViews =
false )
override;
321 virtual bool GetProtectionHash( css::uno::Sequence< sal_Int8 > &rPasswordHash )
override;
323 void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller >
const& xCaller);
324 void CallAutomationDocumentEventSinks(
const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments);
325 void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument >
const& xDocument);
328 virtual std::unique_ptr<LockAllViewsGuard>
LockAllViews()
override;
351 std::u16string_view rFileName,
352 const OUString& rPasswd,
353 const OUString& rFilter,
Give access to the data-provider for chart.
Provides access to the formatting devices of a document.
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 void CancelTransfers()
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem)
virtual sfx::AccessibilityIssueCollection runAccessibilityCheck()
virtual bool GetProtectionHash(css::uno::Sequence< sal_Int8 > &rPasswordHash)
virtual bool LoadFrom(SfxMedium &rMedium)
virtual bool Load(SfxMedium &rMedium)
virtual sfx2::StyleManager * GetStyleManager()
virtual css::uno::Sequence< OUString > GetEventNames()
virtual std::shared_ptr< SfxDocumentInfoDialog > CreateDocumentInfoDialog(weld::Window *pParent, const SfxItemSet &rItemSet)
virtual bool SaveAs(SfxMedium &rMedium)
virtual std::shared_ptr< model::ColorSet > GetThemeColors()
virtual bool SaveCompleted(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual std::unique_ptr< LockAllViewsGuard > LockAllViews()
virtual bool IsChangeRecording() const
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect, bool bOutputForScreen)=0
virtual bool ConvertTo(SfxMedium &rMedium)
virtual void SetProtectionPassword(const OUString &rPassword)
virtual const sfx2::IXmlIdRegistry * GetXmlIdRegistry() const
virtual std::set< Color > GetDocColors()
virtual void LoadStyles(SfxObjectShell &rSource)
virtual void DoFlushDocInfo()
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates)
const tools::Rectangle & GetVisArea() const
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false)
virtual void FillClass(SvGlobalName *pClassName, SotClipboardFormatId *pFormat, OUString *pFullTypeName, sal_Int32 nVersion, bool bTemplate=false) const=0
virtual void UpdateLinks()
virtual bool InsertGeneratedStream(SfxMedium &rMedium, css::uno::Reference< css::text::XTextRange > const &xInsertPosition)
std::vector< SwViewShell * > m_aViewWasUnLocked
bool m_IsRemovedInvisibleContent
whether SID_MAIL_PREPAREEXPORT removed content that SID_MAIL_EXPORT_FINISHED needs to restore
rtl::Reference< SwDoc > m_xDoc
Document.
rtl::Reference< SfxStyleSheetBasePool > m_xBasePool
Passing through for formats.
std::unique_ptr< comphelper::EmbeddedObjectContainer > m_pOLEChildList
SAL_DLLPRIVATE bool IsTemplate() const
SAL_DLLPRIVATE void SetIsTemplate(bool bValue)
bool m_IsInUpdateFontList
prevent nested calls of UpdateFontList
const SwFEShell * GetFEShell() const
const SwDoc * GetDoc() const
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationDocumentEventsCaller
const SwView * GetView() const
sal_Int16 m_nUpdateDocMode
contains the css::document::UpdateDocMode
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
bool m_IsATemplate
prevent nested calls of UpdateFontList
const SwWrtShell * GetWrtShell() const
SwView * m_pView
For "historical reasons" nothing can be done without the WrtShell.
std::unique_ptr< FontList > m_pFontList
Current Fontlist.
sal_Int16 GetUpdateDocMode() const
std::unique_ptr< sfx2::StyleManager > m_pStyleManager
css::uno::Reference< ooo::vba::word::XDocument > mxAutomationDocumentObject
PaM is Point and Mark: a selection of the document model.
Used by the UI to modify the document model.
virtual std::shared_ptr< SfxDialogController > GetController() override
#define SFX_DECL_OBJECTFACTORY()
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
void InitDrawModelAndDocShell(SwDocShell *pSwDocShell, SwDrawModel *pSwDrawModel)
int SwFindDocShell(SfxObjectShellRef &xDocSh, SfxObjectShellLock &xLockRef, std::u16string_view rFileName, const OUString &rPasswd, const OUString &rFilter, sal_Int16 nVersion, SwDocShell *pDestSh)
Find the right DocShell and create a new one: The return value specifies what should happen to the Sh...
#define SFX_DECL_INTERFACE(nId)