From b09426b83c12b0cd27cd909602251cb076ffa4ba Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 14 Apr 2014 16:57:52 -0400 Subject: fdo#76294: Properly intern string literals in formula on xls import. Change-Id: Ib3a442cbb68c23294762561f2911101a087a795e --- formula/source/core/api/token.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'formula') diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index da98d0e5da4d..ecfb02aa52bb 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -801,7 +801,7 @@ FormulaToken* FormulaTokenArray::Add( FormulaToken* t ) } } -FormulaToken* FormulaTokenArray::AddString( const OUString& rStr ) +FormulaToken* FormulaTokenArray::AddString( const svl::SharedString& rStr ) { return Add( new FormulaStringToken( rStr ) ); } @@ -1369,7 +1369,10 @@ bool FormulaDoubleToken::operator==( const FormulaToken& r ) const } FormulaStringToken::FormulaStringToken( const svl::SharedString& r ) : - FormulaToken( svString ), maString( r ) {} + FormulaToken( svString ), maString( r ) +{ +} + FormulaStringToken::FormulaStringToken( const FormulaStringToken& r ) : FormulaToken( r ), maString( r.maString ) {} -- cgit