r17634 by jghali - fix quite a few build warnings

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 25 18:06:29 UTC 2012


Author: jghali
Date: Mon Jun 25 18:06:29 2012
New Revision: 17634

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17634
Log:
fix quite a few build warnings

Modified:
    branches/Version14x/Scribus/scribus/canvas.cpp
    branches/Version14x/Scribus/scribus/canvasmode.cpp
    branches/Version14x/Scribus/scribus/canvasmode_create.cpp
    branches/Version14x/Scribus/scribus/canvasmode_drawfreehand.cpp
    branches/Version14x/Scribus/scribus/canvasmode_nodeedit.cpp
    branches/Version14x/Scribus/scribus/canvasmode_objimport.cpp
    branches/Version14x/Scribus/scribus/canvasmode_rotate.cpp
    branches/Version14x/Scribus/scribus/charselectenhanced.cpp
    branches/Version14x/Scribus/scribus/cmykfw.cpp
    branches/Version14x/Scribus/scribus/curvewidget.cpp
    branches/Version14x/Scribus/scribus/pageitem_pathtext.cpp
    branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
    branches/Version14x/Scribus/scribus/pdflib_core.cpp
    branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
    branches/Version14x/Scribus/scribus/plugins/import/cvg/importcvg.cpp
    branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    branches/Version14x/Scribus/scribus/plugins/import/pct/importpct.cpp
    branches/Version14x/Scribus/scribus/plugins/import/ps/importps.cpp
    branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    branches/Version14x/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
    branches/Version14x/Scribus/scribus/plugins/import/xfig/importxfig.cpp
    branches/Version14x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
    branches/Version14x/Scribus/scribus/pslib.cpp
    branches/Version14x/Scribus/scribus/scpageoutput.cpp
    branches/Version14x/Scribus/scribus/stencilreader.cpp
    branches/Version14x/Scribus/scribus/text/storytext.cpp

Modified: branches/Version14x/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvas.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvas.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvas.cpp Mon Jun 25 18:06:29 2012
@@ -1143,7 +1143,7 @@
 			double gx, gy, gw, gh;
 			m_doc->m_Selection->setGroupRect();
 			m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
-			QPoint out = contentsToViewport(QPoint(0, 0));
+//			QPoint out = contentsToViewport(QPoint(0, 0));
 //			pp->resetMatrix();
 //			pp->translate(out.x(), out.y());
 //			pp->translate(-qRound(m_doc->minCanvasCoordinate.x()*m_viewMode.scale), -qRound(m_doc->minCanvasCoordinate.y()*m_viewMode.scale));
@@ -2353,7 +2353,3 @@
 	m_view->horizRuler->setItem(item);
 	m_view->horizRuler->update();
 }
-
-
-
-

Modified: branches/Version14x/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode.cpp Mon Jun 25 18:06:29 2012
@@ -637,7 +637,6 @@
 
 bool CanvasMode::commonMouseMove(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	if ((m_canvas->m_viewMode.m_MouseButtonPressed && (m->buttons() & Qt::RightButton) && (m->modifiers() & Qt::ControlModifier)) || ((!(m->modifiers() & Qt::ControlModifier)) && (m->buttons() & Qt::MidButton)))
 	{
 		if (!m_panGesture)

Modified: branches/Version14x/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_create.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_create.cpp Mon Jun 25 18:06:29 2012
@@ -369,7 +369,6 @@
 
 void CreateMode::mouseReleaseEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	modifiers = m->modifiers();
 
 	PageItem *currItem;

Modified: branches/Version14x/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_drawfreehand.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_drawfreehand.cpp Mon Jun 25 18:06:29 2012
@@ -246,8 +246,6 @@
 	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	double Rxp = 0;
 	double Ryp = 0;
-	double Rxpd = 0;
-	double Rypd = 0;
 //	m_canvas->PaintSizeRect(QRect());
 	FPoint npf, npf2;
 	QRect tx;
@@ -266,10 +264,8 @@
 	QRect mpo(m->x()-m_doc->guidesSettings.grabRad, m->y()-m_doc->guidesSettings.grabRad, m_doc->guidesSettings.grabRad*2, m_doc->guidesSettings.grabRad*2);
 //	mpo.moveBy(qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 	Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
-	Rxpd = Mxp - Rxp;
 	Mxp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
-	Rypd = Myp - Ryp;
 	Myp = qRound(Ryp);
 	SeRx = Mxp;
 	SeRy = Myp;
@@ -1048,5 +1044,3 @@
 	}
 }
 
-
-

Modified: branches/Version14x/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_nodeedit.cpp Mon Jun 25 18:06:29 2012
@@ -441,10 +441,6 @@
 
 void CanvasMode_NodeEdit::mouseReleaseEvent(QMouseEvent *m)
 {
-//	const double mouseX = m->globalX();
-//	const double mouseY = m->globalY();
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	
 //	QMenu* pmen3 = NULL;
 	PageItem *currItem;
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
@@ -1287,5 +1283,3 @@
 	m_doc->regionsChanged()->update(QRectF());
 }
 
-
-

Modified: branches/Version14x/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_objimport.cpp Mon Jun 25 18:06:29 2012
@@ -127,8 +127,6 @@
 
 void CanvasMode_ObjImport::mouseMoveEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	
 	m->accept();
 
 	if (commonMouseMove(m))
@@ -188,7 +186,6 @@
 
 void CanvasMode_ObjImport::mouseReleaseEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
 	m_canvas->resetRenderMode();
 	m->accept();
@@ -205,6 +202,3 @@
 	m_view->pageSelector->clearFocus();
 }
 
-
-
-

Modified: branches/Version14x/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_rotate.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_rotate.cpp Mon Jun 25 18:06:29 2012
@@ -193,7 +193,6 @@
 	m_canvasPressCoord = mousePointDoc;
 	
 	double Rxp = 0,  Ryp = 0;
-	double Rxpd = 0, Rypd = 0;
 	PageItem *currItem;
 	m_canvas->PaintSizeRect(QRect());
 	QRect tx;
@@ -206,10 +205,8 @@
 	m_view->registerMousePress(m->globalPos());
 	QRect mpo(m->x()-m_doc->guidesSettings.grabRad, m->y()-m_doc->guidesSettings.grabRad, m_doc->guidesSettings.grabRad*2, m_doc->guidesSettings.grabRad*2);
 	Rxp  = m_doc->ApplyGridF(m_canvasPressCoord).x();
-	Rxpd = m_canvasPressCoord.x() - Rxp;
 	m_canvasPressCoord.setX( qRound(Rxp) );
 	Ryp  = m_doc->ApplyGridF(m_canvasPressCoord).y();
-	Rypd = m_canvasPressCoord.y()  - Ryp;
 	m_canvasPressCoord.setY( qRound(Ryp) );
 	if (m->button() == Qt::MidButton)
 	{
@@ -384,15 +381,12 @@
 	m_canvasCurrCoord  = mousePointDoc;
 	m_angleConstrained = false;
 	
-	double newX, newY;
 	PageItem *currItem;
 	QRect tx;
 	m->accept();
 
 	if (GetItem(&currItem))
 	{
-		newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
-		newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
 		m_angleConstrained = ((m->modifiers() & Qt::ControlModifier) != Qt::NoModifier);
 		if (m_view->moveTimerElapsed() && m_canvas->m_viewMode.m_MouseButtonPressed)
 		{
@@ -452,8 +446,6 @@
 	{
 		if ((m_canvas->m_viewMode.m_MouseButtonPressed) && (m->buttons() & Qt::LeftButton))
 		{
-			newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
-			newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
 			QPoint startP = m_canvas->canvasToGlobal(m_canvasPressCoord);
 			m_view->redrawMarker->setGeometry(QRect(startP, m->globalPos()).normalized());
 			if (!m_view->redrawMarker->isVisible())

Modified: branches/Version14x/Scribus/scribus/charselectenhanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/charselectenhanced.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/charselectenhanced.cpp (original)
+++ branches/Version14x/Scribus/scribus/charselectenhanced.cpp Mon Jun 25 18:06:29 2012
@@ -75,7 +75,6 @@
 {
 //     tDebug("scanFont start");
 	uint  charcode;
-	uint   gindex;
 	QString   gname;
 	allClasses.clear();
 	charactersFull.clear();
@@ -112,7 +111,6 @@
 	        it != glyphs.end(); ++it)
 	{
 		charcode = it.value().first.unicode();
-		gindex = it.key();
 		gname = it.value().second;
 		charactersFull.append(charcode);
 		if ((charcode >= 0x0020) && (charcode <= 0x007F))

Modified: branches/Version14x/Scribus/scribus/cmykfw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/cmykfw.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/cmykfw.cpp (original)
+++ branches/Version14x/Scribus/scribus/cmykfw.cpp Mon Jun 25 18:06:29 2012
@@ -83,11 +83,7 @@
 	cyd = cmyk.y / 2.55;
 	ckd = cmyk.k / 2.55;
 	RGBColor rgb;
-	double crd, cgd, cbd;
 	ScColorEngine::getRGBValues(orig, m_doc, rgb);
-	crd = rgb.r / 2.55;
-	cgd = rgb.g / 2.55;
-	cbd = rgb.b / 2.55;
 	resize( 498, 306 );
 	setWindowTitle( tr( "Edit Color" ) );
 	setWindowIcon(QIcon(loadIcon("AppIcon.png")));

Modified: branches/Version14x/Scribus/scribus/curvewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/curvewidget.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/curvewidget.cpp (original)
+++ branches/Version14x/Scribus/scribus/curvewidget.cpp Mon Jun 25 18:06:29 2012
@@ -52,11 +52,9 @@
 
 void KCurve::paintEvent(QPaintEvent *)
 {
-	int    x, y;
+	int    x = 0;
 	int    wWidth = width() - 1;
 	int    wHeight = height() - 1;
-	x  = 0;
-	y  = 0;
 	// Drawing selection or all histogram values.
 	QPainter p1;
 	p1.begin(this);

Modified: branches/Version14x/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ branches/Version14x/Scribus/scribus/pageitem_pathtext.cpp Mon Jun 25 18:06:29 2012
@@ -78,13 +78,12 @@
 	MaxChars = 0;
 	int a;
 	double chs;
-	QString chstr, chstr2, chstr3;
+	QString chstr;
 	ScText *hl;
 	double dx;
 	FPoint point = FPoint(0, 0);
 	FPoint tangent = FPoint(0, 0);
 	uint seg = 0;
-	double segLen = 0;
 	QColor tmp;
 	CurX = Extra;
 	QString cachedStroke = "";
@@ -131,7 +130,6 @@
 		CurX += itemText.charStyle(0).fontSize() * itemText.charStyle(0).tracking() / 10000.0;
 		totalTextLen += itemText.charStyle(0).fontSize() * itemText.charStyle(0).tracking() / 10000.0;
 	}
-	segLen = PoLine.lenPathSeg(seg);
 	for (a = firstChar; a < itemText.length(); ++a)
 	{
 		hl = itemText.item(a);

Modified: branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pageitem_textframe.cpp (original)
+++ branches/Version14x/Scribus/scribus/pageitem_textframe.cpp Mon Jun 25 18:06:29 2012
@@ -2533,8 +2533,7 @@
 		return;
 	QMatrix pf2;
 	QPoint pt1, pt2;
-	double wide, lineCorr;
-	QChar chstr0;
+	double wide;
 	QString cachedStroke = "";
 	QString cachedFill = "";
 	double cachedFillShade = -1;
@@ -2546,7 +2545,7 @@
 	QColor cachedFillQ;
 	QColor cachedStrokeQ;
 	//	QValueList<ParagraphStyle::TabRecord> tTabValues;
-	double desc, asce, tabDist;
+	double desc, asce;
 	//	tTabValues.clear();
 	p->save(); //SA1
 	//	QRect e2;
@@ -2570,10 +2569,6 @@
 			p->fillPath();
 		}
 	}
-	if (lineColor() != CommonStrings::None)
-		lineCorr = m_lineWidth / 2.0;
-	else
-		lineCorr = 0;
 	if ((isAnnotation()) && (annotation().Type() == 2) && (!Pfile.isEmpty()) && (PictureIsAvailable) && (PicArt) && (annotation().UseIcons()))
 	{
 		p->save();//SA2
@@ -2633,14 +2628,12 @@
 			pf2.translate(0, Height);
 			pf2.scale(1, -1);
 		}
-		uint tabCc = 0;
 		assert( firstInFrame() >= 0 );
 		assert( lastInFrame() < itemText.length() );
 		LineSpec ls;
 		for (uint ll=0; ll < itemText.lines(); ++ll)
 		{
 			ls = itemText.line(ll);
-			tabDist = ls.x;
 			double CurX = ls.x;
 
 			// Draw text selection rectangles
@@ -2721,11 +2714,8 @@
 			{
 				hl = itemText.item(a);
 				const CharStyle& charStyle(itemText.charStyle(a));
-				double chs = charStyle.fontSize() * hl->glyph.scaleV;
 				bool selected = itemText.selected(a);
-				if (charStyle.effects() & ScStyle_StartOfLine)
-					tabCc = 0;
-				chstr0 = hl->ch;
+
 				actFill = charStyle.fillColor();
 				actFillShade = charStyle.fillShade();
 				if (actFill != CommonStrings::None)
@@ -2744,24 +2734,6 @@
 				}
 				else
 					p->setFillMode(ScPainter::None);
-				if (charStyle.effects() & ScStyle_DropCap)
-				{
-					const ParagraphStyle& style(itemText.paragraphStyle(a));
-					if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
-						chs = qRound(10 * ((m_Doc->typographicSettings.valueBaseGrid * (style.dropCapLines()-1) + (charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-					else
-					{
-						if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
-							chs = qRound(10 * ((style.lineSpacing() * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-						else
-						{
-							double currasce = charStyle.font().height(style.charStyle().fontSize() / 10.0);
-							chs = qRound(10 * ((currasce * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-						}
-					}
-				}
-				if (chstr0 == SpecialChars::TAB)
-					tabCc++;
 
 				if (!m_Doc->RePos)
 				{
@@ -2804,7 +2776,6 @@
 					else
 						CurX += hl->glyph.wide();
 				}
-				tabDist = CurX;
 			}
 		}
 	//	else {
@@ -3821,7 +3792,6 @@
 		p->drawLine(FPoint(0, TExtra + lineCorr), FPoint(Width, TExtra + lineCorr));
 	if (BExtra + lineCorr!=0.0)
 		p->drawLine(FPoint(0, Height - BExtra - lineCorr), FPoint(Width, Height - BExtra - lineCorr));
-	double oldColRightX = Extra + lineCorr;
 	while(curCol < Cols)
 	{
 		colLeft=(colWidth + ColGap) * curCol + Extra + lineCorr;
@@ -3829,7 +3799,6 @@
 			p->drawLine(FPoint(colLeft, 0), FPoint(colLeft, 0+Height));
 		if (colLeft + colWidth != Width)
 			p->drawLine(FPoint(colLeft+colWidth, 0), FPoint(colLeft+colWidth, 0+Height));
-		oldColRightX=colLeft+colWidth;
 		++curCol;
 	}
 	

Modified: branches/Version14x/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdflib_core.cpp (original)
+++ branches/Version14x/Scribus/scribus/pdflib_core.cpp Mon Jun 25 18:06:29 2012
@@ -3914,7 +3914,6 @@
 	int tabCc = 0;
 	int savedOwnPage = ite->OwnPage;
 	double tabDist = ite->textToFrameDistLeft();
-	double colLeft = 0.0;
 	QString tmp(""), tmp2("");
 	QList<ParagraphStyle::TabRecord> tTabValues;
 	ite->OwnPage = PNr;
@@ -3930,7 +3929,6 @@
 		for (uint ll=0; ll < ite->itemText.lines(); ++ll)
 		{
 			LineSpec ls = ite->itemText.line(ll);
-			colLeft = ls.colLeft;
 			tabDist = ls.x;
 			double CurX = ls.x;
 			for (int d = ls.firstItem; d <= ls.lastItem; ++d)
@@ -4375,11 +4373,7 @@
 		{
 			//		double Ulen = style.font().charWidth(chstr, style.fontSize()) * (hl->glyph.scaleH);
 			double Ulen = hl->glyph.xadvance;
-			double Upos, Uwid, kern;
-			if (style.effects() & ScStyle_StartOfLine)
-				kern = 0;
-			else
-				kern = style.fontSize() * style.tracking() / 10000.0;
+			double Upos, Uwid;
 			if ((style.underlineOffset() != -1) || (style.underlineWidth() != -1))
 			{
 				if (style.underlineOffset() != -1)
@@ -4655,11 +4649,7 @@
 		{
 			//		double Ulen = style.font().charWidth(chstr, style.fontSize()) * (hl->glyph.scaleH);
 			double Ulen = hl->glyph.xadvance;
-			double Upos, Uwid, kern;
-			if (hl->effects() & ScStyle_StartOfLine)
-				kern = 0;
-			else
-				kern = style.fontSize() * style.tracking() / 10000.0;
+			double Upos, Uwid;
 			if ((style.strikethruOffset() != -1) || (style.strikethruWidth() != -1))
 			{
 				if (style.strikethruOffset() != -1)

Modified: branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp Mon Jun 25 18:06:29 2012
@@ -200,9 +200,6 @@
 			m_Doc->PageColors.insert(it.key(), it.value());
 	}
 	Elements.clear();
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/cvg/importcvg.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/cvg/importcvg.cpp Mon Jun 25 18:06:29 2012
@@ -63,7 +63,7 @@
 	interactive = (flags & LoadSavePlugin::lfInteractive);
 	importerFlags = flags;
 	cancel = false;
-	double x, y, b, h;
+	double b, h;
 	bool ret = false;
 	CustColors.clear();
 	QFileInfo fi = QFileInfo(fName);
@@ -93,8 +93,6 @@
 	else
 		progressDialog = NULL;
 /* Set default Page to size defined in Preferences */
-	x = 0.0;
-	y = 0.0;
 	b = 0.0;
 	h = 0.0;
 	if (progressDialog)
@@ -146,9 +144,6 @@
 		m_Doc->m_pageSize = "Custom";
 	}
 	Elements.clear();
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);

Modified: branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Mon Jun 25 18:06:29 2012
@@ -378,9 +378,6 @@
 				m_Doc->documentInfo.setKeywords(Keys.left(Keys.length()-2));
 		}
 	}
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	Elements.clear();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
@@ -2003,6 +2000,3 @@
 	m_styles.clear();
 	m_draws.clear();
 }
-
-
-

Modified: branches/Version14x/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/pct/importpct.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/pct/importpct.cpp Mon Jun 25 18:06:29 2012
@@ -147,9 +147,6 @@
 		m_Doc->m_pageSize = "Custom";
 	}
 	Elements.clear();
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/import/ps/importps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/ps/importps.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/ps/importps.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/ps/importps.cpp Mon Jun 25 18:06:29 2012
@@ -214,9 +214,6 @@
 	}
 	boundingBoxRect.addRect(0, 0, b-x, h-y);
 	Elements.clear();
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp Mon Jun 25 18:06:29 2012
@@ -298,9 +298,6 @@
 			m_Doc->PageOri = 0;
 		m_Doc->m_pageSize = "Custom";
 	}
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/wmf/wmfimport.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/wmf/wmfimport.cpp Mon Jun 25 18:06:29 2012
@@ -567,9 +567,6 @@
 			m_Doc->PageOri = 0;
 		m_Doc->m_pageSize = "Custom";
 	}
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/xfig/importxfig.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/xfig/importxfig.cpp Mon Jun 25 18:06:29 2012
@@ -221,9 +221,6 @@
 		m_Doc->m_pageSize = "Custom";
 	}
 	Elements.clear();
-	FPoint minSize = m_Doc->minCanvasCoordinate;
-	FPoint maxSize = m_Doc->maxCanvasCoordinate;
-	FPoint cOrigin = m_Doc->view()->canvasOrigin();
 	m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;

Modified: branches/Version14x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp Mon Jun 25 18:06:29 2012
@@ -857,12 +857,10 @@
 			}
 		}
 	}
-	double x, y, wide;
+	double wide;
 	QString chstr;
 	for (int a = 0; a < Item->itemText.length(); ++a)
 	{
-		x = 0.0;
-		y = 0.0;
 		ScText *hl = Item->itemText.item(a);
 		const CharStyle& charStyle(Item->itemText.charStyle(a));
 		chstr = Item->itemText.text(a,1);

Modified: branches/Version14x/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/pslib.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pslib.cpp (original)
+++ branches/Version14x/Scribus/scribus/pslib.cpp Mon Jun 25 18:06:29 2012
@@ -2826,11 +2826,7 @@
 								PS_save();
 								PS_translate(0, -(tsz / 10.0));
 								double Ulen = hl->glyph.xadvance;
-								double Upos, Uwid, kern;
-								if (style.effects() & ScStyle_StartOfLine)
-									kern = 0;
-								else
-									kern = style.fontSize() * style.tracking() / 10000.0;
+								double Upos, Uwid;
 								if ((style.underlineOffset() != -1) || (style.underlineWidth() != -1))
 								{
 									if (style.underlineOffset() != -1)
@@ -2897,11 +2893,7 @@
 								PS_save();
 								PS_translate(0, -(tsz / 10.0));
 								double Ulen = hl->glyph.xadvance;
-								double Upos, Uwid, kern;
-								if (hl->effects() & ScStyle_StartOfLine)
-									kern = 0;
-								else
-									kern = style.fontSize() * style.tracking() / 10000.0;
+								double Upos, Uwid;
 								if ((style.strikethruOffset() != -1) || (style.strikethruWidth() != -1))
 								{
 									if (style.strikethruOffset() != -1)
@@ -2974,11 +2966,7 @@
 					{
 						PS_save();
 						double Ulen = hl->glyph.xadvance;
-						double Upos, Uwid, kern;
-						if (style.effects() & ScStyle_StartOfLine)
-							kern = 0;
-						else
-							kern = style.fontSize() * style.tracking() / 10000.0;
+						double Upos, Uwid;
 						if ((style.underlineOffset() != -1) || (style.underlineWidth() != -1))
 						{
 							if (style.underlineOffset() != -1)
@@ -3051,11 +3039,7 @@
 					{
 						PS_save();
 						double Ulen = hl->glyph.xadvance;
-						double Upos, Uwid, kern;
-						if (hl->effects() & ScStyle_StartOfLine)
-							kern = 0;
-						else
-							kern = style.fontSize() * style.tracking() / 10000.0;
+						double Upos, Uwid;
 						if ((style.strikethruOffset() != -1) || (style.strikethruWidth() != -1))
 						{
 							if (style.strikethruOffset() != -1)
@@ -3505,7 +3489,6 @@
 	int tabCc = 0;
 	int savedOwnPage = ite->OwnPage;
 	double tabDist = ite->textToFrameDistLeft();
-	double colLeft = 0.0;
 	QList<ParagraphStyle::TabRecord> tTabValues;
 
 	ite->OwnPage = argh;
@@ -3517,7 +3500,6 @@
 
 	for (uint ll=0; ll < ite->itemText.lines(); ++ll) {
 		LineSpec ls = ite->itemText.line(ll);
-		colLeft = ls.colLeft;
 		tabDist = ls.x;
 		double CurX = ls.x;
 
@@ -3775,11 +3757,7 @@
 		{
 	//		double Ulen = cstyle.font().glyphWidth(glyph, cstyle.fontSize()) * glyphs.scaleH;
 			double Ulen = glyphs.xadvance;
-			double Upos, lw, kern;
-			if (cstyle.effects() & ScStyle_StartOfLine)
-				kern = 0;
-			else
-				kern = cstyle.fontSize() * cstyle.tracking() / 10000.0;
+			double Upos, lw;
 			if ((cstyle.underlineOffset() != -1) || (cstyle.underlineWidth() != -1))
 			{
 				if (cstyle.underlineOffset() != -1)
@@ -3908,11 +3886,7 @@
 		{
 			//		double Ulen = cstyle.font().glyphWidth(glyph, cstyle.fontSize()) * glyphs.scaleH;
 			double Ulen = glyphs.xadvance;
-			double Upos, lw, kern;
-			if (cstyle.effects() & 16384)
-				kern = 0;
-			else
-				kern = cstyle.fontSize() * cstyle.tracking() / 10000.0;
+			double Upos, lw;
 			if ((cstyle.strikethruOffset() != -1) || (cstyle.strikethruWidth() != -1))
 			{
 				if (cstyle.strikethruOffset() != -1)

Modified: branches/Version14x/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scpageoutput.cpp (original)
+++ branches/Version14x/Scribus/scribus/scpageoutput.cpp Mon Jun 25 18:06:29 2012
@@ -1016,12 +1016,12 @@
 
 void ScPageOutput::drawItem_PathText( PageItem_PathText* item, ScPainterExBase* painter, const QRect& clip )
 {
-	QString chstr, chstr2, chstr3;
+	QString chstr;
 	ScText *hl;
 	FPoint point = FPoint(0, 0);
 	FPoint tangent = FPoint(0, 0);
 	uint seg = 0;
-	double chs, dx, segLen = 0;
+	double dx;
 	double CurX = item->textToFrameDistLeft(); // item->CurX = item->textToFrameDistLeft()
 	double CurY = 0;
 	QString actFill, actStroke;
@@ -1060,7 +1060,6 @@
 		CurX += itemText.item(0)->fontSize() * itemText.charStyle(0).tracking() / 10000.0;
 		totalTextLen += itemText.charStyle(0).fontSize() * itemText.charStyle(0).tracking() / 10000.0;
 	}
-	segLen = item->PoLine.lenPathSeg(seg);
 	for (int a = 0; a < itemText.length(); ++a)
 	{
 		hl = itemText.item(a);
@@ -1107,7 +1106,6 @@
 		if (chstr[0] == SpecialChars::PAGENUMBER || chstr[0] == SpecialChars::PARSEP || chstr[0] == SpecialChars::PAGECOUNT
 			|| chstr[0] == SpecialChars::TAB || chstr[0] == SpecialChars::LINEBREAK)
 			continue;
-		chs = hl->fontSize();
 		if (a < itemText.length()-1)
 			chstr += itemText.text(a+1, 1);
 		hl->glyph.yadvance = 0;
@@ -1315,7 +1313,6 @@
 	QRegion cm;
 	int a;
 	double lineCorr;
-	QString chstr, chstr2, chstr3;
 	ScText *hl;
 	double desc, asce, tabDist;
 	
@@ -1361,7 +1358,7 @@
 			painter->translate(0, item->height());
 			painter->scale(1, -1);
 		}
-		uint tabCc = 0;
+
 		for (uint ll=0; ll < item->itemText.lines(); ++ll)
 		{
 			LineSpec ls = item->itemText.line(ll);
@@ -1371,10 +1368,6 @@
 			{
 				hl = item->itemText.item(a);
 				const CharStyle& charStyle  = item->itemText.charStyle(a);
-				double chs = charStyle.fontSize() * hl->glyph.scaleV;
-				if (charStyle.effects() & ScStyle_StartOfLine)
-					tabCc = 0;
-				chstr = hl->ch;
 				if (charStyle.fillColor() != CommonStrings::None)
 				{
 					ScColorShade tmp(m_doc->PageColors[charStyle.fillColor()], (int) hl->fillShade());
@@ -1385,24 +1378,7 @@
 					ScColorShade tmp(m_doc->PageColors[charStyle.strokeColor()], (int) hl->strokeShade());
 					painter->setPen(tmp, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				}
-				if (charStyle.effects() & ScStyle_DropCap)
-				{
-					const ParagraphStyle& style(item->itemText.paragraphStyle(a));
-					if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
-						chs = qRound(10 * ((m_doc->typographicSettings.valueBaseGrid * (style.dropCapLines()-1) + (charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr[0], 10)));
-					else
-					{
-						if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
-							chs = qRound(10 * ((style.lineSpacing() * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr[0], 10)));
-						else
-						{
-							double currasce = charStyle.font().height(style.charStyle().fontSize() / 10.0);
-							chs = qRound(10 * ((currasce * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr[0], 10)));
-						}
-					}
-				}
-				if (chstr[0] == SpecialChars::TAB)
-					tabCc++;
+
 				//if (!m_doc->RePos)
 				{
 					//double xcoZli = CurX + hl->glyph.xoffset;
@@ -1696,7 +1672,3 @@
 {
 	painter->strokePath();
 }
-
-
-
-

Modified: branches/Version14x/Scribus/scribus/stencilreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/stencilreader.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/stencilreader.cpp (original)
+++ branches/Version14x/Scribus/scribus/stencilreader.cpp Mon Jun 25 18:06:29 2012
@@ -1136,8 +1136,6 @@
 			double y1 = 0.0;
 			double currx = 0.0;
 			double curry = 0.0;
-			double startx = 0.0;
-			double starty = 0.0;
 			QString typ = pg.attribute("type");
 			QDomNode point = DOC.firstChild();
 			bool first = true;
@@ -1168,8 +1166,6 @@
 					{
 						currx = x;
 						curry = y;
-						startx = x;
-						starty = y;
 						first = false;
 						if (pt.attribute("type") == "bezier")
 							count = 0;
@@ -1626,8 +1622,6 @@
 			double y1 = 0.0;
 			double currx = 0.0;
 			double curry = 0.0;
-			double startx = 0.0;
-			double starty = 0.0;
 			QString typ = pg.attribute("type");
 			QDomNode point = DOC.firstChild();
 			bool first = true;
@@ -1675,8 +1669,6 @@
 					{
 						currx = x;
 						curry = y;
-						startx = x;
-						starty = y;
 						first = false;
 						if (pt.attribute("type") == "bezier")
 							count = 0;

Modified: branches/Version14x/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17634&path=/branches/Version14x/Scribus/scribus/text/storytext.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/text/storytext.cpp (original)
+++ branches/Version14x/Scribus/scribus/text/storytext.cpp Mon Jun 25 18:06:29 2012
@@ -118,15 +118,6 @@
 	StoryText result(doc);
 	*(result.d) = *d;
 	return result;
-//	qDebug() << QString("StoryText::copy:");
-	QListIterator<ScText*> it( *(result.d) );
-	ScText* elem;
-	while ( it.hasNext() ) {
-		elem = it.next();
-//		qDebug() << QString("\tchar '%1' size %2 (orig %3)").arg(elem->ch).arg(elem->fontSize()).arg(charStyle(i++).fontSize());
-	}
-	
-	return result;
 }
 
 
@@ -533,7 +524,7 @@
 			if (item->ch == SpecialChars::PARSEP) {
 				insertParSep(index);
 			}
-			if (d->cursorPosition >= index) {
+			if (d->cursorPosition >= static_cast<uint>(index)) {
 				d->cursorPosition += 1;
 			}
 			++inserted;
@@ -846,7 +837,7 @@
 	if (len == 0)
 		return;
 
-	int lastParStart = pos == 0? 0 : -1;
+	//int lastParStart = pos == 0? 0 : -1;
 	ScText* itText;
 	for (uint i=pos; i < pos+len; ++i) {
 		itText = d->at(i);




More information about the scribus-commit mailing list