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 ...@@ -213,13 +213,6 @@ class SC_DLLPUBLIC ScCompiler : public formula::FormulaCompiler
{ {
public: public:
enum EncodeUrlMode
{
ENCODE_BY_GRAMMAR,
ENCODE_ALWAYS,
ENCODE_NEVER,
};
enum ExtendedErrorDetection enum ExtendedErrorDetection
{ {
EXTENDED_ERROR_DETECTION_NONE = 0, // no error on unknown symbols, default (interpreter handles it) EXTENDED_ERROR_DETECTION_NONE = 0, // no error on unknown symbols, default (interpreter handles it)
...@@ -330,7 +323,6 @@ private: ...@@ -330,7 +323,6 @@ private:
SCsTAB nMaxTab; // last sheet in document SCsTAB nMaxTab; // last sheet in document
sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol
const Convention *pConv; const Convention *pConv;
EncodeUrlMode meEncodeUrlMode;
ExtendedErrorDetection meExtendedErrorDetection; ExtendedErrorDetection meExtendedErrorDetection;
bool mbCloseBrackets; // whether to close open brackets automatically, default TRUE bool mbCloseBrackets; // whether to close open brackets automatically, default TRUE
bool mbRewind; // whether symbol is to be rewound to some step during lexical analysis bool mbRewind; // whether symbol is to be rewound to some step during lexical analysis
...@@ -411,7 +403,7 @@ public: ...@@ -411,7 +403,7 @@ public:
void SetGrammar( const formula::FormulaGrammar::Grammar eGrammar ); void SetGrammar( const formula::FormulaGrammar::Grammar eGrammar );
void SetNumberFormatter( SvNumberFormatter* pFormatter ); void SetNumberFormatter( SvNumberFormatter* pFormatter );
EncodeUrlMode GetEncodeUrlMode() const;
private: private:
/** Set grammar and reference convention from within SetFormulaLanguage() /** Set grammar and reference convention from within SetFormulaLanguage()
or SetGrammar(). or SetGrammar().
......
...@@ -244,11 +244,6 @@ void ScCompiler::SetNumberFormatter( SvNumberFormatter* pFormatter ) ...@@ -244,11 +244,6 @@ void ScCompiler::SetNumberFormatter( SvNumberFormatter* pFormatter )
mpFormatter = pFormatter; mpFormatter = pFormatter;
} }
ScCompiler::EncodeUrlMode ScCompiler::GetEncodeUrlMode() const
{
return meEncodeUrlMode;
}
void ScCompiler::SetFormulaLanguage( const ScCompiler::OpCodeMapPtr & xMap ) void ScCompiler::SetFormulaLanguage( const ScCompiler::OpCodeMapPtr & xMap )
{ {
if (xMap.get()) if (xMap.get())
...@@ -869,21 +864,7 @@ struct ConventionOOO_A1 : public Convention_A1 ...@@ -869,21 +864,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bODF) if (bODF)
rBuffer.append( '['); rBuffer.append( '[');
bool bEncodeUrl = true; bool bEncodeUrl = bODF;
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:
;
}
makeExternalSingleRefStr(rBuffer, nFileId, rTabName, rRef, rCompiler.GetPos(), pRefMgr, true, bEncodeUrl); makeExternalSingleRefStr(rBuffer, nFileId, rTabName, rRef, rCompiler.GetPos(), pRefMgr, true, bEncodeUrl);
if (bODF) if (bODF)
rBuffer.append( ']'); rBuffer.append( ']');
...@@ -905,21 +886,7 @@ struct ConventionOOO_A1 : public Convention_A1 ...@@ -905,21 +886,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bODF) if (bODF)
rBuffer.append( '['); rBuffer.append( '[');
// Ensure that there's always a closing bracket, no premature returns. // Ensure that there's always a closing bracket, no premature returns.
bool bEncodeUrl = true; bool bEncodeUrl = bODF;
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:
;
}
do do
{ {
...@@ -1324,8 +1291,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL ...@@ -1324,8 +1291,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
if (!pFullName) if (!pFullName)
return; return;
ConventionXL::makeExternalDocStr( ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
ScRangeStringConverter::AppendTableName(rBuffer, rTabName); ScRangeStringConverter::AppendTableName(rBuffer, rTabName);
rBuffer.append('!'); rBuffer.append('!');
...@@ -1347,8 +1313,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL ...@@ -1347,8 +1313,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos()); ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos());
ConventionXL::makeExternalDocStr( ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef); ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef);
rBuffer.append('!'); rBuffer.append('!');
...@@ -1521,8 +1486,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL ...@@ -1521,8 +1486,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
ScAddress aAbsRef = rRef.toAbs(rCompiler.GetPos()); ScAddress aAbsRef = rRef.toAbs(rCompiler.GetPos());
ConventionXL::makeExternalDocStr( ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
ScRangeStringConverter::AppendTableName(rBuffer, rTabName); ScRangeStringConverter::AppendTableName(rBuffer, rTabName);
rBuffer.append('!'); rBuffer.append('!');
...@@ -1545,8 +1509,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL ...@@ -1545,8 +1509,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos()); ScRange aAbsRef = rRef.toAbs(rCompiler.GetPos());
ConventionXL::makeExternalDocStr( ConventionXL::makeExternalDocStr(rBuffer, *pFullName, false);
rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS);
ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef); ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef);
rBuffer.append('!'); rBuffer.append('!');
...@@ -1607,7 +1570,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra ...@@ -1607,7 +1570,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
mnPredetectedReference(0), mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1), mnRangeOpPosInSymbol(-1),
pConv( pConvOOO_A1 ), pConv( pConvOOO_A1 ),
meEncodeUrlMode( ENCODE_BY_GRAMMAR ),
meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ), meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
mbCloseBrackets( true ), mbCloseBrackets( true ),
mbRewind( false ) mbRewind( false )
...@@ -1634,7 +1596,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos) ...@@ -1634,7 +1596,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
mnPredetectedReference(0), mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1), mnRangeOpPosInSymbol(-1),
pConv( pConvOOO_A1 ), pConv( pConvOOO_A1 ),
meEncodeUrlMode( ENCODE_BY_GRAMMAR ),
meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ), meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
mbCloseBrackets( true ), mbCloseBrackets( true ),
mbRewind( false ) 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