summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx8
-rw-r--r--include/formula/FormulaCompiler.hxx22
2 files changed, 15 insertions, 15 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 06bf50fa7cda..23a7320e64eb 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -251,7 +251,7 @@ const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr, sal_Unicode c )
} // namespace
-void FormulaCompiler::OpCodeMap::putExternal( const String & rSymbol, const String & rAddIn )
+void FormulaCompiler::OpCodeMap::putExternal( const OUString & rSymbol, const OUString & rAddIn )
{
// Different symbols may map to the same AddIn, but the same AddIn may not
// map to different symbols, the first pair wins. Same symbol of course may
@@ -268,7 +268,7 @@ void FormulaCompiler::OpCodeMap::putExternal( const String & rSymbol, const Stri
}
}
-void FormulaCompiler::OpCodeMap::putExternalSoftly( const String & rSymbol, const String & rAddIn )
+void FormulaCompiler::OpCodeMap::putExternalSoftly( const OUString & rSymbol, const OUString & rAddIn )
{
bool bOk = mpReverseExternalHashMap->insert( ExternalHashMap::value_type( rAddIn, rSymbol)).second;
if (bOk)
@@ -492,7 +492,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
}
-void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eOp )
+void FormulaCompiler::OpCodeMap::putOpCode( const OUString & rStr, const OpCode eOp )
{
DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range");
if (0 < eOp && sal_uInt16(eOp) < mnSymbols)
@@ -730,7 +730,7 @@ void FormulaCompiler::fillFromAddInMap( NonConstOpCodeMapPtr /*xMap*/, FormulaGr
{
}
-OpCode FormulaCompiler::GetEnglishOpCode( const String& rName ) const
+OpCode FormulaCompiler::GetEnglishOpCode( const OUString& rName ) const
{
FormulaCompiler::OpCodeMapPtr xMap = GetOpCodeMap( sheet::FormulaLanguage::ENGLISH);
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index fa768cfaf31c..cfa4f1e42038 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -60,16 +60,16 @@ struct FormulaArrayStack
};
-struct FORMULA_DLLPUBLIC StringHashCode
+struct FORMULA_DLLPUBLIC OUStringHashCode
{
- size_t operator()( const String& rStr ) const
+ size_t operator()( const OUString& rStr ) const
{
- return rtl_ustr_hashCode_WithLength( rStr.GetBuffer(), rStr.Len() );
+ return rtl_ustr_hashCode_WithLength( rStr.getStr(), rStr.getLength() );
}
};
-typedef ::boost::unordered_map< String, OpCode, StringHashCode, ::std::equal_to< String > > OpCodeHashMap;
-typedef ::boost::unordered_map< String, String, StringHashCode, ::std::equal_to< String > > ExternalHashMap;
+typedef ::boost::unordered_map< OUString, OpCode, OUStringHashCode, ::std::equal_to< OUString > > OpCodeHashMap;
+typedef ::boost::unordered_map< OUString, OUString, OUStringHashCode, ::std::equal_to< OUString > > ExternalHashMap;
class FORMULA_DLLPUBLIC FormulaCompiler
{
@@ -86,8 +86,8 @@ public:
/** Mappings from strings to OpCodes and vice versa. */
class FORMULA_DLLPUBLIC OpCodeMap
{
- OpCodeHashMap * mpHashMap; /// Hash map of symbols, String -> OpCode
- OUString * mpTable; /// Array of symbols, OpCode -> String, offset==OpCode
+ OpCodeHashMap * mpHashMap; /// Hash map of symbols, OUString -> OpCode
+ OUString * mpTable; /// Array of symbols, OpCode -> OUString, offset==OpCode
ExternalHashMap * mpExternalHashMap; /// Hash map of ocExternal, Filter String -> AddIn String
ExternalHashMap * mpReverseExternalHashMap; /// Hash map of ocExternal, AddIn String -> Filter String
FormulaGrammar::Grammar meGrammar; /// Grammar, language and reference convention
@@ -168,14 +168,14 @@ public:
inline bool hasExternals() const { return !mpExternalHashMap->empty(); }
/// Put entry of symbol String and OpCode pair.
- void putOpCode( const String & rStr, const OpCode eOp );
+ void putOpCode( const OUString & rStr, const OpCode eOp );
/// Put entry of symbol String and AddIn international String pair.
- void putExternal( const String & rSymbol, const String & rAddIn );
+ void putExternal( const OUString & rSymbol, const OUString & rAddIn );
/** Put entry of symbol String and AddIn international String pair,
failing silently if rAddIn name already exists. */
- void putExternalSoftly( const String & rSymbol, const String & rAddIn );
+ void putExternalSoftly( const OUString & rSymbol, const OUString & rAddIn );
/// Core implementation of XFormulaOpCodeMapper::getMappings()
::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >
@@ -228,7 +228,7 @@ public:
@param rName
Symbol to lookup. MUST be upper case.
*/
- OpCode GetEnglishOpCode( const String& rName ) const;
+ OpCode GetEnglishOpCode( const OUString& rName ) const;
sal_uInt16 GetErrorConstant( const String& rName ) const;