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

[XaraXtreme-dev] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 700
Date       : Tue Mar 21 18:18:37 GMT 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/bitfilt.cpp
   M /Trunk/XaraLX/Kernel/bmpcomp.cpp
   M /Trunk/XaraLX/Kernel/bmpprefs.h
   M /Trunk/XaraLX/Kernel/camfiltr.cpp
   M /Trunk/XaraLX/Kernel/colcomp.cpp
   M /Trunk/XaraLX/Kernel/cxftext.cpp
   M /Trunk/XaraLX/Kernel/filters.cpp
   M /Trunk/XaraLX/Kernel/frameops.cpp
   M /Trunk/XaraLX/Kernel/group.cpp
   M /Trunk/XaraLX/Kernel/guides.cpp
   M /Trunk/XaraLX/Kernel/infocomp.cpp
   M /Trunk/XaraLX/Kernel/layer.cpp
   M /Trunk/XaraLX/Kernel/nativeop.cpp
   M /Trunk/XaraLX/Kernel/nbevcont.cpp
   M /Trunk/XaraLX/Kernel/ndclpcnt.cpp
   M /Trunk/XaraLX/Kernel/prvwflt.h
   M /Trunk/XaraLX/wxOil/bmpfiltr.h
   M /Trunk/XaraLX/wxOil/camdoc.cpp
   M /Trunk/XaraLX/wxOil/camdoc.h
   M /Trunk/XaraLX/wxOil/menucmds.cpp
   M /Trunk/XaraLX/wxOil/outptgif.h
   M /Trunk/XaraLX/wxOil/outptpng.h

Some preliminary fixes to help whoever is doing "Save"


