OpenOffice or Libre Office Plugin

So, i tried the first steps to design a class which can create platform-independent (OS X, Window and Linux) Word-Files (.docx) and Open Office/Libre Office Files (.odt) without OLE etc. You also don’t need to have the MS Word etc. installed. The only thing you’ll need is the MBS Compression Plugin (29-40€) to zip the files. It’s a lot of work to create such a class, because there are a lot of differences between the Office Open Xml (.docx) and the Open Document Format (.odt). Is there someone interessed to create such a project together? Just let me know via PM.

I have a simple working project :wink:

I did a very simple one and I used the zip and unzip command line from mac os x : I did not need any plugin for that ?

On Mac it is built into the system, but not on Windows.

power Shell can do this in WIndows with built-in ZIP:

Add-Type -A System.IO.Compression.FileSystem [IO.Compression.ZipFile]::CreateFromDirectory('foo', 'foo.zip') [IO.Compression.ZipFile]::ExtractToDirectory('foo.zip', 'bar')

As alternative you could use commandline in 7-zip, its free, and opensource(?)

[quote=253431:@Tomas Jakobs]power Shell can do this in WIndows with built-in ZIP:

Add-Type -A System.IO.Compression.FileSystem [IO.Compression.ZipFile]::CreateFromDirectory('foo', 'foo.zip') [IO.Compression.ZipFile]::ExtractToDirectory('foo.zip', 'bar')

As alternative you could use commandline in 7-zip, its free, and opensource(?)[/quote]

How do you access that from the Xojo shell ?

I saw built-in ZIP in Windows 8.1 / 10,

Calling these built-in from a Xojo application (OS X, WIndows, what about Linux ?) will be nice…

[quote=253431:@Tomas Jakobs]
As alternative you could use commandline in 7-zip, its free, and opensource(?)[/quote]

It works wonderfully, and you can unpack several types of archive.

The only issue I have still to find a Xojo answer for is high-UTF8 file names of archives and files inside ( pack or unpack), like Japanese names. The normal Win shell cannot handle these, and all the RB/Xojo answers I have found have some other failing - can’t do RAR, can’t do 7-Zip, can’t handle passworded files, can’t do archives > 4GB and so on. Admittedly the normal gui 7-Zip wrecks such file names unless run under applocale on an English system.

I’d love to find an answer.

Use of extended characters in shell under Windows is strange even under the normal shell because it use the DOS CP850 encoding, not the native WindowsANSI.

Here is a way to create a file with extended ascii from the Xojo shell, using an ad hoc batch script :

[code] Dim t As TextOutputStream
Dim f As FolderItem = specialfolder.Desktop.child(“myscript.bat”)
If f <> Nil Then
t = TextOutputStream.Create(f)
t.WriteLine(ConvertEncoding(“dir > /Users/Mitch/Desktop/.txt”, Encodings.DOSLatin1))
t.Close
End If

dim batpath as folderitem
batpath = f.parent.child(“myscript.bat”)
dim s as new shell
s.execute(batpath.shellpath)
[/code]

How does the command looks like to compress multiple Files and Folders?

I compress one file at a time sorry did not try that !