summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx19
2 files changed, 18 insertions, 3 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index bfd8802edef7..13639ccc8716 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 9e3bd5a23dd9..aa1c955fbede 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