LibreOffice Module editeng (master) 1
editstat.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#ifndef INCLUDED_EDITENG_EDITSTAT_HXX
21#define INCLUDED_EDITENG_EDITSTAT_HXX
22
23#include <rtl/ustring.hxx>
25#include <utility>
26
27enum class EEControlBits
28{
29 NONE = 0x00000000,
30 USECHARATTRIBS = 0x00000001, // Use of hard character attributes
31 DOIDLEFORMAT = 0x00000008, // Formatting idle
32 PASTESPECIAL = 0x00000010, // Allow PasteSpecial
33 AUTOINDENTING = 0x00000020, // Automatic indenting
34 UNDOATTRIBS = 0x00000040, // Undo for Attributes...
35 ONECHARPERLINE = 0x00000080, // One character per line
36 NOCOLORS = 0x00000100, // Engine: No Color
37 OUTLINER = 0x00000200, // Special treatment Outliner/Outline mode
38 OUTLINER2 = 0x00000400, // Special treatment Outliner/Page
39 ALLOWBIGOBJS = 0x00000800, // Portion info in text object
40 ONLINESPELLING = 0x00001000, // During the edit Spelling
41 STRETCHING = 0x00002000, // Stretch mode
42 MARKNONURLFIELDS = 0x00004000, // Mark fields other than URL with color
43 MARKURLFIELDS = 0x00008000, // Mark URL fields with color
45 RTFSTYLESHEETS = 0x00020000, // Use Stylesheets when imported
46 AUTOCORRECT = 0x00080000, // AutoCorrect
47 AUTOCOMPLETE = 0x00100000, // AutoComplete
48 AUTOPAGESIZEX = 0x00200000, // Adjust paper width to Text
49 AUTOPAGESIZEY = 0x00400000, // Adjust paper height to Text
51 FORMAT100 = 0x01000000, // Always format to 100%
52 ULSPACESUMMATION = 0x02000000, // MS Compat: sum SA and SB, not maximum value
53 SINGLELINE = 0x04000000, // One line for all text
54};
55namespace o3tl
56{
57 template<> struct typed_flags<EEControlBits> : is_typed_flags<EEControlBits, 0x07ffffff> {};
58}
59
60enum class EVControlBits
61{
62 AUTOSCROLL = 0x0001, // Auto scrolling horizontally
63 ENABLEPASTE = 0x0004, // Enable Paste
64 SINGLELINEPASTE = 0x0008, // View: Paste in input line ...
65 OVERWRITE = 0x0010, // Overwrite mode
66 INVONEMORE = 0x0020, // Invalidate one pixel more
67 AUTOSIZEX = 0x0040, // Automatically adapt to text width
68 AUTOSIZEY = 0x0080, // Automatically adapt to Text width
70};
71namespace o3tl
72{
73 template<> struct typed_flags<EVControlBits> : is_typed_flags<EVControlBits, 0xfd> {};
74}
75
77{
78 NONE = 0x0000,
79 HSCROLL = 0x0001,
80 VSCROLL = 0x0002,
81 CURSOROUT = 0x0004,
82 TEXTWIDTHCHANGED = 0x0010,
83 TextHeightChanged = 0x0020,
84 WRONGWORDCHANGED = 0x0040
85};
86namespace o3tl
87{
88 template<> struct typed_flags<EditStatusFlags> : is_typed_flags<EditStatusFlags, 0x77> {};
89}
90
91inline void SetFlags( EVControlBits& rBits, EVControlBits nMask, bool bOn )
92{
93 if ( bOn )
94 rBits |= nMask;
95 else
96 rBits &= ~nMask;
97}
98
100{
101protected:
104
105public:
107
109
112
114};
115
117{
118 IGNOREWORD = 0x0001,
119 STARTSPELLDLG = 0x0002,
120 ADDTODICTIONARY = 0x0003,
121 WORDLANGUAGE = 0x0004,
122 PARALANGUAGE = 0x0005,
123 AUTOCORRECT_OPTIONS = 0x0006,
124};
125
127{
129 OUString aWord;
130
132 : aWord(std::move( _aWord ))
133 {
134 nCommand = nCMD;
135 }
136
138 {
139 nCommand = nCMD;
140 }
141};
142
143#endif // INCLUDED_EDITENG_EDITSTAT_HXX
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EditStatusFlags GetStatusWord() const
Definition: editstat.hxx:110
EditStatusFlags & GetStatusWord()
Definition: editstat.hxx:111
void Clear()
Definition: editstat.hxx:108
EEControlBits & GetControlWord()
Definition: editstat.hxx:113
EditStatusFlags nStatusBits
Definition: editstat.hxx:102
EEControlBits nControlBits
Definition: editstat.hxx:103
EEControlBits
Definition: editstat.hxx:28
SpellCallbackCommand
Definition: editstat.hxx:117
void SetFlags(EVControlBits &rBits, EVControlBits nMask, bool bOn)
Definition: editstat.hxx:91
EditStatusFlags
Definition: editstat.hxx:77
EVControlBits
Definition: editstat.hxx:61
@ TextHeightChanged
OVERWRITE
NONE
SpellCallbackInfo(SpellCallbackCommand nCMD, OUString _aWord)
Definition: editstat.hxx:131
SpellCallbackInfo(SpellCallbackCommand nCMD)
Definition: editstat.hxx:137
SpellCallbackCommand nCommand
Definition: editstat.hxx:128