/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #pragma once
class SwDoc; class SfxInPlaceClient; class FontList; class SwEditShell; class SwView; class SwWrtShell; class SwFEShell; class Reader; class SwReader; typedef std::unique_ptr<SwReader, o3tl::default_delete<SwReader>> SwReaderPtr; class SwCursorShell; class SwSrcView; class SwPaM; class SwgReaderOption; class IDocumentDeviceAccess; class IDocumentChartDataProviderAccess; class SwDocShell; class SwDrawModel; class SwViewShell; class SwDocStyleSheetPool; class SwXTextDocument; class SwTextFormatColl; class UIName; namespace svt
{ class EmbeddedObjectRef;
} namespace com::sun::star::frame { class XController; } namespace ooo::vba { class XSinkCaller; } namespace ooo::vba::word { class XDocument; }
// initialize DrawModel (in form of a SwDrawModel) and DocShell (in form of a SwDocShell) // as needed, one or both parameters may be zero void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawModel);
class SW_DLLPUBLIC SwDocShell
: public SfxObjectShell
, public SfxListener
{
rtl::Reference< SwDoc > m_xDoc; ///< Document.
rtl::Reference< SwDocStyleSheetPool > m_xBasePool; ///< Passing through for formats.
std::unique_ptr<FontList> m_pFontList; ///< Current Fontlist. bool m_IsInUpdateFontList; ///< prevent nested calls of UpdateFontList
/** For "historical reasons" nothing can be done without the WrtShell. Back-pointer on View (again "for historical reasons"). Back-pointer is valid until in Activate a new one is set
or until it is deleted in the View's Dtor. */
SwView* m_pView;
SwWrtShell* m_pWrtShell;
std::unique_ptr<comphelper::EmbeddedObjectContainer> m_pOLEChildList;
sal_Int16 m_nUpdateDocMode; ///< contains the css::document::UpdateDocMode bool m_IsATemplate; ///< prevent nested calls of UpdateFontList
bool m_IsRemovedInvisibleContent; ///< whether SID_MAIL_PREPAREEXPORT removed content that ///< SID_MAIL_EXPORT_FINISHED needs to restore
/// Set View for actions via Shell. void SetView(SwView* pVw); const SwView *GetView() const { return m_pView; }
SwView *GetView() { return m_pView; }
/// Access to the SwWrtShell belonging to SwView.
SwWrtShell *GetWrtShell() { return m_pWrtShell; } const SwWrtShell *GetWrtShell() const { return m_pWrtShell; } // Same as GetWrtShell, but return pointer to SwEditShell base of // (potentially incomplete) SwWrtShell:
SwEditShell * GetEditShell();
/// For Core - it knows the DocShell but not the WrtShell!
SwFEShell *GetFEShell(); const SwFEShell *GetFEShell() const
{ returnconst_cast<SwDocShell*>(this)->GetFEShell(); }
/// Show page style format dialog /// @param nSlot /// Identifies slot by which the dialog is triggered. Used to activate certain dialog pane void FormatPage(
weld::Window* pDialogParent, const UIName& rPage, const OUString& rPageId,
SwWrtShell& rActShell,
SfxRequest* pRequest = nullptr);
// #i59688# /** linked graphics are now loaded on demand. Thus, loading of linked graphics no longer needed and necessary for
the load of document being finished. */
void LoadingFinished();
/// Cancel transfer (called from SFX). virtualvoid CancelTransfers() override;
/// #i20883# Digital Signatures and Encryption virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates ) override;
/** #i42634# Overwrites SfxObjectShell::UpdateLinks This new function is necessary to trigger update of links in docs
read by the binary filter: */ virtualvoid UpdateLinks() override;
// Lock all unlocked views, and returns a guard object which unlocks those views when destructed virtual std::unique_ptr<LockAllViewsGuard> LockAllViews() override;
protected: class LockAllViewsGuard_Impl final : public LockAllViewsGuard
{
std::vector<SwViewShell*> m_aViewWasUnLocked;
/** Find the right DocShell and create a new one: The return value specifies what should happen to the Shell 0 - Error, could not find the DocShell 1 - DocShell is an existing Document 2 - DocShell was created anew, thus it needs to be closed again (will be assigned to xLockRef additionally)
*/ int SwFindDocShell( SfxObjectShellRef& xDocSh,
SfxObjectShellLock& xLockRef,
std::u16string_view rFileName, const OUString& rPasswd, const OUString& rFilter,
sal_Int16 nVersion,
SwDocShell* pDestSh, const css::uno::Reference<css::task::XInteractionHandler>& xIHandler);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.