summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}
}