LibreOffice Module sw (master) 1
crstate.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#ifndef INCLUDED_SW_INC_CRSTATE_HXX
20#define INCLUDED_SW_INC_CRSTATE_HXX
21
22#include <com/sun/star/text/HoriOrientation.hpp>
23#include <tools/gen.hxx>
24#include "swrect.hxx"
25
26#include <memory>
27
28enum class SwFillMode
29{
30 Tab,
31 TabSpace,
32 Space,
33 Margin,
34 Indent
35};
36
38{
40 sal_uInt16 nParaCnt;
41 sal_uInt16 nTabCnt;
42 sal_uInt16 nSpaceCnt;
43 sal_uInt16 nSpaceOnlyCnt;
44 sal_uInt16 nColumnCnt;
45 sal_Int16 eOrient;
48 nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nSpaceOnlyCnt(0), nColumnCnt( 0 ),
49 eOrient( css::text::HoriOrientation::NONE ), eMode( eMd )
50 {}
51};
52
53// Multiportion types: two lines, bidirectional, 270 degrees rotation,
54// ruby portion and 90 degrees rotation
56{
57 TWOLINE = 0,
58 BIDI = 1,
59 ROT_270 = 3,
60 RUBY = 4,
61 ROT_90 = 7,
62};
63
65{
70};
71
104{
106};
107
109{
110 sal_Int32 nCharOfst;
111 sal_Int32 nLineOfst;
113
114 // #i27615#
117 {}
118};
119
120// CursorTravelling-States (for GetModelPositionForViewPoint)
122{
123 NONE,
124 UpDown,
126 LeftMargin,
128 TableSel
129};
130
131// struct for later extensions
133{
135 std::unique_ptr<Sw2LinesPos> m_p2Lines;
156 bool m_bContentCheck; // #i43742# Cursor position over content?
157
158 // #i27615#
165
167 m_pFill( nullptr ),
168 m_pSpecialPos( nullptr ),
169 m_eState( eSt ),
171 m_bStop( false ),
172 m_bRealHeight( false ),
173 m_bFieldInfo( false ),
174 m_bPosCorr( false ),
175 m_bFootnoteNoInfo( false ),
176 m_bExactOnly( false ),
177 m_bFillRet( false ),
178 m_bSetInReadOnly( false ),
179 m_bRealWidth( false ),
180 m_b2Lines( false ),
181 m_bNoScroll( false ),
182 m_bPosMatchesBounds( false ),
183 m_bContentCheck( false ), // #i43742#
184 m_bInFrontOfLabel( false ), // #i27615#
185 m_bInNumPortion(false), // #i26726#
186 m_nInNumPortionOffset(0) // #i26726#
187 {}
189 m_pFill( pInitFill ),
190 m_pSpecialPos( nullptr ),
193 m_bStop( false ),
194 m_bRealHeight( false ),
195 m_bFieldInfo( false ),
196 m_bPosCorr( false ),
197 m_bFootnoteNoInfo( false ),
198 m_bExactOnly( false ),
199 m_bFillRet( false ),
200 m_bSetInReadOnly( false ),
201 m_bRealWidth( false ),
202 m_b2Lines( false ),
203 m_bNoScroll( false ),
204 m_bPosMatchesBounds( false ),
205 m_bContentCheck( false ), // #i43742#
206 m_bInFrontOfLabel( false ), // #i27615#
207 m_bInNumPortion(false), // #i23726#
208 m_nInNumPortionOffset(0) // #i23726#
209 {}
210};
211
212#endif
213
214/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SwFillMode
Definition: crstate.hxx:29
@ TabSpace
fill with spaces and tabs
SwSPExtendRange
SwSpecialPos.
Definition: crstate.hxx:104
CursorMoveState
Definition: crstate.hxx:122
@ SetOnlyText
stay with the cursor inside text
@ RightMargin
at right margin
@ LeftMargin
at left margin
@ TableSel
not in repeated headlines
MultiPortionType
Definition: crstate.hxx:56
def text(shape, orig_st)
NONE
SwRect aPortion
Position and size of the multi portion.
Definition: crstate.hxx:67
SwRect aLine
Position and size of the line.
Definition: crstate.hxx:66
SwRect aPortion2
needed for nested multi portions
Definition: crstate.hxx:68
MultiPortionType nMultiType
Multiportion type.
Definition: crstate.hxx:69
SwFillCursorPos * m_pFill
for automatic filling with tabs etc
Definition: crstate.hxx:134
bool m_bPosCorr
Point had to be corrected.
Definition: crstate.hxx:143
bool m_bInNumPortion
point is in number portion #i23726#
Definition: crstate.hxx:163
bool m_bFootnoteNoInfo
recognized footnote numbering
Definition: crstate.hxx:144
int m_nInNumPortionOffset
distance from number portion's start
Definition: crstate.hxx:164
bool m_b2Lines
Check 2line portions and fill p2Lines.
Definition: crstate.hxx:150
SwCursorMoveState(SwFillCursorPos *pInitFill)
Definition: crstate.hxx:188
sal_uInt8 m_nCursorBidiLevel
Definition: crstate.hxx:139
bool m_bNoScroll
No scrolling of undersized textframes.
Definition: crstate.hxx:151
CursorMoveState m_eState
Definition: crstate.hxx:138
bool m_bRealHeight
should the real height be calculated?
Definition: crstate.hxx:141
SwCursorMoveState(CursorMoveState eSt=CursorMoveState::NONE)
Definition: crstate.hxx:166
std::unique_ptr< Sw2LinesPos > m_p2Lines
for selections inside/around 2line portions
Definition: crstate.hxx:135
SwSpecialPos * m_pSpecialPos
for positions inside fields
Definition: crstate.hxx:136
bool m_bRealWidth
Calculation of the width required.
Definition: crstate.hxx:149
bool m_bFieldInfo
should be fields recognized?
Definition: crstate.hxx:142
bool m_bInFrontOfLabel
cursor in front of label
Definition: crstate.hxx:162
bool m_bFillRet
only used temporary in FillMode
Definition: crstate.hxx:147
Point m_aRealHeight
contains then the position/height of the cursor
Definition: crstate.hxx:137
bool m_bPosMatchesBounds
GetModelPositionForViewPoint should not return the next position if screen position is inside second ...
Definition: crstate.hxx:152
bool m_bExactOnly
let GetModelPositionForViewPoint look for exact matches only, i.e.
Definition: crstate.hxx:145
bool m_bSetInReadOnly
ReadOnly areas may be entered.
Definition: crstate.hxx:148
sal_uInt16 nColumnCnt
number of necessary column breaks
Definition: crstate.hxx:44
SwFillMode eMode
desired fill-up rule
Definition: crstate.hxx:46
sal_Int16 eOrient
paragraph alignment
Definition: crstate.hxx:45
SwFillCursorPos(SwFillMode eMd)
Definition: crstate.hxx:47
sal_uInt16 nSpaceOnlyCnt
number of spaces to insert ("only spaces, no tabs" mode)
Definition: crstate.hxx:43
SwRect aCursor
position and size of the ShadowCursor
Definition: crstate.hxx:39
sal_uInt16 nSpaceCnt
number of spaces to insert
Definition: crstate.hxx:42
sal_uInt16 nTabCnt
number of tabs respectively size of indentation
Definition: crstate.hxx:41
sal_uInt16 nParaCnt
number of paragraphs to insert
Definition: crstate.hxx:40
SwSPExtendRange nExtendRange
Definition: crstate.hxx:112
sal_Int32 nLineOfst
Definition: crstate.hxx:111
sal_Int32 nCharOfst
Definition: crstate.hxx:110
unsigned char sal_uInt8