summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outlvw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/outliner/outlvw.cxx')
-rw-r--r--editeng/source/outliner/outlvw.cxx25
1 files changed, 1 insertions, 24 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 43efbbb1615c..670807932277 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1319,30 +1319,7 @@ const SvxFieldItem* OutlinerView::GetFieldAtSelection() const
const SvxFieldData* OutlinerView::GetFieldAtCursor()
{
- const SvxFieldItem* pFieldItem = GetFieldAtSelection();
- if (pFieldItem)
- {
- // Make sure the whole field is selected
- ESelection aSel = GetSelection();
- if (aSel.nStartPos == aSel.nEndPos)
- {
- aSel.nEndPos++;
- SetSelection(aSel);
- }
- }
- if (!pFieldItem)
- {
- // Cursor probably behind the field - extend selection to select the field
- ESelection aSel = GetSelection();
- if (aSel.nStartPos == aSel.nEndPos)
- {
- aSel.nStartPos--;
- SetSelection(aSel);
- pFieldItem = GetFieldAtSelection();
- }
- }
-
- return pFieldItem ? pFieldItem->GetField() : nullptr;
+ return pEditView->GetFieldAtCursor();
}
void OutlinerView::SetInvalidateMore( sal_uInt16 nPixel )