summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-15 21:07:09 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-18 17:25:40 -0500
commit066d33c7bdcaa938ba7832e53944e1e1a73576cc (patch)
tree0181308876cefad0d128357d336d1e02a60a584d
parent3dab6fcbedf21c1d2971527f6f99fa46d3d45514 (diff)
EncodeUrlMode always set to "by grammer". Remove it.
Change-Id: I7de308bbdaacc1fc60a142497acc2301c080e5dc
-rw-r--r--sc/inc/compiler.hxx10
-rw-r--r--sc/source/core/tool/compiler.cxx51
2 files changed, 7 insertions, 54 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 0fed5cbae324..c780cca49969 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -213,13 +213,6 @@ class SC_DLLPUBLIC ScCompiler : public formula::FormulaCompiler
{
public:
- enum EncodeUrlMode
- {
- ENCODE_BY_GRAMMAR,
- ENCODE_ALWAYS,
- ENCODE_NEVER,
- };
-
enum ExtendedErrorDetection
{
EXTENDED_ERROR_DETECTION_NONE = 0, // no error on unknown symbols, default (interpreter handles it)
@@ -330,7 +323,6 @@ private:
SCsTAB nMaxTab; // last sheet in document
sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol
const Convention *pConv;
- EncodeUrlMode meEncodeUrlMode;
ExtendedErrorDetection meExtendedErrorDetection;
bool mbCloseBrackets; // whether to close open brackets automatically, default TRUE
bool mbRewind; // whether symbol is to be rewound to some step during lexical analysis
@@ -411,7 +403,7 @@ public:
void SetGrammar( const formula::FormulaGrammar::Grammar eGrammar );
void SetNumberFormatter( SvNumberFormatter* pFormatter );
- EncodeUrlMode GetEncodeUrlMode() const;
+
private:
/** Set grammar and reference convention from within SetFormulaLanguage()
or SetGrammar().
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 39b498743610..dee954b93b21 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -244,11 +244,6 @@ void ScCompiler::SetNumberFormatter( SvNumberFormatter* pFormatter )
mpFormatter = pFormatter;
}
-ScCompiler::EncodeUrlMode ScCompiler::GetEncodeUrlMode() const
-{
- return meEncodeUrlMode;
-}
-
void ScCompiler::SetFormulaLanguage( const ScCompiler::OpCodeMapPtr & xMap )
{
if (xMap.get())
@@ -869,21 +864,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bODF)
rBuffer.append( '[');
- bool bEncodeUrl = true;
- switch (rCompiler.GetEncodeUrlMode())
- {
- case ScCompiler::ENCODE_BY_GRAMMAR:
- bEncodeUrl = bODF;
- break;
- case ScCompiler::ENCODE_ALWAYS:
- bEncodeUrl = true;
- break;
- case ScCompiler::ENCODE_NEVER:
- bEncodeUrl = false;
- break;
- default:
- ;
- }
+ bool bEncodeUrl = bODF;
makeExternalSingleRefStr(rBuffer, nFileId, rTabName, rRef, rCompiler.GetPos(), pRefMgr, true, bEncodeUrl);
if (bODF)
rBuffer.append( ']');
@@ -905,21 +886,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bODF)
rBuffer.append( '[');
// Ensure that there's always a closing bracket, no premature returns.
- bool bEncodeUrl = true;
- switch (rCompiler.GetEncodeUrlMode())
- {
- case ScCompiler::ENCODE_BY_GRAMMAR:
- bEncodeUrl = bODF;
- break;
- case ScCompiler::ENCODE_ALWAYS:
- bEncodeUrl = true;
- break;
- case ScCompiler::ENCODE_NEVER:
- bEncodeUrl = false;
- break;
- default:
- ;
- }
+ bool bEncodeUrl = bODF;
do
{
@@ -1324,8 +1291,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
if (!pFullName)
return;
- ConventionXL::makeExternalDocStr(
- rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
+ ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
ScRangeStringConverter::AppendTableName(rBuffer, rTabName);
rBuffer.append('!');
@@ -1347,8 +1313,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos());
- ConventionXL::makeExternalDocStr(
- rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
+ ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef);
rBuffer.append('!');
@@ -1521,8 +1486,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
ScAddress aAbsRef = rRef.toAbs(rCompiler.GetPos());
- ConventionXL::makeExternalDocStr(
- rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
+ ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
ScRangeStringConverter::AppendTableName(rBuffer, rTabName);
rBuffer.append('!');
@@ -1545,8 +1509,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos());
- ConventionXL::makeExternalDocStr(
- rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
+ ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef);
rBuffer.append('!');
@@ -1607,7 +1570,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
pConv( pConvOOO_A1 ),
- meEncodeUrlMode( ENCODE_BY_GRAMMAR ),
meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
mbCloseBrackets( true ),
mbRewind( false )
@@ -1634,7 +1596,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
pConv( pConvOOO_A1 ),
- meEncodeUrlMode( ENCODE_BY_GRAMMAR ),
meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
mbCloseBrackets( true ),
mbRewind( false )