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

[XaraXtreme-commits] Commit Complete



Commit by  : phil
Repository : xara
Revision   : 1195
Date       : Fri May 26 11:37:54 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/debugdlg.cpp
   M /Trunk/XaraLX/Kernel/main2.cpp

Re-enabled the Debug Dialog.


Diff:
Index: Trunk/XaraLX/Kernel/main2.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main2.cpp	(revision 1194)
+++ Trunk/XaraLX/Kernel/main2.cpp	(revision 1195)
@@ -338,10 +338,13 @@
 			DebugTreeDlg::Init() &&				// Temp ******
 #endif //DEBUG_TREE
 
+#if _DEBUG
+			DebugDlg::Init() &&					// Debug command dialogue - in debug builds only
+#endif //_DEBUG
+
 #ifndef EXCLUDE_FROM_XARALX
 			BlobbyTabDlg::Init() &&				// Temp ******
 #if _DEBUG
-			DebugDlg::Init() &&					// Debug command dialogue - in debug builds only
 			OpCreateFontThumbnails::Init() &&	// Debug only
 			OpConvertFileFormats::Init() &&		// Debug only
 #endif //_DEBUG
Index: Trunk/XaraLX/Kernel/debugdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/debugdlg.cpp	(revision 1194)
+++ Trunk/XaraLX/Kernel/debugdlg.cpp	(revision 1195)
@@ -162,7 +162,7 @@
 #include "opimgset.h"
 
 #include "opliveeffects.h"
-#include "xpehost.h"
+//#include "xpehost.h"
 
 #include <time.h>
 #include <stdlib.h>
@@ -172,7 +172,7 @@
 #include "ccc.h"	// <---- not here
 #endif
 
-#include "mainfrm.h"
+//#include "mainfrm.h"
 
 CC_IMPLEMENT_DYNCREATE(DebugDlg, DialogOp)
 
@@ -415,6 +415,9 @@
 					SetCommandValue(LastSelectedGroup, LastSelectedIndex);
 				}
 				break;
+			default:
+				// Do nothing
+				break;
 		}
 
 		if (EndDlg)
@@ -558,7 +561,7 @@
 
 	DeleteAllValues(_R(IDC_DEBUGDLG_GROUP));
 
-#define ADDGROUP(name) { Temp = TEXT(name); SetStringGadgetValue(IDC_DEBUGDLG_GROUP, &Temp); }
+#define ADDGROUP(name) { Temp = TEXT(name); SetStringGadgetValue(_R(IDC_DEBUGDLG_GROUP), Temp); }
 
 	ADDGROUP("Imagesetting (Jason)");		// Group 0
 	ADDGROUP("Jason personal debug");		// Group 1
@@ -615,7 +618,7 @@
 
 	DeleteAllValues(_R(IDC_DEBUGDLG_LIST));
 
-#define ADDCOMMAND(name) { Temp = TEXT(name); SetStringGadgetValue(IDC_DEBUGDLG_LIST, &Temp); }
+#define ADDCOMMAND(name) { Temp = TEXT(name); SetStringGadgetValue(_R(IDC_DEBUGDLG_LIST), Temp); }
 
 	switch (GroupIndex)
 	{
@@ -804,7 +807,7 @@
 								}
 
 								if (pCol && Count > 0)
-									Value._MakeMsg("#1%d", Count);
+									Value._MakeMsg(_T("#1%d"), Count);
 							}
 						}						
 
@@ -925,7 +928,7 @@
 				case 2:	Description = TEXT("Fails memory claims after the specified number of bytes have been claimed.");
 				{
 					String_32 Number;
-					Number._MakeMsg("#1%lu", SimpleCCObject::GetLowMemoryLimit());
+					Number._MakeMsg(_T("#1%lu"), SimpleCCObject::GetLowMemoryLimit());
 					Value = Number;
 					IsEditable = TRUE;
 					break;
@@ -1037,9 +1040,9 @@
 		// Add your own command group(s) here		
 	}
 
-	SetStringGadgetValue(_R(IDC_DEBUGDLG_COMMENT), &Description);
+	SetStringGadgetValue(_R(IDC_DEBUGDLG_COMMENT), Description);
 
-	SetStringGadgetValue(_R(IDC_DEBUGDLG_VALUE1), &Value);
+	SetStringGadgetValue(_R(IDC_DEBUGDLG_VALUE1), Value);
 	EnableGadget(_R(IDC_DEBUGDLG_VALUE1), IsEditable);
 }
 
@@ -1086,6 +1089,8 @@
 					}
 					break;
 
+PORTNOTE("Separations", "Removed use of SetNewColourPlate")
+#ifndef EXCLUDE_FROM_XARALX
 				case 1:  SetNewColourPlate(COLOURPLATE_COMPOSITE,0,0); break;
 				case 2:  SetNewColourPlate(COLOURPLATE_CYAN,	 0,0); break;
 				case 3:  SetNewColourPlate(COLOURPLATE_MAGENTA,	 0,0); break;
@@ -1093,7 +1098,8 @@
 				case 5:  SetNewColourPlate(COLOURPLATE_KEY,		 0,0); break;
 				case 6:
 					{
-						INT32 SpotPlate = atoi(*NewValue);
+						INT32 Pos = 0;
+						INT32 SpotPlate = NewValue->ConvertToInteger(Pos);
 						SetNewColourPlate(COLOURPLATE_SPOT,	 0,SpotPlate);
 					}
 					break;
@@ -1124,6 +1130,7 @@
 						}
 					}
 					break;
+#endif
 
 				default:
 					ERROR3("Unknown debug command");
@@ -1153,6 +1160,8 @@
 		case 2:		// Mike's misc controls -------------------------------------------------
 			switch (CommandIndex)
 			{
+PORTNOTE("PrintMarks", "Removed use of PrintMarksMan")
+#ifndef EXCLUDE_FROM_XARALX
 				case 0:
 				{
 					// We need to execute this one after the dialogue has closed.
@@ -1181,6 +1190,7 @@
 					
 				}
 				break;
+#endif
 
 				case 2:
 				{
@@ -1192,7 +1202,8 @@
 					AttrColFillRampChange* pAttrib = new AttrColFillRampChange;
 					if (pAttrib!=NULL)
 					{
-						INT32 NewVal = atol(*NewValue);
+						INT32 Pos = 0;
+						INT32 NewVal = NewValue->ConvertToInteger(Pos);
 						float pos = ((float)NewVal) / 255.0f;
 						if (pos<0.0f) pos=0.0f;
 						if (pos>1.0f) pos=1.0f;
@@ -1221,7 +1232,8 @@
 					AttrTranspFillRampChange* pAttrib = new AttrTranspFillRampChange;
 					if (pAttrib!=NULL)
 					{
-						INT32 NewVal = atol(*NewValue);
+						INT32 Pos = 0;
+						INT32 NewVal = NewValue->ConvertToInteger(Pos);
 						
 						float pos = ((float)NewVal) / 255.0f;
 						if (pos<0.0f) pos=0.0f;
@@ -1290,7 +1302,8 @@
 
 				case 2:
 				{
-					INT32 NewVal = atol(*NewValue);
+					INT32 Pos = 0;
+					INT32 NewVal = NewValue->ConvertToInteger(Pos);
 					SimpleCCObject::SetClaimLimit(NewVal);
 				}
 				break;
@@ -1309,8 +1322,8 @@
 				
 				case 5:
 				{
-					BOOL MemOK = AfxCheckMemory();
-					ERROR3IF(!MemOK, "MFC Memory check failure (look at TRACE output)");
+//					BOOL MemOK = AfxCheckMemory();
+//					ERROR3IF(!MemOK, "MFC Memory check failure (look at TRACE output)");
 				}
 				break;
 
@@ -1594,6 +1607,8 @@
 			{
 				switch(CommandIndex)
 				{
+PORTNOTE("LiveEffects", "Removed use of LiveEffects")
+#ifndef EXCLUDE_FROM_XARALX
 				case 0:
 					{
 						OpDescriptor* pOp = OpDescriptor::FindOpDescriptor(OPTOKEN_APPLY_LIVEEFFECT);
@@ -1601,7 +1616,7 @@
 						{
 							OpLiveEffectParam Param;
 							Param.bIsDestructive = FALSE;
-							Param.strOpUnique = String("Enhance");
+							Param.strOpUnique = String(_T("Enhance"));
 							pOp->Invoke(&Param);
 						}
 					}
@@ -1613,14 +1628,15 @@
 						{
 							OpLiveEffectParam Param;
 							Param.bIsDestructive = FALSE;
-							Param.strOpUnique = String("Enhance");
+							Param.strOpUnique = String(_T("Enhance"));
 							pOp->Invoke(&Param);
 						}
 					}
 					break;
+#endif
 				case 2:
 					{
-						XPEHost::EndEditSession(TRUE);
+//						XPEHost::EndEditSession(TRUE);
 					}
 					break;
 				case 3:
@@ -1640,9 +1656,9 @@
 				case 0:
 					{
 						// Set the size of a slot to something weird
-						OILFixedDockingBar* pDockBar = (OILFixedDockingBar*)(GetMainFrame()->GetDockBar(DOCKBAR_RIGHT));
-						pDockBar->SetSlotSize(0, 150);
-						GetMainFrame()->RecalcLayout();		
+//						OILFixedDockingBar* pDockBar = (OILFixedDockingBar*)(GetMainFrame()->GetDockBar(DOCKBAR_RIGHT));
+//						pDockBar->SetSlotSize(0, 150);
+//						GetMainFrame()->RecalcLayout();		
 					}
 					break;
 				}


Xara