To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=86251


User bmarcelly changed the following:

                What    |Old value                 |New value
================================================================================
                 Version|OOo 2.4 RC1               |OOo 2.4 RC2
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Tue Mar  4 15:11:22 +0000 
2008 -------
Here is a correction proposal. Tested only on my WindowsXP computer.

pyuno routines systemPathToFileUrl and fileUrlToSystemPath should not be used.

1) Correction of uno.py -> change the existing functions by these versions:

def systemPathToFileUrl( systemPath ):
    "returns a file-url for the given system path"
    sv = 
getComponentContext().ServiceManager.createInstance("com.sun.star.ucb.FileContentProvider")
    ret = sv.getFileURLFromSystemPath("", systemPath)
    return ret

def fileUrlToSystemPath( url ):
    "returns a system path (determined by the system, the python interpreter is 
running on)"
    sv = 
getComponentContext().ServiceManager.createInstance("com.sun.star.ucb.FileContentProvider")
    ret = sv.getSystemPathFromFileURL(url)
    return ret.encode(sys.getfilesystemencoding())


2) Correction of unohelper.py -> change the existing functions by these 
versions:

def systemPathToFileUrl( systemPath ):
    "returns a file-url for the given system path"
    return uno.systemPathToFileUrl( systemPath )

def fileUrlToSystemPath( url ):
    "returns a system path (determined by the system, the python interpreter is 
running on)"
    return uno.fileUrlToSystemPath( url )


3) Improvement of pythonscript.py :
it would be more efficient to call the uno.fileUrlToSystemPath() and 
uno.systemPathToFileUrl instead of the unohelper.py equivalent routines.


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to