bump product version to 7.6.3.2-android
[LibreOffice.git] / include / svl / hint.hxx
blob5967d834ceeb9c0bc423c051f0b960abce3adb2a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVL_HINT_HXX
20 #define INCLUDED_SVL_HINT_HXX
22 #include <ostream>
23 #include <string>
25 #include <svl/svldllapi.h>
27 /// hint ids, mostly used to avoid dynamic_cast of SfxHint
28 enum class SfxHintId {
29 NONE,
30 Dying,
31 NameChanged,
32 TitleChanged,
33 DataChanged,
34 DocChanged,
35 UpdateDone,
36 Deinitializing,
37 ModeChanged,
38 ColorsChanged,
39 LanguageChanged,
40 RedlineChanged,
41 DocumentRepair,
42 SvxViewChanged,
44 // VCL text hints
45 TextParaInserted,
46 TextParaRemoved,
47 TextParaContentChanged,
48 TextHeightChanged,
49 TextFormatPara,
50 TextFormatted,
51 TextModified,
52 TextProcessNotifications,
53 TextViewScrolled,
54 TextViewSelectionChanged,
55 TextViewCaretChanged,
57 // BASIC hints
58 BasicDataWanted,
59 BasicDataChanged,
60 BasicInfoWanted,
61 BasicStart,
62 BasicStop,
64 // SVX edit source
65 EditSourceParasMoved,
66 EditSourceSelectionChanged,
68 // SC hints
69 ScDataChanged,
70 ScTableOpDirty,
71 ScCalcAll,
72 ScReference,
73 ScDrawLayerNew,
74 ScDbAreasChanged,
75 ScAreaChanged,
76 ScAreasChanged,
77 ScTablesChanged,
78 ScDrawChanged,
79 ScDocNameChanged,
80 ScAreaLinksChanged,
81 ScShowRangeFinder,
82 ScDocSaved,
83 ScForceSetTab,
84 ScNavigatorUpdateAll,
85 ScAnyDataChanged,
86 ScPrintOptions,
87 ScRefModeChanged,
88 ScKillEditView,
89 ScKillEditViewNoPaint,
90 ScHiddenRowsChanged,
91 ScSelectionChanged,
92 ScClearCache,
94 // SC accessibility hints
95 ScAccTableChanged,
96 ScAccCursorChanged,
97 ScAccVisAreaChanged,
98 ScAccEnterEditMode,
99 ScAccLeaveEditMode,
100 ScAccMakeDrawLayer,
101 ScAccWindowResized,
104 // SFX stylesheet
105 StyleSheetCreated, // new
106 StyleSheetModified, // changed
107 StyleSheetChanged, // erased and re-created (replaced)
108 StyleSheetErased, // erased
109 StyleSheetInDestruction, // in the process of being destructed
111 // STARMATH
112 MathFormatChanged,
114 // Sw
115 SwDrawViewsCreated,
116 SwSplitNodeOperation,
117 SwSectionFrameMoveAndDelete,
118 SwNavigatorUpdateTracking,
119 SwNavigatorSelectOutlinesWithSelections,
120 SwPreGraphicArrived,
121 SwGraphicPieceArrived,
122 SwLinkedGraphicStreamArrived,
123 SwLegacyModify,
124 SwCollectTextMarks,
125 SwCollectTextTOXMarksForLayout,
126 SwDrawFrameFormat,
127 SwCheckDrawFrameFormatLayer,
128 SwContactChanged,
129 SwDrawFormatLayoutCopy,
130 SwRestoreFlyAnchor,
131 SwCreatePortion,
132 SwCollectTextObjects,
133 SwGetZOrder,
134 SwGetObjectConnected,
135 SwFindSdrObject,
136 SwWW8AnchorConv,
137 SwField,
138 SwFindFormatForField,
139 SwFindFormatForPostItId,
140 SwCollectPostIts,
141 SwHasHiddenInformationNotes,
142 SwGatherNodeIndex,
143 SwGatherRefFields,
144 SwGatherFields,
145 SwNameChanged, // this can possibly be replaced by the generic NameChanged above
146 SwInsertText,
147 SwDeleteText,
148 SwDeleteChar,
149 SwSectionHidden,
150 SwTitleChanged,
151 SwDescriptionChanged,
152 SwDocPosUpdate,
153 SwDocPosUpdateAtIndex,
154 SwTableHeadingChange,
156 ThisIsAnSdrHint
159 template< typename charT, typename traits >
160 inline std::basic_ostream<charT, traits> & operator <<(
161 std::basic_ostream<charT, traits> & stream, const SfxHintId& id )
163 switch(id)
165 case SfxHintId::NONE: return stream << "NONE";
166 case SfxHintId::Dying: return stream << "Dying";
167 case SfxHintId::NameChanged: return stream << "NameChanged";
168 case SfxHintId::TitleChanged: return stream << "TitleChanged";
169 case SfxHintId::DataChanged: return stream << "DataChanged";
170 case SfxHintId::DocChanged: return stream << "DocChanged";
171 case SfxHintId::UpdateDone: return stream << "UpdateDone";
172 case SfxHintId::Deinitializing: return stream << "Deinitializing";
173 case SfxHintId::ModeChanged: return stream << "ModeChanged";
174 case SfxHintId::ColorsChanged: return stream << "ColorsChanged";
175 case SfxHintId::LanguageChanged: return stream << "LanguageChanged";
176 case SfxHintId::RedlineChanged: return stream << "RedlineChanged";
177 case SfxHintId::DocumentRepair: return stream << "DocumentRepair";
178 case SfxHintId::TextParaInserted: return stream << "TextParaInserted";
179 case SfxHintId::TextParaRemoved: return stream << "TextParaRemoved";
180 case SfxHintId::TextParaContentChanged: return stream << "TextParaContentChanged";
181 case SfxHintId::TextHeightChanged: return stream << "TextHeightChanged";
182 case SfxHintId::TextFormatPara: return stream << "TextFormatPara";
183 case SfxHintId::TextFormatted: return stream << "TextFormatted";
184 case SfxHintId::TextModified: return stream << "TextModified";
185 case SfxHintId::TextProcessNotifications: return stream << "TextProcessNotifications";
186 case SfxHintId::TextViewScrolled: return stream << "TextViewScrolled";
187 case SfxHintId::TextViewSelectionChanged: return stream << "TextViewSelectionChanged";
188 case SfxHintId::TextViewCaretChanged: return stream << "TextViewCaretChanged";
189 case SfxHintId::BasicDataWanted: return stream << "BasicDataWanted";
190 case SfxHintId::BasicDataChanged: return stream << "BasicDataChanged";
191 case SfxHintId::BasicInfoWanted: return stream << "BasicInfoWanted";
192 case SfxHintId::BasicStart: return stream << "BasicStart";
193 case SfxHintId::BasicStop: return stream << "BasicStop";
194 case SfxHintId::EditSourceParasMoved: return stream << "EditSourceParasMoved";
195 case SfxHintId::EditSourceSelectionChanged: return stream << "EditSourceSelectionChanged";
196 case SfxHintId::ScDataChanged: return stream << "ScDataChanged";
197 case SfxHintId::ScTableOpDirty: return stream << "ScTableOpDirty";
198 case SfxHintId::ScCalcAll: return stream << "ScCalcAll";
199 case SfxHintId::ScReference: return stream << "ScReference";
200 case SfxHintId::ScDrawLayerNew: return stream << "ScDrawLayerNew";
201 case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
202 case SfxHintId::ScAreaChanged: return stream << "ScAreaChanged";
203 case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
204 case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
205 case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
206 case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
207 case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
208 case SfxHintId::ScShowRangeFinder: return stream << "ScShowRangeFinder";
209 case SfxHintId::ScDocSaved: return stream << "ScDocSaved";
210 case SfxHintId::ScForceSetTab: return stream << "ScForceSetTab";
211 case SfxHintId::ScNavigatorUpdateAll: return stream << "ScNavigatorUpdateAll";
212 case SfxHintId::ScAnyDataChanged: return stream << "ScAnyDataChanged";
213 case SfxHintId::ScPrintOptions: return stream << "ScPrintOptions";
214 case SfxHintId::ScRefModeChanged: return stream << "ScRefModeChanged";
215 case SfxHintId::ScKillEditView: return stream << "ScKillEditView";
216 case SfxHintId::ScKillEditViewNoPaint: return stream << "ScKillEditViewNoPaint";
217 case SfxHintId::ScHiddenRowsChanged: return stream << "ScHiddenRowsChanged";
218 case SfxHintId::ScSelectionChanged: return stream << "ScSelectionChanged";
219 case SfxHintId::ScClearCache: return stream << "ScClearCache";
220 case SfxHintId::ScAccTableChanged: return stream << "ScAccTableChanged";
221 case SfxHintId::ScAccCursorChanged: return stream << "ScAccCursorChanged";
222 case SfxHintId::ScAccVisAreaChanged: return stream << "ScAccVisAreaChanged";
223 case SfxHintId::ScAccEnterEditMode: return stream << "ScAccEnterEditMode";
224 case SfxHintId::ScAccLeaveEditMode: return stream << "ScAccLeaveEditMode";
225 case SfxHintId::ScAccMakeDrawLayer: return stream << "ScAccMakeDrawLayer";
226 case SfxHintId::ScAccWindowResized: return stream << "ScAccWindowResized";
227 case SfxHintId::StyleSheetCreated: return stream << "StyleSheetCreated";
228 case SfxHintId::StyleSheetModified: return stream << "StyleSheetModified";
229 case SfxHintId::StyleSheetChanged: return stream << "StyleSheetChanged";
230 case SfxHintId::StyleSheetErased: return stream << "StyleSheetErased";
231 case SfxHintId::StyleSheetInDestruction: return stream << "StyleSheetInDestruction";
232 case SfxHintId::MathFormatChanged: return stream << "MathFormatChanged";
233 case SfxHintId::SwDrawViewsCreated: return stream << "SwDrawViewsCreated";
234 case SfxHintId::SwSplitNodeOperation: return stream << "SwSplitNodeOperation";
235 case SfxHintId::SwSectionFrameMoveAndDelete: return stream << "SwSectionFrameMoveAndDelete";
236 case SfxHintId::SwNavigatorUpdateTracking: return stream << "SwNavigatorUpdateTracking";
237 case SfxHintId::SwNavigatorSelectOutlinesWithSelections:
238 return stream << "SwNavigatorSelectOutlinesWithSelections";
239 case SfxHintId::SwCollectTextMarks: return stream << "SwCollectTextMarks";
240 case SfxHintId::SwCollectTextTOXMarksForLayout: return stream << "SwCollectTextTOXMarksForLayout";
241 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
242 default: return stream << "unk(" << std::to_string(int(id)) << ")";
246 class SVL_DLLPUBLIC SfxHint
248 private:
249 SfxHintId mnId;
250 public:
251 SfxHint() : mnId(SfxHintId::NONE) {}
252 explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
253 virtual ~SfxHint() {};
255 SfxHint(SfxHint const &) = default;
256 SfxHint(SfxHint &&) = default;
257 SfxHint & operator =(SfxHint const &) = default;
258 SfxHint & operator =(SfxHint &&) = default;
260 SfxHintId GetId() const { return mnId; }
263 #endif
265 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */