1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
28 class NonOverflowingText
;
29 class OverflowingText
;
31 class OutlinerParaObject
;
32 class OFlowChainedText
;
33 class UFlowChainedText
;
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;
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
*);
75 void impUpdateCursorInfo();
77 SdrTextObj
*mpTargetLink
;
78 SdrTextObj
*mpNextLink
;
80 TextChain
*mpTextChain
;
87 // NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
88 class EditingTextChainFlow
: public TextChainFlow
91 EditingTextChainFlow(SdrTextObj
*);
92 virtual void CheckForFlowEvents(SdrOutliner
*) override
;
94 //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
97 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner
*) override
;
99 virtual void impSetFlowOutlinerParams(SdrOutliner
*, SdrOutliner
*) override
;
102 void impBroadcastCursorInfo() const;
105 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */