Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4025 → Rev 4024

/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
246,7 → 246,6
if (!interactive)
{
ScApp->doc->setPage(width, height, 0, 0, 0, 0, 0, 0, false, false);
ScApp->doc->addPage(0);
ScApp->view->addPage(0);
}
else
441,7 → 440,7
SvgStyle *gc = m_gc.current();
parseStyle( gc, b );
//z = ScApp->view->PaintRect(BaseX, BaseY, width, height, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Rectangle, BaseX, BaseY, width, height, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Rectangle, BaseX, BaseY, width, height, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
if ((rx != 0) || (ry != 0))
{
465,7 → 464,7
SvgStyle *gc = m_gc.current();
parseStyle( gc, b );
//z = ScApp->view->PaintEllipse(BaseX, BaseY, rx * 2.0, ry * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Ellipse, BaseX, BaseY, rx * 2.0, ry * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Ellipse, BaseX, BaseY, rx * 2.0, ry * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
QWMatrix mm = QWMatrix();
mm.translate(x, y);
482,7 → 481,7
SvgStyle *gc = m_gc.current();
parseStyle( gc, b );
//z = ScApp->view->PaintEllipse(BaseX, BaseY, r * 2.0, r * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Ellipse, BaseX, BaseY, r * 2.0, r * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Ellipse, BaseX, BaseY, r * 2.0, r * 2.0, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
QWMatrix mm = QWMatrix();
mm.translate(x, y);
500,7 → 499,7
SvgStyle *gc = m_gc.current();
parseStyle( gc, b );
//z = ScApp->view->PaintPoly(BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
ite->PoLine.resize(4);
ite->PoLine.setPoint(0, FPoint(x1, y1));
521,7 → 520,7
SvgStyle *gc = m_gc.current();
parseStyle( gc, b );
//z = ScApp->view->PaintPoly(BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
ite->PoLine.resize(0);
if (parseSVG( b.attribute( "d" ), &ite->PoLine ))
541,10 → 540,10
parseStyle( gc, b );
if( b.tagName() == "polygon" )
//z = ScApp->view->PaintPoly(BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::Polygon, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
else
//z = ScApp->view->PaintPolyLine(BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol);
z = currDoc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, true);
z = currDoc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, BaseX, BaseY, 10, 10, gc->LWidth, gc->FillCol, gc->StrokeCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
ite->PoLine.resize(0);
bool bFirst = true;
601,7 → 600,7
double w = b.attribute( "width" ).isEmpty() ? 1.0 : parseUnit( b.attribute( "width" ) );
double h = b.attribute( "height" ).isEmpty() ? 1.0 : parseUnit( b.attribute( "height" ) );
//z = ScApp->view->PaintPict(x+BaseX, y+BaseY, w, h);
z = currDoc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x+BaseX, y+BaseY, w, h, 1, currDoc->toolSettings.dBrushPict, "None", true);
z = currDoc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x+BaseX, y+BaseY, w, h, 1, currDoc->toolSettings.dBrushPict, "None", !ScApp->view->Mpressed);
if (!fname.isEmpty())
currDoc->LoadPict(fname, z);
PageItem* ite = currDoc->Items->at(z);
1973,7 → 1972,7
SvgStyle *gc = m_gc.current();
parseStyle(gc, tspan);
//int z = ScApp->view->PaintText(x, y, 10, 10, gc->LWidth, gc->FillCol);
int z = currDoc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y, 10, 10, gc->LWidth, "None", gc->FillCol, true);
int z = currDoc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y, 10, 10, gc->LWidth, "None", gc->FillCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
ite->setTextToFrameDist(0.0, 0.0, 0.0, 0.0);
ite->LineSp = gc->FontSize / 10.0 + 2;
2094,7 → 2093,7
{
SvgStyle *gc = m_gc.current();
//int z = ScApp->view->PaintText(x, y - qRound(gc->FontSize / 10.0), 10, 10, gc->LWidth, gc->FillCol);
int z = currDoc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y - qRound(gc->FontSize / 10.0), 10, 10, gc->LWidth, "None", gc->FillCol, true);
int z = currDoc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y - qRound(gc->FontSize / 10.0), 10, 10, gc->LWidth, "None", gc->FillCol, !ScApp->view->Mpressed);
PageItem* ite = currDoc->Items->at(z);
ite->setTextToFrameDist(0.0, 0.0, 0.0, 0.0);
ite->LineSp = gc->FontSize / 10.0 + 2;
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
315,10 → 315,7
{
QDomElement dpg = drawPag.toElement();
if (!interactive)
{
ScApp->doc->addPage(PageCounter);
ScApp->view->addPage(PageCounter);
}
PageCounter++;
m_styleStack.clear();
fillStyleStack( dpg );
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
120,8 → 120,7
if (!interactive)
{
ScApp->doc->setPage(b-x, h-y, 0, 0, 0, 0, 0, 0, false, false);
ScApp->doc->addPage(0);
ScApp->view->addPage(0, true);
ScApp->view->addPage(0);
}
else
{
318,8 → 317,7
params = Code.read();
if ((lasttoken == "sp") && (!interactive) && (!eps))
{
ScApp->doc->addPage(pagecount);
ScApp->view->addPage(pagecount, true);
ScApp->view->addPage(pagecount);
pagecount++;
}
if (token == "n")
355,10 → 353,10
{
if (ClosedPath)
//z = ScApp->view->PaintPoly(0, 0, 10, 10, LineW, CurrColor, "None");
z = ScApp->doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, 0, 0, 10, 10, LineW, CurrColor, "None", true);
z = ScApp->doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, 0, 0, 10, 10, LineW, CurrColor, "None", !ScApp->view->Mpressed);
else
//z = ScApp->view->PaintPolyLine(0, 0, 10, 10, LineW, CurrColor, "None");
z = ScApp->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, 0, 0, 10, 10, LineW, CurrColor, "None", true);
z = ScApp->doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, 0, 0, 10, 10, LineW, CurrColor, "None", !ScApp->view->Mpressed);
ite = ScApp->doc->Items->at(z);
ite->PoLine = Coords.copy();
ite->PoLine.translate(ScApp->doc->currentPage->xOffset(), ScApp->doc->currentPage->yOffset());
396,10 → 394,10
ScribusDoc* Doku = ScApp->doc;
if (ClosedPath)
//z = ScApp->view->PaintPoly(0, 0, 10, 10, LineW, "None", CurrColor);
z = Doku->itemAdd(PageItem::Polygon, PageItem::Unspecified, 0, 0, 10, 10, LineW, "None", CurrColor, true);
z = Doku->itemAdd(PageItem::Polygon, PageItem::Unspecified, 0, 0, 10, 10, LineW, "None", CurrColor, !ScApp->view->Mpressed);
else
//z = ScApp->view->PaintPolyLine(0, 0, 10, 10, LineW, "None", CurrColor);
z = Doku->itemAdd(PageItem::PolyLine, PageItem::Unspecified, 0, 0, 10, 10, LineW, "None", CurrColor, true);
z = Doku->itemAdd(PageItem::PolyLine, PageItem::Unspecified, 0, 0, 10, 10, LineW, "None", CurrColor, !ScApp->view->Mpressed);
ite = Doku->Items->at(z);
ite->PoLine = Coords.copy();
ite->PoLine.translate(Doku->currentPage->xOffset(), Doku->currentPage->yOffset());