[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1476
Date       : Wed Jul 19 12:58:35 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/filter_types.h
   M /Trunk/XaraLX/Kernel/filters.cpp
   M /Trunk/XaraLX/Kernel/filters.h
   M /Trunk/XaraLX/wxOil/imgmgkft.cpp
   M /Trunk/XaraLX/wxOil/imgmgkft.h

Fix bug #1294
Define FilterID's from a range in filters.h
Use a separate IMAGEMAGICK bitmap type ID
We still should really fix filter IDs to be dynamic, but this is the main problem solved


Diff:
Index: Trunk/XaraLX/Kernel/filters.cpp
===================================================================
--- Trunk/XaraLX/Kernel/filters.cpp	(revision 1475)
+++ Trunk/XaraLX/Kernel/filters.cpp	(revision 1476)
@@ -838,7 +838,7 @@
 		ADD_FILTER(ImageMagickFilterSCT)
 		ADD_FILTER(ImageMagickFilterSFW)
 		ADD_FILTER(ImageMagickFilterSUN)
-		ADD_FILTER(ImageMagickFilterSVG)
+		// ADD_FILTER(ImageMagickFilterSVG) - removed per NeilH 19/07/2006 so it doesn't clash with vector SVG import
 		ADD_FILTER(ImageMagickFilterTGA)
 		ADD_FILTER(ImageMagickFilterTIFF)
 		ADD_FILTER(ImageMagickFilterTIM)
Index: Trunk/XaraLX/Kernel/filter_types.h
===================================================================
--- Trunk/XaraLX/Kernel/filter_types.h	(revision 1475)
+++ Trunk/XaraLX/Kernel/filter_types.h	(revision 1476)
@@ -192,68 +192,7 @@
 	PNG_TRANSPARENT,
 	PNG_TRANSINTER,
 
-	IMAGEMAGICK,		// This one should never be used
-	IMAGEMAGICK_BMP,
-	IMAGEMAGICK_CUR,
-	IMAGEMAGICK_CUT,
-	IMAGEMAGICK_DCM,
-	IMAGEMAGICK_DCX,
-	IMAGEMAGICK_DIB,
-	IMAGEMAGICK_DNG,
-	IMAGEMAGICK_EPDF,
-	IMAGEMAGICK_EPI,
-	IMAGEMAGICK_EPS,
-	IMAGEMAGICK_EPS2,
-	IMAGEMAGICK_EPS3,
-	IMAGEMAGICK_EPSF,
-	IMAGEMAGICK_EPSI,
-	IMAGEMAGICK_EPT,
-	IMAGEMAGICK_FAX,
-	IMAGEMAGICK_FITS,
-	IMAGEMAGICK_ICO,
-	IMAGEMAGICK_JNG,
-	IMAGEMAGICK_MIFF,
-	IMAGEMAGICK_MPC,
-	IMAGEMAGICK_OTB,
-	IMAGEMAGICK_P7,
-	IMAGEMAGICK_PALM,
-	IMAGEMAGICK_PAM,
-	IMAGEMAGICK_PBM,
-	IMAGEMAGICK_PCD,
-	IMAGEMAGICK_PCDS,
-	IMAGEMAGICK_PCL,
-	IMAGEMAGICK_PCX,
-	IMAGEMAGICK_PDB,
-	IMAGEMAGICK_PDF,
-	IMAGEMAGICK_PGM,
-	IMAGEMAGICK_PICT,
-	IMAGEMAGICK_PIX,
-	IMAGEMAGICK_PNM,
-	IMAGEMAGICK_PPM,
-	IMAGEMAGICK_PS,
-	IMAGEMAGICK_PS2,
-	IMAGEMAGICK_PS3,
-	IMAGEMAGICK_PSD,
-	IMAGEMAGICK_PTIF,
-	IMAGEMAGICK_PWP,
-	IMAGEMAGICK_RLA,
-	IMAGEMAGICK_RLE,
-	IMAGEMAGICK_SCT,
-	IMAGEMAGICK_SFW,
-	IMAGEMAGICK_SUN,
-	IMAGEMAGICK_SVG,
-	IMAGEMAGICK_TGA,
-	IMAGEMAGICK_TIFF,
-	IMAGEMAGICK_TIM,
-	IMAGEMAGICK_TTF,
-	IMAGEMAGICK_VICAR,
-	IMAGEMAGICK_VIFF,
-	IMAGEMAGICK_WBMP,
-	IMAGEMAGICK_WPG,
-	IMAGEMAGICK_XBM,
-	IMAGEMAGICK_XCF,
-	IMAGEMAGICK_XPM,
-	IMAGEMAGICK_XWD,
+	IMAGEMAGICK,
 
 	// --- Insert new Filter Types just above here ---
 
Index: Trunk/XaraLX/Kernel/filters.h
===================================================================
--- Trunk/XaraLX/Kernel/filters.h	(revision 1475)
+++ Trunk/XaraLX/Kernel/filters.h	(revision 1476)
@@ -234,6 +234,10 @@
 #define	FILTERID_ALDUS_START		1000
 #define	FILTERID_ALDUS_END			1099
 
+// ImageMagick filters IDs 1100-1999 - 900 should be enough
+#define FILTERID_IMAGEMAGICK_START	1100
+#define FILTERID_IMAGEMAGICK_END	1999
+
 // !!!!!!!!!!!!!!!!! DON'T ADD ANY MORE TO THE ABOVE LIST !!!!!!!!!!!!!!!!
 
 enum SelectionType { SELECTION, DRAWING, SPREAD, ABITMAP, SOMEBITMAPS, PAGE };
Index: Trunk/XaraLX/wxOil/imgmgkft.cpp
===================================================================
--- Trunk/XaraLX/wxOil/imgmgkft.cpp	(revision 1475)
+++ Trunk/XaraLX/wxOil/imgmgkft.cpp	(revision 1476)
@@ -260,7 +260,7 @@
 	// Things that the derive class constructor may stamp on
 	Flags.CanImport 	= TRUE;
 	Flags.CanExport 	= TRUE;
-	FilterID			= IMAGEMAGICK;
+	FilterID			= FILTERID_IMAGEMAGICK;
 	FilterNameID		= _R(IDS_IMAGEMAGICK_FILTERNAME);
 	FilterInfoID		= _R(IDS_IMAGEMAGICK_FILTERINFO);
 	FilterExtID			= _R(IDS_IMAGEMAGICK_FILTEREXT);
Index: Trunk/XaraLX/wxOil/imgmgkft.h
===================================================================
--- Trunk/XaraLX/wxOil/imgmgkft.h	(revision 1475)
+++ Trunk/XaraLX/wxOil/imgmgkft.h	(revision 1476)
@@ -318,7 +318,7 @@
 	{																			\
 		Flags.CanImport 	= IMCanInport;										\
 		Flags.CanExport 	= IMCanExport;										\
-		FilterID			= IMAGEMAGICK_ ## IMType ;							\
+		FilterID			= FILTERID_IMAGEMAGICK_ ## IMType ;					\
 		FilterNameID		= _R(IDS_IMAGEMAGICK_ ## IMType ## _FILTERNAME);	\
 		FilterInfoID		= _R(IDS_IMAGEMAGICK_ ## IMType ## _FILTERINFO);	\
 		FilterExtID			= _R(IDS_IMAGEMAGICK_ ## IMType ## _FILTEREXT);		\
@@ -339,7 +339,7 @@
 // ==============================================
 //
 // 1. Declare the filter below (let's say you give it the classname FOO)
-// 2. Add "IMAGEMAGIK_FOO" to the enum in filter_types.h
+// 2. Add "IMAGEMAGIK_FOO" to the enum in below
 // 3. Add "ADD_FILTER(ImageMagickFilterFOO)" to filters.cpp
 // 4. Add appropriate resources to wxOil/xrc/EN/imagemagick-strings.xrc
 //    These would be
@@ -352,6 +352,75 @@
 //		IDS_IMAGEMAGICK_FOO_MASKINGMSG
 //
 
+enum ImageMagickFilterID
+{
+	FILTERID_IMAGEMAGICK = FILTERID_IMAGEMAGICK_START,		// This one should never be used
+	FILTERID_IMAGEMAGICK_BMP,
+	FILTERID_IMAGEMAGICK_CUR,
+	FILTERID_IMAGEMAGICK_CUT,
+	FILTERID_IMAGEMAGICK_DCM,
+	FILTERID_IMAGEMAGICK_DCX,
+	FILTERID_IMAGEMAGICK_DIB,
+	FILTERID_IMAGEMAGICK_DNG,
+	FILTERID_IMAGEMAGICK_EPDF,
+	FILTERID_IMAGEMAGICK_EPI,
+	FILTERID_IMAGEMAGICK_EPS,
+	FILTERID_IMAGEMAGICK_EPS2,
+	FILTERID_IMAGEMAGICK_EPS3,
+	FILTERID_IMAGEMAGICK_EPSF,
+	FILTERID_IMAGEMAGICK_EPSI,
+	FILTERID_IMAGEMAGICK_EPT,
+	FILTERID_IMAGEMAGICK_FAX,
+	FILTERID_IMAGEMAGICK_FITS,
+	FILTERID_IMAGEMAGICK_ICO,
+	FILTERID_IMAGEMAGICK_JNG,
+	FILTERID_IMAGEMAGICK_MIFF,
+	FILTERID_IMAGEMAGICK_MPC,
+	FILTERID_IMAGEMAGICK_OTB,
+	FILTERID_IMAGEMAGICK_P7,
+	FILTERID_IMAGEMAGICK_PALM,
+	FILTERID_IMAGEMAGICK_PAM,
+	FILTERID_IMAGEMAGICK_PBM,
+	FILTERID_IMAGEMAGICK_PCD,
+	FILTERID_IMAGEMAGICK_PCDS,
+	FILTERID_IMAGEMAGICK_PCL,
+	FILTERID_IMAGEMAGICK_PCX,
+	FILTERID_IMAGEMAGICK_PDB,
+	FILTERID_IMAGEMAGICK_PDF,
+	FILTERID_IMAGEMAGICK_PGM,
+	FILTERID_IMAGEMAGICK_PICT,
+	FILTERID_IMAGEMAGICK_PIX,
+	FILTERID_IMAGEMAGICK_PNM,
+	FILTERID_IMAGEMAGICK_PPM,
+	FILTERID_IMAGEMAGICK_PS,
+	FILTERID_IMAGEMAGICK_PS2,
+	FILTERID_IMAGEMAGICK_PS3,
+	FILTERID_IMAGEMAGICK_PSD,
+	FILTERID_IMAGEMAGICK_PTIF,
+	FILTERID_IMAGEMAGICK_PWP,
+	FILTERID_IMAGEMAGICK_RLA,
+	FILTERID_IMAGEMAGICK_RLE,
+	FILTERID_IMAGEMAGICK_SCT,
+	FILTERID_IMAGEMAGICK_SFW,
+	FILTERID_IMAGEMAGICK_SUN,
+	FILTERID_IMAGEMAGICK_SVG,
+	FILTERID_IMAGEMAGICK_TGA,
+	FILTERID_IMAGEMAGICK_TIFF,
+	FILTERID_IMAGEMAGICK_TIM,
+	FILTERID_IMAGEMAGICK_TTF,
+	FILTERID_IMAGEMAGICK_VICAR,
+	FILTERID_IMAGEMAGICK_VIFF,
+	FILTERID_IMAGEMAGICK_WBMP,
+	FILTERID_IMAGEMAGICK_WPG,
+	FILTERID_IMAGEMAGICK_XBM,
+	FILTERID_IMAGEMAGICK_XCF,
+	FILTERID_IMAGEMAGICK_XPM,
+	FILTERID_IMAGEMAGICK_XWD,
+
+	// add the others above this line
+	FILTERID_IMAGEMAGICK_TOP
+};
+
 //						  ClassName	Import	Export	Transp	Int'lce	Tag			Extension	Compat
 DECLARE_IMAGEMAGICK_FILTER(BMP,		TRUE,	TRUE,	TRUE,	FALSE,	_T("bmp"),	_T("bmp"),	10); // Microsoft Windows Bitmap
 DECLARE_IMAGEMAGICK_FILTER(CUR,		TRUE,	FALSE,	TRUE,	FALSE,	_T("cur"),	_T("cur"),	10); // Microsoft Cursor Icon
@@ -415,6 +484,7 @@
 DECLARE_IMAGEMAGICK_FILTER(XPM,		TRUE,	TRUE,	TRUE,	FALSE,	_T("xpm"),	_T("xpm"),	10); // X Windows system pixmap
 DECLARE_IMAGEMAGICK_FILTER(XWD,		TRUE,	TRUE,	TRUE,	FALSE,	_T("xwd"),	_T("xwd"),	10); // X Windows system window dump
 
+
 #endif // INC_ImageMagickFILTR
 
 


Xara