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
24 #include <sal/types.h>
25 #include <svl/svldllapi.h>
27 enum class SfxHintId
{
45 TextParaContentChanged
,
50 TextProcessNotifications
,
52 TextViewSelectionChanged
,
64 EditSourceSelectionChanged
,
86 ScKillEditViewNoPaint
,
91 // SC accessibility hints
102 StyleSheetCreated
, // new
103 StyleSheetModified
, // changed
104 StyleSheetChanged
, // erased and re-created (replaced)
105 StyleSheetErased
, // erased
106 StyleSheetInDestruction
, // in the process of being destructed
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
)
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
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
; }
219 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */