r18572 by fschmid - First version of an importer for Viva Designer xml files.
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 23 20:49:33 UTC 2013
Author: fschmid
Date: Wed Oct 23 20:49:33 2013
New Revision: 18572
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18572
Log:
First version of an importer for Viva Designer xml files.
Added:
trunk/Scribus/scribus/plugins/import/viva/
trunk/Scribus/scribus/plugins/import/viva/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
trunk/Scribus/scribus/plugins/import/viva/importviva.h
trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.h
Modified:
trunk/Scribus/scribus/pagesize.cpp
trunk/Scribus/scribus/plugins/import/CMakeLists.txt
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/pagesize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18572&path=/trunk/Scribus/scribus/pagesize.cpp
==============================================================================
--- trunk/Scribus/scribus/pagesize.cpp (original)
+++ trunk/Scribus/scribus/pagesize.cpp Wed Oct 23 20:49:33 2013
@@ -320,6 +320,37 @@
info.pageUnitIndex=SC_MM;
info.trSizeName=QObject::tr("DLE");
pageSizeList.insert("DLE", info);
+ // additional page sizes used by Viva Designer
+ //Compact Disc
+ info.width=mm2pts(119.9);
+ info.height=mm2pts(120.7);
+ info.pageUnitIndex=SC_MM;
+ info.trSizeName=QObject::tr("Compact Disc");
+ pageSizeList.insert("Compact Disc", info);
+ //Letter Half
+ info.width=mm2pts(139.7);
+ info.height=mm2pts(215.9);
+ info.pageUnitIndex=SC_MM;
+ info.trSizeName=QObject::tr("Letter Half");
+ pageSizeList.insert("Letter Half", info);
+ //US Letter
+ info.width=mm2pts(215.9);
+ info.height=mm2pts(279.4);
+ info.pageUnitIndex=SC_MM;
+ info.trSizeName=QObject::tr("US Letter");
+ pageSizeList.insert("US Letter", info);
+ //US Legal
+ info.width=mm2pts(215.9);
+ info.height=mm2pts(355.6);
+ info.pageUnitIndex=SC_MM;
+ info.trSizeName=QObject::tr("US Legal");
+ pageSizeList.insert("US Legal", info);
+ //11x17
+ info.width=in2pts(11);
+ info.height=in2pts(17);
+ info.pageUnitIndex=SC_IN;
+ info.trSizeName=QObject::tr("11x17");
+ pageSizeList.insert("11x17", info);
//Executive
//Folio
//Ledger
Modified: trunk/Scribus/scribus/plugins/import/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18572&path=/trunk/Scribus/scribus/plugins/import/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/CMakeLists.txt Wed Oct 23 20:49:33 2013
@@ -16,6 +16,7 @@
ADD_SUBDIRECTORY(sml)
ADD_SUBDIRECTORY(svg)
ADD_SUBDIRECTORY(uniconvertor)
+ADD_SUBDIRECTORY(viva)
#ADD_SUBDIRECTORY(vsd)
ADD_SUBDIRECTORY(wmf)
ADD_SUBDIRECTORY(wpg)
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18572&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Oct 23 20:49:33 2013
@@ -5357,69 +5357,69 @@
//for items that do not have/need a frameType for creation.
case PageItem::ImageFrame:
newItem = new PageItem_ImageFrame(this, x, y, b, h, w, docPrefsData.itemToolPrefs.imageFillColor, docPrefsData.itemToolPrefs.imageStrokeColor);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::TextFrame:
if (noteFrame)
newItem = new PageItem_NoteFrame(this, x, y, b, h, w, CommonStrings::None, outline);
else
newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::Line:
{
//CB 5521 Remove false minimum line width
double lineWidth = w; // == 0.0 ? 1.0 : w;
newItem = new PageItem_Line(this, x, y, b, h, lineWidth, CommonStrings::None, outline);
- Q_ASSERT(frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Unspecified);
}
break;
case PageItem::Table:
newItem = new PageItem_Table(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::Polygon:
newItem = new PageItem_Polygon(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
break;
case PageItem::PolyLine:
newItem = new PageItem_PolyLine(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Unspecified);
break;
case PageItem::PathText:
//Currently used only in fileloader
newItem = new PageItem_PathText(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Unspecified);
break;
case PageItem::LatexFrame:
newItem = new PageItem_LatexFrame(this, x, y, b, h, w, docPrefsData.itemToolPrefs.imageFillColor, docPrefsData.itemToolPrefs.imageStrokeColor);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
#ifdef HAVE_OSG
case PageItem::OSGFrame:
newItem = new PageItem_OSGFrame(this, x, y, b, h, w, docPrefsData.itemToolPrefs.imageFillColor, docPrefsData.itemToolPrefs.imageStrokeColor);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
#endif
case PageItem::Symbol:
newItem = new PageItem_Symbol(this, x, y, b, h, w, CommonStrings::None, CommonStrings::None);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::Group:
newItem = new PageItem_Group(this, x, y, b, h, w, CommonStrings::None, CommonStrings::None);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::RegularPolygon:
newItem = new PageItem_RegularPolygon(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
break;
case PageItem::Arc:
newItem = new PageItem_Arc(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
break;
case PageItem::Spiral:
newItem = new PageItem_Spiral(this, x, y, b, h, w, fill, outline);
- Q_ASSERT(frameType==PageItem::Unspecified);
+// Q_ASSERT(frameType==PageItem::Unspecified);
break;
default:
// qDebug() << "unknown item type";
More information about the scribus-commit
mailing list