Bump version to 6.4-15
[LibreOffice.git] / include / svx / textchainflow.hxx
blob2c5f5d8c00a5fcf57e9f4534a1ed84d227474383
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_SVX_TEXTCHAINFLOW_HXX
21 #define INCLUDED_SVX_TEXTCHAINFLOW_HXX
23 #include <svx/textchain.hxx>
24 #include <memory>
26 class SdrTextObj;
27 class SdrOutliner;
28 class NonOverflowingText;
29 class OverflowingText;
30 class TextChain;
31 class OutlinerParaObject;
32 class OFlowChainedText;
33 class UFlowChainedText;
35 class TextChainFlow
37 public:
38 TextChainFlow(SdrTextObj *pChainTarget);
39 virtual ~TextChainFlow();
41 // Check for flow events in Outliner
42 virtual void CheckForFlowEvents(SdrOutliner *);
44 void ExecuteUnderflow(SdrOutliner *);
46 // Uses two outliners: one for the non-overflow text and one for overflowing (might be the same)
47 void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
49 bool IsOverflow() const;
50 bool IsUnderflow() const;
52 SdrTextObj *GetLinkTarget() const;
54 protected:
55 // Cursor related
56 bool mbPossiblyCursorOut;
57 ESelection maOverflowPosSel;
58 ESelection maPostChainingSel;
60 std::unique_ptr<OFlowChainedText> mpOverflChText;
61 std::unique_ptr<UFlowChainedText> mpUnderflChText;
63 void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *);
65 TextChain *GetTextChain() const;
67 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
68 void impMoveChainedTextToNextLink(SdrOutliner *);
70 virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *);
72 private:
73 bool mbOFisUFinduced;
75 void impUpdateCursorInfo();
77 SdrTextObj *mpTargetLink;
78 SdrTextObj *mpNextLink;
80 TextChain *mpTextChain;
82 bool bUnderflow;
83 bool bOverflow;
87 // NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
88 class EditingTextChainFlow : public TextChainFlow
90 public:
91 EditingTextChainFlow(SdrTextObj *);
92 virtual void CheckForFlowEvents(SdrOutliner *) override;
94 //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
96 protected:
97 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) override;
99 virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) override;
101 private:
102 void impBroadcastCursorInfo() const;
105 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */