| commit | cf12ce9224c2f4142e777a5c65a04e48b1bab0a6 | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Thu Jul 15 12:00:27 2021 +0100 |
| committer | Michael Stahl <michael.stahl@allotropia.de> | Fri Jul 16 17:06:31 2021 +0200 |
| tree | e841339d721bcf8e9a042ecb38683b1c31cdaa9f | |
| parent | 52f7bed66abed69ba30a9f699aca435fe3e54f9f [diff] |
tdf#143327 keep selection bounds on replacing color so select-all and type 'a' will retain cursor at position 1 and delete/backspace keep cursor position in a semi-rational way Change-Id: I802f132e58cea9f111deb1c6d157706d08cb5b81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118921 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/svx/source/dialog/hexcolorcontrol.cxx b/svx/source/dialog/hexcolorcontrol.cxx index ff9b10c..fbf6b9e 100644 --- a/svx/source/dialog/hexcolorcontrol.cxx +++ b/svx/source/dialog/hexcolorcontrol.cxx
@@ -63,7 +63,10 @@ void HexColorControl::SetColor(Color nColor) OUString sColor = aBuffer.makeStringAndClear().copy(1); if (sColor == m_xEntry->get_text()) return; int nStartPos, nEndPos; m_xEntry->get_selection_bounds(nStartPos, nEndPos); m_xEntry->set_text(sColor); m_xEntry->select_region(nStartPos, nEndPos); } Color HexColorControl::GetColor() const