[Libreoffice-commits] core.git: include/sfx2 include/svl
Tor Lillqvist
tml at collabora.com
Tue Mar 20 17:10:22 UTC 2018
include/sfx2/event.hxx | 80 ++++++++++++++++++++++++++++++++++++++++++++++
include/svl/hint.hxx | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 164 insertions(+)
New commits:
commit 406edb6407532ed725165c2d7e1d360680050377
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 20 13:53:25 2018 +0200
Add debug output operator<< for SfxHintId, SvMacroItemId, and SfxEventHintId
Change-Id: I36fd3efc630d99643fb7db3b89f777d4054ec87d
Reviewed-on: https://gerrit.libreoffice.org/51651
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index ac0c2689e1f7..78d8736bc522 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -20,6 +20,9 @@
#define INCLUDED_SFX2_EVENT_HXX
#include <sal/config.h>
+
+#include <ostream>
+
#include <sfx2/dllapi.h>
#include <svl/hint.hxx>
#include <unotools/eventcfg.hxx>
@@ -70,6 +73,42 @@ enum class SvMacroItemId : sal_uInt16 {
SwFrmMove = 20007,
};
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const SvMacroItemId& id )
+{
+ switch(id)
+ {
+ case SvMacroItemId::NONE: return stream << "NONE";
+ case SvMacroItemId::HtmlOnSubmitForm: return stream << "HtmlOnSubmitForm";
+ case SvMacroItemId::HtmlOnResetForm: return stream << "HtmlOnResetForm";
+ case SvMacroItemId::HtmlOnGetFocus: return stream << "HtmlOnGetFocus";
+ case SvMacroItemId::HtmlOnLoseFocus: return stream << "HtmlOnLoseFocus";
+ case SvMacroItemId::HtmlOnClick: return stream << "HtmlOnClick";
+ case SvMacroItemId::HtmlOnClickItem: return stream << "HtmlOnClickItem";
+ case SvMacroItemId::HtmlOnChange: return stream << "HtmlOnChange";
+ case SvMacroItemId::HtmlOnSelect: return stream << "HtmlOnSelect";
+ case SvMacroItemId::OpenDoc: return stream << "OpenDoc";
+ case SvMacroItemId::PrepareCloseDoc: return stream << "PrepareCloseDoc";
+ case SvMacroItemId::ActivateDoc: return stream << "ActivateDoc";
+ case SvMacroItemId::DeactivateDoc: return stream << "DeactivateDoc";
+ case SvMacroItemId::OnMouseOver: return stream << "OnMouseOver";
+ case SvMacroItemId::OnClick: return stream << "OnClick";
+ case SvMacroItemId::OnMouseOut: return stream << "OnMouseOut";
+ case SvMacroItemId::OnImageLoadDone: return stream << "OnImageLoadDone";
+ case SvMacroItemId::OnImageLoadCancel: return stream << "OnImageLoadCancel";
+ case SvMacroItemId::OnImageLoadError: return stream << "OnImageLoadError";
+ case SvMacroItemId::SwObjectSelect: return stream << "SwObjectSelect";
+ case SvMacroItemId::SwStartInsGlossary: return stream << "SwStartInsGlossary";
+ case SvMacroItemId::SwEndInsGlossary: return stream << "SwEndInsGlossary";
+ case SvMacroItemId::SwFrmKeyInputAlpha: return stream << "SwFrmKeyInputAlpha";
+ case SvMacroItemId::SwFrmKeyInputNoAlpha: return stream << "SwFrmKeyInputNoAlpha";
+ case SvMacroItemId::SwFrmResize: return stream << "SwFrmResize";
+ case SvMacroItemId::SwFrmMove: return stream << "SwFrmMove";
+ default: return stream << "unk(" << std::to_string(int(id)) << ")";
+ }
+}
+
class SfxObjectShell;
enum class SfxEventHintId {
@@ -107,6 +146,47 @@ enum class SfxEventHintId {
SwEventLayoutFinished,
};
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const SfxEventHintId& id )
+{
+ switch(id)
+ {
+ case SfxEventHintId::NONE: return stream << "NONE";
+ case SfxEventHintId::ActivateDoc: return stream << "ActivateDoc";
+ case SfxEventHintId::CloseDoc: return stream << "CloseDoc";
+ case SfxEventHintId::CloseView: return stream << "CloseView";
+ case SfxEventHintId::CreateDoc: return stream << "CreateDoc";
+ case SfxEventHintId::DeactivateDoc: return stream << "DeactivateDoc";
+ case SfxEventHintId::DocCreated: return stream << "DocCreated";
+ case SfxEventHintId::LoadFinished: return stream << "LoadFinished";
+ case SfxEventHintId::ModifyChanged: return stream << "ModifyChanged";
+ case SfxEventHintId::OpenDoc: return stream << "OpenDoc";
+ case SfxEventHintId::PrepareCloseDoc: return stream << "PrepareCloseDoc";
+ case SfxEventHintId::PrepareCloseView: return stream << "PrepareCloseView";
+ case SfxEventHintId::PrintDoc: return stream << "PrintDoc";
+ case SfxEventHintId::SaveAsDoc: return stream << "SaveAsDoc";
+ case SfxEventHintId::SaveAsDocDone: return stream << "SaveAsDocDone";
+ case SfxEventHintId::SaveAsDocFailed: return stream << "SaveAsDocFailed";
+ case SfxEventHintId::SaveDoc: return stream << "SaveDoc";
+ case SfxEventHintId::SaveDocDone: return stream << "SaveDocDone";
+ case SfxEventHintId::SaveDocFailed: return stream << "SaveDocFailed";
+ case SfxEventHintId::SaveToDoc: return stream << "SaveToDoc";
+ case SfxEventHintId::SaveToDocDone: return stream << "SaveToDocDone";
+ case SfxEventHintId::SaveToDocFailed: return stream << "SaveToDocFailed";
+ case SfxEventHintId::StorageChanged: return stream << "StorageChanged";
+ case SfxEventHintId::ViewCreated: return stream << "ViewCreated";
+ case SfxEventHintId::VisAreaChanged: return stream << "VisAreaChanged";
+ case SfxEventHintId::SwMailMerge: return stream << "SwMailMerge";
+ case SfxEventHintId::SwMailMergeEnd: return stream << "SwMailMergeEnd";
+ case SfxEventHintId::SwEventPageCount: return stream << "SwEventPageCount";
+ case SfxEventHintId::SwEventFieldMerge: return stream << "SwEventFieldMerge";
+ case SfxEventHintId::SwEventFieldMergeFinished: return stream << "SwEventFieldMergeFinished";
+ case SfxEventHintId::SwEventLayoutFinished: return stream << "SwEventLayoutFinished";
+ default: return stream << "unk(" << std::to_string(int(id)) << ")";
+ }
+}
+
class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
{
SfxObjectShell* pObjShell;
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index c675ddb31615..b229d7f9b7cf 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -19,6 +19,8 @@
#ifndef INCLUDED_SVL_HINT_HXX
#define INCLUDED_SVL_HINT_HXX
+#include <ostream>
+
#include <sal/types.h>
#include <svl/svldllapi.h>
@@ -114,6 +116,88 @@ enum class SfxHintId {
SwSplitNodeOperation,
};
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const SfxHintId& id )
+{
+ switch(id)
+ {
+ case SfxHintId::NONE: return stream << "NONE";
+ case SfxHintId::Dying: return stream << "Dying";
+ case SfxHintId::NameChanged: return stream << "NameChanged";
+ case SfxHintId::TitleChanged: return stream << "TitleChanged";
+ case SfxHintId::DataChanged: return stream << "DataChanged";
+ case SfxHintId::DocChanged: return stream << "DocChanged";
+ case SfxHintId::UpdateDone: return stream << "UpdateDone";
+ case SfxHintId::Deinitializing: return stream << "Deinitializing";
+ case SfxHintId::ModeChanged: return stream << "ModeChanged";
+ case SfxHintId::ColorsChanged: return stream << "ColorsChanged";
+ case SfxHintId::LanguageChanged: return stream << "LanguageChanged";
+ case SfxHintId::RedlineChanged: return stream << "RedlineChanged";
+ case SfxHintId::DocumentRepair: return stream << "DocumentRepair";
+ case SfxHintId::TextParaInserted: return stream << "TextParaInserted";
+ case SfxHintId::TextParaRemoved: return stream << "TextParaRemoved";
+ case SfxHintId::TextParaContentChanged: return stream << "TextParaContentChanged";
+ case SfxHintId::TextHeightChanged: return stream << "TextHeightChanged";
+ case SfxHintId::TextFormatPara: return stream << "TextFormatPara";
+ case SfxHintId::TextFormatted: return stream << "TextFormatted";
+ case SfxHintId::TextModified: return stream << "TextModified";
+ case SfxHintId::TextBlockNotificationStart: return stream << "TextBlockNotificationStart";
+ case SfxHintId::TextBlockNotificationEnd: return stream << "TextBlockNotificationEnd";
+ case SfxHintId::TextInputStart: return stream << "TextInputStart";
+ case SfxHintId::TextInputEnd: return stream << "TextInputEnd";
+ case SfxHintId::TextViewScrolled: return stream << "TextViewScrolled";
+ case SfxHintId::TextViewSelectionChanged: return stream << "TextViewSelectionChanged";
+ case SfxHintId::TextViewCaretChanged: return stream << "TextViewCaretChanged";
+ case SfxHintId::BasicDataWanted: return stream << "BasicDataWanted";
+ case SfxHintId::BasicDataChanged: return stream << "BasicDataChanged";
+ case SfxHintId::BasicInfoWanted: return stream << "BasicInfoWanted";
+ case SfxHintId::BasicStart: return stream << "BasicStart";
+ case SfxHintId::BasicStop: return stream << "BasicStop";
+ case SfxHintId::EditSourceParasMoved: return stream << "EditSourceParasMoved";
+ case SfxHintId::EditSourceSelectionChanged: return stream << "EditSourceSelectionChanged";
+ case SfxHintId::ScDataChanged: return stream << "ScDataChanged";
+ case SfxHintId::ScTableOpDirty: return stream << "ScTableOpDirty";
+ case SfxHintId::ScCalcAll: return stream << "ScCalcAll";
+ case SfxHintId::ScReference: return stream << "ScReference";
+ case SfxHintId::ScDrawLayerNew: return stream << "ScDrawLayerNew";
+ case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
+ case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
+ case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
+ case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
+ case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
+ case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
+ case SfxHintId::ScShowRangeFinder: return stream << "ScShowRangeFinder";
+ case SfxHintId::ScDocSaved: return stream << "ScDocSaved";
+ case SfxHintId::ScForceSetTab: return stream << "ScForceSetTab";
+ case SfxHintId::ScNavigatorUpdateAll: return stream << "ScNavigatorUpdateAll";
+ case SfxHintId::ScAnyDataChanged: return stream << "ScAnyDataChanged";
+ case SfxHintId::ScPrintOptions: return stream << "ScPrintOptions";
+ case SfxHintId::ScRefModeChanged: return stream << "ScRefModeChanged";
+ case SfxHintId::ScKillEditView: return stream << "ScKillEditView";
+ case SfxHintId::ScKillEditViewNoPaint: return stream << "ScKillEditViewNoPaint";
+ case SfxHintId::ScHiddenRowsChanged: return stream << "ScHiddenRowsChanged";
+ case SfxHintId::ScSelectionChanged: return stream << "ScSelectionChanged";
+ case SfxHintId::ScClearCache: return stream << "ScClearCache";
+ case SfxHintId::ScAccTableChanged: return stream << "ScAccTableChanged";
+ case SfxHintId::ScAccCursorChanged: return stream << "ScAccCursorChanged";
+ case SfxHintId::ScAccVisAreaChanged: return stream << "ScAccVisAreaChanged";
+ case SfxHintId::ScAccEnterEditMode: return stream << "ScAccEnterEditMode";
+ case SfxHintId::ScAccLeaveEditMode: return stream << "ScAccLeaveEditMode";
+ case SfxHintId::ScAccMakeDrawLayer: return stream << "ScAccMakeDrawLayer";
+ case SfxHintId::ScAccWindowResized: return stream << "ScAccWindowResized";
+ case SfxHintId::StyleSheetCreated: return stream << "StyleSheetCreated";
+ case SfxHintId::StyleSheetModified: return stream << "StyleSheetModified";
+ case SfxHintId::StyleSheetChanged: return stream << "StyleSheetChanged";
+ case SfxHintId::StyleSheetErased: return stream << "StyleSheetErased";
+ case SfxHintId::StyleSheetInDestruction: return stream << "StyleSheetInDestruction";
+ case SfxHintId::MathFormatChanged: return stream << "MathFormatChanged";
+ case SfxHintId::SwDrawViewsCreated: return stream << "SwDrawViewsCreated";
+ case SfxHintId::SwSplitNodeOperation: return stream << "SwSplitNodeOperation";
+ default: return stream << "unk(" << std::to_string(int(id)) << ")";
+ }
+}
+
class SVL_DLLPUBLIC SfxHint
{
private:
More information about the Libreoffice-commits
mailing list