1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
25 #include <svl/svldllapi.h>
27 /// hint ids, mostly used to avoid dynamic_cast of SfxHint
28 enum class SfxHintId
{
47 TextParaContentChanged
,
52 TextProcessNotifications
,
54 TextViewSelectionChanged
,
66 EditSourceSelectionChanged
,
89 ScKillEditViewNoPaint
,
94 // SC accessibility hints
105 StyleSheetCreated
, // new
106 StyleSheetModified
, // changed
107 StyleSheetChanged
, // erased and re-created (replaced)
108 StyleSheetErased
, // erased
109 StyleSheetInDestruction
, // in the process of being destructed
116 SwSplitNodeOperation
,
117 SwSectionFrameMoveAndDelete
,
118 SwNavigatorUpdateTracking
,
119 SwNavigatorSelectOutlinesWithSelections
,
121 SwGraphicPieceArrived
,
122 SwLinkedGraphicStreamArrived
,
125 SwCollectTextTOXMarksForLayout
,
127 SwCheckDrawFrameFormatLayer
,
129 SwDrawFormatLayoutCopy
,
132 SwCollectTextObjects
,
134 SwGetObjectConnected
,
138 SwFindFormatForField
,
139 SwFindFormatForPostItId
,
141 SwHasHiddenInformationNotes
,
145 SwNameChanged
, // this can possibly be replaced by the generic NameChanged above
151 SwDescriptionChanged
,
153 SwDocPosUpdateAtIndex
,
154 SwTableHeadingChange
,
159 template< typename charT
, typename traits
>
160 inline std::basic_ostream
<charT
, traits
> & operator <<(
161 std::basic_ostream
<charT
, traits
> & stream
, const SfxHintId
& 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
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
; }
265 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */