title: How to know the Java interfaces an OpenOffice Calc UNO object supports (through queryInterface)
body: <p>I'm developing a "macro" for OpenOffice Calc. As the language, I chose Java, in order to get code assistance in Eclipse. I even wrote a small <code>ant</code> build script that compiles and embeds the "macro" in an <code>*.ods</code> file. In general, this works fine and surprisingly fast; I'm already using some simple stuff quite successfully.</p>
  
  <p><em>BUT</em></p>
  
  <p>So often I get stuck because with <code>UNO</code>, I need to "query" an interface for any given non-trivial object, to be able to access data / call methods of that object. I.e., I literally need to guess which interfaces a given object may provide. This is <em>not at all</em> obvious and not even visible during Java development (through some sort of meta-information, reflection or the like), and also sparsely documented (I downloaded tons of stuff, but I don't find the source or maybe JavaDoc for the interfaces I'm using, like <code>XButton</code>, <code>XPropertySet</code>, etc. - <code>XButton</code> has <code>setLabel</code>, but <em>not</em> <code>getLabel</code> - what??).</p>
  
  <p>There is online documentation (for the most fundamental concepts, which is not bad at all!), <em>but</em> it lacks many details that I'm faced with. It always magically stops exactly at the point I need to solve.</p>
  
  <p>I'm willing to look at the <code>C++</code> code to get a clue what interfaces an object (e.g. the button / event I'm currently stuck with) may provide. Confusingly, the <code>C++</code> class and file names don't exactly match the Java interfaces. It's <em>almost</em> what I'm looking for, but then in Java I don't really find the equivalent, <em>or</em> calling <code>queryInterface</code> on a given object returns <code>null</code>.. It's becoming a bit frustrating.</p>
  
  <p>How are the UNO Java interfaces generated? Is there some kind of documentation in the code that serves as the origin for the generated (Java) code?</p>
  
  <p>I think I <em>really</em> need to know what interfaces are available at which point, in order to become a bit more fluent during <em>Java-UNO-macro</em> development.</p>