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

EncodeUrlMode always set to "by grammer". Remove it.

Change-Id: I7de308bbdaacc1fc60a142497acc2301c080e5dc
üst 3dab6fcb
......@@ -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().
......
......@@ -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 )
......
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