summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authoros <os@openoffice.org>2010-12-08 10:17:56 +0100
committeros <os@openoffice.org>2010-12-08 10:17:56 +0100
commit6d2bd0b433056988e83e9371cf71567a6c31e591 (patch)
tree245e524b181c044df2bd61d83a7add53c2350d8e /starmath
parent118d72cbfd4e732b4b472260fe7cbc67fc9e68ee (diff)
#i115956# token translation fixed
Diffstat (limited to 'starmath')
-rwxr-xr-xstarmath/source/parse.cxx27
1 files changed, 16 insertions, 11 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index d12f3df07400..697e18362d87 100755
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2317,18 +2317,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
{
@@ -2367,7 +2372,7 @@ void SmParser::Special()
if (bReplace && aNewName.Len() && rName != aNewName)
{
- Replace( GetTokenIndex() + 1, rName.Len(), aNewName );
+ Replace( GetTokenIndex(), rName.Len(), aNewName );
rName = aNewName;
}