diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-15 12:49:53 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-18 17:25:38 -0500 |
commit | b73b5750ed51acbb5076bc51159a2d6c87c69cbf (patch) | |
tree | 3bccb106a4448421d0a58528e277e796a986d715 | |
parent | 2c92ee37abee82b7190c88bd16d4f12356acdf60 (diff) |
Pre-quote sheet names to avoid doing it every single time.
Change-Id: Ib103ca22bf59c334945c0462588610899a0acfaa
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/tokenstringcontext.cxx | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 395bf115f57e..a9d17d656c24 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -734,10 +734,7 @@ struct ConventionOOO_A1 : public Convention_A1 if (static_cast<size_t>(nTab) >= rCxt.maTabNames.size()) aString = ScGlobal::GetRscString(STR_NO_REF_TABLE); else - { aString = rCxt.maTabNames[nTab]; - ScCompiler::CheckTabQuotes( aString, FormulaGrammar::CONV_OOO ); - } aString += "."; return aString; } @@ -1040,10 +1037,6 @@ struct ConventionXL return; } 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, diff --git a/sc/source/core/tool/tokenstringcontext.cxx b/sc/source/core/tool/tokenstringcontext.cxx index b26d338df278..075bd96d44eb 100644 --- a/sc/source/core/tool/tokenstringcontext.cxx +++ b/sc/source/core/tool/tokenstringcontext.cxx @@ -27,6 +27,12 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula 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(eGram)); + } + const ScRangeName* pNames = pDoc->GetRangeName(); if (pNames) { |