diff options
author | Justin Luth <jluth@mail.com> | 2023-11-06 16:53:50 -0500 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-11-15 20:05:38 +0100 |
commit | 32d0efa9d934ec45f2863a285d250dfc0ab137e8 (patch) | |
tree | decd6ec1639e71b9e80d5cf3b3c4305ca4cf4dc5 /include | |
parent | 33ec38c5333e0c71aa995292fbddc1a237979e32 (diff) |
tdf#158031 editeng: rename GetFieldAtCursor
because it doesn't really get the field at the cursor,
and certainly is not similar to SelectFieldAtCursor.
It first gets the field under the mouse.
Then, if there is a selection, it gets the selected field,
else it looks for the field on either side.
There were LOTS of places where it
probably had not been used properly.
Most of those are gone now, so it is easier
to rename the function.
Change-Id: I1a64af24092582cf865509d2a474080258edd76c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159022
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/editview.hxx | 2 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index b54f6b463e1f..01a0e426c09a 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -334,7 +334,7 @@ public: const SvxFieldItem* GetFieldAtSelection(bool* pIsBeforeCursor) const; /// return field under mouse, at selection, or immediately after (or before) the current cursor - const SvxFieldData* GetFieldAtCursor(bool bAlsoCheckBeforeCursor = false) const; + const SvxFieldData* GetFieldUnderMouseOrInSelectionOrAtCursor(bool bAlsoCheckBeforeCursor = false) const; /// if no selection, select the field immediately after or before the current cursor void SelectFieldAtCursor(); /// Converts position in paragraph to logical position without unfolding fields diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 4f8d41e21b9b..35860b762037 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -307,9 +307,7 @@ public: void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; const SvxFieldItem* GetFieldAtSelection(bool bAlsoCheckBeforeCursor = false) const; - /// Return the field at the current cursor position or nullptr if no field found - const SvxFieldData* GetFieldAtCursor() const; - /// Select the field at the current cursor position + /// if no selection, select the field immediately after or before the current cursor void SelectFieldAtCursor(); /** enables bullets for the selected paragraphs if the bullets/numbering of the first paragraph is off |