r18300 by jghali - fix build error in scripter 2

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 2 14:35:13 UTC 2013


Author: jghali
Date: Sun Jun  2 14:35:13 2013
New Revision: 18300

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18300
Log:
fix build error in scripter 2

Modified:
    trunk/Scribus/scribus/plugins/scripter/api_page.cpp
    trunk/Scribus/scribus/plugins/scripter/api_page.h

Modified: trunk/Scribus/scribus/plugins/scripter/api_page.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18300&path=/trunk/Scribus/scribus/plugins/scripter/api_page.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_page.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_page.cpp Sun Jun  2 14:35:13 2013
@@ -278,9 +278,9 @@
 // XXX: newPolyLine, bezierline
 
 
-void PageAPI::placeImage(const int formatid, const QString & filename, const double x, const double y)
-{
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(formatid);
+void PageAPI::placeImage(const QString formatExt, const QString & filename, const double x, const double y)
+{
+	const FileFormat * fmt = LoadSavePlugin::getFormatByExt(formatExt);
 	if (fmt)
 	{
 		fmt->loadFile(filename,
@@ -316,7 +316,7 @@
  */
 void PageAPI::placeSVG(const QString & filename, const double x, const double y)
 {
-	placeImage(FORMATID_SVGIMPORT, filename, x, y);
+	placeImage("svg", filename, x, y);
 }
 
 
@@ -330,7 +330,7 @@
  */
 void PageAPI::placeODG(const QString & filename, const double x, const double y)
 {
-	placeImage(FORMATID_ODGIMPORT, filename, x, y);
+	placeImage("odg", filename, x, y);
 }
 
 
@@ -344,7 +344,7 @@
  */
 void PageAPI::placeEPS(const QString & filename, const double x, const double y)
 {
-	placeImage(FORMATID_PSIMPORT, filename, x, y);
+	placeImage("ps", filename, x, y);
 }
 
 
@@ -358,7 +358,7 @@
  */
 void PageAPI::placeSXD(const QString & filename, const double x, const double y)
 {
-	placeImage(FORMATID_SXDIMPORT, filename, x, y);
+	placeImage("sxd", filename, x, y);
 }
 
 

Modified: trunk/Scribus/scribus/plugins/scripter/api_page.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18300&path=/trunk/Scribus/scribus/plugins/scripter/api_page.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_page.h (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_page.h Sun Jun  2 14:35:13 2013
@@ -51,7 +51,7 @@
 	                 const double x, const double y, const double width,
 	                 const double height, const double w,
 	                 const QString& fill, const QString& outline);
-	void placeImage(const int formatid, const QString & filename, const double x, const double y);
+	void placeImage(const QString formatExt, const QString & filename, const double x, const double y);
 
 	bool isMasterPage;
 	int type();




More information about the scribus-commit mailing list