r15315 by jghali - #9248: Language settings in character styles aren't saved

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 11 00:50:30 CEST 2010


Revision: 15315
Author: jghali
Date: 2010-07-10T22:40:17.144307Z
Commit message: #9248: Language settings in character styles aren't saved

Changeset: 
M  /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M  /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp

Diffs:
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15314)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15315)
@@ -528,6 +528,7 @@
 	docu.writeAttribute("BASEO", style.baselineOffset() / 10.0);
 	docu.writeAttribute("KERN", style.tracking() / 10.0);
 	docu.writeAttribute("wordTrack", style.wordTracking());
+	docu.writeAttribute("LANGUAGE", style.language());
 	docu.writeAttribute("SHORTCUT", style.shortcut()); // shortcuts won't be inherited
 }
 
@@ -573,6 +574,8 @@
 		docu.writeAttribute("KERN", style.tracking() / 10.0); 
 	if ( ! style.isInhWordTracking())
 		docu.writeAttribute("wordTrack", style.wordTracking());
+	if ( ! style.isInhLanguage())
+		docu.writeAttribute("LANGUAGE", style.language());
 	if ( ! style.shortcut().isEmpty() )
 		docu.writeAttribute("SHORTCUT", style.shortcut()); // shortcuts won't be inherited
 }
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 15314)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 15315)
@@ -1757,6 +1757,9 @@
 	if (it->hasAttribute("TXTSTW"))
 		newStyle.setStrikethruWidth(qRound(ScCLocale::toDoubleC(it->attribute("TXTSTW")) * 10));
 
+	if (it->hasAttribute("LANGUAGE"))
+		newStyle.setLanguage(it->attribute("LANGUAGE"));
+
 	if (it->hasAttribute("SHORTCUT"))
 		newStyle.setShortcut(it->attribute("SHORTCUT"));
 




More information about the scribus-commit mailing list