r13970 by jghali - #8410: Baseline shift is not saved for tab characters

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 7 01:15:18 CEST 2009


Revision: 13970
Author: jghali
Date: 2009-09-06T23:15:21.992234Z
Commit message: #8410: Baseline shift is not saved for tab characters

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 13969)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 13970)
@@ -1016,7 +1016,10 @@
 		else if (ch == SpecialChars::PARSEP)	// stores also the paragraphstyle for preceding chars
 			putPStyle(docu, item->itemText.paragraphStyle(k), "para");
 		else if (ch == SpecialChars::TAB)
+		{
 			docu.writeEmptyElement("tab");
+			putCStyle(docu, lastStyle);
+		}
 		else if (ch == SpecialChars::LINEBREAK)
 			docu.writeEmptyElement("breakline");
 		else if (ch == SpecialChars::COLBREAK)
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 13969)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 13970)
@@ -1017,7 +1017,14 @@
 							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, last->Style);
 						}
 						else if (it.tagName()=="tab")
+						{
+							CharStyle newStyle;
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::TAB);
+							GetCStyle(&it, m_Doc, newStyle);
+							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, newStyle);
+							last->StyleStart = Neu->itemText.length()-1;
+							last->Style = newStyle;
+						}
 						else if (it.tagName()=="breakline")
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::LINEBREAK);
 						else if (it.tagName()=="breakcol")
@@ -1242,7 +1249,14 @@
 							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, last->Style);
 						}
 						else if (it.tagName()=="tab")
+						{
+							CharStyle newStyle;
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::TAB);
+							GetCStyle(&it, m_Doc, newStyle);
+							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, newStyle);
+							last->StyleStart = Neu->itemText.length()-1;
+							last->Style = newStyle;
+						}
 						else if (it.tagName()=="breakline")
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::LINEBREAK);
 						else if (it.tagName()=="breakcol")
@@ -2999,7 +3013,14 @@
 							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, last->Style);
 						}
 						else if (it.tagName()=="tab")
+						{
+							CharStyle newStyle;
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::TAB);
+							GetCStyle(&it, m_Doc, newStyle);
+							Neu->itemText.setCharStyle(Neu->itemText.length()-1, 1, newStyle);
+							last->StyleStart = Neu->itemText.length()-1;
+							last->Style = newStyle;
+						}
 						else if (it.tagName()=="breakline")
 							Neu->itemText.insertChars(Neu->itemText.length(), SpecialChars::LINEBREAK);
 						else if (it.tagName()=="breakcol")




More information about the scribus-commit mailing list