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