diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-05-16 19:52:32 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-05-17 08:45:01 +0200 |
commit | 9f26e04c8f97af9139e2f4be335fe6999d26a387 (patch) | |
tree | 33d2dd30a4cba558f1018a21be5e5868e434ddeb /include | |
parent | 2a040bfe3e9f58db5c9f6503796778f07e2beba9 (diff) |
svx: move lok's NotifyKit in the ruler to the SvxRuler super-class
We want to make the ruler work in other components and also not
only for horizontal orientation. For this we want the NotifyKit
already in the SvxRuler, which is used by all rulers. This change
moves the functionality to the from SwCommentRuler to SvxRuler and
partially reverts the previous attempt as changing the ruler
instance for vertical ruelr to SwCommentRuler caused test failures.
Change-Id: Ie618b5dc5b936f9dc53d09b624eefdbc506d98f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167740
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/ruler.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx index 486515f1822a..f9d91412b229 100644 --- a/include/svx/ruler.hxx +++ b/include/svx/ruler.hxx @@ -40,6 +40,7 @@ class SfxRectangleItem; class SvxObjectItem; class SfxBoolItem; struct SvxRuler_Impl; +namespace tools { class JsonWriter; } enum class RulerChangeType { @@ -162,6 +163,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener void UpdateColumns(); void UpdateObject(); + void NotifyKit(); + // Convert position to stick to ruler ticks tools::Long MakePositionSticky(tools::Long rValue, tools::Long aPointOfReference, bool aSnapToFrameMargin = true) const; @@ -230,6 +233,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener void UpdateParaContents_Impl(tools::Long lDiff, UpdateType); protected: + bool isHorizontal() { return bHorz; } + virtual void Command( const CommandEvent& rCEvt ) override; virtual void Click() override; virtual bool StartDrag() override; @@ -275,6 +280,8 @@ public: Update(); } + void CreateJsonNotification(tools::JsonWriter& rJsonWriter); + //#i24363# tab stops relative to indent void SetTabsRelativeToIndent( bool bRel ); void SetValues(RulerChangeType type, tools::Long value); |