summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-04-09 01:21:25 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-04-09 04:27:17 +0200
commit42aece949ec96c775b31216bddd723aa5321e966 (patch)
treec8c084fb5284d62489552335015cd7099b3fe352
parentdbc616c0021b86e6365930ba581818fea280d1a8 (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>
-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 a39a9cea2e55..ad3617c9666f 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -657,7 +657,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();
}
}