diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 9b4fb3a55be0..83d0eb192549 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -337,6 +337,15 @@ void RefEdit::SetReferences(IControlReferenceHandler* pDlg, weld::Frame* pFrame) maGetLabelTextForShrinkModeFunc = [pFrame] { return pFrame->get_label(); }; } +Selection RefEdit::GetSelection() const +{ + int nStartPos, nEndPos; + if (mxEntry->get_selection_bounds(nStartPos, nEndPos)) + return Selection(nStartPos, nEndPos); + + return Selection(); +} + OUString RefEdit::GetLabelTextForShrinkMode() { if (maGetLabelTextForShrinkModeFunc) diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 390ae2799c16..3d3d4e6c1e8c 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -117,12 +117,7 @@ public: mxEntry->set_position(-1); } - Selection GetSelection() const - { - int nStartPos, nEndPos; - mxEntry->get_selection_bounds(nStartPos, nEndPos); - return Selection(nStartPos, nEndPos); - } + Selection GetSelection() const; OUString GetLabelTextForShrinkMode();