summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-29 21:54:18 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-29 21:54:18 +0200
commit08c36805acddc116d57f0a7f912aeb75f3a41de1 (patch)
treec9835fb7073b793963bb425bccc493d3f23c77cb /sc
parentsome clean-up (diff)
downloadcore-08c36805acddc116d57f0a7f912aeb75f3a41de1.tar.gz
core-08c36805acddc116d57f0a7f912aeb75f3a41de1.zip
fix for fdo#36963: name box always selects cell in the first sheet
add the current table number as fallback to the address parser for the case that no table is specified
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/address.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index e7865a9163af..20fd586d0516 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1424,7 +1424,7 @@ sal_uInt16 ScRange::ParseAny( const String& r, ScDocument* pDoc,
if ( (nRet & nValid) != nValid )
{
- ScAddress aAdr;
+ ScAddress aAdr(aStart);//initialize with currentPos as fallback for table number
nRet = aAdr.Parse( r, pDoc, rDetails );
if ( nRet & SCA_VALID )
aStart = aEnd = aAdr;
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index af08922d4828..62c67ac21c77 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1694,7 +1694,7 @@ void ScPosWnd::DoEnter()
{
// Note that SID_CURRENTCELL always expects address to
// be in Calc A1 format. Convert the text.
- ScRange aRange;
+ ScRange aRange(0,0,pViewData->GetTabNo());
aRange.ParseAny(aText, pDoc, pDoc->GetAddressConvention());
aRange.Format(aText, SCR_ABS_3D, pDoc, ::formula::FormulaGrammar::CONV_OOO);
}