https://issues.apache.org/ooo/show_bug.cgi?id=122450
Bug ID: 122450
Issue Type: DEFECT
Summary: insertDocumentFromUrl not working with ftp url
Product: Writer
Version: AOO 3.4.1
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: open-import
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
in Openooffice 3.4.1 the following Macro that works on earlier versions (till
3.2.1) will trhow this error
"com.sun.star.lang.WrappedTargetException
Message : Can't read contents!
Target Exception :
Type:com.sun.star.packages.ZipIoException
Message:
C:/AOO/sources/aoo340SVN/main/package/source/zippackage/ZipPackage.cxx:<unknown>:800;Bad
Zip File.."
Sub inserisciCodificati
REM Dim InputVal As String
Dim Fcodif As String
Dim Doc As Object
Dim Cursor As Object
Dim Valori(1) as new com.sun.star.beans.PropertyValue
Dim oDocument As Object
Dim oText As Object
Dim oViewCursor As Object
Dim oTextCursor As Object
Fcodif = "ftp://[email protected]/codificati/"+Fcodi+".sxw"
oDocument = ThisComponent
oText = oDocument.Text
oViewCursor = oDocument.CurrentController.getViewCursor()
oTextCursor = oText.createTextCursorByRange(oViewCursor.getStart())
oTextCursor.insertDocumentFromURL(Fcodif,Valori())
End Sub
In Variable Fcodif is stored the path of the file it has to be imported. If i
change the Path to something loccal as "file:///C:/Users/user/Desktop/test.sxw"
everything works fine.
Thanks in Advance
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.