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 .
22 #include "textchain.hxx"
27 class NonOverflowingText
;
28 class OverflowingText
;
30 class OutlinerParaObject
;
31 class OFlowChainedText
;
32 class UFlowChainedText
;
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;
54 void impCheckForFlowEvents(SdrOutliner
*, SdrOutliner
*);
56 TextChain
* GetTextChain() const;
58 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner
*);
59 void impMoveChainedTextToNextLink(SdrOutliner
*);
61 virtual void impSetFlowOutlinerParams(SdrOutliner
*, SdrOutliner
*);
64 void impUpdateCursorInfo();
67 std::unique_ptr
<OFlowChainedText
> mpOverflChText
;
68 std::unique_ptr
<UFlowChainedText
> mpUnderflChText
;
70 ESelection maOverflowPosSel
;
71 ESelection maPostChainingSel
;
72 bool mbPossiblyCursorOut
;
75 SdrTextObj
* mpTargetLink
;
76 SdrTextObj
* mpNextLink
;
77 TextChain
* mpTextChain
;
83 // NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
84 class EditingTextChainFlow final
: public TextChainFlow
87 EditingTextChainFlow(SdrTextObj
*);
88 virtual void CheckForFlowEvents(SdrOutliner
*) override
;
90 //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
93 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner
*) override
;
95 virtual void impSetFlowOutlinerParams(SdrOutliner
*, SdrOutliner
*) override
;
97 void impBroadcastCursorInfo() const;
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */