r16329 by petr - #7563: Preflight checker: report underfull image frames
scribus-commit
scribus-commit at lists.scribus.net
Mon Jan 31 22:03:45 CET 2011
Author: petr
Date: Mon Jan 31 21:03:45 2011
New Revision: 16329
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16329
Log:
#7563: Preflight checker: report underfull image frames
Modified:
trunk/Scribus/scribus/documentchecker.cpp
trunk/Scribus/scribus/documentchecker.h
trunk/Scribus/scribus/scribusstructs.h
trunk/Scribus/scribus/ui/checkDocument.cpp
trunk/Scribus/scribus/ui/checkDocument.h
Modified: trunk/Scribus/scribus/documentchecker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16329&path=/trunk/Scribus/scribus/documentchecker.cpp
==============================================================================
--- trunk/Scribus/scribus/documentchecker.cpp (original)
+++ trunk/Scribus/scribus/documentchecker.cpp Mon Jan 31 21:03:45 2011
@@ -183,6 +183,14 @@
itemError.insert(PlacedPDF, 0);
if ((ext == "gif") && (checkerSettings.checkForGIF))
itemError.insert(ImageIsGIF, 0);
+
+ //qDebug() << "MASTER: ImageUnderfullsFrame" << currItem->height() << currItem->imageYScale()*currItem->pixm.height() << currItem->width() << currItem->imageXScale()*currItem->pixm.width();
+ // check image vs. frame sizes
+ if (currItem->height() > currItem->imageYScale() * currItem->pixm.height()
+ || currItem->width() > currItem->imageXScale() * currItem->pixm.width())
+ {
+ itemError.insert(ImageUnderfullsFrame, 0);
+ }
if (extensionIndicatesPDF(ext))
{
@@ -447,6 +455,15 @@
itemError.insert(PlacedPDF, 0);
if ((ext == "gif") && (checkerSettings.checkForGIF))
itemError.insert(ImageIsGIF, 0);
+
+ //qDebug() << "REGULAR: ImageUnderfullsFrame" << currItem->height() << currItem->imageYScale()*currItem->pixm.height() << currItem->width() << currItem->imageXScale()*currItem->pixm.width();
+ // check image vs. frame sizes
+ if (currItem->height() > currItem->imageYScale() * currItem->pixm.height()
+ || currItem->width() > currItem->imageXScale() * currItem->pixm.width())
+ {
+ itemError.insert(ImageUnderfullsFrame, 0);
+ }
+
if (extensionIndicatesPDF(ext))
{
PDFAnalyzer analyst(currItem->Pfile);
Modified: trunk/Scribus/scribus/documentchecker.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16329&path=/trunk/Scribus/scribus/documentchecker.h
==============================================================================
--- trunk/Scribus/scribus/documentchecker.h (original)
+++ trunk/Scribus/scribus/documentchecker.h Mon Jan 31 21:03:45 2011
@@ -25,6 +25,8 @@
#define DOCUMENTCHECKER_H
#include "scribusapi.h"
+#include "scribusstructs.h"
+
class ScribusDoc;
/*! \brief It create a error/warning list for CheckDocument GUI class.
@@ -34,6 +36,7 @@
class SCRIBUS_API DocumentChecker
{
public:
+
//! Check the passed document for errors, return true on error found
static bool checkDocument(ScribusDoc *currDoc);
};
Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16329&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Mon Jan 31 21:03:45 2011
@@ -271,7 +271,8 @@
DeviceColorAndOutputIntend=14,
FontNotEmbedded=15,
EmbeddedFontIsOpenType=16,
- OffConflictLayers=17
+ OffConflictLayers=17,
+ ImageUnderfullsFrame = 18
} PreflightError;
typedef QMap<PreflightError, int> errorCodes;
Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16329&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp (original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp Mon Jan 31 21:03:45 2011
@@ -206,6 +206,10 @@
item->setIcon(COLUMN_ITEM, onlyWarning );
break;
}
+ case ImageUnderfullsFrame:
+ item->setText(COLUMN_PROBLEM, imageUnderfullsFrame);
+ item->setIcon(COLUMN_ITEM, onlyWarning);
+ break;
case Transparency:
item->setText(COLUMN_PROBLEM, transpar);
item->setIcon(COLUMN_ITEM, graveError );
@@ -616,6 +620,7 @@
rasterPDF = tr("Object is a placed PDF");
isGIF = tr("Image is GIF");
WrongFont = tr("Annotation uses a non TrueType font");
+ imageUnderfullsFrame = tr("Image is smaller than its frame");
//isGIFtoolTip = "<qt>" + tr("GIF images are not reccomended for print. See the online docs for more info") + "</qt>";
}
Modified: trunk/Scribus/scribus/ui/checkDocument.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16329&path=/trunk/Scribus/scribus/ui/checkDocument.h
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.h (original)
+++ trunk/Scribus/scribus/ui/checkDocument.h Mon Jan 31 21:03:45 2011
@@ -131,6 +131,7 @@
QString isGIF;
QString isGIFtoolTip;
QString WrongFont;
+ QString imageUnderfullsFrame;
//! \brief Flag if is ignore button shown. true = hidden, false = shown.
bool noButton;
More information about the scribus-commit
mailing list