LibreOffice Module svx (master) 1
textchainflow.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "textchain.hxx"
23#include <memory>
24
25class SdrTextObj;
26class SdrOutliner;
28class OverflowingText;
29class TextChain;
33
35{
36public:
37 TextChainFlow(SdrTextObj* pChainTarget);
38 virtual ~TextChainFlow();
39
40 // Check for flow events in Outliner
41 virtual void CheckForFlowEvents(SdrOutliner*);
42
44
45 // Uses two outliners: one for the non-overflow text and one for overflowing (might be the same)
47
48 bool IsOverflow() const;
49 bool IsUnderflow() const;
50
52
53protected:
55
56 TextChain* GetTextChain() const;
57
60
62
63private:
65
66protected:
67 std::unique_ptr<OFlowChainedText> mpOverflChText;
68 std::unique_ptr<UFlowChainedText> mpUnderflChText;
69 // Cursor related
73
74private:
81};
82
83// NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
85{
86public:
88 virtual void CheckForFlowEvents(SdrOutliner*) override;
89
90 //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
91
92private:
93 virtual void impLeaveOnlyNonOverflowingText(SdrOutliner*) override;
94
95 virtual void impSetFlowOutlinerParams(SdrOutliner*, SdrOutliner*) override;
96
97 void impBroadcastCursorInfo() const;
98};
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void CheckForFlowEvents(SdrOutliner *) override
virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) override
virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) override
void impBroadcastCursorInfo() const
EditingTextChainFlow(SdrTextObj *)
virtual ~TextChainFlow()
ESelection maOverflowPosSel
SdrTextObj * GetLinkTarget() const
bool IsOverflow() const
std::unique_ptr< OFlowChainedText > mpOverflChText
virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *)
TextChain * mpTextChain
SdrTextObj * mpTargetLink
TextChainFlow(SdrTextObj *pChainTarget)
bool IsUnderflow() const
void ExecuteUnderflow(SdrOutliner *)
virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *)
void ExecuteOverflow(SdrOutliner *, SdrOutliner *)
TextChain * GetTextChain() const
void impUpdateCursorInfo()
virtual void CheckForFlowEvents(SdrOutliner *)
ESelection maPostChainingSel
bool mbPossiblyCursorOut
void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *)
std::unique_ptr< UFlowChainedText > mpUnderflChText
void impMoveChainedTextToNextLink(SdrOutliner *)
SdrTextObj * mpNextLink