OpenOffice Plugin error and possible reason

I had a major heart attack when this bug happened but thankfully now made a change to my document and it seems to be resolved, here's the story:

I have some pictures in the document with 'captions' I wanted to reference the diagram I had inserted so I tried inserting a citation within the caption. Zotero Plugin says no!

So I inserted the reference into the main text then cut and pasted it into the caption and everything seemed to work fine for hours, I repeated my 'trick' with another diagram and continued writing, saving the document as i went and then when I next tried to insert a reference I got an error with this line of code:

nLT1 = oR1.Text.ReferenceId

"method or property undefined"

[see also
http://forums.zotero.org/discussion/1353/
same function different line
http://forums.zotero.org/discussion/1675/
same line!]


Nothing would work, not the refresh function not the set style function, everything seemed broken! I restarted firefox and OOo, didn't work, restarted computer (Win XP), didn't work either.

Then, thank God, I thought I might have done something illegal by putting the reference in the caption. I took it out and low and behold everything works!

But strangely there *is* still a reference in my initial caption (remember I did this trick twice) why didn't it break that time? Maybe because there were other references *after* that one in the document?

Maybe ReferenceId breaks on references in captions but it's OK as long as there are other 'normal' references 'shielding' the abnormal one?

Anyway I need to get back to writing this thesis so no time to experiment (also worried I'll break it more!)

Hope this is useful to someone if the same code breaks again.

P.S.
The whole function was

Function fnRangeComp(m1, m2) as boolean
'Needed for the sort routine in OOo to get marks in correct order.
Dim oR1, oR2, nLT1 as Integer, nLT2 as Integer

oR1 = fnMarkRange(m1)
oR2 = fnMarkRange(m2)
nLT1 = fnLocationType(oR1)
nLT2 = fnLocationType(oR2)
if nLT1 > nLT2 then
fnRangeComp = true
elseif nLT1 < nLT2 then
fnRangeComp = false
elseif nLT1 = ZOTERO_MAIN then
** fnRangeComp = thisComponent.Text.compareRegionStarts(oR1, oR2) > 0 **
else
nLT1 = oR1.Text.ReferenceId <--- broke here!
nLT2 = oR2.Text.ReferenceId
fnRangeComp = nLT1 < nLT2
end If
End Function
  • I just had the same problem, thank you very much for posting this, avoided my "heart attack"!

    Was this entered as a bug somewhere?
Sign In or Register to comment.