Diff:
Index: Trunk/XaraLX/Kernel/filters.cpp
===================================================================
--- Trunk/XaraLX/Kernel/filters.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/filters.cpp	(revision 700)
@@ -1756,8 +1756,8 @@
 BOOL Filter::OpenExportFile(CCDiskFile * pDiskFile, PathName *pPath)
 {
 #ifdef DO_EXPORT
-	ERROR2IF(pDiskFile == NULL, FALSE,"Filter::OpenExportFile null file supplied")
-	ERROR2IF(pPath == NULL, FALSE,"Filter::OpenExportFile null pathname supplied")
+	ERROR2IF(pDiskFile == NULL, FALSE,"Filter::OpenExportFile null file supplied");
+	ERROR2IF(pPath == NULL, FALSE,"Filter::OpenExportFile null pathname supplied");
 
 	// Open up the file. This will create a zero length file just to make sure that it
 	// is possible, i.e. we have write access. This should have actually already been
@@ -1796,7 +1796,7 @@
 BOOL Filter::DeleteExportFile(CCDiskFile * pDiskFile)
 {
 #ifdef DO_EXPORT
-	ERROR2IF(pDiskFile == NULL, FALSE,"Filter::CloseExportFile null file supplied")
+	ERROR2IF(pDiskFile == NULL, FALSE,"Filter::CloseExportFile null file supplied");
 
 	// Remove the zero length file that we created as part of the process.
 	
@@ -1933,7 +1933,7 @@
 
 	if (IsCamelotEPS)
 	{
-		TRY
+		//TRY
 		{
 			// Special 3-stage rendering needed for Camelot EPS to be renderable.
 			View *pView = DocView::GetSelected();
@@ -1956,6 +1956,7 @@
 			// Finished render region - close down region (i.e. output trailer).
 			((EPSRenderRegion *) pRegion)->CloseDown();
 		}
+#if 0
 		CATCH(CFileException, e)
 		{
 			// Didn't work - report failure to caller.
@@ -1964,7 +1965,7 @@
 			return FALSE;
 		}
 		END_CATCH
-
+#endif
 		// All ok
 		return TRUE;
 	}
@@ -2152,7 +2153,7 @@
 	NumNodes = 0;
 
 	// Guard against disk/file errors, and get ready to render.
-	TRY
+	//TRY
 	{
 		// Get the region ready to render.
 		if ( !pRegion->StartRender() )
@@ -2163,6 +2164,7 @@
 			return FALSE;
 		}
 	}
+#if 0
 	CATCH ( CFileException, e )
 	{
 		// Didn't work - report failure to caller.
@@ -2173,7 +2175,7 @@
 		return FALSE;
 	}
 	END_CATCH
-
+#endif
 	// Write the nodes out to the file, and end the export
 	if ( WriteNodes ( pRegion, pDC, VisibleLayersOnly, CheckSelected, ShowProgress ) &&
 		 EndExportRender ( pRegion, ShowProgress ) )
@@ -2230,7 +2232,7 @@
 
 	// Cycle through all exportable nodes, and render (export) them.
 	// Export the file, but catch any file errors.
-	TRY
+	//TRY
 	{
 		BOOL IsPageBackGroundAnd32BitAlpha = FALSE;
 		BOOL LookForPageBackgrounds = TRUE;
@@ -2239,6 +2241,7 @@
 		pRegion->RenderTree(pNode, FALSE, FALSE, &MyCallback);
 		pRegion->ResetRender();
 	}
+#if 0
 	CATCH ( CFileException, e )
 	{
 		// Didn't work - report failure to caller.
@@ -2250,7 +2253,7 @@
 		return FALSE;
 	}
 	END_CATCH
-
+#endif
 	// All OK
 	return TRUE;
 #else
@@ -2308,7 +2311,7 @@
 {
 #ifdef DO_EXPORT
 
-	TRY
+	//TRY
 	{
 		// Finished rendering - deinit render region.
 		pRegion->StopRender ();
@@ -2316,6 +2319,7 @@
 		// Shut down the render region.
 		pRegion->CloseDown ();
 	}
+#if 0
 	CATCH ( CFileException, e )
 	{
 		// Didn't work - report failure to caller.
@@ -2324,7 +2328,7 @@
 		return FALSE;
 	}
 	END_CATCH
-
+#endif
 	// Close down progress display, if present
 	if ( ShowProgress )
 		EndSlowJob ();
@@ -2419,7 +2423,7 @@
 		static UINT32 LastError = 0;
 		if (LastError != CurrentProgressLimit)
 		{
-			if (IsUserName("Tim"))
+			if (Error::IsUserName("Tim"))
 			{
 				ERROR3("Filter::UpdateExportedNodeCount() called with an out of range value!");
 			}
Index: Trunk/XaraLX/Kernel/prvwflt.h
===================================================================
--- Trunk/XaraLX/Kernel/prvwflt.h	(revision 699)
+++ Trunk/XaraLX/Kernel/prvwflt.h	(revision 700)
@@ -105,8 +105,8 @@
 #define INC_PREVIEWFILTERS
 
 #include "bmpfiltr.h"	// for BMP preview
-#include "giffiltr.h"	// for GIF preview
-#include "exjpeg.h"		// for JPEG preview
+//#include "giffiltr.h"	// for GIF preview
+//#include "exjpeg.h"		// for JPEG preview
 #include "pngfiltr.h"	// for, you guessed it.. PNG preview
 
 // Forward definitions.
@@ -180,6 +180,8 @@
 	virtual BOOL GetExportOptions(BitmapExportOptions* pOptions);
 };
 
+PORTNOTE ("filters", "Removed GIF & JPEG preview filters")
+#ifndef EXCLUDE_FROM_XARALX
 /********************************************************************************************
 
 >	class PreviewFilterGIF : public TI_GIFFilter
@@ -229,6 +231,7 @@
 protected:
 	virtual BOOL GetExportOptions(BitmapExportOptions* pOptions);
 };
+#endif
 
 /********************************************************************************************
 
Index: Trunk/XaraLX/Kernel/frameops.cpp
===================================================================
--- Trunk/XaraLX/Kernel/frameops.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/frameops.cpp	(revision 700)
@@ -3940,7 +3940,7 @@
 
 BOOL GrabFrameFilter::ExportVisibleLayersOnly()
 {
-#if DO_EXPORT
+#ifdef DO_EXPORT
 	MaskedFilterExportOptions* pMaskedOptions = (MaskedFilterExportOptions*)GetBitmapExportOptions();
 	ERROR2IF(pMaskedOptions == NULL, FALSE, "NULL Args");
 	ERROR3IF(!pMaskedOptions->IS_KIND_OF(MaskedFilterExportOptions), "pMaskedOptions isn't");
@@ -4013,7 +4013,7 @@
 
 BOOL GrabFrameFilter::IsSecondPassRequired()
 {
-#if DO_EXPORT
+#ifdef DO_EXPORT
 	MaskedFilterExportOptions* pMaskedOptions = (MaskedFilterExportOptions*)GetBitmapExportOptions();
 	ERROR2IF(pMaskedOptions == NULL, FALSE, "NULL Args");
 	ERROR3IF(!pMaskedOptions->IS_KIND_OF(MaskedFilterExportOptions), "pMaskedOptions isn't");
Index: Trunk/XaraLX/Kernel/group.cpp
===================================================================
--- Trunk/XaraLX/Kernel/group.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/group.cpp	(revision 700)
@@ -117,7 +117,7 @@
 #include "cxftags.h"
 #include "camfiltr.h"
 #include "rechgrp.h"
-//#include "cmxrendr.h"
+#include "cmxrendr.h"
 //#include "cmxexdc.h"
 #include "extender.h"
 #include "nodeblnd.h"
@@ -232,7 +232,7 @@
 	{
 		// Output "start group" token
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
-		pDC->OutputToken("u");
+		pDC->OutputToken(_T("u"));
 		pDC->OutputNewLine();
 	}
 	else if(pRegion->IsKindOf(CC_RUNTIME_CLASS(CMXRenderRegion)))
@@ -252,7 +252,7 @@
 	{
 		// Output "end group" token
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
-		pDC->OutputToken("U");
+		pDC->OutputToken(_T("U"));
 		pDC->OutputNewLine();
 		
 		// Tell caller we rendered ourselves ok
Index: Trunk/XaraLX/Kernel/nbevcont.cpp
===================================================================
--- Trunk/XaraLX/Kernel/nbevcont.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/nbevcont.cpp	(revision 700)
@@ -2050,7 +2050,7 @@
 			}
 			else if (m_pBevel->m_bOuter)
 			{
-				pDC->OutputToken("u");
+				pDC->OutputToken(_T("u"));
 				pDC->OutputNewLine();
 			}
 		}
@@ -2075,7 +2075,7 @@
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
 
 		if(m_pBevel && m_pBevel->m_bOuter)
-			pDC->OutputToken("U");
+			pDC->OutputToken(_T("U"));
 
 		pDC->OutputNewLine();
 		
Index: Trunk/XaraLX/Kernel/layer.cpp
===================================================================
--- Trunk/XaraLX/Kernel/layer.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/layer.cpp	(revision 700)
@@ -2406,7 +2406,7 @@
 		if (Guide)
 		{
 			pDC->OutputValue(INT32(TAG_GUIDELAYER));	// Output start extended object tag and token
-			pDC->OutputToken("cso");
+			pDC->OutputToken(_T("cso"));
 			pDC->OutputNewLine();
 		}
 
@@ -2415,32 +2415,32 @@
 
 		// Layer type - foreground or background
 		if (IsBackground())
-			pDC->OutputToken("0");
+			pDC->OutputToken(_T("0"));
 		else
-			pDC->OutputToken("1");
+			pDC->OutputToken(_T("1"));
 
 		// Visible flag
 		if (Visible)
-			pDC->OutputToken("1");
+			pDC->OutputToken(_T("1"));
 		else
-			pDC->OutputToken("0");
+			pDC->OutputToken(_T("0"));
 
 		// Printable flag
 		if (IsPrintable())
-			pDC->OutputToken("1");
+			pDC->OutputToken(_T("1"));
 		else
-			pDC->OutputToken("0");
+			pDC->OutputToken(_T("0"));
 
 		// Locked flag
 		if (Locked)
-			pDC->OutputToken("1");
+			pDC->OutputToken(_T("1"));
 		else
-			pDC->OutputToken("0");
+			pDC->OutputToken(_T("0"));
 
 		// Layer token itself
 
 		if (!Guide)
-			pDC->OutputToken("alyr");
+			pDC->OutputToken(_T("alyr"));
 		else
 		{
 			// Output guide layer stuff
@@ -2453,7 +2453,7 @@
 			if (pGuideColour != NULL)
 				pDC->OutputNamedColour(pGuideColour);
 
-			pDC->OutputToken("glyr");
+			pDC->OutputToken(_T("glyr"));
 		}
 
 		pDC->OutputNewLine();
@@ -2488,7 +2488,7 @@
 	{
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
 
-		pDC->OutputToken("ceo");
+		pDC->OutputToken(_T("ceo"));
 		pDC->OutputNewLine();
 	}
 	else if(pRegion->IsKindOf(CC_RUNTIME_CLASS(CMXRenderRegion)))
Index: Trunk/XaraLX/Kernel/bmpcomp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmpcomp.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/bmpcomp.cpp	(revision 700)
@@ -814,7 +814,7 @@
 		}
 
 		// Something to mark the start of the bitmap pool
-		pDC->OutputToken("%%BeginCamelotBitmapPool");
+		pDC->OutputToken(_T("%%BeginCamelotBitmapPool"));
 		pDC->OutputNewLine();
 
 		// Tell the filter we are starting to save the bitmap pool
@@ -824,7 +824,7 @@
 		INT32 TotalBitmaps = pBitmapsToExport->GetCount();
 
 		// Output a comment saying how many bitmaps we have
-		pDC->OutputToken("%%BitmapPoolCount");
+		pDC->OutputToken(_T("%%BitmapPoolCount"));
 		pDC->OutputValue(TotalBitmaps);
 		pDC->OutputNewLine();
 
@@ -850,7 +850,7 @@
 		((CamelotNativeEPSFilter*)pFilter)->IsSavingBitmapPool = FALSE;
 
 		// Something to mark the start of the bitmap pool
-		pDC->OutputToken("%%EndCamelotBitmapPool");
+		pDC->OutputToken(_T("%%EndCamelotBitmapPool"));
 		pDC->OutputNewLine();
 	}
 
@@ -887,7 +887,7 @@
 		// ...then the bitmap object token.
 		pDC->OutputValue(BitmapNum);			// Output the number of the bitmap
 		pDC->OutputValue(INT32(0));				// Bitmap pool type (ready for expansion)
-		pDC->OutputToken("cbmp");				// Bitmap pool token
+		pDC->OutputToken(_T("cbmp"));				// Bitmap pool token
 		pDC->OutputNewLine();
 		
 		// ...and then the bitmap data itself.
@@ -1891,6 +1891,8 @@
 		return pExportBitmap->RecordNumber;
 	}
 
+PORTNOTE("other", "Removed live effects stuff")
+#ifndef EXCLUDE_FROM_XARALX
 	// Check to see whether we can save a simple placeholder, relying on the 
 	// XPE to regenerate the bitmap from master and edits when it's reloaded.
 	if (pFilter->GetSaveXPEBitmaps() == FALSE)
@@ -1917,6 +1919,7 @@
 			}
 		}
 	}
+#endif
 
 	BOOL ok = TRUE;
 	// Find out what bitmap compression was requested by the user
Index: Trunk/XaraLX/Kernel/bmpprefs.h
===================================================================
--- Trunk/XaraLX/Kernel/bmpprefs.h	(revision 699)
+++ Trunk/XaraLX/Kernel/bmpprefs.h	(revision 700)
@@ -194,8 +194,6 @@
 	Purpose:   	Base class for storing information about the bitmap we're exporting.
 ********************************************************************************************/
 
-PORTNOTE("other","Removed BitmapExportOptions")
-#ifndef EXCLUDE_FROM_XARALX
 class BitmapExportOptions : public OpParam
 {
 	CC_DECLARE_DYNCREATE(BitmapExportOptions)
@@ -272,7 +270,7 @@
 
 	// Provide a baseclass version which returns something
 	virtual	DITHER GetDither() const				{ return XARADITHER_NONE; }
-	virtual SetDither(const DITHER&) { ERROR3("The base class has no concept of dithering"); }
+	virtual BOOL SetDither(const DITHER&) { ERROR3("The base class has no concept of dithering"); return FALSE; }
 
 	BOOL ShouldPutHTMLTagOnClipboard()				{ return m_fPutHTMLTagOnClipboard; }
 	void SetPutHTMLTagOnClipboard(BOOL fValueToSet)	{ m_fPutHTMLTagOnClipboard = fValueToSet; }
@@ -497,7 +495,6 @@
 											// that would affect the appearance of the temp file
 	BOOL m_bCMYK;
 };
-#endif
 
 
 /********************************************************************************************
Index: Trunk/XaraLX/Kernel/guides.cpp
===================================================================
--- Trunk/XaraLX/Kernel/guides.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/guides.cpp	(revision 700)
@@ -134,7 +134,7 @@
 //#include "osrndrgn.h"
 //#include "cameleps.h"
 #include "saveeps.h"
-//#include "nativeps.h"		// The old style EPS native filter, used in v1.1
+#include "nativeps.h"		// The old style EPS native filter, used in v1.1
 #include "keypress.h"
 #include "prpsgds.h"
 //#include "snapops.h"
@@ -482,7 +482,7 @@
 		pDC->OutputValue(Ordinate);
 		pDC->OutputValue(INT32(Type));
 
-		pDC->OutputToken("glne");			// Camelot "guideline" token
+		pDC->OutputToken(_T("glne"));			// Camelot "guideline" token
 		pDC->OutputNewLine();
 	}
 #endif
@@ -509,9 +509,9 @@
 #ifdef DO_EXPORT
 	if (pRegion->IS_KIND_OF(NativeRenderRegion))
 	{
-		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
+		/*EPSExportDC *pDC = */ (EPSExportDC *) pRegion->GetRenderDC();
 
-//		pDC->OutputToken("ceo");			// Output end extended object token
+//		pDC->OutputToken(_T("ceo"));			// Output end extended object token
 //		pDC->OutputNewLine();
 	}
 #endif
Index: Trunk/XaraLX/Kernel/camfiltr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/camfiltr.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/camfiltr.cpp	(revision 700)
@@ -5101,7 +5101,7 @@
 	BOOL ok = TRUE;
 	EscapePressed = FALSE;
 
-	TRY
+//	TRY
 	{
 		// This needs to be fixed sensibly as it uses the value that is 
 		// currently in the TotalProgressBarCount variable
@@ -5186,6 +5186,7 @@
 			}
 		}
 	}
+#if 0
 	CATCH(CFileException, e)
 	{
 		TRACE( _T("BaseCamelotFilter::DoExport An error has occurred during export!
") );
@@ -5193,7 +5194,7 @@
 		ok = FALSE;
 	}
 	END_CATCH
-
+#endif
 	// Clean up if we get an error
 	if (!ok)
 	{
Index: Trunk/XaraLX/Kernel/nativeop.cpp
===================================================================
--- Trunk/XaraLX/Kernel/nativeop.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/nativeop.cpp	(revision 700)
@@ -457,7 +457,7 @@
 void OpMenuSave::DoWithParam(OpDescriptor*, OpParam* pOpParam)
 {
 	// Extract the parameters.
-	NativeFileOpParams* ppm = (NativeFileOpParams*) (pOpParam->Param1);
+	NativeFileOpParams* ppm = (NativeFileOpParams*) (void *) (pOpParam->Param1);
 
 	// Try to save the file.
 	ERROR3IF(!ppm->pFile, "Null CCLexFile* in OpMenuSave::DoWithParam");
@@ -761,7 +761,7 @@
 
 	// First off, we have to try and open the file
 	BOOL AllOK = TRUE;
-	TRY
+//	TRY
 	{
 		// Tell the filter we would like a Preview Bitmap please
 		if (pFilter->CanIncludePreviewBmp()) pFilter->IncludePreviewBmp(TRUE);
@@ -785,7 +785,7 @@
 			AllOK = FALSE;
 		}
 	}
-
+#if 0
 	// See if there was a file io error
 	CATCH(CFileException, e)
 	{
@@ -801,7 +801,7 @@
 		return FALSE;
 	}
 	END_CATCH
-
+#endif
 	// Tell the filter we would NOT like a Preview Bitmap ready for next time
 	if (pFilter->CanIncludePreviewBmp()) pFilter->IncludePreviewBmp(FALSE);
 
Index: Trunk/XaraLX/Kernel/infocomp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/infocomp.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/infocomp.cpp	(revision 700)
@@ -118,7 +118,8 @@
 //#include "expcol.h"		// ExportedColours handling class
 #include "cxfrec.h"		// CXaraFileRecord handler
 
-//#include "exphint.h"	// ExportHint class
+#include "exphint.h"	// ExportHint class
+#include "ophist.h"
 
 DECLARE_SOURCE("$Revision: 662 $");
 
@@ -465,7 +466,7 @@
 	Document * pDoc = pFilter->GetDocument();
 	if (pDoc)
 	{
-		BOOL ok = ExportDocumentComment(pFilter, pDoc);
+		/*BOOL ok =*/ ExportDocumentComment(pFilter, pDoc);
 	}
 
 #endif
Index: Trunk/XaraLX/Kernel/bitfilt.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bitfilt.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/bitfilt.cpp	(revision 700)
@@ -108,14 +108,14 @@
 #include "spread.h"
 #include "page.h"
 //#include "tim.h"
-//#include "grndbmp.h"
-//#include "osrndrgn.h"
+#include "grndbmp.h"
+#include "osrndrgn.h"
 #include "nodebmp.h"
 #include "bitmpinf.h"
-//#include "progress.h"
+#include "progress.h"
 //#include "nev.h"		// _R(IDN_USER_CANCELLED)
 //#include "bmpres.h"		// general bitmap filter based resources
-//#include "prvwflt.h"
+#include "prvwflt.h"
 #ifndef WEBSTER
 //#include "extfilts.h"	// Accusoft filters
 #endif //WEBSTER
@@ -128,6 +128,7 @@
 #include "qualattr.h"
 #include "ccbuffil.h"
 //#include "palman.h"
+#include "bmpprefs.h"
 
 #include "bmapprev.h"
 
@@ -1702,7 +1703,7 @@
 
 /********************************************************************************************
 
->	BOOL BaseBitmapFilter::GetExportOptions(BitmapExportOptions* pOptions)
+>	BOOL BaseBitmapFilter::GetExportOptions(* pOptions)
 
 	Author:		Colin_Barfoot (Xara Group Ltd) <camelotdev@xxxxxxxx>
 	Created:	12/11/96
@@ -1913,7 +1914,7 @@
 									   SelectionType Selection, UINT32 Dither)
 {
 #ifdef DO_EXPORT
-	ERROR2IF(pSpread==NULL,FALSE,"BaseBitmapFilter::PrepareToExport null spread pointer")
+	ERROR2IF(pSpread==NULL,FALSE,"BaseBitmapFilter::PrepareToExport null spread pointer");
 
 	// Check whether the selection contains objects that can't be represented
 	// in a bitmap
@@ -1994,17 +1995,17 @@
 	else
 	{
 		// Ensure Bitmap is at least 1 pixel square!
-		if (ClipRect.Width()<PIXELWIDTH)	ClipRect.hix = ClipRect.lox + PIXELWIDTH;
-		if (ClipRect.Height()<PIXELHEIGHT)	ClipRect.hiy = ClipRect.loy + PIXELHEIGHT;
+		if (ClipRect.Width()<PIXELWIDTH)	ClipRect.hi.x = ClipRect.lo.x + PIXELWIDTH;
+		if (ClipRect.Height()<PIXELHEIGHT)	ClipRect.hi.y = ClipRect.lo.y + PIXELHEIGHT;
 	}
 
 	// Remember the size of the bitmap
 	WinRect	Rect = OSRenderRegion::BitmapDocRectToWin( Identity, ClipRect, DPI );
-	SetPixelWidth(Rect.Width());
-	SetPixelHeight(Rect.Height());
+	SetPixelWidth(Rect.GetWidth());
+	SetPixelHeight(Rect.GetHeight());
 
 	// Create the region
-	TRACEUSER( "Gerry", _T("PrepareToExport creating GRenderBitmap %d bpp   (cmyk = %d)
"), Depth, GetBitmapExportOptions()->IsCMYK());
+//	TRACEUSER( "Gerry", _T("PrepareToExport creating GRenderBitmap %d bpp   (cmyk = %d)
"), Depth, GetBitmapExportOptions()->IsCMYK());
 	ExportRegion = new GRenderBitmap(ClipRect, Identity, Scale, Depth, DPI, FALSE, Dither, NULL, TRUE);
 	if (ExportRegion == NULL)
 		// Error already set by new, so just return
@@ -2429,7 +2430,7 @@
 #ifdef DO_EXPORT
 
 	// Dreamweaver integration.
-	BOOL bDesignNotesSelectedValue = FALSE;
+//	BOOL bDesignNotesSelectedValue = FALSE;
 
 	ERROR2IF(pOp == NULL, FALSE,"BaseBitmapFilter::DoExport no export operation");
 	ERROR2IF(pFile == NULL, FALSE,"BaseBitmapFilter::DoExport no file to export to");
@@ -2476,7 +2477,7 @@
 		Info.ErrorMsg = _R(IDT_BMPEXP_NOSELECTION);
 		Info.Button[0] = _R(IDB_EXPQUERY_EXPORT);
 		Info.Button[1] = _R(IDB_EXPQUERY_DONTEXPORT);
-		if (AskQuestion(&Info) == _R(IDB_EXPQUERY_DONTEXPORT))
+		if ((ResourceID)(AskQuestion(&Info)) == _R(IDB_EXPQUERY_DONTEXPORT))
 		{
 			Error::SetError(_R(IDN_USER_CANCELLED),0);		// Expects error set on cancel
 			ok = FALSE;
@@ -2695,9 +2696,9 @@
 	// all this conversion with possible rounding errors.
 	// Use the original size that has been calculated in the info header
 	UINT32 PixWidth  = BmInfo.PixelWidth;
-	UINT32 PixHeight = BmInfo.PixelHeight;
+//	UINT32 PixHeight = BmInfo.PixelHeight;
 	MILLIPOINT	RecWidth = BmInfo.RecommendedWidth;
-	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
+//	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
 
 	if (PixWidth > 0)
 	{
@@ -3411,9 +3412,9 @@
 	// all this conversion with possible rounding errors.
 	// Use the original size that has been calculated in the info header
 	UINT32 PixWidth  = BmInfo.PixelWidth;
-	UINT32 PixHeight = BmInfo.PixelHeight;
+//	UINT32 PixHeight = BmInfo.PixelHeight;
 	MILLIPOINT	RecWidth = BmInfo.RecommendedWidth;
-	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
+//	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
 
 	if (PixWidth > 0)
 	{
@@ -3511,9 +3512,9 @@
 	// all this conversion with possible rounding errors.
 	// Use the original size that has been calculated in the info header
 	UINT32 PixWidth  = BmInfo.PixelWidth;
-	UINT32 PixHeight = BmInfo.PixelHeight;
+//	UINT32 PixHeight = BmInfo.PixelHeight;
 	MILLIPOINT	RecWidth = BmInfo.RecommendedWidth;
-	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
+//	MILLIPOINT	RecHeight = BmInfo.RecommendedHeight;
 
 	if (PixWidth > 0)
 	{
@@ -3670,7 +3671,7 @@
 		if (NumberOfStrips <= 0)
 			NumberOfStrips = 1;
 TRACEUSER( "Gerry", _T("Number of bands is %d
"), NumberOfStrips);
-TRACEUSER( "Gerry", _T"Number of nodes is %d
"), OurNumNodes);
+TRACEUSER( "Gerry", _T("Number of nodes is %d
"), OurNumNodes);
 
 		// We need the progress bar to just move up once rather than for every strip	
 		// plus include the number of lines in the export bitmap so that we can show
@@ -3767,10 +3768,10 @@
 				// it has actually been allocated in StartRender
 				WinRect BitmapRect = ((GRenderRegion*)pGRenderBitmap)->CalculateWinRect(pGRenderBitmap->GetClipRect());
 
-				TRACEUSER( "Gerry", _T("CMYK bitmap is (%d, %d)
"), BitmapRect.Width(), BitmapRect.Height() );
+				TRACEUSER( "Gerry", _T("CMYK bitmap is (%d, %d)
"), BitmapRect.GetWidth(), BitmapRect.GetHeight() );
 				LPBYTE pCMYKBits = NULL;
-				LPBITMAPINFO pCMYKInfo = AllocDIB(BitmapRect.Width(), BitmapRect.Height(), 32, &pCMYKBits);
-				memset(pCMYKBits, 0, BitmapRect.Width() * BitmapRect.Height() * sizeof(DWORD));
+				LPBITMAPINFO pCMYKInfo = AllocDIB(BitmapRect.Width(), BitmapRect.GetHeight(), 32, &pCMYKBits);
+				memset(pCMYKBits, 0, BitmapRect.GetWidth() * BitmapRect.GetHeight() * sizeof(DWORD));
 
 				// Loop around the four plates
 				for (UINT32 PlateType = COLOURPLATE_CYAN; PlateType <= COLOURPLATE_KEY; PlateType += 1)
Index: Trunk/XaraLX/Kernel/colcomp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/colcomp.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/colcomp.cpp	(revision 700)
@@ -1405,7 +1405,7 @@
 					if (RecordNumber > 0)
 					{
 						// Add this colour to our list of exported items
-						BOOL ok = pExportedColours->AddColour(&Result, RecordNumber);
+						/*BOOL ok =*/ pExportedColours->AddColour(&Result, RecordNumber);
 						// Should return this error to the caller but not fatal so just continue
 					}
 
@@ -1899,7 +1899,7 @@
 	{
 		// If there is a parent then recover the record number from the exported colours list 
 		pExportCol = pExportedColours->GetColour(pParentCol);
-		ERROR2IF(pExportCol == NULL,FALSE,"ColourListComponent::SaveComplexColour Not exported parent before child!")
+		ERROR2IF(pExportCol == NULL,FALSE,"ColourListComponent::SaveComplexColour Not exported parent before child!");
 		ParentColourRef = pExportCol->RecordNumber;
 		TRACEUSER( "Neville", _T("Saving parent reference %d
"),ParentColourRef);
 	}
@@ -2267,7 +2267,7 @@
 		EPSExportDC *pDC = pFilter->GetExportDC();
 
 		// The ArtWorks EPS comment:
-		pDC->OutputToken("%%AWColourTable");
+		pDC->OutputToken(_T("%%AWColourTable"));
 		pDC->OutputNewLine();
 
 		// Iterate over the document's list of named IndexedColours...
@@ -2334,7 +2334,7 @@
 						if (!HaveOutputHeader)
 						{
 							// Output the header comment if we haven't already done so
-							pDC->OutputToken("%%JWColourTable");
+							pDC->OutputToken(_T("%%JWColourTable"));
 							pDC->OutputNewLine();
 							HaveOutputHeader = TRUE;
 						}
@@ -2365,7 +2365,7 @@
 						if (!HaveOutputHeader)
 						{
 							// Output the header comment if we haven't already done so
-							pDC->OutputToken("%%JWColourTable");
+							pDC->OutputToken(_T("%%JWColourTable"));
 							pDC->OutputNewLine();
 							HaveOutputHeader = TRUE;
 						}
@@ -2553,11 +2553,11 @@
 	ColourModel Model = pCol->GetColourModel();
 
 	// Buffer to build up colour defs in.
-	char ColDef[256];
-	_tcscpy(ColDef, "%%+");
+	TCHAR ColDef[256];
+	_tcscpy(ColDef, _T("%%+"));
 
 	// Buffer for temporary strings
-	char TmpBuf[256];
+	TCHAR TmpBuf[256];
 
 	// Get information on the colour - ask for its full identifier rather than just the name,
 	// so we get a unique id for unnamed colours rather than just "Local colour"
@@ -2592,13 +2592,13 @@
 		// Add tint identifier to colour definition
 		if (pCol->TintIsShade())
 		{
-			_tcscat(ColDef, "d");		// Is a shaDe
+			_tcscat(ColDef, _T("d"));		// Is a shaDe
 			TintVal = pCol->GetShadeValueY();		// Note that it is written out as "Y X"
 			ShadeVal = pCol->GetShadeValueX();		// to make backward compatability easier
 		}
 		else
 		{
-			_tcscat(ColDef, "t");		// Is a Tint
+			_tcscat(ColDef, _T("t"));		// Is a Tint
 			TintVal = pCol->GetTintValue();
 		}
 
@@ -2611,15 +2611,15 @@
 		if (NestingLevel > 1)
 		{
 			// Write out the nesting level
-			_stprintf(TmpBuf, " %d", NestingLevel);
+			tsprintf(TmpBuf, 256, _T(" %d"), NestingLevel);
 			_tcscat(ColDef, TmpBuf);
 		}
 
 		// Add the colour name and tint value
 		if (pCol->TintIsShade())
-			_stprintf(TmpBuf, " (%s) %d %d", ColName, Tint, Shade);
+			tsprintf(TmpBuf, 256, _T(" (%s) %d %d"), ColName, Tint, Shade);
 		else
-			_stprintf(TmpBuf, " (%s) %d", ColName, Tint);
+			tsprintf(TmpBuf, 256, _T(" (%s) %d"), ColName, Tint);
 			_tcscat(ColDef, TmpBuf);
 	}
 	else
@@ -2634,50 +2634,53 @@
 		if (Linked)
 		{
 			// Mark this as a linked colour
-			_tcscat(ColDef, "l");
+			_tcscat(ColDef, _T("l"));
 		}
 		else if (CamelotEPS && (ColType == COLOURTYPE_SPOT))
 		{
 			// Mark this as a spot colour
-			_tcscat(ColDef, "s");
+			_tcscat(ColDef, _T("s"));
 		}
 
 		// Save out colour model, nesting level and colour name
 		switch (Model)
 		{
 			case COLOURMODEL_RGBT:
-				_tcscat(ColDef, "r");
+				_tcscat(ColDef, _T("r"));
 				break;
 
 			case COLOURMODEL_HSVT:
-				_tcscat(ColDef, "h");
+				_tcscat(ColDef, _T("h"));
 				break;
 
 			case COLOURMODEL_CMYK:
-				_tcscat(ColDef, "c");
+				_tcscat(ColDef, _T("c"));
 				break;
 
 			case COLOURMODEL_GREYT:
 				// Special case - only Camelot can handle greyscales - ArtWorks can't.
 				if (CamelotEPS)
-					_tcscat(ColDef, "g");
+					_tcscat(ColDef, _T("g"));
 				else
-					_tcscat(ColDef, "r");
+					_tcscat(ColDef, _T("r"));
 				break;
+
+			default:
+				break;
 		}
 
 		// Add nesting level, if needed
 		if (NestingLevel > 1)
 		{
 			// Write out the nesting level
-			_stprintf(TmpBuf, " %d", NestingLevel);
+			tsprintf(TmpBuf, 256, _T(" %d"), NestingLevel);
 			_tcscat(ColDef, TmpBuf);
 		}
 
 		// Add colour name
-		_tcscat(ColDef , " (");
+		_tcscat(ColDef , _T(" ("));
 		_tcscat(ColDef, ColName);
-		_tcscat(ColDef, ")");
+		_tcscat(ColDef, _T(")"));
 
 		// Now write out the colour component values...
 		switch (Model)
@@ -2687,9 +2690,9 @@
 				ColourRGBT *pRGBT;
 				pRGBT = (ColourRGBT *) &GenCol;
 
-				AddComponentValue(ColDef, "%.3f", pRGBT->Red.MakeDouble(),   LINKED(1));
-				AddComponentValue(ColDef, "%.3f", pRGBT->Green.MakeDouble(), LINKED(2));
-				AddComponentValue(ColDef, "%.3f", pRGBT->Blue.MakeDouble(),  LINKED(3));
+				AddComponentValue(ColDef, _T("%.3f"), pRGBT->Red.MakeDouble(),   LINKED(1));
+				AddComponentValue(ColDef, _T("%.3f"), pRGBT->Green.MakeDouble(), LINKED(2));
+				AddComponentValue(ColDef, _T("%.3f"), pRGBT->Blue.MakeDouble(),  LINKED(3));
 				break;
 
 			case COLOURMODEL_HSVT:
@@ -2697,9 +2700,9 @@
 				ColourHSVT *pHSVT;
 				pHSVT = (ColourHSVT *) &GenCol;
 
-				AddComponentValue(ColDef, "%.1f", pHSVT->Hue.MakeDouble() * 360.0, LINKED(1));
-				AddComponentValue(ColDef, "%.1f", pHSVT->Saturation.MakeDouble() * 100.0, LINKED(2));
-				AddComponentValue(ColDef, "%.1f", pHSVT->Value.MakeDouble() * 100.0, LINKED(3));
+				AddComponentValue(ColDef, _T("%.1f"), pHSVT->Hue.MakeDouble() * 360.0, LINKED(1));
+				AddComponentValue(ColDef, _T("%.1f"), pHSVT->Saturation.MakeDouble() * 100.0, LINKED(2));
+				AddComponentValue(ColDef, _T("%.1f"), pHSVT->Value.MakeDouble() * 100.0, LINKED(3));
 				break;
 
 			case COLOURMODEL_CMYK:
@@ -2707,10 +2710,10 @@
 				ColourCMYK *pCMYK;
 				pCMYK = (ColourCMYK *) &GenCol;
 
-				AddComponentValue(ColDef, "%.3f", pCMYK->Cyan.MakeDouble(),    LINKED(1));
-				AddComponentValue(ColDef, "%.3f", pCMYK->Magenta.MakeDouble(), LINKED(2));
-				AddComponentValue(ColDef, "%.3f", pCMYK->Yellow.MakeDouble(),  LINKED(3));
-				AddComponentValue(ColDef, "%.3f", pCMYK->Key.MakeDouble(),     LINKED(4));
+				AddComponentValue(ColDef, _T("%.3f"), pCMYK->Cyan.MakeDouble(),    LINKED(1));
+				AddComponentValue(ColDef, _T("%.3f"), pCMYK->Magenta.MakeDouble(), LINKED(2));
+				AddComponentValue(ColDef, _T("%.3f"), pCMYK->Yellow.MakeDouble(),  LINKED(3));
+				AddComponentValue(ColDef, _T("%.3f"), pCMYK->Key.MakeDouble(),     LINKED(4));
 				break;
 
 			case COLOURMODEL_GREYT:
@@ -2722,7 +2725,7 @@
 				if (CamelotEPS)
 				{
 					// General greyscale format...just add the intensity component
-					AddComponentValue(ColDef, "%.3f", Intensity, LINKED(1));
+					AddComponentValue(ColDef, _T("%.3f"), Intensity, LINKED(1));
 				}
 				else
 				{
@@ -2730,7 +2733,7 @@
 					// where R = G = B.
 					for (INT32 i = 1; i <= 3; i++)
 					{
-						AddComponentValue(ColDef, "%.3f", Intensity, FALSE);
+						AddComponentValue(ColDef, _T("%.3f"), Intensity, FALSE);
 					}
 				}
 				break;
Index: Trunk/XaraLX/Kernel/ndclpcnt.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ndclpcnt.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/ndclpcnt.cpp	(revision 700)
@@ -2567,7 +2567,7 @@
 	{
 		// Output "start group" token
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
-		pDC->OutputToken("q");
+		pDC->OutputToken(_T("q"));
 		pDC->OutputNewLine();
 	}
 	else if(pRegion->IsKindOf(CC_RUNTIME_CLASS(CMXRenderRegion)))
@@ -2599,7 +2599,7 @@
 	{
 		// Output "end group" token
 		EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
-		pDC->OutputToken("Q");
+		pDC->OutputToken(_T("Q"));
 		pDC->OutputNewLine();
 		
 		// Tell caller we rendered ourselves ok
Index: Trunk/XaraLX/Kernel/cxftext.cpp
===================================================================
--- Trunk/XaraLX/Kernel/cxftext.cpp	(revision 699)
+++ Trunk/XaraLX/Kernel/cxftext.cpp	(revision 700)
@@ -108,7 +108,7 @@
 
 #include "camtypes.h"
 
-#if DO_EXPORT
+#ifdef DO_EXPORT
 
 #include "fontman.h"
 #include "nodetext.h"
@@ -376,7 +376,7 @@
 
 	String_256 GuaranteedFonts = pFilter->GetDontConvertTheseFontsToOutlinesString();
 	String_64  GuaranteedFontName;
-	String_64  Delimiters = ";";
+	String_64  Delimiters = _T(";");
 	String_64  Str;
 
 	TCHAR* pTchar = cc_lstrtok(GuaranteedFonts,Delimiters);
Index: Trunk/XaraLX/wxOil/outptgif.h
===================================================================
--- Trunk/XaraLX/wxOil/outptgif.h	(revision 699)
+++ Trunk/XaraLX/wxOil/outptgif.h	(revision 700)
@@ -105,14 +105,14 @@
 #include "dibconv.h"					// needs DIBConvert
 #include "dibutil.h"					// needs FNPTR_SCANLINE
 #include "outptdib.h"	
-#include "gifutil.h"					// GIF header definitions
+//#include "gifutil.h"					// GIF header definitions
 extern "C"
 {
 // Header files supplied by Accusoft image library
-#include "imglib.h"						// get filter numbers
+//#include "imglib.h"						// get filter numbers
 }
 
-#include "accuflts.h"	// TI_GIF ...
+//#include "accuflts.h"	// TI_GIF ...
 
 #define MAXCODE(n_bits)        (((code_int) 1 << (n_bits)) - 1)
 
Index: Trunk/XaraLX/wxOil/menucmds.cpp
===================================================================
--- Trunk/XaraLX/wxOil/menucmds.cpp	(revision 699)
+++ Trunk/XaraLX/wxOil/menucmds.cpp	(revision 700)
@@ -420,14 +420,15 @@
 
 void FileSaveAction() 
 {               
-PORTNOTETRACE("other", "FileSaveAction does nothing");
-#if !defined(EXCLUDE_FROM_XARALX)
+#if 0
  	((CCamDoc *)											
  		(((CMDIFrameWnd *)                                      
  			((AfxGetApp())->m_pMainWnd))->MDIGetActive()   	//Get Active Child Window
  					)->GetActiveDocument()                  	//Get Active Document
  						)->OnFileSave();                   			//Save Active Document
 #endif
+	wxCommandEvent		event;
+	AfxGetApp().GetDocumentManager()->OnFileSave( event );
 }
  
 /********************************************************************************************
Index: Trunk/XaraLX/wxOil/camdoc.h
===================================================================
--- Trunk/XaraLX/wxOil/camdoc.h	(revision 699)
+++ Trunk/XaraLX/wxOil/camdoc.h	(revision 700)
@@ -140,8 +140,6 @@
 	virtual bool OnNewDocument();
 	virtual bool OnSaveDocument(const wxString& filename);
 	virtual bool OnOpenDocument(const wxString& filename);
-	virtual bool IsModified() const;
-	virtual void Modify(bool mod);
 
 	// Some CDocument emulation stuff
 	void SetModifiedFlag( BOOL fMod = TRUE ) { Modify( FALSE != fMod ); }
Index: Trunk/XaraLX/wxOil/outptpng.h
===================================================================
--- Trunk/XaraLX/wxOil/outptpng.h	(revision 699)
+++ Trunk/XaraLX/wxOil/outptpng.h	(revision 700)
@@ -104,7 +104,7 @@
 #include "ccfile.h"						// needs FilePos
 #include "dibconv.h"					// needs DIBConvert
 #include "dibutil.h"					// needs FNPTR_SCANLINE
-//#include "outptdib.h"	
+#include "outptdib.h"	
 //#include "outptgif.h"					// TI_GIF_TRANSINTER	
 #include <png.h>
 //#include "accuflts.h"					// PNG
@@ -128,9 +128,6 @@
 
 ********************************************************************************************/
 
-PORTNOTE("filters","Removed OutputPNG")
-
-#ifndef EXCLUDE_FROM_XARALX
 class OutputPNG : public OutputDIB
 {
 public:
@@ -185,5 +182,4 @@
 	//INT32 DataBufferSize;				// size of the data buffer
 	UINT32 WidthOfLine;				// word/byte rounded line width rather than the pixel width
 };
-#endif
 #endif // INC_OUTPTPNG
Index: Trunk/XaraLX/wxOil/bmpfiltr.h
===================================================================
--- Trunk/XaraLX/wxOil/bmpfiltr.h	(revision 699)
+++ Trunk/XaraLX/wxOil/bmpfiltr.h	(revision 700)
@@ -103,7 +103,7 @@
 #include "bitfilt.h"
 #include "outptdib.h"
 #include "bmpprefs.h"  // SelectionType
-#include "imglib.h"
+//#include "imglib.h"
 //#include "accures.h"
 //#include "tim.h"
 
@@ -195,7 +195,8 @@
 	static UINT32 GetDefaultExportDither();
 	static void SetDefaultExportDither( UINT32 );
 
-	virtual INT32 GetFilterType() const { return BMP_UNCOMPRESSED; }
+PORTNOTE("filters", "Removed use of BMP_UNCOMPRESSED")
+	virtual INT32 GetFilterType() const { return 0/*BMP_UNCOMPRESSED*/; }
 
 	// Import related functions
 	virtual BOOL ReadFromFile(OILBitmap* pOilBitmap);
Index: Trunk/XaraLX/wxOil/camdoc.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camdoc.cpp	(revision 699)
+++ Trunk/XaraLX/wxOil/camdoc.cpp	(revision 700)
@@ -683,9 +683,93 @@
 	// Success.
 	return TRUE;
 }
-bool CCamDoc::OnSaveDocument( const wxString &strFilename )
+/********************************************************************************************
+>	virtual bool CCamDoc::OnSaveDocument(const wxString& filename)
+
+	Author:		Justin_Flude (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	8/3/94
+	Inputs:		A C string with the directory path / filename of the document.
+	Returns:	TRUE for a successful save, FALSE otherwise
+	Purpose:	Saves the document to the specified path.  Calls the kernel
+				to do the actual work.
+	SeeAlso:	CCamDoc::OnNewDocument; CCamDoc::OnOpenDocument; CCamDoc::DoSaveDocument
+********************************************************************************************/
+
+bool CCamDoc::OnSaveDocument(const wxString& filename)
 {
-	return false;
+	const TCHAR* pcszPathName = filename.c_str();
+#ifdef STANDALONE
+
+	// Do nothing on a standalone version
+	return TRUE;
+
+#else
+
+//	ASSERT_VALID(this);
+//	ASSERT(pcszPathName == 0 || AfxIsValidString(pcszPathName));
+
+PORTNOTE("other", "Disabled OLE")
+#ifndef EXCLUDE_FROM_XARALX
+#if (_OLE_VER >= 0x200)
+	#ifdef _DEBUG
+		if (IsUserName("JustinF"))
+		{
+			TRACE( _T("In CCamDoc::OnSaveDocument("));	
+			if (pcszPathName)
+				TRACE( _T("FILE %s"), (LPCTSTR) pcszPathName);
+			else
+				TRACE( _T("STORAGE 0x%p"), (LPVOID) m_lpRootStg);	
+			TRACE( _T(", %s)
", (LPCTSTR) (m_bSameAsLoad ? TEXT("SAVE"))
+													  : (m_bRemember ? TEXT("SAVE AS")
+																	 : TEXT("SAVE COPY"))));
+		}
+	#endif
+#endif
+
+#if (_OLE_VER >= 0x200)
+	// This patched in from COleLinkingDoc::OnSaveDocument.
+	BOOL fRemember = m_bRemember;
+#endif
+
+	// TO DO: Check if we need to call the base-class, and how.
+/*	if (!CCamDocBase::OnSaveDocument(pcszPathName))
+	{
+		TRACE( _T("CCamDocBase::OnSaveDocument failed - that's quite scary, isn't it?
"));
+		return FALSE;
+	}
+*/
+	// Set the busy prefix.
+//	StatusLine::SetPrefix(String_64(_R(IDS_WAIT_SAVING_DOC_PFX)));
+#endif
+	// Try the actual save.
+	if (!DoSaveDocument(pcszPathName))
+	{
+//		StatusLine::SetDefaultPrefix();
+		return FALSE;
+	}
+
+PORTNOTE("other", "Disabled OLE")
+#ifndef EXCLUDE_FROM_XARALX
+#if (_OLE_VER >= 0x200)
+	// Update the moniker/registration if the name has changed.
+	// Neville 8/8/97 Fix for bug 5592: MFC Assert while saving
+	// Check that the document is not a copy before trying to do OLE bits
+	// If its a copy then it should never be an OLE doc.
+	if (fRemember && m_strMoniker != pcszPathName && !IsACopy())
+	{
+		// update the moniker/registration since the name has changed
+		Revoke();
+		RegisterIfServerAttached(pcszPathName, TRUE);
+	}
+#endif
+#endif
+	// Close the file, update the flags etc and return success.
+	if (pcszPathName) SetOriginalPath(TEXT(""));
+	m_fIsUntouched = FALSE;
+//	StatusLine::SetDefaultPrefix();
+	return TRUE;
+
+#endif
 }
 
 /********************************************************************************************
@@ -1080,15 +1164,7 @@
 	return TRUE;
 }
 
-bool CCamDoc::IsModified() const
-{
-	return false;
-}
 
-void CCamDoc::Modify( bool mod )
-{
-}
-
 /********************************************************************************************
 
 >	virtual void CCamDoc::SetTitle(LPCTSTR lpszTitle)


Xara