summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-12-09 10:58:42 +0100
committerobo <obo@openoffice.org>2010-12-09 10:58:42 +0100
commit450deef7af2e6150493f9f584bf08600884ca098 (patch)
tree29e6883692ab844a1340176650169198ed7ea31c
parente2bbfbc07382adcac481920e1c4cec9fa89557b5 (diff)
parent7580b9ec86dbfdf78f70c49159b3e5a17de02e66 (diff)
CWS-TOOLING: integrate CWS calc33stopper3ooo/OOO330_m18
-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 af5c02c827..b9a75add06 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;
}