diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2014-09-04 22:20:01 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-09-05 06:26:58 -0500 |
commit | 645bccf7a5b91d794d387286deca583ea41f3516 (patch) | |
tree | e78db0df7adfe3250a43a9e20382d0f86f194287 | |
parent | 5fc238d11e939064a70573ef93939af49a241b20 (diff) |
fdo#83481 Correct syntax for external references with all formula syntax
Change-Id: I99ea9f026b95d36f6335414c46f332f5ba7cf235
Reviewed-on: https://gerrit.libreoffice.org/11286
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 05e0251457ca..0ee88c5cb07b 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2861,9 +2861,22 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) // #i75893# convert escaped URL of the document to something user friendly OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); - aRefStr = "\'"; - aRefStr += aFileName; - aRefStr += "'#"; + switch(aAddrDetails.eConv) + { + case formula::FormulaGrammar::CONV_XL_A1 : + case formula::FormulaGrammar::CONV_XL_OOX : + case formula::FormulaGrammar::CONV_XL_R1C1 : + aRefStr = "[\'"; + aRefStr += aFileName; + aRefStr += "']"; + break; + case formula::FormulaGrammar::CONV_OOO : + default: + aRefStr = "\'"; + aRefStr += aFileName; + aRefStr += "'#"; + break; + } aRefStr += aTmp; } else |