<div dir="ltr">Hello everyone, I wrote and published an extension for OpenOffice in Java using the OpenOffice Netbeans plugin.<div><br></div><div>Now I am trying to port it over to LibreOffice so I can publish it as an extension there too.</div><div><br></div><div>At first I was getting some errors such as this:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Stack map does not match the one at exception handler 354 Exception Details:</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> Location:</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> io/bibleget/BibleGetJSON.JSONParse(Ljava/lang/String;)V @354: astore</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> Reason:</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> Type 'com/sun/star/lang/IllegalArgumentException' (current frame, stack[0]) is not assignable to 'com/sun/star/uno/Exception' (stack map, stack[0])</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> Current Frame:</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> bci: @283</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> flags: { }</span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)">  </span><span style="color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12.8px;background-color:rgb(240,247,255)"> locals: { 'io/biblege</span><br clear="all"><div><br></div><div>But I think I figured out what the problem there was, it's not enough to just change the context of the Netbeans plugin environment to LibreOffice 5 and LibreOffice 5 SDK, it's also necessary to actually create a new OpenOffice plugin project after adjusting the context so that the right .jar files will be included in the libraries.</div><div><br></div><div>However when I try to create a new OpenOffice project, after going through the wizard I am getting this error: "<font color="#ff0000">unknown entity com.sun.star.frame.ProtocolHandler</font>"</div><div><br></div><div>So I don't know if the project is being created correctly or not...</div><div><br></div><div>I tried deleting all files in the project except the LibreOffice jar libraries, and copying over all the files from the OpenOffice project together with all other libraries that I am using (not OpenOffice jars). </div><div>However when I "build and install in OpenOffice", it does install the extension to the extension manager and open LibreOffice, and I do see the addon menu with the menu items, but all of the menu items are greyed out.</div><div><br></div><div>Does LibreOffice use a different .xcu format than OpenOffice? I'm guessing it's not liking something in the registry/data/org/openoffice/Office/Addons.xcu.</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:arial;font-size:small"><div>John R. D'Orazio</div><div><br></div></div></div></div></div></div>
</div></div>