summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-04-09 01:21:25 +0200
committerAndras Timar <andras.timar@collabora.com>2017-04-12 17:24:42 +0200
commit189442aab3b12dd866f6ae129a79f648847af919 (patch)
tree2d915e58a094aa227549d862aa54546ad57dbaab /sc
parent5a19dc0254b7938a5967625e663a439d04f93eae (diff)
don't replace content of formula field when selecting range, tdf#58635
Change-Id: I85953fdd7c2b7f193b2a815564526d985ae2bba4 Reviewed-on: https://gerrit.libreoffice.org/36309 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 42aece949ec96c775b31216bddd723aa5321e966) Reviewed-on: https://gerrit.libreoffice.org/36310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit dcd9eef1727efb7a909f8009fde4f34f26139522)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index b2c0a1c07dd8..9a416692a4fd 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -572,7 +572,10 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*)
OUString aRefStr(rRef.Format(nFlags, mpViewData->GetDocument(),
ScAddress::Details(mpViewData->GetDocument()->GetAddressConvention(), 0, 0)));
- pEdit->SetRefString( aRefStr );
+ if (pEdit != mpEdRange)
+ pEdit->ReplaceSelected(aRefStr);
+ else
+ pEdit->SetRefString( aRefStr );
updateTitle();
}
}