summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-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
{