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