LibreOffice Module svx (master) 1
textchain.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 <editeng/editdata.hxx>
23#include <map>
24
26class SdrTextObj;
27class SdrModel;
28
29namespace rtl
30{
31class OUString;
32}
33
34typedef OUString ChainLinkId;
35
37{
42};
43
45{
46protected:
47 friend class TextChain;
48
50 {
51 aNilChainingEvent = false;
53 aPreChainingSel = ESelection(0, 0, 0, 0);
54 aPostChainingSel = ESelection(0, 0, 0, 0);
55 aIsPartOfLastParaInNextLink = false; // XXX: Should come from file
56 aSwitchingToNextBox = false;
57 }
58
59private:
60 // NOTE: Remember to set default value in constructor when adding field
67};
68
70{
71public:
72 ~TextChain();
73
75
76 // Specific Link Properties
79
81 void SetNilChainingEvent(const SdrTextObj*, bool);
82
84 void SetPreChainingSel(const SdrTextObj*, ESelection const&);
85
87 void SetPostChainingSel(const SdrTextObj*, ESelection const&);
88
89 // return whether a paragraph is split between this box and the next
92
93 // return whether we are currently moving the cursor to the next box (useful to know whether we should prevent SetOutlinerParaObject invocations in SdrTextObj::EndTextEdit)
95 void SetSwitchingToNextBox(const SdrTextObj*, bool);
96
97protected:
98 TextChain();
99
100private:
101 std::map<ChainLinkId, ImpChainLinkProperties*> maLinkPropertiesMap;
102
103 friend class SdrModel;
104};
105
106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ESelection aPreChainingSel
Definition: textchain.hxx:61
ESelection aPostChainingSel
Definition: textchain.hxx:62
CursorChainingEvent aCursorEvent
Definition: textchain.hxx:63
bool GetNilChainingEvent(const SdrTextObj *)
Definition: textchain.cxx:38
ESelection const & GetPostChainingSel(const SdrTextObj *)
Definition: textchain.cxx:60
bool GetSwitchingToNextBox(const SdrTextObj *)
Definition: textchain.cxx:82
CursorChainingEvent const & GetCursorEvent(const SdrTextObj *)
Definition: textchain.cxx:27
void SetSwitchingToNextBox(const SdrTextObj *, bool)
Definition: textchain.cxx:87
void SetCursorEvent(const SdrTextObj *, CursorChainingEvent const &)
Definition: textchain.cxx:32
std::map< ChainLinkId, ImpChainLinkProperties * > maLinkPropertiesMap
Definition: textchain.hxx:101
void SetPreChainingSel(const SdrTextObj *, ESelection const &)
Definition: textchain.cxx:54
ImpChainLinkProperties * GetLinkProperties(const SdrTextObj *)
Definition: textchain.cxx:117
void SetIsPartOfLastParaInNextLink(const SdrTextObj *, bool)
Definition: textchain.cxx:76
void SetNilChainingEvent(const SdrTextObj *, bool)
Definition: textchain.cxx:43
ESelection const & GetPreChainingSel(const SdrTextObj *)
Definition: textchain.cxx:49
void SetPostChainingSel(const SdrTextObj *, ESelection const &)
Definition: textchain.cxx:65
bool GetIsPartOfLastParaInNextLink(const SdrTextObj *)
Definition: textchain.cxx:71
OUString ChainLinkId
Definition: textchain.hxx:34
CursorChainingEvent
Definition: textchain.hxx:37
unsigned char sal_uInt8