summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/misc/urlfieldhelper.cxx3
-rw-r--r--editeng/source/outliner/outlvw.cxx5
-rw-r--r--include/editeng/editview.hxx2
-rw-r--r--include/editeng/outliner.hxx4
-rw-r--r--sc/source/ui/view/editsh.cxx2
6 files changed, 6 insertions, 12 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index e1229b6918db..81cc8bf1aa56 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1424,7 +1424,7 @@ void EditView::SelectFieldAtCursor()
assert(std::abs(aSel.nStartPos - aSel.nEndPos) == 1);
}
-const SvxFieldData* EditView::GetFieldAtCursor(bool bAlsoCheckBeforeCursor) const
+const SvxFieldData* EditView::GetFieldUnderMouseOrInSelectionOrAtCursor(bool bAlsoCheckBeforeCursor) const
{
const SvxFieldItem* pFieldItem = GetFieldUnderMousePointer();
if (!pFieldItem)
diff --git a/editeng/source/misc/urlfieldhelper.cxx b/editeng/source/misc/urlfieldhelper.cxx
index d60d7be92934..57f2a042c6b5 100644
--- a/editeng/source/misc/urlfieldhelper.cxx
+++ b/editeng/source/misc/urlfieldhelper.cxx
@@ -38,7 +38,8 @@ bool URLFieldHelper::IsCursorAtURLField(const EditView& pEditView, bool bAlsoChe
if (!bIsValidSelection)
return false;
- const SvxFieldData* pField = pEditView.GetFieldAtCursor(bAlsoCheckBeforeCursor);
+ const SvxFieldData* pField
+ = pEditView.GetFieldUnderMouseOrInSelectionOrAtCursor(bAlsoCheckBeforeCursor);
if (dynamic_cast<const SvxURLField*>(pField))
return true;
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 2649e865d6d7..136ecd776c26 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1345,11 +1345,6 @@ const SvxFieldItem* OutlinerView::GetFieldAtSelection(bool bAlsoCheckBeforeCurso
return pEditView->GetFieldAtSelection(bAlsoCheckBeforeCursor);
}
-const SvxFieldData* OutlinerView::GetFieldAtCursor() const
-{
- return pEditView->GetFieldAtCursor();
-}
-
void OutlinerView::SelectFieldAtCursor()
{
pEditView->SelectFieldAtCursor();
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
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index c48b7772f7e3..9ed398fb9876 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -888,7 +888,7 @@ std::unique_ptr<const SvxFieldData> ScEditShell::GetURLField()
if (!pActiveView)
return std::unique_ptr<const SvxFieldData>();
- const SvxFieldData* pField = pActiveView->GetFieldAtCursor();
+ const SvxFieldData* pField = pActiveView->GetFieldUnderMouseOrInSelectionOrAtCursor();
if (auto pURLField = dynamic_cast<const SvxURLField*>(pField))
return pURLField->Clone();