Can't insert citation in text box in LibreOffice

Not sure if this is expected, but I ran into an error using the Zotero connector in LibreOffice today:

Zotero experienced an error updating your document.

An error occurred communicating with Zotero:
com.sun.star.uno.RuntimeException: no text selection
at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:185)
at com.sun.proxy.$Proxy25.getText(Unknown Source)
at org.zotero.integration.ooo.comp.Document.cursorInField(Document.java:267)
at org.zotero.integration.ooo.comp.CommMessage.execute(CommMessage.java:93)
at org.zotero.integration.ooo.comp.CommMessage.getBytes(CommMessage.java:61)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:84)
at java.lang.Thread.run(Thread.java:745)

It happened when I tried to insert a citation into a text box.

My version of LibreOffice:

Version: 5.3.5.2
Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; VCL: kde4; Layout Engine: new;
Locale: en-GB (en_GB.UTF-8); Calc: group

My version of Zotero: 5.0.8

  • Does it work in a fresh document? If it does, then you will need to look into debugging the document
  • edited August 9, 2017
    I get the same error with a fresh document. The parameters used are:
    - Citation style: Journal of Plant Physiology
    - Store citations as: ReferenceMarks
    - [x] Use MEDLINE journal abbreviations

    If I insert in the text body, no problem. If I insert in a text box, same error.
    The error appears after setting the document preferences (if it is the first time I try to add the citation, or as soon as I click the "add/edit citation button" (and therefore the "quick format citation" box never appears).
  • edited August 9, 2017
    I don't believe text boxes have every worked. That's not an elegant way to fail for Zotero, though. It should just tell you that what you're trying to do isn't possible.

    (Edit: @adomasven I can replicate this with Zotero 4 on my Ubuntu setup: open a text box in LO, put cursor in it, try to insert add-on, produces the error above)
  • Oh, right. I missed the part about the text box. Yes, that's never worked and won't work for the foreseeable future as it's a limitation within LibreOffice that's stopping us (although we could perhaps have a better error message).
  • Right, that makes sense, I would understand why it wouldn't be a priority to implement that (bit of a corner case), but I agree with @adamsmith : the error message should just say "you cannot insert a citation here" or something of the sort.

    Cheers
  • (Just to be clear, it’s not that it’s not a priority to insert citations into text boxes, by rather than LibreOffice doesn’t allow ReferenceMarks or Bookmarks, which Zotero uses to store the reference information, into text boxes. If LibreOffice allowed this, Zotero could implement it.)
  • Right, thanks for explaining. Is that something that LibreOffice *should* allow for, in your opinion? I.e., is there a bug report / enhancement request in Bugzilla for it?
Sign In or Register to comment.