r13954 by fschmid - Fixed build issues introduced by the last prefs struct splitting.

scribus-commit scribus-commit at lists.scribus.net
Fri Sep 4 11:20:33 CEST 2009


Revision: 13954
Author: fschmid
Date: 2009-09-04T09:20:32.616294Z
Commit message: Fixed build issues introduced by the last prefs struct splitting.

Changeset: 
M  /trunk/Scribus/scribus/plugins/psimport/importps.cpp
M  /trunk/Scribus/scribus/plugins/wpgimplugin/importwpg.cpp
M  /trunk/Scribus/scribus/plugins/xfigimplugin/importxfig.cpp
M  /trunk/Scribus/scribus/plugins/cvgimplugin/importcvg.cpp
M  /trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
M  /trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
M  /trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
M  /trunk/Scribus/scribus/scribusview.cpp

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 13953)
+++ scribus/scribusview.cpp	(revision 13954)
@@ -3634,7 +3634,7 @@
 		}
 	case PageItem::OSGFrame:
 #ifdef HAVE_OSG
-		z = Doc->itemAdd(PageItem::OSGFrame, PageItem::Unspecified, x, y, w, h, 1, Doc->toolSettings.dBrushPict, CommonStrings::None, true);
+		z = Doc->itemAdd(PageItem::OSGFrame, PageItem::Unspecified, x, y, w, h, 1, Doc->itemToolPrefs.dBrushPict, CommonStrings::None, true);
 		undoManager->setUndoEnabled(false);
 		Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
 		Doc->Items->at(z)->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
Index: scribus/plugins/scriptplugin/cmdobj.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmdobj.cpp	(revision 13953)
+++ scribus/plugins/scriptplugin/cmdobj.cpp	(revision 13954)
@@ -29,8 +29,8 @@
 	int i = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::Polygon, PageItem::Rectangle,
 								pageUnitXToDocX(x), pageUnitYToDocY(y),
 								ValueToPoint(w), ValueToPoint(h),
-								ScCore->primaryMainWindow()->doc->toolSettings.dWidth,
-								ScCore->primaryMainWindow()->doc->toolSettings.dBrush, ScCore->primaryMainWindow()->doc->toolSettings.dPen, true);
+								ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth,
+								ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush, ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen, true);
 //	ScCore->primaryMainWindow()->doc->setRedrawBounding(ScCore->primaryMainWindow()->doc->Items->at(i));
 	if (Name != EMPTY_STRING)
 	{
@@ -60,9 +60,9 @@
 										pageUnitYToDocY(y),
 										ValueToPoint(w),
 										ValueToPoint(h),
-										ScCore->primaryMainWindow()->doc->toolSettings.dWidth,
-										ScCore->primaryMainWindow()->doc->toolSettings.dBrush,
-										ScCore->primaryMainWindow()->doc->toolSettings.dPen,
+										ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth,
+										ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush,
+										ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen,
 										true);
 //	if (ItemExists(QString::fromUtf8(Name)))
 //	{
@@ -98,7 +98,7 @@
 									pageUnitYToDocY(y),
 									ValueToPoint(w),
 									ValueToPoint(h),
-									1, ScCore->primaryMainWindow()->doc->toolSettings.dBrushPict,
+									1, ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrushPict,
 									CommonStrings::None, true);
 //	if (ItemExists(QString::fromUtf8(Name)))
 //	{
@@ -134,8 +134,8 @@
 								pageUnitYToDocY(y),
 								ValueToPoint(w),
 								ValueToPoint(h),
-								ScCore->primaryMainWindow()->doc->toolSettings.dWidth, CommonStrings::None,
-								ScCore->primaryMainWindow()->doc->toolSettings.dPenText, true);
+								ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth, CommonStrings::None,
+								ScCore->primaryMainWindow()->doc->itemToolPrefs.dPenText, true);
 //	if (ItemExists(QString::fromUtf8(Name)))
 //	{
 //		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists.","python error"));
@@ -175,9 +175,9 @@
 //	}
 	int i = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::Line, PageItem::Unspecified,
 							   x, y, w, h,
-							   ScCore->primaryMainWindow()->doc->toolSettings.dWidth,
-							   ScCore->primaryMainWindow()->doc->toolSettings.dBrush,
-							   ScCore->primaryMainWindow()->doc->toolSettings.dPen, true);
+							   ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth,
+							   ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush,
+							   ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen, true);
 	PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(i);
 	it->setRotation(xy2Deg(w-x, h-y));
 	it->setWidthHeight(sqrt(pow(x-w, 2.0) + pow(y-h, 2.0)), 1.0);
@@ -251,7 +251,7 @@
 	i++;
 	y = pageUnitYToDocY(static_cast<double>(PyFloat_AsDouble(PyList_GetItem(il, i))));
 	i++;
-	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->toolSettings.dWidth, ScCore->primaryMainWindow()->doc->toolSettings.dBrush, ScCore->primaryMainWindow()->doc->toolSettings.dPen, true);
+	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth, ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush, ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen, true);
 	PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(ic);
 	it->PoLine.resize(2);
 	it->PoLine.setPoint(0, 0, 0);
@@ -335,7 +335,7 @@
 	i++;
 	y = pageUnitYToDocY(static_cast<double>(PyFloat_AsDouble(PyList_GetItem(il, i))));
 	i++;
-	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->toolSettings.dWidth, ScCore->primaryMainWindow()->doc->toolSettings.dBrush, ScCore->primaryMainWindow()->doc->toolSettings.dPen, true);
+	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth, ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush, ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen, true);
 	PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(ic);
 	it->PoLine.resize(2);
 	it->PoLine.setPoint(0, 0, 0);
@@ -430,7 +430,7 @@
 	ky2 = pageUnitYToDocY(static_cast<double>(PyFloat_AsDouble(PyList_GetItem(il, i))));
 	i++;
 	//int ic = ScCore->primaryMainWindow()->view->PaintPolyLine(x, y, 1, 1,	ScCore->primaryMainWindow()->doc->toolSettings.dWidth, ScCore->primaryMainWindow()->doc->toolSettings.dBrush, ScCore->primaryMainWindow()->doc->toolSettings.dPen);
-	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->toolSettings.dWidth, ScCore->primaryMainWindow()->doc->toolSettings.dBrush, ScCore->primaryMainWindow()->doc->toolSettings.dPen, true);
+	int ic = ScCore->primaryMainWindow()->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, x, y, 1, 1,	ScCore->primaryMainWindow()->doc->itemToolPrefs.dWidth, ScCore->primaryMainWindow()->doc->itemToolPrefs.dBrush, ScCore->primaryMainWindow()->doc->itemToolPrefs.dPen, true);
 	PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(ic);
 	it->PoLine.resize(2);
 	it->PoLine.setPoint(0, 0, 0);
Index: scribus/plugins/cvgimplugin/importcvg.cpp
===================================================================
--- scribus/plugins/cvgimplugin/importcvg.cpp	(revision 13953)
+++ scribus/plugins/cvgimplugin/importcvg.cpp	(revision 13954)
@@ -206,7 +206,7 @@
 				double gw = maxx - minx;
 				double gh = maxy - miny;
 				PageItem *high = m_Doc->Items->at(highestItem);
-				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 				PageItem *neu = m_Doc->Items->takeAt(z);
 				m_Doc->Items->insert(lowestItem, neu);
 				neu->Groups.push(m_Doc->GroupCounter);
Index: scribus/plugins/aiimplugin/importai.cpp
===================================================================
--- scribus/plugins/aiimplugin/importai.cpp	(revision 13953)
+++ scribus/plugins/aiimplugin/importai.cpp	(revision 13954)
@@ -258,7 +258,7 @@
 				double gw = maxx - minx;
 				double gh = maxy - miny;
 				PageItem *high = m_Doc->Items->at(highestItem);
-				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 				PageItem *neu = m_Doc->Items->takeAt(z);
 				m_Doc->Items->insert(lowestItem, neu);
 				neu->Groups.push(m_Doc->GroupCounter);
@@ -1819,7 +1819,7 @@
 			QString family = textFont;
 			QString ret = "";
 			family.replace( QRegExp( "'" ) , QChar( ' ' ) );
-			textFont = m_Doc->toolSettings.defFont;
+			textFont = m_Doc->itemToolPrefs.defFont;
 			bool found = false;
 			SCFontsIterator it(PrefsManager::instance()->appPrefs.AvailFonts);
 			for ( ; it.hasNext(); it.next())
Index: scribus/plugins/xfigimplugin/importxfig.cpp
===================================================================
--- scribus/plugins/xfigimplugin/importxfig.cpp	(revision 13953)
+++ scribus/plugins/xfigimplugin/importxfig.cpp	(revision 13954)
@@ -276,7 +276,7 @@
 				double gw = maxx - minx;
 				double gh = maxy - miny;
 				PageItem *high = m_Doc->Items->at(highestItem);
-				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 				PageItem *neu = m_Doc->Items->takeAt(z);
 				m_Doc->Items->insert(lowestItem, neu);
 				neu->Groups.push(m_Doc->GroupCounter);
@@ -1213,7 +1213,7 @@
 	text = cleanText(text);
 	FPointArray textPath;
 	QPainterPath painterPath;
-	QString TFont = m_Doc->toolSettings.defFont;
+	QString TFont = m_Doc->itemToolPrefs.defFont;
 	QFont::Weight weight = QFont::Normal;
 	bool isItalic = false;
 	if (font_flags & 4)
@@ -1370,7 +1370,7 @@
 				weight = QFont::Normal;
 				break;
 			default:
-				TFont = m_Doc->toolSettings.defFont;
+				TFont = m_Doc->itemToolPrefs.defFont;
 				weight = QFont::Normal;
 				break;
 		}
@@ -1401,7 +1401,7 @@
 				weight = QFont::Normal;
 				break;
 			default:
-				TFont = m_Doc->toolSettings.defFont;
+				TFont = m_Doc->itemToolPrefs.defFont;
 				weight = QFont::Normal;
 				break;
 		}
Index: scribus/plugins/wpgimplugin/importwpg.cpp
===================================================================
--- scribus/plugins/wpgimplugin/importwpg.cpp	(revision 13953)
+++ scribus/plugins/wpgimplugin/importwpg.cpp	(revision 13954)
@@ -441,7 +441,7 @@
 	}
 	double w = (bitmap.rect.x2 - bitmap.rect.x1) * 72.0;
 	double h = (bitmap.rect.y2 - bitmap.rect.y1) * 72.0;
-	int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, bitmap.rect.x1 * 72 + baseX, bitmap.rect.y1 * 72 + baseY, w, h, 1, m_Doc->toolSettings.dBrushPict, CommonStrings::None, true);
+	int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, bitmap.rect.x1 * 72 + baseX, bitmap.rect.y1 * 72 + baseY, w, h, 1, m_Doc->itemToolPrefs.dBrushPict, CommonStrings::None, true);
 	PageItem *ite = m_Doc->Items->at(z);
 	ite->tempImageFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_svg_XXXXXX.png");
 	ite->tempImageFile->open();
@@ -615,7 +615,7 @@
 				double gw = maxx - minx;
 				double gh = maxy - miny;
 				PageItem *high = m_Doc->Items->at(highestItem);
-				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 				PageItem *neu = m_Doc->Items->takeAt(z);
 				m_Doc->Items->insert(lowestItem, neu);
 				neu->Groups.push(m_Doc->GroupCounter);
Index: scribus/plugins/svgimplugin/svgplugin.cpp
===================================================================
--- scribus/plugins/svgimplugin/svgplugin.cpp	(revision 13953)
+++ scribus/plugins/svgimplugin/svgplugin.cpp	(revision 13954)
@@ -307,7 +307,7 @@
 	m_Doc->view()->updatesOn(false);
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-	gc->FontFamily = m_Doc->toolSettings.defFont;
+	gc->FontFamily = m_Doc->itemToolPrefs.defFont;
 	if (!m_Doc->PageColors.contains("Black"))
 		m_Doc->PageColors.insert("Black", ScColor(0, 0, 0, 255));
 	m_gc.push( gc );
@@ -403,7 +403,7 @@
 			double gw = maxx - minx;
 			double gh = maxy - miny;
 			PageItem *high = m_Doc->Items->at(highestItem);
-			int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+			int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 			PageItem *neu = m_Doc->Items->takeAt(z);
 			m_Doc->Items->insert(lowestItem, neu);
 			neu->Groups.push(m_Doc->GroupCounter);
@@ -1217,7 +1217,7 @@
 	double h = e.attribute( "height" ).isEmpty() ? 1.0 : parseUnit( e.attribute( "height" ) );
 	setupNode(e);
 	parseClipPathAttr(e, clipPath);
-	int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x+BaseX, y+BaseY, w, h, 1, m_Doc->toolSettings.dBrushPict, CommonStrings::None, true);
+	int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x+BaseX, y+BaseY, w, h, 1, m_Doc->itemToolPrefs.dBrushPict, CommonStrings::None, true);
 	PageItem* ite = m_Doc->Items->at(z);
 	if (!fname.isEmpty())
 	{
Index: scribus/plugins/psimport/importps.cpp
===================================================================
--- scribus/plugins/psimport/importps.cpp	(revision 13953)
+++ scribus/plugins/psimport/importps.cpp	(revision 13954)
@@ -274,7 +274,7 @@
 				double gw = maxx - minx;
 				double gh = maxy - miny;
 				PageItem *high = m_Doc->Items->at(highestItem);
-				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
+				int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->itemToolPrefs.dBrush, m_Doc->itemToolPrefs.dPen, true);
 				PageItem *neu = m_Doc->Items->takeAt(z);
 				m_Doc->Items->insert(lowestItem, neu);
 				neu->Groups.push(m_Doc->GroupCounter);




More information about the scribus-commit mailing list