Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / textchainflow.hxx
blobd52e26a86e3d29f26980dad5ffda7b8885221ac4
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>
25 class SdrTextObj;
26 class SdrOutliner;
27 class NonOverflowingText;
28 class OverflowingText;
29 class TextChain;
30 class OutlinerParaObject;
31 class OFlowChainedText;
32 class UFlowChainedText;
34 class TextChainFlow
36 public:
37 TextChainFlow(SdrTextObj *pChainTarget);
38 virtual ~TextChainFlow();
40 // Check for flow events in Outliner
41 virtual void CheckForFlowEvents(SdrOutliner *);
43 void ExecuteUnderflow(SdrOutliner *);
45 // Uses two outliners: one for the non-overflow text and one for overflowing (might be the same)
46 void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
48 bool IsOverflow() const;
49 bool IsUnderflow() const;
51 SdrTextObj *GetLinkTarget() const;
53 protected:
54 // Cursor related
55 bool mbPossiblyCursorOut;
56 ESelection maOverflowPosSel;
57 ESelection maPostChainingSel;
59 OFlowChainedText *mpOverflChText;
60 UFlowChainedText *mpUnderflChText;
62 void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *);
64 TextChain *GetTextChain() const;
66 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
67 void impMoveChainedTextToNextLink(SdrOutliner *);
69 virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *);
71 private:
72 bool mbOFisUFinduced;
74 void impUpdateCursorInfo();
76 SdrTextObj *mpTargetLink;
77 SdrTextObj *mpNextLink;
79 TextChain *mpTextChain;
81 bool bUnderflow;
82 bool bOverflow;
86 // NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
87 class EditingTextChainFlow : public TextChainFlow
89 public:
90 EditingTextChainFlow(SdrTextObj *);
91 virtual void CheckForFlowEvents(SdrOutliner *) override;
93 //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
95 protected:
96 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) override;
98 virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) override;
100 private:
101 void impBroadcastCursorInfo() const;
104 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */