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

[XaraXtreme-commits] Commit Complete



Commit by  : gerry
Repository : xara
Revision   : 1011
Date       : Thu May 11 18:03:33 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/xpfilter.cpp
   M /Trunk/XaraLX/wxOil/xpoilflt.cpp
   M /Trunk/XaraLX/wxOil/xpoilflt.h

Fixed a couple of issues


Diff:
Index: Trunk/XaraLX/Kernel/xpfilter.cpp
===================================================================
--- Trunk/XaraLX/Kernel/xpfilter.cpp	(revision 1010)
+++ Trunk/XaraLX/Kernel/xpfilter.cpp	(revision 1011)
@@ -240,28 +240,7 @@
 	if (!sFilename.IsEmpty())
 	{
 		PluginOILFilter* pPluginOILFilter = (PluginOILFilter*)pOILFilter;
-// Temporarily removed to stop file loading problems
-//		HowCompatible = pPluginOILFilter->HowCompatible(Filename);
-
-		// Look at the source for wxExecute
-
-		// Try using CamProcess instead
-		// Perhaps the redirection will stop the strangeness
-
-		wxString sCommand(_T("echo 1"));
-	
-		TRACE(_T("Running '%s'"), sCommand.c_str());
-	
-		CamProcess TheProc(NULL, NULL);
-
-		int code = TheProc.Execute(sCommand);
-		if (code != 0)
-		{
-			TRACE(_T("Execution of '%s' failed."), sCommand.c_str());
-			// Extract error from a derived CamProcess class and report it
-			return(FALSE);
-		}
-
+		HowCompatible = pPluginOILFilter->HowCompatible(Filename);
 	}
 
 	// Return the found value to the caller.
Index: Trunk/XaraLX/wxOil/xpoilflt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/xpoilflt.cpp	(revision 1010)
+++ Trunk/XaraLX/wxOil/xpoilflt.cpp	(revision 1011)
@@ -307,8 +307,13 @@
 	// This should be set to some sensible path but I've hardcoded it for now
 	// We should change to making ~/.XaraLX into a directory and store the main config
 	// file and these filter config files in there
-	m_XMLFile.SetPathName(_T("/home/gerry/.XPFilters/XPFilter.xml"));
+	m_XMLFile.AssignHomeDir();
+	m_XMLFile.AppendDir(_T(".XaraLXFilters"));
+	m_XMLFile.Mkdir(0777, wxPATH_MKDIR_FULL);
 
+	m_XMLFile.SetName(m_InternalName);
+	m_XMLFile.SetExt(_T("xml"));
+
 	m_bImport = !(m_DoImport.IsEmpty());
 	m_bExport = !(m_DoExport.IsEmpty());
 
@@ -536,7 +541,7 @@
 	// Does this need double quotes to cope with spaces in filenames?
 	wxString sCommand(m_PrepareExport);
 	sCommand.Replace(_T("%OUT%"), (LPCTSTR)pPath->GetPath());
-	sCommand.Replace(_T("%XML%"), (LPCTSTR)m_XMLFile.GetPath());
+	sCommand.Replace(_T("%XML%"), m_XMLFile.GetFullPath());
 
 	TRACE(_T("Running '%s'"), sCommand.c_str());
 
@@ -551,7 +556,7 @@
 
 	if (code == 0)
 	{
-		BOOL bOK = BuildCapabilityTree(m_XMLFile.GetPath(), pCapTree);
+		BOOL bOK = BuildCapabilityTree(m_XMLFile.GetFullPath(), pCapTree);
 		if (!bOK)
 		{
 			// Assume BuildCapabilityTree has already set an error
@@ -602,7 +607,7 @@
 
 	wxString sCommand(m_DoExport);
 	sCommand.Replace(_T("%OUT%"), (LPCTSTR)pPath->GetPath());
-	sCommand.Replace(_T("%XML%"), (LPCTSTR)m_XMLFile.GetPath());
+	sCommand.Replace(_T("%XML%"), m_XMLFile.GetFullPath());
 
 	TRACE(_T("Running '%s'"), sCommand.c_str());
 
Index: Trunk/XaraLX/wxOil/xpoilflt.h
===================================================================
--- Trunk/XaraLX/wxOil/xpoilflt.h	(revision 1010)
+++ Trunk/XaraLX/wxOil/xpoilflt.h	(revision 1011)
@@ -192,13 +192,6 @@
 	void Cleanup();
 
 protected:
-PORTNOTE("other","PluginFilter COM bits removed")
-#if !defined(EXCLUDE_FROM_XARALX)
-	// Functions to create and release the filter COM object
-	BOOL CreateFilterObject();
-	void ReleaseFilterObject();
-#endif
-
 //	This function is called from GetCapabilities to parse the XML
 	BOOL BuildCapabilityTree(wxString strXML, CapabilityTree* pCapTree);
 
@@ -228,26 +221,8 @@
 	wxString m_CanImport;		// Command for CanImport
 	wxString m_DoImport;		// Command for DoImport
 
-	PathName m_XMLFile;			// Full path to filter XML config file for the current user
+	wxFileName m_XMLFile;		// Full path to filter XML config file for the current user
 	PathName m_TempXarFile;		// Full path to temporary Xar file
-
-
-PORTNOTE("other","PluginFilter COM bits removed")
-#if !defined(EXCLUDE_FROM_XARALX)
-	CLSID m_CLSID;
-	CComPtr<IXPFilter> m_pFilterObj;
-	CComPtr<IStream> m_pXarStream;
-#endif
-
-public:
-PORTNOTE("other","PluginFilter COM bits removed")
-#if !defined(EXCLUDE_FROM_XARALX)
-	// These functions handle the COM object autoregistration
-	static BOOL AutoRegisterFilters();
-	static BOOL RegisterDLL(String_256& sPath);
-	static BOOL GetFileVersion(PathName* pPath, String_64* pVersion);
-	static INT32 CompareVersions(const String_64& lhs, const String_64& rhs);
-#endif
 };
 
 


Xara