diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-06 11:47:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-06 16:42:05 +0100 |
commit | 427d1355fd909b12c71d82e504cc200db6e55aa5 (patch) | |
tree | 65b1d13f8d7018155f85c582b407b4b95aa7ed49 /sw/inc/view.hxx | |
parent | e5721d002f7bb2edd43aebc58341574b4ec03252 (diff) |
disentangle writer's SID_FM_CONTROL_IDENTIFIER handling
a) make m_nFormSfxId simply follow the slotid, like its sibling m_nDrawSfxId
b) move the previously selected form object into a variable of its own
as m_eFormObjKind instead of ~abusing m_nFormSfxId to do that
c) pass which form object a ConstFormControl creates as an explicit ctor arg
instead of providing that information by overwriting the slotid that
its ::Activate gets passed
making it follow the equivalent calc pattern and separating these very
different slot ids and object identifiers
In testing, with the form controls toolbar, clicking on a toolbaritem
toggles it on, and drawing in writer gives the expected control via
ConstFormControl ctor, and clicking the same toolbaritem toggles it off
hitting the expected SID_FM_LEAVE_CREATE case.
Change-Id: I514f6adc38f706c82f0268abf5c5e73cef5b902c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105405
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/view.hxx')
-rw-r--r-- | sw/inc/view.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 8513b6c7e171..4130142662e4 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -214,6 +214,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell sal_uInt16 m_nDrawSfxId; OUString m_sDrawCustom; //some drawing types are marked with strings! sal_uInt16 m_nFormSfxId; + sal_uInt16 m_eFormObjKind; SotExchangeDest m_nLastPasteDestination; // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin() @@ -520,7 +521,7 @@ public: bool EnterDrawTextMode(const Point& aDocPos); /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position. bool EnterShapeDrawTextMode(SdrObject* pObject); - void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear();} + void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear(); m_eFormObjKind = 0; } bool IsDrawMode() const { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); } bool IsFormMode() const; bool IsBezierEditMode() const; |