From dc40dabec04300ab3a4578e80a0b2170e62df674 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 3 May 2011 17:16:41 -0400 Subject: fdo#36721: Fixed a crash on datapilot while editing the source range. --- sc/source/ui/dbgui/pvlaydlg.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sc/source/ui/dbgui/pvlaydlg.cxx') diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index f280af43f7e0..fa063bcf7ab8 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -1450,11 +1450,24 @@ void ScDPLayoutDlg::UpdateSrcRange() switch (eSrcType) { case SRC_REF: + { // data source is a range reference. if (inSheet.GetSourceRange() == aNewRange) // new range is identical to the current range. Nothing to do. return; inSheet.SetSourceRange(aNewRange); + sal_uLong nError = inSheet.CheckSourceRange(); + if (nError) + { + // The error number corresponds with string ID for the error + // message. In the future we should display the error message + // somewhere in the dialog to let the user know of the reason + // for error. + aEdInPos.SetRefValid(false); + aBtnOk.Disable(); + return; + } + } break; case SRC_NAME: // data source is a range name. -- cgit