Kaydet (Commit) 83cdcdb9 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#74512: Generate escaped sheet names after the grammer is set.

Otherwise the single quote characters wouldn't be properly doubled.

Change-Id: I864ca8912a35049905e52e002d92d648e1278015
üst c4987cd7
......@@ -238,6 +238,14 @@ void ScCompiler::SetGrammar( const FormulaGrammar::Grammar eGrammar )
if (eMyGrammar != GetGrammar())
SetGrammarAndRefConvention( eMyGrammar, eOldGrammar);
}
if (pDoc && maTabNames.empty())
{
maTabNames = pDoc->GetAllTableNames();
std::vector<OUString>::iterator it = maTabNames.begin(), itEnd = maTabNames.end();
for (; it != itEnd; ++it)
ScCompiler::CheckTabQuotes(*it, formula::FormulaGrammar::extractRefConvention(meGrammar));
}
}
void ScCompiler::SetNumberFormatter( SvNumberFormatter* pFormatter )
......@@ -1546,16 +1554,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
mbRewind( false )
{
nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
if (pDoc)
{
maTabNames = pDoc->GetAllTableNames();
{
std::vector<OUString>::iterator it = maTabNames.begin(), itEnd = maTabNames.end();
for (; it != itEnd; ++it)
ScCompiler::CheckTabQuotes(*it, formula::FormulaGrammar::extractRefConvention(meGrammar));
}
}
}
ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos ) :
......@@ -1589,16 +1587,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
mbRewind( false )
{
nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
if (pDoc)
{
maTabNames = pDoc->GetAllTableNames();
{
std::vector<OUString>::iterator it = maTabNames.begin(), itEnd = maTabNames.end();
for (; it != itEnd; ++it)
ScCompiler::CheckTabQuotes(*it, formula::FormulaGrammar::extractRefConvention(meGrammar));
}
}
}
ScCompiler::~ScCompiler()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment