nss: upgrade to release 3.73
[LibreOffice.git] / include / svl / hint.hxx
blobadff3fa6239dda5e1379706e370d0df7cf9cbf4d
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>
24 #include <sal/types.h>
25 #include <svl/svldllapi.h>
27 enum class SfxHintId {
28 NONE,
29 Dying,
30 NameChanged,
31 TitleChanged,
32 DataChanged,
33 DocChanged,
34 UpdateDone,
35 Deinitializing,
36 ModeChanged,
37 ColorsChanged,
38 LanguageChanged,
39 RedlineChanged,
40 DocumentRepair,
42 // VCL text hints
43 TextParaInserted,
44 TextParaRemoved,
45 TextParaContentChanged,
46 TextHeightChanged,
47 TextFormatPara,
48 TextFormatted,
49 TextModified,
50 TextProcessNotifications,
51 TextViewScrolled,
52 TextViewSelectionChanged,
53 TextViewCaretChanged,
55 // BASIC hints
56 BasicDataWanted,
57 BasicDataChanged,
58 BasicInfoWanted,
59 BasicStart,
60 BasicStop,
62 // SVX edit source
63 EditSourceParasMoved,
64 EditSourceSelectionChanged,
66 // SC hints
67 ScDataChanged,
68 ScTableOpDirty,
69 ScCalcAll,
70 ScReference,
71 ScDrawLayerNew,
72 ScDbAreasChanged,
73 ScAreasChanged,
74 ScTablesChanged,
75 ScDrawChanged,
76 ScDocNameChanged,
77 ScAreaLinksChanged,
78 ScShowRangeFinder,
79 ScDocSaved,
80 ScForceSetTab,
81 ScNavigatorUpdateAll,
82 ScAnyDataChanged,
83 ScPrintOptions,
84 ScRefModeChanged,
85 ScKillEditView,
86 ScKillEditViewNoPaint,
87 ScHiddenRowsChanged,
88 ScSelectionChanged,
89 ScClearCache,
91 // SC accessibility hints
92 ScAccTableChanged,
93 ScAccCursorChanged,
94 ScAccVisAreaChanged,
95 ScAccEnterEditMode,
96 ScAccLeaveEditMode,
97 ScAccMakeDrawLayer,
98 ScAccWindowResized,
101 // SFX stylesheet
102 StyleSheetCreated, // new
103 StyleSheetModified, // changed
104 StyleSheetChanged, // erased and re-created (replaced)
105 StyleSheetErased, // erased
106 StyleSheetInDestruction, // in the process of being destructed
108 // STARMATH
109 MathFormatChanged,
111 // Sw
112 SwDrawViewsCreated,
113 SwSplitNodeOperation,
114 SwSectionFrameMoveAndDelete,
115 SwNavigatorUpdateTracking,
116 SwNavigatorSelectOutlinesWithSelections,
118 ThisIsAnSdrHint // used to avoid dynamic_cast
121 template< typename charT, typename traits >
122 inline std::basic_ostream<charT, traits> & operator <<(
123 std::basic_ostream<charT, traits> & stream, const SfxHintId& id )
125 switch(id)
127 case SfxHintId::NONE: return stream << "NONE";
128 case SfxHintId::Dying: return stream << "Dying";
129 case SfxHintId::NameChanged: return stream << "NameChanged";
130 case SfxHintId::TitleChanged: return stream << "TitleChanged";
131 case SfxHintId::DataChanged: return stream << "DataChanged";
132 case SfxHintId::DocChanged: return stream << "DocChanged";
133 case SfxHintId::UpdateDone: return stream << "UpdateDone";
134 case SfxHintId::Deinitializing: return stream << "Deinitializing";
135 case SfxHintId::ModeChanged: return stream << "ModeChanged";
136 case SfxHintId::ColorsChanged: return stream << "ColorsChanged";
137 case SfxHintId::LanguageChanged: return stream << "LanguageChanged";
138 case SfxHintId::RedlineChanged: return stream << "RedlineChanged";
139 case SfxHintId::DocumentRepair: return stream << "DocumentRepair";
140 case SfxHintId::TextParaInserted: return stream << "TextParaInserted";
141 case SfxHintId::TextParaRemoved: return stream << "TextParaRemoved";
142 case SfxHintId::TextParaContentChanged: return stream << "TextParaContentChanged";
143 case SfxHintId::TextHeightChanged: return stream << "TextHeightChanged";
144 case SfxHintId::TextFormatPara: return stream << "TextFormatPara";
145 case SfxHintId::TextFormatted: return stream << "TextFormatted";
146 case SfxHintId::TextModified: return stream << "TextModified";
147 case SfxHintId::TextProcessNotifications: return stream << "TextProcessNotifications";
148 case SfxHintId::TextViewScrolled: return stream << "TextViewScrolled";
149 case SfxHintId::TextViewSelectionChanged: return stream << "TextViewSelectionChanged";
150 case SfxHintId::TextViewCaretChanged: return stream << "TextViewCaretChanged";
151 case SfxHintId::BasicDataWanted: return stream << "BasicDataWanted";
152 case SfxHintId::BasicDataChanged: return stream << "BasicDataChanged";
153 case SfxHintId::BasicInfoWanted: return stream << "BasicInfoWanted";
154 case SfxHintId::BasicStart: return stream << "BasicStart";
155 case SfxHintId::BasicStop: return stream << "BasicStop";
156 case SfxHintId::EditSourceParasMoved: return stream << "EditSourceParasMoved";
157 case SfxHintId::EditSourceSelectionChanged: return stream << "EditSourceSelectionChanged";
158 case SfxHintId::ScDataChanged: return stream << "ScDataChanged";
159 case SfxHintId::ScTableOpDirty: return stream << "ScTableOpDirty";
160 case SfxHintId::ScCalcAll: return stream << "ScCalcAll";
161 case SfxHintId::ScReference: return stream << "ScReference";
162 case SfxHintId::ScDrawLayerNew: return stream << "ScDrawLayerNew";
163 case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
164 case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
165 case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
166 case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
167 case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
168 case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
169 case SfxHintId::ScShowRangeFinder: return stream << "ScShowRangeFinder";
170 case SfxHintId::ScDocSaved: return stream << "ScDocSaved";
171 case SfxHintId::ScForceSetTab: return stream << "ScForceSetTab";
172 case SfxHintId::ScNavigatorUpdateAll: return stream << "ScNavigatorUpdateAll";
173 case SfxHintId::ScAnyDataChanged: return stream << "ScAnyDataChanged";
174 case SfxHintId::ScPrintOptions: return stream << "ScPrintOptions";
175 case SfxHintId::ScRefModeChanged: return stream << "ScRefModeChanged";
176 case SfxHintId::ScKillEditView: return stream << "ScKillEditView";
177 case SfxHintId::ScKillEditViewNoPaint: return stream << "ScKillEditViewNoPaint";
178 case SfxHintId::ScHiddenRowsChanged: return stream << "ScHiddenRowsChanged";
179 case SfxHintId::ScSelectionChanged: return stream << "ScSelectionChanged";
180 case SfxHintId::ScClearCache: return stream << "ScClearCache";
181 case SfxHintId::ScAccTableChanged: return stream << "ScAccTableChanged";
182 case SfxHintId::ScAccCursorChanged: return stream << "ScAccCursorChanged";
183 case SfxHintId::ScAccVisAreaChanged: return stream << "ScAccVisAreaChanged";
184 case SfxHintId::ScAccEnterEditMode: return stream << "ScAccEnterEditMode";
185 case SfxHintId::ScAccLeaveEditMode: return stream << "ScAccLeaveEditMode";
186 case SfxHintId::ScAccMakeDrawLayer: return stream << "ScAccMakeDrawLayer";
187 case SfxHintId::ScAccWindowResized: return stream << "ScAccWindowResized";
188 case SfxHintId::StyleSheetCreated: return stream << "StyleSheetCreated";
189 case SfxHintId::StyleSheetModified: return stream << "StyleSheetModified";
190 case SfxHintId::StyleSheetChanged: return stream << "StyleSheetChanged";
191 case SfxHintId::StyleSheetErased: return stream << "StyleSheetErased";
192 case SfxHintId::StyleSheetInDestruction: return stream << "StyleSheetInDestruction";
193 case SfxHintId::MathFormatChanged: return stream << "MathFormatChanged";
194 case SfxHintId::SwDrawViewsCreated: return stream << "SwDrawViewsCreated";
195 case SfxHintId::SwSplitNodeOperation: return stream << "SwSplitNodeOperation";
196 case SfxHintId::SwSectionFrameMoveAndDelete: return stream << "SwSectionFrameMoveAndDelete";
197 case SfxHintId::SwNavigatorUpdateTracking: return stream << "SwNavigatorUpdateTracking";
198 case SfxHintId::SwNavigatorSelectOutlinesWithSelections:
199 return stream << "SwNavigatorSelectOutlinesWithSelections";
200 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
201 default: return stream << "unk(" << std::to_string(int(id)) << ")";
205 class SVL_DLLPUBLIC SfxHint
207 private:
208 SfxHintId mnId;
209 public:
210 SfxHint() : mnId(SfxHintId::NONE) {}
211 explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
212 virtual ~SfxHint() COVERITY_NOEXCEPT_FALSE;
214 SfxHint(SfxHint const &) = default;
215 SfxHint(SfxHint &&) = default;
216 SfxHint & operator =(SfxHint const &) = default;
217 SfxHint & operator =(SfxHint &&) = default;
219 SfxHintId GetId() const { return mnId; }
222 #endif
224 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */