Found with Server Installation (own profile) of "LibreOffice 3.4.5 RC1 - WIN7 Home Premium (64bit) German UI [Build ID: OOO340m1 (Build:501)]": When I try to use "Instant Word count" I get an Error Message as shown in Attachment. Same with 3.5.6.2
Sorry, used my test account for bug submission. Leif, what do you think?
Created attachment 65789 [details] Error Message
Hmmm. I must admit that I haven't spend much time on the extension lately because we have a word count in status bar and a 'floating' word count window in LibreOffice. Its quite some time I created the extension. I'm using it myself almost everyday without any problems. (Linus 32 bit). I remember some problems with the Python framework from earlier. As I remember it the extension MUST be installed as a user extension (not an administration installed extension). But I don't recall all the details. I think we should try with one or two other Python extensions for benchmarking. The macro is launched with the following syntax: vnd.sun.star.script:wordcount.oxt|wc|wc.py$wordCount?language=Python&location=user:uno_packages Perhaps that syntax is outdated?
Leif, Yikes. I've really slacked off on this one :-) The error is because of a vestigial `print' statement in the wc.py file. Since recent versions of OOo/LibO are using Python 3, the print statement should be turned into a print function--basically line 54 should be changed from `print ...' to `print(...)'. However even after this change I seem to be having some trouble with counting words in a selection. Working on this now in the BitBucket repo at https://bitbucket.org/yawaramin/oo.o-live-word-count/overview If anyone can help debug that, would appreciate. Contact me for details.... Thanks, Yawar
OK. Selection word count bug fixed and code simplified. Leif, can you package the new version I've just pushed to BitBucket? Thanks
Created attachment 77950 [details] Extension The script is now bundled as an extension. Please note that this extension is LibreOffice only. Open Office will not run it as a result of the Python upgrade. I have tested on Linux and Windows. The counter works fine but it seems that the goal value is not stored as document variable. As a consequence of this the goal is not stored in the document. I will look into this problem later.
Hi Leif, (In reply to comment #6) [...] > Please note that this extension is LibreOffice only. Open Office will not > run it as a result of the Python upgrade. Ah, I didn't realise that OOo is still on Python 2. However ... I think it should still work. The newest Python feature that I'm using is probably conditional expressions from 2.5.
New release of the ewxtension here: http://extensions.libreoffice.org/extension-center/instant-word-count/pscreleasefolder.2011-09-10.1251884787/20130415.0.1