summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-29 21:54:18 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2011-06-30 16:40:13 +0200
commita2198f4880b6586732aa6bbb5f59e63555ae026f (patch)
tree082ee8cad42e226d300631be855ad758cc7d2936
parent0292da5929768cb7324821947379aad625ed41e4 (diff)
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 Signed-off-by: Katarina Machalkova <kmachalkova@novell.com>
-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 570f8dd45..156043b6e 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1420,7 +1420,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 3907c6d79..49c35a437 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1701,7 +1701,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);
}