nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / core / inc / node2lay.hxx
blobef0e2f03adeebf1254004c5f89f87ae7a296b623
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_NODE2LAY_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_NODE2LAY_HXX
22 #include <tools/solar.h>
23 #include <memory>
25 /**
26 * This class connects the Nodes with the Layouts.
27 * It provides an intelligent iterator over Frames belonging to the Node or
28 * Node Range. Depending on the purpose of iterating (e.g. to insert other
29 * Frames before or after the Frames) Master/Follows are recognized and only
30 * the relevant ones are returned. Repeated table headers are also taken
31 * into account.
32 * It's possible to iterate over SectionNodes that are either not directly
33 * assigned to a SectionFrame or to multiple ones due to nesting.
35 * This class is an interface between the method and a SwClientIter: it
36 * chooses the right sw::BroadcastingModify depending on the task, creates a SwClientIter
37 * and filters its iterations depending on the task.
38 * The task is determined by the choice of class.
40 * 1. Collecting the UpperFrames (so that later RestoreUpperFrames can be called)
41 * is called by MakeFrames, if there's no PrevNext (before/after we can insert
42 * the Frames).
43 * 2. Inserting the Frames before/after which the new Frames of a Node need to
44 * be inserted, is also called by MakeFrames.
47 class SwNode2LayImpl;
48 class SwFrame;
49 class SwLayoutFrame;
50 class SwNode;
51 class SwNodes;
52 class Point;
54 class SwNode2Layout
56 std::unique_ptr<SwNode2LayImpl> m_pImpl;
58 public:
59 /// Use this ctor for inserting before/after rNd
60 /// @param nIdx is the index of the to-be-inserted Node
61 SwNode2Layout(const SwNode& rNd, sal_uLong nIdx);
62 ~SwNode2Layout();
63 SwFrame* NextFrame();
64 SwLayoutFrame* UpperFrame(SwFrame*& rpFrame, const SwNode& rNode);
66 SwFrame* GetFrame(const Point* pDocPos) const;
69 class SwNode2LayoutSaveUpperFrames
71 std::unique_ptr<SwNode2LayImpl> m_pImpl;
73 public:
74 /// Use this ctor for collecting the UpperFrames
75 SwNode2LayoutSaveUpperFrames(const SwNode& rNd);
76 ~SwNode2LayoutSaveUpperFrames();
78 void RestoreUpperFrames(SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd);
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */