r18936 by fschmid - Remove some now unused code.

scribus-commit scribus-commit at lists.scribus.net
Sun Mar 23 07:59:52 UTC 2014


Author: fschmid
Date: Sun Mar 23 07:59:52 2014
New Revision: 18936

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18936
Log:
Remove some now unused code.

Modified:
    trunk/Scribus/scribus/plugins/import/odg/importodg.cpp

Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18936&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp Sun Mar 23 07:59:52 2014
@@ -3918,117 +3918,6 @@
 			hatchS = 2;
 		item->setHatchParameters(hatchS, gStyle.hatchDistance, gStyle.hatchRotation, obState.hatchSolidFill, obState.CurrColorFill, gStyle.hatchColor);
 		item->GrType = 14;
-	/*	QString patternName = "Hatch_" + obState.hatchName;
-		if (m_Doc->docPatterns.contains(patternName))
-		{
-			item->setPattern(patternName);
-			item->GrType = 8;
-		}
-		else
-		{
-			ScPattern pat = ScPattern();
-			pat.setDoc(m_Doc);
-			int patB = qRound(fabs(sin(gStyle.hatchRotation / 180.0 * M_PI)) * gStyle.hatchDistance * 8);
-			if (patB == 0)
-				patB = qRound(gStyle.hatchDistance * 4);
-			int patH = fabs(cos(gStyle.hatchRotation / 180.0 * M_PI)) * gStyle.hatchDistance * 8;
-			if (patH == 0)
-				patH = qRound(gStyle.hatchDistance * 4);
-			int hw = qMax(patB, patH);
-			QImage retImg = QImage(patB * 3, patH * 3, QImage::Format_ARGB32_Premultiplied);
-			if (obState.hatchSolidFill)
-			{
-				const ScColor& col = m_Doc->PageColors[obState.CurrColorFill];
-				QColor tmp = ScColorEngine::getShadeColorProof(col, m_Doc, 100);
-				retImg.fill(tmp.rgba());
-			}
-			else
-				retImg.fill( qRgba(0, 0, 0, 0) );
-			ScPainter *painter = new ScPainter(&retImg, retImg.width(), retImg.height(), 1, 0);
-			const ScColor& col = m_Doc->PageColors[gStyle.hatchColor];
-			QColor tmp = ScColorEngine::getShadeColorProof(col, m_Doc, 100);
-			painter->setPen(tmp, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			painter->setStrokeMode(ScPainter::Solid);
-			painter->setFillMode(ScPainter::None);
-			painter->setBlendModeStroke(0);
-			painter->translate(patB / 2, patH / 2);
-			painter->setZoomFactor(2);
-			painter->rotate(-gStyle.hatchRotation);
-			painter->save();
-			double xlen = sqrt((hw * 2.0) * (hw * 2.0)) * 2.0;
-			double dist = 0;
-			while (dist < sqrt((hw * 2.0) * (hw * 2.0)) * 3.0)
-			{
-				painter->drawLine(QPointF(-xlen * 2, dist), QPointF(xlen * 2, dist));
-				painter->drawLine(QPointF(-xlen * 2, -dist), QPointF(xlen * 2, -dist));
-				dist += gStyle.hatchDistance;
-			}
-			painter->restore();
-			if ((gStyle.hatchStyle == "double") || (gStyle.hatchStyle == "triple"))
-			{
-				painter->save();
-				painter->rotate(90);
-				dist = 0;
-				while (dist < sqrt((hw * 2.0) * (hw * 2.0)) * 3.0)
-				{
-					painter->drawLine(QPointF(-xlen * 2, dist), QPointF(xlen * 2, dist));
-					painter->drawLine(QPointF(-xlen * 2, -dist), QPointF(xlen * 2, -dist));
-					dist += gStyle.hatchDistance;
-				}
-				painter->restore();
-			}
-			if (gStyle.hatchStyle == "triple")
-			{
-				painter->save();
-				painter->rotate(45);
-				dist = 0;
-				while (dist < sqrt((hw * 2.0) * (hw * 2.0)) * 3.0)
-				{
-					painter->drawLine(QPointF(-xlen * 2, dist), QPointF(xlen * 2, dist));
-					painter->drawLine(QPointF(-xlen * 2, -dist), QPointF(xlen * 2, -dist));
-					dist += gStyle.hatchDistance;
-				}
-				painter->restore();
-			}
-			painter->end();
-			delete painter;
-			QImage patImg = retImg.copy(patB, patH, patB, patH).scaled(patB / 2, patH / 2);
-			QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_odg_XXXXXX.png");
-			tempFile->setAutoRemove(false);
-			if (tempFile->open())
-			{
-				QString fileName = getLongPathName(tempFile->fileName());
-				if (!fileName.isEmpty())
-				{
-					tempFile->close();
-					patImg.save(fileName, "PNG");
-					int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, 0, 0, patImg.width(), patImg.height(), 0, CommonStrings::None, CommonStrings::None, true);
-					PageItem* newItem = m_Doc->Items->at(z);
-					newItem->pixm.imgInfo.lowResType = 0;
-					m_Doc->loadPict(fileName, newItem);
-					newItem->isInlineImage = true;
-					newItem->isTempFile = true;
-					m_Doc->Items->takeAt(z);
-					pat.width = newItem->pixm.qImage().width();
-					pat.height = newItem->pixm.qImage().height();
-					pat.scaleX = 1;
-					pat.scaleY = 1;
-					pat.pattern = newItem->pixm.qImage().copy();
-					newItem->setWidth(pat.pattern.width());
-					newItem->setHeight(pat.pattern.height());
-					newItem->SetRectFrame();
-					newItem->gXpos = 0.0;
-					newItem->gYpos = 0.0;
-					newItem->gWidth = pat.pattern.width();
-					newItem->gHeight = pat.pattern.height();
-					pat.items.append(newItem);
-					m_Doc->addPattern(patternName, pat);
-					item->setPattern(patternName);
-					item->GrType = 8;
-				}
-			}
-			delete tempFile;
-		} */
 	}
 	if (!obState.opacityName.isEmpty())
 	{




More information about the scribus-commit mailing list