diff options
author | os <os@openoffice.org> | 2010-12-08 10:17:56 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-12-15 15:25:22 +0100 |
commit | 3c703a627697aa5f302af2e4890568371e5fa2f9 (patch) | |
tree | b10604793904f4ee0905a1955bed65f0d4ae9480 | |
parent | 1db43df96c97a2f61ca74df154500553b35ebdd8 (diff) |
#i115956# token translation fixedfeature/helppack
-rw-r--r-- | starmath/source/parse.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index e77d3bedff..072d433c55 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2297,18 +2297,23 @@ void SmParser::Special() // conversion of symbol names for 6.0 (XML) file format // (name change on import / export. // UI uses localized names XML file format does not.) - if (IsImportSymbolNames()) + if( rName.Len() && rName.GetChar( 0 ) == sal_Unicode( '%' ) ) { - const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); - aNewName = rLSD.GetUiSymbolName( rName ); - bReplace = TRUE; - } - else if (IsExportSymbolNames()) - { - const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); - aNewName = rLSD.GetExportSymbolName( rName ); - bReplace = TRUE; + if (IsImportSymbolNames()) + { + const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); + aNewName = rLSD.GetUiSymbolName( rName.Copy( 1 ) ); + bReplace = TRUE; + } + else if (IsExportSymbolNames()) + { + const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); + aNewName = rLSD.GetExportSymbolName( rName.Copy( 1 ) ); + bReplace = TRUE; + } } + if( aNewName.Len() ) + aNewName.Insert( '%', 0 ); } else // 5.0 <-> 6.0 formula text (symbol name) conversion { @@ -2347,7 +2352,7 @@ void SmParser::Special() if (bReplace && aNewName.Len() && rName != aNewName) { - Replace( GetTokenIndex() + 1, rName.Len(), aNewName ); + Replace( GetTokenIndex(), rName.Len(), aNewName ); rName = aNewName; } |