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 
29 {
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;
46  SwFillMode const eMode;
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 {
105  NONE, BEFORE, BEHIND
106 };
107 
109 {
110  sal_Int32 nCharOfst;
111  sal_uInt16 nLineOfst;
113 
114  // #i27615#
115  SwSpecialPos() : nCharOfst(0), nLineOfst(0),
116  nExtendRange(SwSPExtendRange::NONE)
117  {}
118 };
119 
120 // CursorTravelling-States (for GetCursorOfst)
122 {
129 };
130 
131 // struct for later extensions
133 {
135  std::unique_ptr<Sw2LinesPos> m_p2Lines;
140  bool m_bStop;
143  bool m_bPosCorr;
147  bool m_bFillRet;
150  bool m_b2Lines;
151  bool m_bNoScroll;
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 ),
170  m_nCursorBidiLevel( 0 ),
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 ),
191  m_eState( MV_SETONLYTEXT ),
192  m_nCursorBidiLevel( 0 ),
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: */
bool m_bFieldInfo
should be fields recognized?
Definition: crstate.hxx:142
SwRect aLine
Position and size of the line.
Definition: crstate.hxx:66
sal_Int32 nCharOfst
Definition: crstate.hxx:110
sal_Int16 eOrient
paragraph alignment
Definition: crstate.hxx:45
bool m_bRealHeight
should the real height be calculated?
Definition: crstate.hxx:141
by left paragraph indention
Definition: crstate.hxx:34
sal_uInt16 nParaCnt
number of paragraphs to insert
Definition: crstate.hxx:40
fill with spaces and tabs
Definition: crstate.hxx:31
stay with the cursor inside text
Definition: crstate.hxx:127
SwRect aCursor
position and size of the ShadowCursor
Definition: crstate.hxx:39
MultiPortionType nMultiType
Multiportion type.
Definition: crstate.hxx:69
default
Definition: crstate.hxx:123
sal_uInt16 nSpaceCnt
number of spaces to insert
Definition: crstate.hxx:42
sal_uInt8 m_nCursorBidiLevel
Definition: crstate.hxx:139
bool m_bRealWidth
Calculation of the width required.
Definition: crstate.hxx:149
bool m_bSetInReadOnly
ReadOnly areas may be entered.
Definition: crstate.hxx:148
bool m_bExactOnly
let GetCursorOfst look for exact matches only, i.e.
Definition: crstate.hxx:145
Cursor Up/Down.
Definition: crstate.hxx:124
SwFillMode const eMode
desired fill-up rule
Definition: crstate.hxx:46
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
at left margin
Definition: crstate.hxx:126
bool m_bFillRet
only used temporary in FillMode
Definition: crstate.hxx:147
NONE
sal_uInt16 nSpaceOnlyCnt
number of spaces to insert ("only spaces, no tabs" mode)
Definition: crstate.hxx:43
int m_nInNumPortionOffset
distance from number portion's start
Definition: crstate.hxx:164
default, fill with tabs
Definition: crstate.hxx:30
SwFillMode
Definition: crstate.hxx:28
sal_uInt16 nTabCnt
number of tabs respectively size of indentation
Definition: crstate.hxx:41
not in repeated headlines
Definition: crstate.hxx:128
bool m_bInFrontOfLabel
cursor in front of label
Definition: crstate.hxx:162
Point m_aRealHeight
contains then the position/height of the cursor
Definition: crstate.hxx:137
bool m_bNoScroll
No scrolling of undersized textframes.
Definition: crstate.hxx:151
bool m_b2Lines
Check 2line portions and fill p2Lines.
Definition: crstate.hxx:150
CursorMoveState
Definition: crstate.hxx:121
std::unique_ptr< Sw2LinesPos > m_p2Lines
for selections inside/around 2line portions
Definition: crstate.hxx:135
sal_uInt16 nLineOfst
Definition: crstate.hxx:111
bool m_bFootnoteNoInfo
recognized footnote numbering
Definition: crstate.hxx:144
SwFillCursorPos * m_pFill
for automatic filling with tabs etc
Definition: crstate.hxx:134
bool m_bInNumPortion
point is in number portion #i23726#
Definition: crstate.hxx:163
SwFillCursorPos(SwFillMode eMd)
Definition: crstate.hxx:47
unsigned char sal_uInt8
SwRect aPortion2
needed for nested multi portions
Definition: crstate.hxx:68
SwSpecialPos * m_pSpecialPos
for positions inside fields
Definition: crstate.hxx:136
CursorMoveState m_eState
Definition: crstate.hxx:138
at right margin
Definition: crstate.hxx:125
SwSPExtendRange
SwSpecialPos.
Definition: crstate.hxx:103
BEFORE
bool m_bPosMatchesBounds
GetCursorOfst should not return the next position if screen position is inside second have of bound r...
Definition: crstate.hxx:152
bool m_bPosCorr
Point had to be corrected.
Definition: crstate.hxx:143
def text(shape, st)
SwSPExtendRange nExtendRange
Definition: crstate.hxx:112
SwCursorMoveState(CursorMoveState eSt=MV_NONE)
Definition: crstate.hxx:166
fill with spaces
Definition: crstate.hxx:32
MultiPortionType
Definition: crstate.hxx:55
SwRect aPortion
Position and size of the multi portion.
Definition: crstate.hxx:67
only align left, center, right
Definition: crstate.hxx:33
SwCursorMoveState(SwFillCursorPos *pInitFill)
Definition: crstate.hxx:188
sal_uInt16 nColumnCnt
number of necessary column breaks
Definition: crstate.hxx:44