19 #ifndef INCLUDED_SW_INC_DOCSH_HXX
20 #define INCLUDED_SW_INC_DOCSH_HXX
24 #include <rtl/ref.hxx>
25 #include <com/sun/star/uno/Sequence.h>
45 typedef std::unique_ptr<SwReader, o3tl::default_delete<SwReader>>
SwReaderPtr;
57 class EmbeddedObjectRef;
60 namespace 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)
130 SAL_DLLPRIVATE
void Edit(
131 const OUString &rName,
132 const OUString& rParent,
136 const OString& sPageId,
139 sal_uInt16 nSlot = 0);
142 SAL_DLLPRIVATE
void Hide(
const OUString &rName,
SfxStyleFamily nFamily,
bool bHidden);
149 SAL_DLLPRIVATE
void MakeByExample(
const OUString &rName,
152 SAL_DLLPRIVATE
void SubInitNew();
154 SAL_DLLPRIVATE
void RemoveOLEObjects();
155 SAL_DLLPRIVATE
void CalcLayoutForOLEObjects();
157 SAL_DLLPRIVATE
void Init_Impl();
168 SFX_DECL_OBJECTFACTORY()
172 static
void InitInterface_Impl();
175 static OUString GetEventName( sal_Int32 nId );
184 DECL_LINK( Ole2ModifiedHdl,
bool,
void );
187 virtual
void SetVisArea( const
tools::Rectangle &rRect ) override;
188 virtual
tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override;
189 virtual
Printer *GetDocumentPrinter() override;
191 virtual
void OnDocumentPrinterChanged(
Printer * pNewPrinter ) override;
193 virtual
void SetModified(
bool = true ) override;
197 void ExecStyleSheet(SfxRequest&);
200 void StateStyleSheet(SfxItemSet&,
SwWrtShell* pSh =
nullptr );
203 SwDoc* GetDoc() {
return m_xDoc.get(); }
208 void UpdateFontList();
209 void UpdateChildWindows();
212 virtual bool Save()
override;
219 void SetView(
SwView* pVw);
233 {
return const_cast<SwDocShell*
>(
this)->GetFEShell(); }
240 virtual bool DdeGetData(
const OUString& rItem,
const OUString& rMimeType,
241 css::uno::Any & rValue )
override;
242 virtual bool DdeSetData(
const OUString& rItem,
const OUString& rMimeType,
243 const css::uno::Any & rValue )
override;
250 OUString * pLongUserName,
251 sal_Int32 nFileFormat,
252 bool bTemplate =
false )
const override;
259 void LoadStyles_(
SfxObjectShell& rSource,
bool bPreserveCurrentDocument );
265 const OUString& rPage,
266 const OString& rPageId,
275 void LoadingFinished();
281 void ReloadFromHtml(
const OUString& rStreamName,
SwSrcView* pSrcView );
285 void ToggleLayoutMode(
SwView* pView);
288 void InvalidateModel();
289 void ReactivateModel();
291 virtual css::uno::Sequence< OUString >
GetEventNames()
override;
301 css::uno::Reference< css::frame::XController >
305 SAL_DLLPRIVATE
bool IsTemplate()
const {
return m_IsATemplate; }
306 SAL_DLLPRIVATE
void SetIsTemplate(
bool bValue ) { m_IsATemplate = bValue; }
314 virtual void SetChangeRecording(
bool bActivate,
bool bLockAllViews =
false )
override;
316 virtual bool GetProtectionHash( css::uno::Sequence< sal_Int8 > &rPasswordHash )
override;
318 void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller >
const& xCaller);
319 void CallAutomationDocumentEventSinks(
const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments);
320 void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument >
const& xDocument);
323 virtual std::unique_ptr<LockAllViewsGuard>
LockAllViews()
override;
346 const OUString& rFileName,
347 const OUString& rPasswd,
348 const OUString& rFilter,
std::vector< SwViewShell * > m_aViewWasUnLocked
sal_Int16 GetUpdateDocMode() const
virtual sfx::AccessibilityIssueCollection runAccessibilityCheck()
const SwDoc * GetDoc() const
virtual bool Load(SfxMedium &rMedium)
virtual std::unique_ptr< LockAllViewsGuard > LockAllViews()
std::unique_ptr< comphelper::EmbeddedObjectContainer > m_pOLEChildList
virtual void FillClass(SvGlobalName *pClassName, SotClipboardFormatId *pFormat, OUString *pFullTypeName, sal_Int32 nVersion, bool bTemplate=false) const =0
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationDocumentEventsCaller
virtual bool SaveCompleted(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual bool SaveAs(SfxMedium &rMedium)
void InitDrawModelAndDocShell(SwDocShell *pSwDocShell, SwDrawModel *pSwDrawModel)
std::unique_ptr< sfx2::StyleManager > m_pStyleManager
virtual sfx2::StyleManager * GetStyleManager()
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
Used by the UI to modify the document model.
virtual bool PrepareClose(bool bUI=true)
virtual void DoFlushDocInfo()
virtual void CancelTransfers()
SAL_DLLPRIVATE bool IsTemplate() const
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
virtual void ReconnectDdeLink(SfxObjectShell &rServer)
virtual bool IsChangeRecording() const
virtual const sfx2::IXmlIdRegistry * GetXmlIdRegistry() const
PaM is Point and Mark: a selection of the document model.
virtual bool HasChangeRecordProtection() const
int SwFindDocShell(SfxObjectShellRef &xDocSh, SfxObjectShellLock &xLockRef, const OUString &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...
virtual std::shared_ptr< SfxDocumentInfoDialog > CreateDocumentInfoDialog(weld::Window *pParent, const SfxItemSet &rItemSet)
virtual css::uno::Sequence< OUString > GetEventNames()
virtual bool LoadFrom(SfxMedium &rMedium)
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
virtual ::sfx2::SvLinkSource * DdeCreateLinkSource(const OUString &rItem)
rtl::Reference< SwDoc > m_xDoc
Document.
std::unique_ptr< FontList > m_pFontList
Current Fontlist.
bool m_IsATemplate
prevent nested calls of UpdateFontList
const tools::Rectangle & GetVisArea() const
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates)
SAL_DLLPRIVATE void SetIsTemplate(bool bValue)
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false)
virtual bool InitNew(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual void LoadStyles(SfxObjectShell &rSource)
bool m_IsRemovedInvisibleContent
whether SID_MAIL_PREPAREEXPORT removed content that SID_MAIL_EXPORT_FINISHED needs to restore ...
virtual bool ConvertTo(SfxMedium &rMedium)
rtl::Reference< SfxStyleSheetBasePool > m_xBasePool
Passing through for formats.
Provides access to the formatting devices of a document.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
virtual std::set< Color > GetDocColors()
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect)=0
SwView * m_pView
For "historical reasons" nothing can be done without the WrtShell.
bool m_IsInUpdateFontList
prevent nested calls of UpdateFontList
virtual bool GetProtectionHash(css::uno::Sequence< sal_Int8 > &rPasswordHash)
const SwFEShell * GetFEShell() const
virtual void SetProtectionPassword(const OUString &rPassword)
const SwWrtShell * GetWrtShell() const
sal_Int16 m_nUpdateDocMode
contains the css::document::UpdateDocMode
Give access to the data-provider for chart.
const SwView * GetView() const
virtual bool InsertGeneratedStream(SfxMedium &rMedium, css::uno::Reference< css::text::XTextRange > const &xInsertPosition)
virtual bool ConvertFrom(SfxMedium &rMedium)
css::uno::Reference< ooo::vba::word::XDocument > mxAutomationDocumentObject
#define SFX_DECL_INTERFACE(nId)