summaryrefslogtreecommitdiff
path: root/starmath/source/parse.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-12-20 01:54:36 +0100
committerJan Holesovsky <kendy@suse.cz>2010-12-20 01:54:36 +0100
commit1dd1dae66786cb7b50ac6c4b988ba891e6e0342d (patch)
tree78e5e5954242a3fb93e5aa5377d6a6994d9b7d02 /starmath/source/parse.cxx
parentd80b166d6aa125fd639d282ab5d00d1594448d98 (diff)
parentff50442f39cdc329d646ce0a4905e6fa702e205b (diff)
Merge commit 'libreoffice-3.3.0.2'
Conflicts: starmath/source/parse.cxx sw/source/core/text/makefile.mk sw/source/filter/rtf/swparrtf.cxx sw/source/filter/ww8/rtfattributeoutput.cxx
Diffstat (limited to 'starmath/source/parse.cxx')
-rw-r--r--starmath/source/parse.cxx27
1 files changed, 16 insertions, 11 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index cfc6b12b1d03..e20340c7da9a 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;
}