r21423 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 27 20:32:00 UTC 2016


Author: jghali
Date: Wed Jul 27 20:32:00 2016
New Revision: 21423

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21423
Log:
#14239: undefined glyph symbol appearing unpredictably in exported PDF

Modified:
    trunk/Scribus/scribus/pageitem_group.cpp
    trunk/Scribus/scribus/pageitem_group.h
    trunk/Scribus/scribus/pageitem_table.cpp
    trunk/Scribus/scribus/pageitem_table.h
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21423&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_group.cpp	Wed Jul 27 20:32:00 2016
@@ -82,6 +82,15 @@
 	return ret;
 }
 
+void PageItem_Group::layout()
+{
+	for (int i = 0; i < groupItemList.count(); ++i)
+	{
+		PageItem* embedded = groupItemList.at(i);
+		embedded->layout();
+	}
+}
+
 void PageItem_Group::setLayer(int newLayerID)
 {
 	for (int em = 0; em < groupItemList.count(); ++em)

Modified: trunk/Scribus/scribus/pageitem_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21423&path=/trunk/Scribus/scribus/pageitem_group.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.h	(original)
+++ trunk/Scribus/scribus/pageitem_group.h	Wed Jul 27 20:32:00 2016
@@ -50,6 +50,8 @@
 	virtual void replaceNamedResources(ResourceCollection& newNames);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
+
+	virtual void layout();
 	
 protected:
 	virtual void DrawObj_Item(ScPainter *p, QRectF e);

Modified: trunk/Scribus/scribus/pageitem_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21423&path=/trunk/Scribus/scribus/pageitem_table.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_table.cpp	Wed Jul 27 20:32:00 2016
@@ -172,6 +172,25 @@
 	}
 
 	PageItem::getNamedResources(lists);
+}
+
+void PageItem_Table::layout()
+{
+	int rowCount = rows();
+	int columnCount = columns();
+
+	for (int row = 0; row < rowCount; ++row)
+	{
+		for (int col = 0; col < columnCount; col ++)
+		{
+			TableCell cell = cellAt(row, col);
+			if (cell.row() == row && cell.column() == col)
+			{
+				PageItem* textFrame = cell.textFrame();
+				textFrame->layout();
+			}
+		}
+	}
 }
 
 void PageItem_Table::resize(double width, double height)

Modified: trunk/Scribus/scribus/pageitem_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21423&path=/trunk/Scribus/scribus/pageitem_table.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.h	(original)
+++ trunk/Scribus/scribus/pageitem_table.h	Wed Jul 27 20:32:00 2016
@@ -481,8 +481,11 @@
 	/// Returns the rows of the table for writing to SLA
 	QList<QList<TableCell> > cellRows() const { return m_cellRows; }
 
-	// Collect named resource of table and its cells
+	/// Collect named resource of table and its cells
 	virtual void getNamedResources(ResourceCollection& lists) const;
+
+	/// creates valid layout information
+	virtual void layout();
 
 signals:
 	/// This signal is emitted whenever the table changes.

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21423&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Wed Jul 27 20:32:00 2016
@@ -4534,6 +4534,9 @@
 	if (!it->isTextFrame() && !it->isPathText())
 		return;
 
+	if (it->invalid)
+		it->layout();
+
 	// This works pretty well except for the case of page numbers and al. placed on masterpages
 	// where layout may depend on the page where the masterpage item is placed
 	UsedGlyphsPainter p(Really);
@@ -5287,7 +5290,7 @@
 		for (ScLayers::iterator it = Layers.begin(); it != Layers.end(); ++it)
 		{
 			setActiveLayer(it->ID);
-			for (uint ite = 0; ite < end; ++ite)
+			for (int ite = 0; ite < end; ++ite)
 			{
 				PageItem *itemToCopy = DocItems.at(ite);
 				if ((itemToCopy->OwnPage == static_cast<int>(sourcePage->pageNr())) && (it->ID == itemToCopy->LayerID))
@@ -6556,7 +6559,7 @@
 {
 	bool found = false;
 	QList<PageItem*> allItems;
-	uint docItemCount = Items->count();
+	int docItemCount = Items->count();
 	for (int i = 0; i < docItemCount; ++i)
 	{
 		PageItem *currItem = Items->at(i);
@@ -13715,7 +13718,7 @@
 {
 	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
 	assert(itemSelection!=0);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 




More information about the scribus-commit mailing list