diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-01-17 21:21:23 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-01-17 21:22:10 +0200 |
commit | b1e1ab577fe7f402a5367a624963338a1dbf6a55 (patch) | |
tree | 9b11367749f94788b3e3a34f1c6157d313fd1421 /sc | |
parent | 1f63b4f3d688f0c5e4e7a4ceb796487094f63082 (diff) |
Follow-up (micro-?)optimisation
Change-Id: Ia49cb02b2374e1c284bb4dee77e333fe6c8839ce
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 3730d24de83f..ff1cbb1cdcac 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1631,24 +1631,34 @@ void ScCompiler::SetRefConvention( FormulaGrammar::AddressConvention eConv ) const ScCompiler::Convention* ScCompiler::GetRefConvention( FormulaGrammar::AddressConvention eConv ) { - static const ConventionOOO_A1 ConvOOO_A1; - static const ConventionOOO_A1_ODF ConvOOO_A1_ODF; - static const ConventionXL_A1 ConvXL_A1; - static const ConventionXL_R1C1 ConvXL_R1C1; - static const ConventionXL_OOX ConvXL_OOX; switch (eConv) { case FormulaGrammar::CONV_OOO: + { + static const ConventionOOO_A1 ConvOOO_A1; return &ConvOOO_A1; + } case FormulaGrammar::CONV_ODF: + { + static const ConventionOOO_A1_ODF ConvOOO_A1_ODF; return &ConvOOO_A1_ODF; + } case FormulaGrammar::CONV_XL_A1: + { + static const ConventionXL_A1 ConvXL_A1; return &ConvXL_A1; + } case FormulaGrammar::CONV_XL_R1C1: + { + static const ConventionXL_R1C1 ConvXL_R1C1; return &ConvXL_R1C1; + } case FormulaGrammar::CONV_XL_OOX: + { + static const ConventionXL_OOX ConvXL_OOX; return &ConvXL_OOX; + } case FormulaGrammar::CONV_UNSPECIFIED: default: ; |