[Libreoffice-commits] core.git: sc/source

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Fri Sep 5 04:27:36 PDT 2014


 sc/source/ui/app/inputhdl.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 645bccf7a5b91d794d387286deca583ea41f3516
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Thu Sep 4 22:20:01 2014 +0200

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 05e0251..0ee88c5 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


More information about the Libreoffice-commits mailing list