summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/pvlaydlg.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-21 17:54:58 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-21 17:54:58 -0500
commit47d642003d05773668f7448d4d0144aff6758426 (patch)
tree788fbf7df43c662108ffd01655fb8274273efddb /sc/source/ui/dbgui/pvlaydlg.cxx
parent62363c6f7dac83f8a90411814d1faaca18dfa974 (diff)
Properly display range name in the UI when appropriate.
DataPilot main dialog now displays range name properly in lieu of the traditional raw range reference string if the source data range is referred to as a range name.
Diffstat (limited to 'sc/source/ui/dbgui/pvlaydlg.cxx')
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 89da27b4bb69..02b1af696a3b 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -247,9 +247,16 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
{
aEdInPos.Enable();
aRbInPos.Enable();
- aOldRange = xDlgDPObject->GetSheetDesc()->GetSourceRange();
- aOldRange.Format( inString, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
- aEdInPos.SetText(inString);
+ const ScSheetSourceDesc* p = xDlgDPObject->GetSheetDesc();
+ OUString aRangeName = p->GetRangeName();
+ if (aRangeName.getLength())
+ aEdInPos.SetText(aRangeName);
+ else
+ {
+ aOldRange = p->GetSourceRange();
+ aOldRange.Format( inString, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
+ aEdInPos.SetText(inString);
+ }
}
else
{