diff options
author | Eike Rathke <erack@redhat.com> | 2016-03-22 13:59:44 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-03-22 14:02:35 +0100 |
commit | 97269062ca08d4265e15eb0e8343f90f10810403 (patch) | |
tree | a98828560cb401ee483b9bd396bbf0206be2aa20 | |
parent | 011e65c93053c88eb752e50ef47c69872608cbcd (diff) |
enquote sheet name of other-sheet-local named expressions, tdf#96915 follow-up
Change-Id: I8fde73dc86c29054ec05bbc60e212ae660c78376
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 15b193907025..b425de6e222e 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4815,7 +4815,10 @@ void ScCompiler::CreateStringFromIndex( OUStringBuffer& rBuffer, const FormulaTo // Sheet-local on other sheet. OUString aName; if (pDoc->GetName( nTab, aName)) + { + ScCompiler::CheckTabQuotes( aName, pConv->meConv); aBuffer.append( aName); + } else aBuffer.append( ScGlobal::GetRscString( STR_NO_NAME_REF)); aBuffer.append( pConv->getSpecialSymbol( ScCompiler::Convention::SHEET_SEPARATOR)); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index d3d571e94415..ac2eed2c85d3 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -4754,7 +4754,10 @@ void appendTokenByType( sc::TokenStringContext& rCxt, OUStringBuffer& rBuf, cons if (static_cast<size_t>(nTab) < rCxt.maTabNames.size()) aName = rCxt.maTabNames[nTab]; if (!aName.isEmpty()) + { + ScCompiler::CheckTabQuotes( aName, rCxt.mpRefConv->meConv); rBuf.append( aName); + } else rBuf.append( ScGlobal::GetRscString( STR_NO_NAME_REF)); rBuf.append( rCxt.mpRefConv->getSpecialSymbol( ScCompiler::Convention::SHEET_SEPARATOR)); |