diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-14 14:39:56 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-14 23:53:51 -0500 |
commit | d9a914fe5b221f879c6fb7873c7e7011dc655421 (patch) | |
tree | b3c5a683480e054bd600511df111a11cc35832ee /formula | |
parent | 6a4b377c1a5794efee4cbdc93289bc9ce5ead730 (diff) |
Identify methods that don't modify internal state and mark them const.
Change-Id: Ie63d93d51640bfb80dc02bb226d742c2f9be96d8
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index c42ee0609f67..f65d0b324fb9 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -963,7 +963,7 @@ sal_uInt16 FormulaCompiler::GetErrorConstant( const OUString& rName ) const } -void FormulaCompiler::AppendErrorConstant( OUStringBuffer& rBuffer, sal_uInt16 nError ) +void FormulaCompiler::AppendErrorConstant( OUStringBuffer& rBuffer, sal_uInt16 nError ) const { OpCode eOp; switch (nError) @@ -1875,7 +1875,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuffer, F } -void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal ) +void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal ) const { if ( mxSymbols->isEnglish() ) { @@ -1894,12 +1894,12 @@ void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal ) } } -void FormulaCompiler::AppendBoolean( OUStringBuffer& rBuffer, bool bVal ) +void FormulaCompiler::AppendBoolean( OUStringBuffer& rBuffer, bool bVal ) const { rBuffer.append( mxSymbols->getSymbol( static_cast<OpCode>(bVal ? ocTrue : ocFalse)) ); } -void FormulaCompiler::AppendString( OUStringBuffer& rBuffer, const OUString & rStr ) +void FormulaCompiler::AppendString( OUStringBuffer& rBuffer, const OUString & rStr ) const { rBuffer.append( '"'); if ( lcl_UnicodeStrChr( rStr.getStr(), '"' ) == NULL ) @@ -2074,27 +2074,27 @@ bool FormulaCompiler::HandleDbData() return true; } -void FormulaCompiler::CreateStringFromSingleRef( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) +void FormulaCompiler::CreateStringFromSingleRef( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } -void FormulaCompiler::CreateStringFromDoubleRef( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) +void FormulaCompiler::CreateStringFromDoubleRef( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } -void FormulaCompiler::CreateStringFromIndex( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) +void FormulaCompiler::CreateStringFromIndex( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } -void FormulaCompiler::CreateStringFromMatrix( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) +void FormulaCompiler::CreateStringFromMatrix( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } -void FormulaCompiler::CreateStringFromExternal( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) +void FormulaCompiler::CreateStringFromExternal( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } -void FormulaCompiler::LocalizeString( OUString& /*rName*/ ) +void FormulaCompiler::LocalizeString( OUString& /*rName*/ ) const { } |