summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/basic/sbdef.hxx3
-rw-r--r--include/basic/sbmeth.hxx2
-rw-r--r--include/basic/sbx.hxx4
-rw-r--r--include/basic/sbxdef.hxx8
-rw-r--r--include/basic/sbxvar.hxx5
-rw-r--r--include/editeng/AccessibleStaticTextBase.hxx12
-rw-r--r--include/editeng/editdata.hxx2
-rw-r--r--include/editeng/editstat.hxx2
-rw-r--r--include/editeng/unoedhlp.hxx11
-rw-r--r--include/svl/hint.hxx118
-rw-r--r--include/svl/style.hxx33
-rw-r--r--include/svx/AccessibleTextHelper.hxx16
-rw-r--r--include/vcl/textdata.hxx20
13 files changed, 131 insertions, 105 deletions
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index 39576fbe7f87..40071031eff2 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -59,9 +59,6 @@ namespace o3tl {
#define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module
#define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module
-#define SBX_HINT_BASICSTART SFX_HINT_USER04
-#define SBX_HINT_BASICSTOP SFX_HINT_USER05
-
enum class PropertyMode
{
NONE,
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index e0d57a695d09..2a67dc7ad592 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -62,7 +62,7 @@ public:
// Interface to execute a method from the applications
ErrCode Call( SbxValue* pRet, SbxVariable* pCaller = nullptr );
- virtual void Broadcast( sal_uInt32 nHintId ) override;
+ virtual void Broadcast( SfxHintId nHintId ) override;
};
typedef tools::SvRef<SbMethod> SbMethodRef;
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 35d09c45d450..d52b6ce42d42 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -94,7 +94,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxHint
{
SbxVariable* pVar;
public:
- SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
+ SbxHint( SfxHintId n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; }
};
@@ -103,7 +103,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener
{
SbxVariableRef xAlias;
virtual ~SbxAlias() override;
- virtual void Broadcast( sal_uInt32 ) override;
+ virtual void Broadcast( SfxHintId ) override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public:
SbxAlias( const SbxAlias& );
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index 42863984f68c..44c75dbb03b6 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -200,14 +200,6 @@ namespace o3tl
template<> struct typed_flags<SbxFlagBits> : is_typed_flags<SbxFlagBits, 0xffff> {};
}
-// Broadcaster-IDs:
-#define SBX_HINT_DYING SFX_HINT_DYING
-#define SBX_HINT_DATAWANTED SFX_HINT_USER00
-#define SBX_HINT_DATACHANGED SFX_HINT_DATACHANGED
-#define SBX_HINT_CONVERTED SFX_HINT_USER01
-#define SBX_HINT_INFOWANTED SFX_HINT_USER02
-#define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03
-
// List of all creators for Load/Store
#define SBXCR_SBX 0x20584253 // SBX(blank)
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 9ad6cb3f92b5..82acb60f2982 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -28,6 +28,7 @@
class SbxDecimal;
+enum class SfxHintId;
struct SbxValues
{
@@ -82,7 +83,7 @@ protected:
OUString aPic; // Picture-String
OUString aToolString; // tool string copy
- virtual void Broadcast( sal_uInt32 ); // Broadcast-Call
+ virtual void Broadcast( SfxHintId ); // Broadcast-Call
virtual ~SbxValue() override;
virtual bool LoadData( SvStream&, sal_uInt16 ) override;
virtual bool StoreData( SvStream& ) const override;
@@ -269,7 +270,7 @@ public:
// Due to data reduction and better DLL-hierarchy currently via casting
SfxBroadcaster& GetBroadcaster();
bool IsBroadcaster() const { return pCst != nullptr; }
- virtual void Broadcast( sal_uInt32 nHintId ) override;
+ virtual void Broadcast( SfxHintId nHintId ) override;
inline const SbxObject* GetParent() const { return pParent; }
SbxObject* GetParent() { return pParent;}
diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx
index aaa5f43e57be..09af887c1554 100644
--- a/include/editeng/AccessibleStaticTextBase.hxx
+++ b/include/editeng/AccessibleStaticTextBase.hxx
@@ -117,15 +117,15 @@ namespace accessibility
only be called from the main office thread.
The EditSource set here is required to broadcast out the
- following hints: EDITSOURCE_HINT_PARASMOVED,
- EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
- TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
- TEXT_HINT_TEXTHEIGHTCHANGED,
- TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ following hints: SfxHintId::EditSourceParasMoved,
+ SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
+ SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
+ SfxHintId::TextHeightChanged,
+ SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it
- has to broadcast a SFX_HINT_DYING hint.
+ has to broadcast a SfxHintId::Dying hint.
This class does not have a dispose method, since it is not
a UNO component. Nevertheless, it holds C++ references to
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 33de259fc6c2..34187ecb8f0a 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -297,7 +297,7 @@ enum EENotifyType
EE_NOTIFY_PARAGRAPHSMOVED,
/// The height of at least one paragraph has changed
- EE_NOTIFY_TEXTHEIGHTCHANGED,
+ EE_NOTIFY_TextHeightChanged,
/// The view area of the EditEngine scrolled
EE_NOTIFY_TEXTVIEWSCROLLED,
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index fa5c771c7b88..c6b099d2202a 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -86,7 +86,7 @@ enum class EditStatusFlags
CRSRMOVEFAIL = 0x0008,
CRSRLEFTPARA = 0x0010,
TEXTWIDTHCHANGED = 0x0020,
- TEXTHEIGHTCHANGED = 0x0040,
+ TextHeightChanged = 0x0040,
WRONGWORDCHANGED = 0x0080
};
namespace o3tl
diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx
index ca8dac26fcb0..c08576741cd8 100644
--- a/include/editeng/unoedhlp.hxx
+++ b/include/editeng/unoedhlp.hxx
@@ -30,11 +30,8 @@
struct EENotify;
class EditEngine;
-#define EDITSOURCE_HINT_PARASMOVED 20
-#define EDITSOURCE_HINT_SELECTIONCHANGED 21
-
/** Extends TextHint by two additional parameters which are necessary
- for the EDITSOURCE_HINT_PARASMOVED hint. TextHint's value in this
+ for the SfxHintId::EditSourceParasMoved hint. TextHint's value in this
case denotes the destination position, the two parameters the
start and the end of the moved paragraph range.
*/
@@ -45,8 +42,8 @@ private:
sal_Int32 mnEnd;
public:
- SvxEditSourceHint( sal_uInt32 nId );
- SvxEditSourceHint( sal_uInt32 nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
+ SvxEditSourceHint( SfxHintId nId );
+ SvxEditSourceHint( SfxHintId nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
using TextHint::GetValue;
sal_Int32 GetStartValue() const { return mnStart;}
@@ -55,7 +52,7 @@ public:
class SvxEditSourceHintEndPara :public SvxEditSourceHint
{
public:
- SvxEditSourceHintEndPara() : SvxEditSourceHint(EDITSOURCE_HINT_SELECTIONCHANGED) {}
+ SvxEditSourceHintEndPara() : SvxEditSourceHint(SfxHintId::EditSourceSelectionChanged) {}
};
/** Helper class for common functionality in edit sources
*/
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index a31cea4e6a47..fb1f2d03067a 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -22,37 +22,105 @@
#include <sal/types.h>
#include <svl/svldllapi.h>
-#define SFX_HINT_DYING 0x00000001
-#define SFX_HINT_NAMECHANGED 0x00000002
-#define SFX_HINT_TITLECHANGED 0x00000004
-#define SFX_HINT_DATACHANGED 0x00000008
-#define SFX_HINT_DOCCHANGED 0x00000010
-#define SFX_HINT_UPDATEDONE 0x00000020
-#define SFX_HINT_DEINITIALIZING 0x00000040
-#define SFX_HINT_MODECHANGED 0x00000080
- // unused, formerly SFX_HINT_CANCELLABLE
- // unused, formerly SFX_HINT_DATAAVAILABLE
- // unused, formerly SFX_HINT_SAVECOMPLETED
- // unused, formerly SFX_HINT_RELEASEREF
-#define SFX_HINT_COLORS_CHANGED 0x00001000
-#define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000
- // unused, formerly SFX_HINT_VIEWCREATED
-#define SFX_HINT_USER00 0x00010000
-#define SFX_HINT_USER01 0x00020000
-#define SFX_HINT_USER02 0x00040000
-#define SFX_HINT_USER03 0x00080000
-#define SFX_HINT_USER04 0x00100000
-#define SFX_HINT_USER05 0x00200000
+enum class SfxHintId {
+ NONE,
+ Dying,
+ NameChanged,
+ TitleChanged,
+ DataChanged,
+ DocChanged,
+ UpdateDone,
+ Deinitializing,
+ ModeChanged,
+ ColorsChanged,
+ AccessibilityChanged,
+
+// VCL text hints
+ TextParaInserted,
+ TextParaRemoved,
+ TextParaContentChanged,
+ TextHeightChanged,
+ TextFormatPara,
+ TextFormatted,
+ TextModified,
+ TextBlockNotificationStart,
+ TextBlockNotificationEnd,
+ TextInputStart,
+ TextInputEnd,
+ TextViewScrolled,
+ TextViewSelectionChanged,
+ TextViewCaretChanged,
+
+// BASIC hints
+ BasicDying,
+ BasicDataWanted,
+ BasicDataChanged,
+ BasicConverted,
+ BasicInfoWanted,
+ BasicObjectChanged,
+ BasicStart,
+ BasicStop,
+
+// SVX edit source
+ EditSourceParasMoved,
+ EditSourceSelectionChanged,
+
+// SC hints
+ ScDataChanged,
+ ScTableOpDirty,
+ ScCalcAll,
+ ScReference,
+ ScDrawLayerNew,
+ ScDbAreasChanged,
+ ScAreasChanged,
+ ScTablesChanged,
+ ScDrawChanged,
+ ScDocNameChanged,
+ ScAreaLinksChanged,
+ ScShowRangeFinder,
+ ScDocSaved,
+ ScForceSetTab,
+ ScNavigatorUpdateAll,
+ ScAnyDataChanged,
+ ScPrintOptions,
+ ScRefModeChanged,
+ ScKillEditView,
+ ScKillEditViewNoPaint,
+
+// SC accessibility hints
+ ScAccTableChanged,
+ ScAccCursorChanged,
+ ScAccVisAreaChanged,
+ ScAccEnterEditMode,
+ ScAccLeaveEditMode,
+ ScAccMakeDrawLayer,
+ ScAccWindowResized,
+
+
+// SFX stylesheet
+ StyleSheetCreated, // new
+ StyleSheetModified, // changed
+ StyleSheetChanged, // erased and re-created (replaced)
+ StyleSheetErased, // erased
+ StyleSheetInDestruction, // in the process of being destructed
+
+// STARMATH
+ MathFormatChanged,
+
+// SW
+ SwDrawViewsCreated,
+ SwSplitNodeOperation,
+};
class SVL_DLLPUBLIC SfxHint
{
private:
- sal_uInt32 mnId;
+ SfxHintId mnId;
public:
- SfxHint() : mnId(0) {}
- explicit SfxHint( sal_uInt32 nId ) : mnId(nId) {}
+ SfxHint() : mnId(SfxHintId::NONE) {}
+ explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
virtual ~SfxHint();
- sal_uInt32 GetId() const { return mnId; }
+ SfxHintId GetId() const { return mnId; }
};
#endif
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 6e0b0b996a9c..69bc70f0dbd2 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -49,24 +49,24 @@ must broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasts.
The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a
pointer to the <SfxStyleSheetBase>. The actions are:
-#define SfxStyleSheetHintId::CREATED // style is created
-#define SfxStyleSheetHintId::MODIFIED // style is modified
-#define SfxStyleSheetHintId::CHANGED // style is replaced
-#define SfxStyleSheetHintId::ERASED // style is deleted
+#define SfxHintId::StyleSheetCreated // style is created
+#define SfxHintId::StyleSheetModified // style is modified
+#define SfxHintId::StyleSheetChanged // style is replaced
+#define SfxHintId::StyleSheetErased // style is deleted
The following methods already broadcast themself
-SfxSimpleHint(SFX_HINT_DYING) from:
+SfxSimpleHint(SfxHintId::Dying) from:
SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
-SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
SfxStyleFamily eFam, sal_uInt16 mask)
-SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *pNew ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetChanged, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
-SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) from:
SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p )
SfxStyleSheetBasePool::Clear()
*/
@@ -292,15 +292,6 @@ public:
};
-enum SfxStyleSheetHintId
-{
- CREATED = 1, // new
- MODIFIED = 2, // changed
- CHANGED = 3, // erased and re-created (replaced)
- ERASED = 4, // erased
- INDESTRUCTION = 5, // in the process of being destructed
-};
-
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{
public:
@@ -311,14 +302,10 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
- sal_uInt16 nHint;
-
public:
- SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
+ SfxStyleSheetHint( SfxHintId, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
- sal_uInt16 GetHint() const
- { return nHint; }
};
class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
@@ -326,7 +313,7 @@ class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
OUString aName;
public:
- SfxStyleSheetHintExtended( sal_uInt16, const OUString& rOld,
+ SfxStyleSheetHintExtended( SfxHintId, const OUString& rOld,
SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; }
};
diff --git a/include/svx/AccessibleTextHelper.hxx b/include/svx/AccessibleTextHelper.hxx
index 7fdee91520de..f156397ef6c9 100644
--- a/include/svx/AccessibleTextHelper.hxx
+++ b/include/svx/AccessibleTextHelper.hxx
@@ -85,7 +85,7 @@ namespace accessibility
AccessibleTextHelper will call the SvxEditSource and their
forwarder to update it's state. Avoid being inconsistent in
the facts you tell in the events, e.g. when sending a
- TEXT_HINT_PARAINSERTED event, the
+ SfxHintId::TextParaInserted event, the
SvxEditSource::GetTextForwarder().GetParagraphCount() should
already include the newly inserted paragraph.
@@ -147,15 +147,15 @@ namespace accessibility
from the main office thread.
The EditSource set here is required to broadcast out the
- following hints: EDITSOURCE_HINT_PARASMOVED,
- EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
- TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
- TEXT_HINT_TEXTHEIGHTCHANGED,
- TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ following hints: SfxHintId::EditSourceParasMoved,
+ SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
+ SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
+ SfxHintId::TextHeightChanged,
+ SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it
- has to broadcast a SFX_HINT_DYING hint.
+ has to broadcast a SfxHintId::Dying hint.
If the SvxEditSource's managed text can change between
edit/non-edit mode (i.e. there are times when
@@ -262,7 +262,7 @@ namespace accessibility
children. Call this method if your visibility state has
changed somehow, e.g. if the visible area has changed and
the AccessibleTextHelper isn't notified internally
- (e.g. via TEXT_HINT_VIEWSCROLLED). Normally, there should
+ (e.g. via SfxHintId::TextViewScrolled). Normally, there should
not be a need to call this method.
*/
void UpdateChildren();
diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx
index abcd6629dad3..de0dabd93348 100644
--- a/include/vcl/textdata.hxx
+++ b/include/vcl/textdata.hxx
@@ -111,30 +111,14 @@ inline bool TextSelection::operator != ( const TextSelection& rSel ) const
return !( *this == rSel );
}
-#define TEXT_HINT_PARAINSERTED 1
-#define TEXT_HINT_PARAREMOVED 2
-#define TEXT_HINT_PARACONTENTCHANGED 3
-#define TEXT_HINT_TEXTHEIGHTCHANGED 4
-#define TEXT_HINT_FORMATPARA 5
-#define TEXT_HINT_TEXTFORMATTED 6
-#define TEXT_HINT_MODIFIED 7
-#define TEXT_HINT_BLOCKNOTIFICATION_START 8
-#define TEXT_HINT_BLOCKNOTIFICATION_END 9
-#define TEXT_HINT_INPUT_START 10
-#define TEXT_HINT_INPUT_END 11
-
-#define TEXT_HINT_VIEWSCROLLED 100
-#define TEXT_HINT_VIEWSELECTIONCHANGED 101
-#define TEXT_HINT_VIEWCARETCHANGED 102
-
class VCL_DLLPUBLIC TextHint : public SfxHint
{
private:
sal_uLong mnValue;
public:
- TextHint( sal_uInt32 nId );
- TextHint( sal_uInt32 nId, sal_uLong nValue );
+ TextHint( SfxHintId nId );
+ TextHint( SfxHintId nId, sal_uLong nValue );
sal_uLong GetValue() const { return mnValue; }
};