Bump version to 6.4-15
[LibreOffice.git] / include / svl / hint.hxx
blob708986e3163193b766d8b10d7fd71a9e4e5b5374
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,
116 ThisIsAnSdrHint // used to avoid dynamic_cast
119 template< typename charT, typename traits >
120 inline std::basic_ostream<charT, traits> & operator <<(
121 std::basic_ostream<charT, traits> & stream, const SfxHintId& id )
123 switch(id)
125 case SfxHintId::NONE: return stream << "NONE";
126 case SfxHintId::Dying: return stream << "Dying";
127 case SfxHintId::NameChanged: return stream << "NameChanged";
128 case SfxHintId::TitleChanged: return stream << "TitleChanged";
129 case SfxHintId::DataChanged: return stream << "DataChanged";
130 case SfxHintId::DocChanged: return stream << "DocChanged";
131 case SfxHintId::UpdateDone: return stream << "UpdateDone";
132 case SfxHintId::Deinitializing: return stream << "Deinitializing";
133 case SfxHintId::ModeChanged: return stream << "ModeChanged";
134 case SfxHintId::ColorsChanged: return stream << "ColorsChanged";
135 case SfxHintId::LanguageChanged: return stream << "LanguageChanged";
136 case SfxHintId::RedlineChanged: return stream << "RedlineChanged";
137 case SfxHintId::DocumentRepair: return stream << "DocumentRepair";
138 case SfxHintId::TextParaInserted: return stream << "TextParaInserted";
139 case SfxHintId::TextParaRemoved: return stream << "TextParaRemoved";
140 case SfxHintId::TextParaContentChanged: return stream << "TextParaContentChanged";
141 case SfxHintId::TextHeightChanged: return stream << "TextHeightChanged";
142 case SfxHintId::TextFormatPara: return stream << "TextFormatPara";
143 case SfxHintId::TextFormatted: return stream << "TextFormatted";
144 case SfxHintId::TextModified: return stream << "TextModified";
145 case SfxHintId::TextProcessNotifications: return stream << "TextProcessNotifications";
146 case SfxHintId::TextViewScrolled: return stream << "TextViewScrolled";
147 case SfxHintId::TextViewSelectionChanged: return stream << "TextViewSelectionChanged";
148 case SfxHintId::TextViewCaretChanged: return stream << "TextViewCaretChanged";
149 case SfxHintId::BasicDataWanted: return stream << "BasicDataWanted";
150 case SfxHintId::BasicDataChanged: return stream << "BasicDataChanged";
151 case SfxHintId::BasicInfoWanted: return stream << "BasicInfoWanted";
152 case SfxHintId::BasicStart: return stream << "BasicStart";
153 case SfxHintId::BasicStop: return stream << "BasicStop";
154 case SfxHintId::EditSourceParasMoved: return stream << "EditSourceParasMoved";
155 case SfxHintId::EditSourceSelectionChanged: return stream << "EditSourceSelectionChanged";
156 case SfxHintId::ScDataChanged: return stream << "ScDataChanged";
157 case SfxHintId::ScTableOpDirty: return stream << "ScTableOpDirty";
158 case SfxHintId::ScCalcAll: return stream << "ScCalcAll";
159 case SfxHintId::ScReference: return stream << "ScReference";
160 case SfxHintId::ScDrawLayerNew: return stream << "ScDrawLayerNew";
161 case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
162 case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
163 case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
164 case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
165 case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
166 case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
167 case SfxHintId::ScShowRangeFinder: return stream << "ScShowRangeFinder";
168 case SfxHintId::ScDocSaved: return stream << "ScDocSaved";
169 case SfxHintId::ScForceSetTab: return stream << "ScForceSetTab";
170 case SfxHintId::ScNavigatorUpdateAll: return stream << "ScNavigatorUpdateAll";
171 case SfxHintId::ScAnyDataChanged: return stream << "ScAnyDataChanged";
172 case SfxHintId::ScPrintOptions: return stream << "ScPrintOptions";
173 case SfxHintId::ScRefModeChanged: return stream << "ScRefModeChanged";
174 case SfxHintId::ScKillEditView: return stream << "ScKillEditView";
175 case SfxHintId::ScKillEditViewNoPaint: return stream << "ScKillEditViewNoPaint";
176 case SfxHintId::ScHiddenRowsChanged: return stream << "ScHiddenRowsChanged";
177 case SfxHintId::ScSelectionChanged: return stream << "ScSelectionChanged";
178 case SfxHintId::ScClearCache: return stream << "ScClearCache";
179 case SfxHintId::ScAccTableChanged: return stream << "ScAccTableChanged";
180 case SfxHintId::ScAccCursorChanged: return stream << "ScAccCursorChanged";
181 case SfxHintId::ScAccVisAreaChanged: return stream << "ScAccVisAreaChanged";
182 case SfxHintId::ScAccEnterEditMode: return stream << "ScAccEnterEditMode";
183 case SfxHintId::ScAccLeaveEditMode: return stream << "ScAccLeaveEditMode";
184 case SfxHintId::ScAccMakeDrawLayer: return stream << "ScAccMakeDrawLayer";
185 case SfxHintId::ScAccWindowResized: return stream << "ScAccWindowResized";
186 case SfxHintId::StyleSheetCreated: return stream << "StyleSheetCreated";
187 case SfxHintId::StyleSheetModified: return stream << "StyleSheetModified";
188 case SfxHintId::StyleSheetChanged: return stream << "StyleSheetChanged";
189 case SfxHintId::StyleSheetErased: return stream << "StyleSheetErased";
190 case SfxHintId::StyleSheetInDestruction: return stream << "StyleSheetInDestruction";
191 case SfxHintId::MathFormatChanged: return stream << "MathFormatChanged";
192 case SfxHintId::SwDrawViewsCreated: return stream << "SwDrawViewsCreated";
193 case SfxHintId::SwSplitNodeOperation: return stream << "SwSplitNodeOperation";
194 case SfxHintId::SwSectionFrameMoveAndDelete: return stream << "SwSectionFrameMoveAndDelete";
195 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
196 default: return stream << "unk(" << std::to_string(int(id)) << ")";
200 class SVL_DLLPUBLIC SfxHint
202 private:
203 SfxHintId mnId;
204 public:
205 SfxHint() : mnId(SfxHintId::NONE) {}
206 explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
207 virtual ~SfxHint() COVERITY_NOEXCEPT_FALSE;
209 SfxHint(SfxHint const &) = default;
210 SfxHint(SfxHint &&) = default;
211 SfxHint & operator =(SfxHint const &) = default;
212 SfxHint & operator =(SfxHint &&) = default;
214 SfxHintId GetId() const { return mnId; }
217 #endif
219 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */