LibreOffice Module svl (master) 1
hint.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#ifndef INCLUDED_SVL_HINT_HXX
20#define INCLUDED_SVL_HINT_HXX
21
22#include <ostream>
23#include <string>
24
25#include <svl/svldllapi.h>
26
28enum class SfxHintId {
29 NONE,
30 Dying,
43
44// VCL text hints
56
57// BASIC hints
63
64// SVX edit source
67
68// SC hints
93
94// SC accessibility hints
102
103
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
110
111// STARMATH
113
114// Sw
137 SwField,
145 SwNameChanged, // this can possibly be replaced by the generic NameChanged above
155
157};
158
159template< typename charT, typename traits >
160inline std::basic_ostream<charT, traits> & operator <<(
161 std::basic_ostream<charT, traits> & stream, const SfxHintId& id )
162{
163 switch(id)
164 {
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";
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)) << ")";
243 }
244}
245
247{
248private:
250public:
252 explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
253 virtual ~SfxHint() {};
254
255 SfxHint(SfxHint const &) = default;
256 SfxHint(SfxHint &&) = default;
257 SfxHint & operator =(SfxHint const &) = default;
258 SfxHint & operator =(SfxHint &&) = default;
259
260 SfxHintId GetId() const { return mnId; }
261};
262
263#endif
264
265/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxHint(SfxHint &&)=default
virtual ~SfxHint()
Definition: hint.hxx:253
SfxHint(SfxHint const &)=default
SfxHint()
Definition: hint.hxx:251
SfxHintId mnId
Definition: hint.hxx:249
SfxHint(SfxHintId nId)
Definition: hint.hxx:252
SfxHintId GetId() const
Definition: hint.hxx:260
sal_uInt16 mnId
Reference< XOutputStream > stream
SfxHintId
hint ids, mostly used to avoid dynamic_cast of SfxHint
Definition: hint.hxx:28
@ SwCollectTextObjects
@ ScAccCursorChanged
@ TextParaContentChanged
@ ScRefModeChanged
@ SwGatherRefFields
@ MathFormatChanged
@ SwPreGraphicArrived
@ TextHeightChanged
@ SwCollectTextMarks
@ SwSplitNodeOperation
@ TextViewCaretChanged
@ ScDbAreasChanged
@ TextParaInserted
@ SwGetObjectConnected
@ SwFindFormatForPostItId
@ StyleSheetErased
@ TextViewScrolled
@ SwNavigatorSelectOutlinesWithSelections
@ StyleSheetCreated
@ SwNavigatorUpdateTracking
@ SwRestoreFlyAnchor
@ StyleSheetChanged
@ ScKillEditViewNoPaint
@ SwDescriptionChanged
@ SwCollectTextTOXMarksForLayout
@ ScAnyDataChanged
@ SwCheckDrawFrameFormatLayer
@ SwSectionFrameMoveAndDelete
@ SwFindFormatForField
@ ScNavigatorUpdateAll
@ SwHasHiddenInformationNotes
@ ScAccWindowResized
@ SwTableHeadingChange
@ ScSelectionChanged
@ SwDrawFormatLayoutCopy
@ TextViewSelectionChanged
@ ScAccMakeDrawLayer
@ EditSourceParasMoved
@ SwCollectPostIts
@ StyleSheetModified
@ ScAccEnterEditMode
@ BasicDataChanged
@ SwGatherNodeIndex
@ SwGraphicPieceArrived
@ ScHiddenRowsChanged
@ ScAreaLinksChanged
@ SwContactChanged
@ SwLinkedGraphicStreamArrived
@ StyleSheetInDestruction
@ ScAccVisAreaChanged
@ ScAccTableChanged
@ ScDocNameChanged
@ EditSourceSelectionChanged
@ TextProcessNotifications
@ ScShowRangeFinder
@ SwDrawViewsCreated
@ ScAccLeaveEditMode
@ SwDocPosUpdateAtIndex
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const SfxHintId &id)
Definition: hint.hxx:160
NONE
sal_Int16 nId
#define SVL_DLLPUBLIC
Definition: svldllapi.h:28