Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / DocumentLayoutManager.hxx
blob8db5cbe328fea524354fe397d8b9e8bbf08b55cb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTLAYOUTMANAGER_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTLAYOUTMANAGER_HXX
23 #include <IDocumentLayoutAccess.hxx>
24 #include <memory>
26 class SwDoc;
27 class SwViewShell;
28 class SwLayouter;
30 namespace sw {
32 class DocumentLayoutManager final : public IDocumentLayoutAccess
35 public:
37 DocumentLayoutManager( SwDoc& i_rSwdoc );
39 virtual const SwViewShell *GetCurrentViewShell() const override;
40 virtual SwViewShell *GetCurrentViewShell() override; //< It must be able to communicate to a SwViewShell.This is going to be removed later.
41 virtual void SetCurrentViewShell( SwViewShell* pNew ) override;
43 virtual const SwRootFrame *GetCurrentLayout() const override;
44 virtual SwRootFrame *GetCurrentLayout() override;
45 virtual bool HasLayout() const override;
47 virtual const SwLayouter* GetLayouter() const override;
48 virtual SwLayouter* GetLayouter() override;
49 virtual void SetLayouter( SwLayouter* pNew ) override;
51 virtual SwFrameFormat* MakeLayoutFormat( RndStdIds eRequest, const SfxItemSet* pSet ) override;
52 virtual void DelLayoutFormat( SwFrameFormat *pFormat ) override;
53 virtual SwFrameFormat* CopyLayoutFormat( const SwFrameFormat& rSrc, const SwFormatAnchor& rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames ) override;
55 //Non Interface methods
56 void ClearSwLayouterEntries();
58 virtual ~DocumentLayoutManager() override;
60 private:
62 DocumentLayoutManager(DocumentLayoutManager const&) = delete;
63 DocumentLayoutManager& operator=(DocumentLayoutManager const&) = delete;
65 SwDoc& m_rDoc;
67 SwViewShell *mpCurrentView; //< SwDoc should get a new member mpCurrentView
68 std::unique_ptr<SwLayouter> mpLayouter; /**< css::frame::Controller for complex layout formatting
69 like footnote/endnote in sections */
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */