diff options
| author | malex <malex@11d20701-8431-0410-a711-e3c959e3b870> | 2012-02-10 03:20:54 +0000 |
|---|---|---|
| committer | malex <malex@11d20701-8431-0410-a711-e3c959e3b870> | 2012-02-10 03:20:54 +0000 |
| commit | 0a3229cf1860de8f59f5f59a3d0b3c563ea13df8 (patch) | |
| tree | 738a12992d2ec9794035adab2195d4a9425aa27f | |
| parent | cee06e59c897fd7b66365c838248b394e047098e (diff) | |
| download | scribus-0a3229cf1860de8f59f5f59a3d0b3c563ea13df8.tar.gz scribus-0a3229cf1860de8f59f5f59a3d0b3c563ea13df8.tar.xz scribus-0a3229cf1860de8f59f5f59a3d0b3c563ea13df8.zip | |
Ubuntu patch from 9850 for building on armel arch
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17287 11d20701-8431-0410-a711-e3c959e3b870
| -rw-r--r-- | scribus/fonts/scfontmetrics.cpp | 4 | ||||
| -rw-r--r-- | scribus/pageitem.cpp | 12 | ||||
| -rw-r--r-- | scribus/pageitem_textframe.cpp | 6 | ||||
| -rw-r--r-- | scribus/pdflib_core.cpp | 8 | ||||
| -rw-r--r-- | scribus/plugins/svgexplugin/svgexplugin.cpp | 16 | ||||
| -rw-r--r-- | scribus/plugins/tools/pathstroker/pathstroker.cpp | 2 | ||||
| -rw-r--r-- | scribus/propertiespalette.cpp | 4 | ||||
| -rw-r--r-- | scribus/pslib.cpp | 24 | ||||
| -rw-r--r-- | scribus/scpageoutput.cpp | 8 | ||||
| -rw-r--r-- | scribus/scpainter.cpp | 8 | ||||
| -rw-r--r-- | scribus/scribusview.cpp | 16 | ||||
| -rw-r--r-- | scribus/selection.cpp | 8 | ||||
| -rw-r--r-- | scribus/smlinestyle.cpp | 2 | ||||
| -rw-r--r-- | scribus/ui/modetoolbar.cpp | 2 |
14 files changed, 60 insertions, 60 deletions
diff --git a/scribus/fonts/scfontmetrics.cpp b/scribus/fonts/scfontmetrics.cpp index 8706361..391ef54 100644 --- a/scribus/fonts/scfontmetrics.cpp +++ b/scribus/fonts/scfontmetrics.cpp @@ -281,7 +281,7 @@ QPixmap FontSample(const ScFace& fnt, int s, QString ts, QColor back, bool force { gly.translate(static_cast<qreal>(pen_x) / 6400.0, a); gp = getMaxClipF(&gly); - ymax = qMax(ymax, gp.y()); + ymax = qMax(double(ymax), gp.y()); p->setupPolygon(&gly); p->fillPath(); } @@ -302,7 +302,7 @@ QPixmap FontSample(const ScFace& fnt, int s, QString ts, QColor back, bool force { gly.translate(static_cast<qreal>(pen_x) / 6400.0, a); gp = getMaxClipF(&gly); - ymax = qMax(ymax, gp.y()); + ymax = qMax(double(ymax), gp.y()); p->setupPolygon(&gly); p->fillPath(); } diff --git a/scribus/pageitem.cpp b/scribus/pageitem.cpp index 4a05a2d..56a6451 100644 --- a/scribus/pageitem.cpp +++ b/scribus/pageitem.cpp @@ -2038,12 +2038,12 @@ void PageItem::drawGlyphs(ScPainter *p, const CharStyle& style, GlyphLayout& gly if (style.underlineWidth() != -1) lw = (style.underlineWidth() / 1000.0) * (style.fontSize() / 10.0); else - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { st = style.font().underlinePos(style.fontSize() / 10.0); - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0); @@ -2156,12 +2156,12 @@ void PageItem::drawGlyphs(ScPainter *p, const CharStyle& style, GlyphLayout& gly if (style.strikethruWidth() != -1) lw = (style.strikethruWidth() / 1000.0) * (style.fontSize() / 10.0); else - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { st = style.font().strikeoutPos(style.fontSize() / 10.0); - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0); @@ -4829,7 +4829,7 @@ void PageItem::getBoundingRect(double *x1, double *y1, double *x2, double *y2) c FPoint maxAr = getMaxClipF(&arrow); totalRect = totalRect.united(QRectF(QPointF(minAr.x(), minAr.y()), QPointF(maxAr.x(), maxAr.y()))); } - totalRect.getCoords(x1, y1, x2, y2); + totalRect.getCoords((qreal*)x1, (qreal*)y1, (qreal*)x2, (qreal*)y2); } void PageItem::getVisualBoundingRect(double * x1, double * y1, double * x2, double * y2) const @@ -4989,7 +4989,7 @@ void PageItem::getVisualBoundingRect(double * x1, double * y1, double * x2, doub FPoint maxAr = getMaxClipF(&arrow); totalRect = totalRect.united(QRectF(QPointF(minAr.x(), minAr.y()), QPointF(maxAr.x(), maxAr.y()))); } - totalRect.getCoords(x1, y1, x2, y2); + totalRect.getCoords((qreal*)x1, (qreal*)y1, (qreal*)x2, (qreal*)y2); } double PageItem::visualXPos() const diff --git a/scribus/pageitem_textframe.cpp b/scribus/pageitem_textframe.cpp index 6482755..fb7c07b 100644 --- a/scribus/pageitem_textframe.cpp +++ b/scribus/pageitem_textframe.cpp @@ -525,7 +525,7 @@ struct LineControl { double maxX = colRight - morespace; if (legacy) maxX -= lineCorr; - double StartX = floor(qMax(line.x, qMin(maxX,breakXPos-maxShrink-1))-1); + double StartX = floor(qMax((double)line.x, qMin(maxX,breakXPos-maxShrink-1))-1); int xPos = static_cast<int>(ceil(maxX)); QPoint pt12 (xPos, Yasc); @@ -729,8 +729,8 @@ struct LineControl { desc = cStyle.font().realCharDescent(ch, cStyle.fontSize() / 10.0) * scaleV - offset; } // qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(result); - line.ascent = qMax(line.ascent, asce); - line.descent = qMax(line.descent, desc); + line.ascent = qMax((double)line.ascent, asce); + line.descent = qMax((double)line.descent, desc); } } diff --git a/scribus/pdflib_core.cpp b/scribus/pdflib_core.cpp index ab0bb02..f781812 100644 --- a/scribus/pdflib_core.cpp +++ b/scribus/pdflib_core.cpp @@ -4418,12 +4418,12 @@ bool PDFLibCore::setTextCh(PageItem *ite, uint PNr, double x, double y, uint d, if (style.underlineWidth() != -1) Uwid = (style.underlineWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), (qreal)1.0); } else { Upos = style.font().underlinePos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), (qreal)1.0); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); @@ -4698,12 +4698,12 @@ bool PDFLibCore::setTextCh(PageItem *ite, uint PNr, double x, double y, uint d, if (style.strikethruWidth() != -1) Uwid = (style.strikethruWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), (qreal)1.0); } else { Upos = style.font().strikeoutPos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), (qreal)1.0); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); diff --git a/scribus/plugins/svgexplugin/svgexplugin.cpp b/scribus/plugins/svgexplugin/svgexplugin.cpp index 080d106..d9d4786 100644 --- a/scribus/plugins/svgexplugin/svgexplugin.cpp +++ b/scribus/plugins/svgexplugin/svgexplugin.cpp @@ -723,12 +723,12 @@ QDomElement SVGExPlug::processTextItem(PageItem *Item, QString trans, QString fi if (charStyle.underlineWidth() != -1) lw = (charStyle.underlineWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = charStyle.font().underlinePos(charStyle.fontSize() / 10.0); - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * (charStyle.baselineOffset() / 1000.0); @@ -780,12 +780,12 @@ QDomElement SVGExPlug::processTextItem(PageItem *Item, QString trans, QString fi if (charStyle.strikethruWidth() != -1) lw = (charStyle.strikethruWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = charStyle.font().strikeoutPos(charStyle.fontSize() / 10.0); - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * hl->glyph.scaleV * (charStyle.baselineOffset() / 1000.0); @@ -970,12 +970,12 @@ QDomElement SVGExPlug::processPathTextItem(PageItem *Item, QString trans, QStrin if (charStyle.underlineWidth() != -1) Uwid = (charStyle.underlineWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = charStyle.font().underlinePos(charStyle.fontSize() / 10.0); - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * (charStyle.baselineOffset() / 1000.0); @@ -1046,12 +1046,12 @@ QDomElement SVGExPlug::processPathTextItem(PageItem *Item, QString trans, QStrin if (charStyle.strikethruWidth() != -1) Uwid = (charStyle.strikethruWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = charStyle.font().strikeoutPos(charStyle.fontSize() / 10.0); - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), qreal(1.0)); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * (charStyle.baselineOffset() / 1000.0); diff --git a/scribus/plugins/tools/pathstroker/pathstroker.cpp b/scribus/plugins/tools/pathstroker/pathstroker.cpp index 67eb0e8..416e5af 100644 --- a/scribus/plugins/tools/pathstroker/pathstroker.cpp +++ b/scribus/plugins/tools/pathstroker/pathstroker.cpp @@ -115,7 +115,7 @@ bool PathStrokerPlugin::run(ScribusDoc* doc, QString) currDoc = ScCore->primaryMainWindow()->doc; if (currDoc->m_Selection->count() > 0) { - QVector<double> m_array; + QVector<qreal> m_array; PageItem *currItem = currDoc->m_Selection->itemAt(0); FPointArray path = currItem->PoLine; QPainterPath pp; diff --git a/scribus/propertiespalette.cpp b/scribus/propertiespalette.cpp index 168da4f..8c53fe6 100644 --- a/scribus/propertiespalette.cpp +++ b/scribus/propertiespalette.cpp @@ -107,7 +107,7 @@ void LineFormatItemDelegate::redraw(const QVariant& data) const const ScColor& col = item.m_doc->PageColors[item.m_Line[its].Color]; tmpf = ScColorEngine::getDisplayColor(col, item.m_doc, item.m_Line[its].Shade); QPen pen; - QVector<double> m_array; + QVector<qreal> m_array; if (item.m_Line[its].Dash == 1) pen.setStyle(Qt::SolidLine); else @@ -4618,7 +4618,7 @@ void PropertiesPalette::MakeIrre(int f, int c, qreal *vals) doc->setRedrawBounding(CurItem); break; default: - CurItem->SetFrameShape(c, vals); + CurItem->SetFrameShape(c, (double*)vals); doc->setRedrawBounding(CurItem); CurItem->FrameType = f+2; break; diff --git a/scribus/pslib.cpp b/scribus/pslib.cpp index 141e506..fcc5baa 100644 --- a/scribus/pslib.cpp +++ b/scribus/pslib.cpp @@ -2840,12 +2840,12 @@ bool PSLib::ProcessItem(ScribusDoc* Doc, Page* a, PageItem* c, uint PNr, bool se if (style.underlineWidth() != -1) Uwid = (style.underlineWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { Upos = style.font().underlinePos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); @@ -2911,12 +2911,12 @@ bool PSLib::ProcessItem(ScribusDoc* Doc, Page* a, PageItem* c, uint PNr, bool se if (style.strikethruWidth() != -1) Uwid = (style.strikethruWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { Upos = style.font().strikeoutPos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); @@ -2988,12 +2988,12 @@ bool PSLib::ProcessItem(ScribusDoc* Doc, Page* a, PageItem* c, uint PNr, bool se if (style.underlineWidth() != -1) Uwid = (style.underlineWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { Upos = style.font().underlinePos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); @@ -3065,12 +3065,12 @@ bool PSLib::ProcessItem(ScribusDoc* Doc, Page* a, PageItem* c, uint PNr, bool se if (style.strikethruWidth() != -1) Uwid = (style.strikethruWidth() / 1000.0) * (style.fontSize() / 10.0); else - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { Upos = style.font().strikeoutPos(style.fontSize() / 10.0); - Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + Uwid = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) Upos += (style.fontSize() / 10.0) * hl->glyph.scaleV * (style.baselineOffset() / 1000.0); @@ -3789,12 +3789,12 @@ void PSLib::setTextCh(ScribusDoc* Doc, PageItem* ite, double x, double y, bool g if (cstyle.underlineWidth() != -1) lw = (cstyle.underlineWidth() / 1000.0) * (cstyle.fontSize() / 10.0); else - lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), 1.0); + lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = cstyle.font().underlinePos(cstyle.fontSize() / 10.0); - lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), 1.0); + lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), qreal(1.0)); } if (cstyle.baselineOffset() != 0) Upos += (cstyle.fontSize() / 10.0) * glyphs.scaleV * (cstyle.baselineOffset() / 1000.0); @@ -3922,12 +3922,12 @@ void PSLib::setTextCh(ScribusDoc* Doc, PageItem* ite, double x, double y, bool g if (cstyle.strikethruWidth() != -1) lw = (cstyle.strikethruWidth() / 1000.0) * (cstyle.fontSize() / 10.0); else - lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), 1.0); + lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), qreal(1.0)); } else { Upos = cstyle.font().strikeoutPos(cstyle.fontSize() / 10.0); - lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), 1.0); + lw = qMax(cstyle.font().strokeWidth(cstyle.fontSize() / 10.0), qreal(1.0)); } if (cstyle.baselineOffset() != 0) Upos += (cstyle.fontSize() / 10.0) * glyphs.scaleV * (cstyle.baselineOffset() / 1000.0); diff --git a/scribus/scpageoutput.cpp b/scribus/scpageoutput.cpp index b13ceee..be3bb00 100644 --- a/scribus/scpageoutput.cpp +++ b/scribus/scpageoutput.cpp @@ -551,12 +551,12 @@ void ScPageOutput::drawGlyphs(PageItem* item, ScPainterExBase *painter, const Ch if (style.underlineWidth() != -1) lw = (style.underlineWidth() / 1000.0) * (style.fontSize() / 10.0); else - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { st = style.font().underlinePos(style.fontSize() / 10.0); - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0); @@ -638,12 +638,12 @@ void ScPageOutput::drawGlyphs(PageItem* item, ScPainterExBase *painter, const Ch if (style.strikethruWidth() != -1) lw = (style.strikethruWidth() / 1000.0) * (style.fontSize() / 10.0); else - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } else { st = style.font().strikeoutPos(style.fontSize() / 10.0); - lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), 1.0); + lw = qMax(style.font().strokeWidth(style.fontSize() / 10.0), qreal(1.0)); } if (style.baselineOffset() != 0) st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0); diff --git a/scribus/scpainter.cpp b/scribus/scpainter.cpp index 5b81a09..77498da 100644 --- a/scribus/scpainter.cpp +++ b/scribus/scpainter.cpp @@ -941,7 +941,7 @@ void ScPainter::drawVPath( int mode ) cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_WINDING); if (fillMode == 1) { - double r, g, b; + qreal r, g, b; m_fill.getRgbF(&r, &g, &b); cairo_set_source_rgba( m_cr, r, g, b, fill_trans ); // if (fill_trans != 1.0) @@ -979,7 +979,7 @@ void ScPainter::drawVPath( int mode ) vneu = 255 - ((255 - v) * shad / 100); qStopColor.setHsv(h, sneu, vneu); double a = colorStops[offset]->opacity; - double r, g, b; + qreal r, g, b; qStopColor.getRgbF(&r, &g, &b); cairo_pattern_add_color_stop_rgba (pat, rampPoint, r, g, b, a); lastPoint = rampPoint; @@ -1024,7 +1024,7 @@ void ScPainter::drawVPath( int mode ) cairo_set_dash( m_cr, m_array.data(), m_array.count(), m_offset); else cairo_set_dash( m_cr, NULL, 0, 0 ); - double r, g, b; + qreal r, g, b; m_stroke.getRgbF(&r, &g, &b); cairo_set_source_rgba( m_cr, r, g, b, stroke_trans ); // if (stroke_trans != 1.0) @@ -1348,7 +1348,7 @@ void ScPainter::drawText(QRectF area, QString text) double y; double ww = 0; double hh = 0; - double r, g, b; + qreal r, g, b; cairo_select_font_face(m_cr, m_font.family().toLatin1(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(m_cr, m_font.pointSizeF()); cairo_font_extents (m_cr, &extentsF); diff --git a/scribus/scribusview.cpp b/scribus/scribusview.cpp index 40a59b5..2e936c6 100644 --- a/scribus/scribusview.cpp +++ b/scribus/scribusview.cpp @@ -4153,12 +4153,12 @@ void ScribusView::TextToPath() if (charStyle.underlineWidth() != -1) Uwid = (charStyle.underlineWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } else { Upos = charStyle.font().underlinePos(charStyle.fontSize() / 10.0); - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * (charStyle.baselineOffset() / 1000.0); @@ -4293,12 +4293,12 @@ void ScribusView::TextToPath() if (charStyle.strikethruWidth() != -1) Uwid = (charStyle.strikethruWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } else { Upos = charStyle.font().strikeoutPos(charStyle.fontSize() / 10.0); - Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + Uwid = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } if (charStyle.baselineOffset() != 0) Upos += (charStyle.fontSize() / 10.0) * (charStyle.baselineOffset() / 1000.0); @@ -4383,12 +4383,12 @@ void ScribusView::TextToPath() if (charStyle.underlineWidth() != -1) lw = (charStyle.underlineWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } else { st = charStyle.font().underlinePos(charStyle.fontSize() / 10.0); - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } if (charStyle.baselineOffset() != 0) st += (charStyle.fontSize() / 10.0) * hl->glyph.scaleV * (charStyle.baselineOffset() / 1000.0); @@ -4567,12 +4567,12 @@ void ScribusView::TextToPath() if (charStyle.strikethruWidth() != -1) lw = (charStyle.strikethruWidth() / 1000.0) * (charStyle.fontSize() / 10.0); else - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } else { st = charStyle.font().strikeoutPos(charStyle.fontSize() / 10.0); - lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), 1.0); + lw = qMax(charStyle.font().strokeWidth(charStyle.fontSize() / 10.0), (qreal)1.0); } if (charStyle.baselineOffset() != 0) st += (charStyle.fontSize() / 10.0) * hl->glyph.scaleV * (charStyle.baselineOffset() / 1000.0); diff --git a/scribus/selection.cpp b/scribus/selection.cpp index d20dfbe..1a00fa5 100644 --- a/scribus/selection.cpp +++ b/scribus/selection.cpp @@ -517,10 +517,10 @@ void Selection::setGroupRect() QRectF itRect(currItem->getVisualBoundingRect()); // for (uint pc = 0; pc < 4; ++pc) { - vminx = qMin(vminx, itRect.x()); - vminy = qMin(vminy, itRect.y()); - vmaxx = qMax(vmaxx, itRect.right()); - vmaxy = qMax(vmaxy, itRect.bottom()); + vminx = qMin(vminx, (double)itRect.x()); + vminy = qMin(vminy, (double)itRect.y()); + vmaxx = qMax(vmaxx, (double)itRect.right()); + vmaxy = qMax(vmaxy, (double)itRect.bottom()); } } else diff --git a/scribus/smlinestyle.cpp b/scribus/smlinestyle.cpp index 2952971..0eb1c1c 100644 --- a/scribus/smlinestyle.cpp +++ b/scribus/smlinestyle.cpp @@ -734,7 +734,7 @@ void SMLineStyle::updatePreview() for (int it = (*tmpLine).size()-1; it > -1; it--) { QPen pen; - QVector<double> m_array; + QVector<qreal> m_array; if ((*tmpLine)[it].Dash == 1) pen.setStyle(Qt::SolidLine); else diff --git a/scribus/ui/modetoolbar.cpp b/scribus/ui/modetoolbar.cpp index 55acb28..d4f612a 100644 --- a/scribus/ui/modetoolbar.cpp +++ b/scribus/ui/modetoolbar.cpp @@ -101,7 +101,7 @@ void ModeToolBar::SelShape(int s, int c, qreal *vals) // insertShapeButtonMenu->hide(); SubMode = s; ValCount = c; - ShapeVals = vals; + ShapeVals = (double*)vals; m_ScMW->scrActions["toolsInsertShape"]->setChecked(false); m_ScMW->scrActions["toolsInsertShape"]->setChecked(true); } |
