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

Pre-quote sheet names to avoid doing it every single time.

Change-Id: Ib103ca22bf59c334945c0462588610899a0acfaa
üst 2c92ee37
...@@ -734,10 +734,7 @@ struct ConventionOOO_A1 : public Convention_A1 ...@@ -734,10 +734,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (static_cast<size_t>(nTab) >= rCxt.maTabNames.size()) if (static_cast<size_t>(nTab) >= rCxt.maTabNames.size())
aString = ScGlobal::GetRscString(STR_NO_REF_TABLE); aString = ScGlobal::GetRscString(STR_NO_REF_TABLE);
else else
{
aString = rCxt.maTabNames[nTab]; aString = rCxt.maTabNames[nTab];
ScCompiler::CheckTabQuotes( aString, FormulaGrammar::CONV_OOO );
}
aString += "."; aString += ".";
return aString; return aString;
} }
...@@ -1040,10 +1037,6 @@ struct ConventionXL ...@@ -1040,10 +1037,6 @@ struct ConventionXL
return; return;
} }
rTabName = rCxt.maTabNames[aAbs.Tab()]; rTabName = rCxt.maTabNames[aAbs.Tab()];
// XL uses the same sheet name quoting conventions in both modes
// it is safe to use A1 here
ScCompiler::CheckTabQuotes( rTabName, FormulaGrammar::CONV_XL_A1 );
} }
static void MakeTabStr( OUStringBuffer& rBuf, static void MakeTabStr( OUStringBuffer& rBuf,
......
...@@ -27,6 +27,12 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula ...@@ -27,6 +27,12 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
if (pDoc) if (pDoc)
{ {
maTabNames = pDoc->GetAllTableNames(); maTabNames = pDoc->GetAllTableNames();
{
std::vector<OUString>::iterator it = maTabNames.begin(), itEnd = maTabNames.end();
for (; it != itEnd; ++it)
ScCompiler::CheckTabQuotes(*it, formula::FormulaGrammar::extractRefConvention(eGram));
}
const ScRangeName* pNames = pDoc->GetRangeName(); const ScRangeName* pNames = pDoc->GetRangeName();
if (pNames) if (pNames)
{ {
......
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