[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[patch] Re: OpenDocumentText Compare Error

From: Ian Anderson <i.tsvn_at_operation-sensory-overload.com>
Date: 2006-11-21 21:17:25 CET

Stefan Küng wrote:
> Steve Wardell wrote:
>> I'm using Tortoise 1.4.1 and trying to compare an ODT file in two
>> different revisions.

[snip]

>> Error: com.sun.star.lang.IllegalArgumentException: URL seems to be an
>> unsupported one.

[snip]

> Can you provide a patch for this please?
>
> Stefan

This patch adds URI translation to the odt diff script. Tested on
OpenOffice 2.0.

Index: contrib/other/diff-scripts/diff-odt.vbs
===================================================================
--- contrib/other/diff-scripts/diff-odt.vbs (revision 8090)
+++ contrib/other/diff-scripts/diff-odt.vbs (working copy)
@@ -34,15 +34,18 @@
 On Error Goto 0
 'Create the DesktopSet
 Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+Set objUriTranslator = objServiceManager.createInstance("com.sun.star.uri.ExternalUriReferenceTranslator")
 'Adjust the paths for OO
 sBaseDoc=Replace(sBaseDoc, "\", "/")
 sBaseDoc=Replace(sBaseDoc, ":", "|")
 sBaseDoc=Replace(sBaseDoc, " ", "%20")
 sBaseDoc="file:///"&sBaseDoc
+sBaseDoc=objUriTranslator.translateToInternal(sBaseDoc)
 sNewDoc=Replace(sNewDoc, "\", "/")
 sNewDoc=Replace(sNewDoc, ":", "|")
 sNewDoc=Replace(sNewDoc, " ", "%20")
 sNewDoc="file:///"&sNewDoc
+sNewDoc=objUriTranslator.translateToInternal(sNewDoc)
 
 'Open the %base document
 Dim oPropertyValue(0)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Nov 21 21:17:27 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.