sc/source/core/tool/compiler.cxx | 2 ++ sc/source/ui/app/inputhdl.cxx | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-)
New commits: commit 10817252c56f48b0026158fc37a55005098a9d78 Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net> Date: Thu Sep 4 22:20:01 2014 +0200 fdo#83481 Correct syntax for external references with all formula syntax Reviewed-on: https://gerrit.libreoffice.org/11286 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> (cherry picked from commit 645bccf7a5b91d794d387286deca583ea41f3516) Signed-off-by: Eike Rathke <er...@redhat.com> parseExternalDocName() also for ConventionXL_A1::parseAnyToken(), fdo#83481 to make 645bccf7a5b91d794d387286deca583ea41f3516 actually work for both, ExcelA1 and ExcelR1C1 address conventions. (cherry picked from commit 5cb685d9e248f810e00a0a8617ebb04dcb7a5334) Change-Id: I99ea9f026b95d36f6335414c46f332f5ba7cf235 Reviewed-on: https://gerrit.libreoffice.org/11300 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index bfd8802..13639cc 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1241,6 +1241,8 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL sal_Int32 nSrcPos, const CharClass* pCharClass) const SAL_OVERRIDE { + ConventionXL::parseExternalDocName(rFormula, nSrcPos); + ParseResult aRet; if ( lcl_isValidQuotedText(rFormula, nSrcPos, aRet) ) return aRet; diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 9e3bd5a..aa1c955 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2868,9 +2868,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits