Kaydet (Commit) e71ece6a authored tarafından Caolán McNamara's avatar Caolán McNamara

document that nEndPos of -1 is all text

Change-Id: I4646e1ef09db3a637248cff53cbbafb214219cf8
Reviewed-on: https://gerrit.libreoffice.org/59542
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1cf7fcda
...@@ -484,6 +484,7 @@ public: ...@@ -484,6 +484,7 @@ public:
virtual OUString get_text() const = 0; virtual OUString get_text() const = 0;
virtual void set_width_chars(int nChars) = 0; virtual void set_width_chars(int nChars) = 0;
virtual void set_max_length(int nChars) = 0; virtual void set_max_length(int nChars) = 0;
// nEndPos can be -1 in order to select all text
virtual void select_region(int nStartPos, int nEndPos) = 0; virtual void select_region(int nStartPos, int nEndPos) = 0;
virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0; virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
virtual void set_position(int nCursorPos) = 0; virtual void set_position(int nCursorPos) = 0;
......
...@@ -106,7 +106,7 @@ SwFieldInputDlg::SwFieldInputDlg(weld::Window *pParent, SwWrtShell &rS, ...@@ -106,7 +106,7 @@ SwFieldInputDlg::SwFieldInputDlg(weld::Window *pParent, SwWrtShell &rS,
// preselect all text to allow quickly changing the content // preselect all text to allow quickly changing the content
if (bEnable) if (bEnable)
m_xEditED->select_region(0, m_xEditED->get_text().getLength()); m_xEditED->select_region(0, -1);
} }
SwFieldInputDlg::~SwFieldInputDlg() SwFieldInputDlg::~SwFieldInputDlg()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment