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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 925
Date       : Tue May  2 07:48:37 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   M /Trunk/XaraLX/Kernel/bmapprev.cpp
   M /Trunk/XaraLX/Kernel/filters.cpp
   M /Trunk/XaraLX/Kernel/filtimag.cpp
   M /Trunk/XaraLX/Kernel/filtimag.h
   M /Trunk/XaraLX/Kernel/htmlexp.h
   M /Trunk/XaraLX/Kernel/htmlfltr.cpp
   M /Trunk/XaraLX/Kernel/strlist.h

Enable more of export dialog


Diff:
Index: Trunk/XaraLX/Kernel/filters.cpp
===================================================================
--- Trunk/XaraLX/Kernel/filters.cpp	(revision 924)
+++ Trunk/XaraLX/Kernel/filters.cpp	(revision 925)
@@ -853,9 +853,9 @@
 	// HTML based filters.
 PORTNOTE("filter","Removed HTMLFilter usage")
 	ADD_FILTER(HTMLFilter)	// the HTML filter
+#endif //EXCLUDE_FROM_XARALX
 	ADD_FILTER(ImagemapFilter)
 
-#endif //EXCLUDE_FROM_XARALX
 
 #if BUILD_OTHER_TEXT_FILTERS
 
Index: Trunk/XaraLX/Kernel/filtimag.h
===================================================================
--- Trunk/XaraLX/Kernel/filtimag.h	(revision 924)
+++ Trunk/XaraLX/Kernel/filtimag.h	(revision 925)
@@ -103,7 +103,7 @@
 #include "filtimop.h"	//For ImagemapFilterOptions
 #include "filtirr.h"	//For ImagemapRenderRegion
 #include "filters.h"	//For AuldLangSyne
-//#include "htmlexp.h"	//The HTML export filter
+#include "htmlexp.h"	//The HTML export filter
 #include "list.h"		//For the list class
 
 class CCLexFile;
@@ -126,8 +126,6 @@
 					at the same time as it exports the bitmap
 
 **************************************************************************************/
-PORTNOTE("filter","Removed ImagemapFilter - don't need exporter yet")
-#ifndef EXCLUDE_FROM_XARALX
 class ImagemapFilter : public HTMLExportFilter
 {
 	// Declare the class for memory tracking
@@ -232,6 +230,5 @@
 	static TCHAR ms_strFile[];	
 	static TCHAR ms_strInsert[];	
 };
-#endif
 
 #endif	// INC_IMAGEMAPFILTER
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 924)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 925)
@@ -19,11 +19,11 @@
 	cxftext.cpp cxftfile.cpp cxftrans.cpp dbugtree.cpp dialogop.cpp doccolor.cpp \
 	doccomp.cpp doccoord.cpp docrect.cpp document.cpp docview.cpp dumbnode.cpp \
 	cpp exphint.cpp extender.cpp fillattr.cpp fillramp.cpp \
-	fillval.cpp filters.cpp filtrmgr.cpp fontcomp.cpp fontlist.cpp fontman.cpp \
-	fracfill.cpp fthrattr.cpp gcache.cpp fntcache.cpp textacts.cpp \
+	fillval.cpp filters.cpp filtimag.cpp filtimop.cpp filtrmgr.cpp fontcomp.cpp fontlist.cpp \
+	fontman.cpp fracfill.cpp fthrattr.cpp gcache.cpp fntcache.cpp textacts.cpp \
 	fttyplis.cpp gadget.cpp gblend.cpp genv.cpp gla.cpp gmould.cpp \
-	grid.cpp group.cpp guides.cpp gwinding.cpp hittest.cpp hotkeys.cpp impbmp.cpp \
-	impcol.cpp impstr.cpp impexpop.cpp infocomp.cpp insertnd.cpp invalid.cpp \
+	grid.cpp group.cpp guides.cpp gwinding.cpp hittest.cpp htmlexp.cpp hotkeys.cpp \
+	impbmp.cpp impcol.cpp impstr.cpp impexpop.cpp infocomp.cpp insertnd.cpp invalid.cpp \
 	isetattr.cpp layer.cpp lineattr.cpp linecomp.cpp linedef.cpp list.cpp listitem.cpp \
 	main.cpp main1.cpp main2.cpp main3.cpp matrix.cpp modlist.cpp module.cpp \
 	moldedit.cpp moldenv.cpp moldpers.cpp moldshap.cpp native.cpp nativeop.cpp \
Index: Trunk/XaraLX/Kernel/bmapprev.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmapprev.cpp	(revision 924)
+++ Trunk/XaraLX/Kernel/bmapprev.cpp	(revision 925)
@@ -252,12 +252,12 @@
 	}
 	else
 	{
-PORTNOTE("other","Removed registry usage")
+PORTNOTE("other","Removed IDD_TPALETTE - doesn't exist in resources")
 #ifndef EXCLUDE_FROM_XARALX
 		// Not exporting a bitmap from the bitmap gallery
 		AddAPage(_R(IDD_TPALETTE));
 #endif
-
+	
 		if (!m_bSlicingImage)
 			ok = AddAPage(_R(IDD_TBITMAPSIZE));
 	}
@@ -3251,8 +3251,6 @@
 // //////////////////////////////////////////////////////////////////////////////////////// //
 void BmapPrevDlg::HandleImageMapTabMsg(DialogMsg* Msg)
 {
-PORTNOTETRACE("other","BmapPrevDlg::HandleImageMapTabMsg - Do nothing");
-#ifndef EXCLUDE_FROM_XARALX
 	CDlgResID PageID = GetCurrentPageID();	// Get currently selected Tab id
 	TalkToPage(_R(IDD_TIMAPOPTIONS));  // The Coords Page identifier
 
@@ -3309,7 +3307,10 @@
 
 				m_pExportOptions->SetCanUseDesignNotes( bCurrentState );
 
+PORTNOTE("other","SetRegistryFlagForDesignNotes - not defiend yet");
+#ifndef EXCLUDE_FROM_XARALX
 				SetRegistryFlagForDesignNotes(bCurrentState);
+#endif
 			}
 			break;
 		}
@@ -3323,7 +3324,6 @@
 			break;
 
 	}
-#endif
 }
 
 /********************************************************************************************
@@ -3337,8 +3337,6 @@
 ********************************************************************************************/
 void BmapPrevDlg::ImageMapOnCreate()
 {
-PORTNOTETRACE("other","BmapPrevDlg::ImageMapOnCreate - Do nothing");
-#ifndef EXCLUDE_FROM_XARALX
 	//Make sure we're talking to the right page
 	TalkToPage(_R(IDD_TIMAPOPTIONS));
 
@@ -3347,7 +3345,8 @@
 	//  has been named or not, we can enable/disable the appropriate controls.
 	wxString DocName = _T("\") + Document::GetCurrent()->GetPathName();	//  File name
 
-	BOOL bUsesDesignNotes	= UsesDesignNotes();			//  Is Dreamweaver 3 installed?
+PORTNOTE("other","Removed UsesDesignNotes - not defined yet")
+	BOOL bUsesDesignNotes	= false; //UsesDesignNotes();			//  Is Dreamweaver 3 installed?
 	BOOL bFileSaved			= DocName != _("\");			//  Has the current document been saved?
 
 	SetLongGadgetValue( _R(IDC_IMAPTAB_ADDDESIGNNOTE), m_pExportOptions->GetCanUseDesignNotes() );
@@ -3425,7 +3424,7 @@
 	}
 
 	//Get the current set of ImagemapFilterOptions
-	ImagemapFilterOptions ifoCurrent=pImagemapFilter->GetFilterOptions();
+	ImagemapFilterOptions ifoCurrent = pImagemapFilter->GetFilterOptions();
 
 	//First get the value for the ExportToFile switch
 	BOOL fFile=ifoCurrent.ExportToFile();
@@ -3540,7 +3539,6 @@
 	ImageMapEnableExportToFileOptions(fFile);
 
 	RefreshImageMapTab();
-#endif
 }
 
 void BmapPrevDlg::RefreshImageMapTab()
Index: Trunk/XaraLX/Kernel/htmlfltr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/htmlfltr.cpp	(revision 924)
+++ Trunk/XaraLX/Kernel/htmlfltr.cpp	(revision 925)
@@ -156,25 +156,25 @@
 static struct {
 	TCHAR *tag;		
 	HTMLTAG_TYPE Id;		
-} HTML_Table[] = {	"img",	HTMLTAG_IMGSRC,
-					"body", HTMLTAG_BODY,
-					"input",HTMLTAG_INPUT,
-					"center", HTMLTAG_CENTER,
-					"/center", HTMLTAG_CENTEREND,
-					"embed", HTMLTAG_EMBED,
+} HTML_Table[] = {	{_T("img"),	HTMLTAG_IMGSRC},
+					{_T("body"),	HTMLTAG_BODY},
+					{_T("input"),	HTMLTAG_INPUT},
+					{_T("center"),	HTMLTAG_CENTER},
+					{_T("/center"),HTMLTAG_CENTEREND},
+					{_T("embed"),	HTMLTAG_EMBED},
 
 					// The following tags are not used during the parsing,
 					// but are used during HowCompatible()
-					"a href", HTMLTAG_UNUSED,
-					"select",HTMLTAG_UNUSED,
-					"/body", HTMLTAG_UNUSED,
-					"/a", HTMLTAG_UNUSED,
-					"html", HTMLTAG_UNUSED,
-					"/html", HTMLTAG_UNUSED,
-					"title", HTMLTAG_UNUSED,
-					"/title", HTMLTAG_UNUSED,
-					"head", HTMLTAG_UNUSED,
-					"/head",HTMLTAG_UNUSED,
+					{_T("a href"),	HTMLTAG_UNUSED},
+					{_T("select"),	HTMLTAG_UNUSED},
+					{_T("/body"),	HTMLTAG_UNUSED},
+					{_T("/a"),		HTMLTAG_UNUSED},
+					{_T("html"),	HTMLTAG_UNUSED},
+					{_T("/html"),	HTMLTAG_UNUSED},
+					{_T("title"),	HTMLTAG_UNUSED},
+					{_T("/title"),	HTMLTAG_UNUSED},
+					{_T("head"),	HTMLTAG_UNUSED},
+					{_T("/head"),	HTMLTAG_UNUSED},
 									
 					////// add more TAGS here //////
 					///// just add the FIRST element of the HTML tag ///////
Index: Trunk/XaraLX/Kernel/strlist.h
===================================================================
--- Trunk/XaraLX/Kernel/strlist.h	(revision 924)
+++ Trunk/XaraLX/Kernel/strlist.h	(revision 925)
@@ -128,7 +128,7 @@
 		return m_String;
 	}
 
-	void SetString(String_256& strToSet)
+	void SetString(const String_256& strToSet)
 	{
 		m_String=strToSet;
 	}
Index: Trunk/XaraLX/Kernel/htmlexp.h
===================================================================
--- Trunk/XaraLX/Kernel/htmlexp.h	(revision 924)
+++ Trunk/XaraLX/Kernel/htmlexp.h	(revision 925)
@@ -104,7 +104,7 @@
 
 class CCLexFile;
 
-const HTMLEXPORT_DEFAULTWORDWRAP=100;
+const UINT32 HTMLEXPORT_DEFAULTWORDWRAP = 100;
 
 /**************************************************************************************
 
Index: Trunk/XaraLX/Kernel/filtimag.cpp
===================================================================
--- Trunk/XaraLX/Kernel/filtimag.cpp	(revision 924)
+++ Trunk/XaraLX/Kernel/filtimag.cpp	(revision 925)
@@ -109,7 +109,7 @@
 
 //#include "resimmap.h"		// Imagemap resources
 
-//#include "fimagdlg.h"		//Imagemap dialog
+#include "fimagdlg.h"		//Imagemap dialog
 #include "filtimag.h"
 
 #include "docview.h"		//For DocView::GetCurrent
@@ -213,8 +213,11 @@
 		Camelot.DeclarePref( NULL, ms_strInsert, &ms_Options.m_fInsert, FALSE, TRUE);
 	}
 
+PORTNOTE("other","Remove ImagemapDlg usage - not defined yet");
+#ifndef EXCLUDE_FROM_XARALX
 	//Initialise the ExportOptions dialog
 	ImagemapDlg::Init();
+#endif
 	
 	//And return
 	return TRUE;
@@ -510,23 +513,17 @@
 	Info.Cancel = 3;
 
 	//And put the error box up
-	switch (AskQuestion( &Info ))
-	{
-		case _R(IDB_IMAGEMAP_INSERT):
-			ms_Options.m_fInsert=TRUE;	
-			return TRUE;
-
-		case _R(IDB_IMAGEMAP_REPLACE):
-			ms_Options.m_fInsert=FALSE;
-			return TRUE;
-
-		case _R(IDS_CANCEL):
-			return FALSE;
-
-		default:
-			return TRUE;
-	}
-
+	const UINT32 uResult = AskQuestion( &Info );
+	if( uResult == _R(IDB_IMAGEMAP_INSERT) )
+		ms_Options.m_fInsert=TRUE;	
+	else
+	if( uResult == _R(IDB_IMAGEMAP_REPLACE) )
+		ms_Options.m_fInsert=FALSE;	
+	else
+	if( uResult ==_R(IDS_CANCEL) )
+		return FALSE;
+	
+	return TRUE;
 }
 
 /********************************************************************************************
@@ -650,6 +647,8 @@
 {
 	ERROR2IF (pifoDefault==NULL, FALSE, "ImagemapFilter::GetOptionsFromUser - NULL parameter");
 
+PORTNOTETRACE("other","ImagemapFilter::GetOptionsFromUser - Do nothing");
+#ifndef EXCLUDE_FROM_XARALX
 	//Now, if the file we are writing to exists already, and if
 	//we are writing to that file
 	if (SGLibOil::FileExists(ppthFile) && ms_Options.Insert())
@@ -681,7 +680,9 @@
 		//chose back into *pifoDefault
 		return ImagemapDlg::InvokeDialog(pifoDefault);
 	}
-
+#endif
+	
+	return FALSE;
 }	
 
 
@@ -709,6 +710,8 @@
 
 BOOL ImagemapFilter::PrepareRenderRegion(Document* pDoc)
 {
+PORTNOTETRACE("other","ImagemapFilter::PrepareRenderRegion - Do nothing");
+#ifndef EXCLUDE_FROM_XARALX
 	// First, create the render region from our current options
 	if (m_pRegion)
 		delete m_pRegion;
@@ -730,7 +733,8 @@
 
 	//We also need to switch background rendering off in the view
 	ForceBackgroundRedrawOff(pView);
-		
+#endif
+	
 	return TRUE;
 }
 
@@ -1070,6 +1074,8 @@
 	//Keep a count of the characters we write out
 	INT32 lCharsWritten=0;
 
+PORTNOTETRACE("other","ImagemapFilter::WriteImagemapHTML - Do nothing");
+#ifndef EXCLUDE_FROM_XARALX
 	//Do we have an imagemap render region member?
 	if (m_pRegion)
 	{
@@ -1093,8 +1099,8 @@
 		//And a new line
 		//lCharsWritten+=WriteEOL(pfileToWrite, pcBuffer);
 	}
+#endif	
 	
-	
 	//And return the number of characters written
 	return lCharsWritten;
 }
@@ -1136,6 +1142,8 @@
 	//Check parameters
 	ERROR2IF (pFile==NULL || pPath==NULL, FALSE, "ImagemapFilter::WriteDataToExistingFile - null parameter");
 
+PORTNOTETRACE("other","ImagemapFilter::WriteDataToExistingFile - Do nothing");
+#ifndef EXCLUDE_FROM_XARALX
 	//Now let's create a new Xara temporary file
 	PathName pthTemp=FileUtil::GetTemporaryPathName();
 
@@ -1165,6 +1173,9 @@
 
 	//And return
 	return ok;
+#endif
+
+	return TRUE;
 }
 
 /********************************************************************************************
@@ -1455,11 +1466,11 @@
 		}
 
 		//Then get a pointer to the last HTML token we read
-		TCHAR* pcBufferToWrite=pfileFrom->GetHTMLTokenBuffer();
+		char* pcBufferToWrite=pfileFrom->GetHTMLTokenBuffer();
 
 		//And write it out
 		if (pcBufferToWrite)
-			pfileTo->write(pcBufferToWrite, camStrlen(pcBufferToWrite));
+			pfileTo->write(pcBufferToWrite, strlen(pcBufferToWrite));
 	}
 
 	//Now, if we haven't inserted an imagemap before a closing body tag,
@@ -1545,6 +1556,8 @@
 
 void ImagemapFilter::BuildMapNamesList(CCLexFile* pfileSearch, PathName* ppthSearch, List* plstToAdd)
 {
+PORTNOTETRACE("other","ImagemapFilter::BuildMapNamesList - Do nothing");
+#ifndef EXCLUDE_FROM_XARALX
 	//First we must open the file for reading
 	CCDiskFile* pDiskFile=(CCDiskFile*) pfileSearch;
 
@@ -1581,6 +1594,7 @@
 
 	//Then close the file
 	pDiskFile->close();
+#endif
 }
 
 
@@ -1625,7 +1639,7 @@
 		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T("<img src=\"file:///"));
 
 		nChars = camStrlen(pcBuffer);
-		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T(ms_Options.m_GraphicPath.GetPath())); // the path and file name of the graphic
+		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), ms_Options.m_GraphicPath.GetPath() ); // the path and file name of the graphic
 
 		nChars = camStrlen(pcBuffer);
 		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T("\""));
@@ -1674,7 +1688,7 @@
 		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T(" usemap=\"#"));
 
 		nChars = camStrlen(pcBuffer);
-		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T(ms_Options.GetImagemapName()));
+		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), ms_Options.GetImagemapName() );
 
 		nChars = camStrlen(pcBuffer);
 		camStrcpy(pcBuffer+nChars*sizeof(TCHAR), _T("\" border=\"0\">
"));
@@ -1690,7 +1704,7 @@
 
 	//Image Path and filename...
 	nChars += camStrlen(_T("<img src=\"file:///"));
-	nChars += camStrlen(_T(ms_Options.m_GraphicPath.GetPath())); // the path and file name of the graphic
+	nChars += camStrlen( ms_Options.m_GraphicPath.GetPath() ); // the path and file name of the graphic
 	nChars += camStrlen(_T("\""));
 
 /************************************************************************************
@@ -1727,7 +1741,7 @@
 
 	//Now the remaining details...
 	nChars += camStrlen(_T(" usemap=\"#"));
-	nChars += camStrlen(_T(ms_Options.GetImagemapName()));
+	nChars += camStrlen( ms_Options.GetImagemapName() );
 	nChars += camStrlen(_T("\" border=\"0\">
"));
 
 	return nChars*sizeof(TCHAR);


Xara