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

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 11 00:51:04 CEST 2010


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

Changeset: 
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp

Diffs:
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 15315)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 15316)
@@ -553,6 +553,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
 }
 
@@ -598,6 +599,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/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 15315)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 15316)
@@ -1155,6 +1155,10 @@
 	if (attrs.hasAttribute(TXTSTW))
 		newStyle.setStrikethruWidth(qRound(attrs.valueAsDouble(TXTSTW) * 10));
 
+	static const QString LANGUAGE("LANGUAGE");
+	if (attrs.hasAttribute(LANGUAGE))
+		newStyle.setLanguage(attrs.valueAsString(LANGUAGE));
+
 	static const QString SHORTCUT("SHORTCUT");
 	if (attrs.hasAttribute(SHORTCUT))
 		newStyle.setShortcut(attrs.valueAsString(SHORTCUT));
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15315)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15316)
@@ -529,6 +529,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
 }
 
@@ -574,6 +575,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 15315)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 15316)
@@ -1127,6 +1127,10 @@
 	if (attrs.hasAttribute(TXTSTW))
 		newStyle.setStrikethruWidth(qRound(attrs.valueAsDouble(TXTSTW) * 10));
 
+	static const QString LANGUAGE("LANGUAGE");
+	if (attrs.hasAttribute(LANGUAGE))
+		newStyle.setLanguage(attrs.valueAsString(LANGUAGE));
+
 	static const QString SHORTCUT("SHORTCUT");
 	if (attrs.hasAttribute(SHORTCUT))
 		newStyle.setShortcut(attrs.valueAsString(SHORTCUT));




More information about the scribus-commit mailing list