Hello Martin, On Saturday 22 May 2010, 15:28, Martin Dobiasch wrote: > Okay. My Mistake. Its a Uno Component which provides add in for calc > (I used the *M....oft* Word for this) > So as it is java it seems that I don't have access to XScriptContext.
now I am confused: is it an ADD-IN for Calc, or an ADD-ON? It seems to implement a css.frame.ProtocolHandler, so I assume the last one. Please notice that I'm not a lunatic asking you for technical correctness in your expressions, it is just that both a Calc Add-In and an Add-On are UNO components, that are implemented in a different way, so they have access to underlying document in a very different way. So in order to help, we must know what you're trying to achieve. In short, for your question "Not able to access CurrentComponent?", if it is a ProtocolHandler ADD-ON, you access the document model from the css.frame.Frame you're initialized with, via the css.frame.Controller: http://api.openoffice.org/docs/common/ref/com/sun/star/frame/Frame.html http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Component/Getting_Frames,_Controllers_and_Models_from_Each_Other http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Implementation So your attempt in private void ResetStreamTime() and public String CSDRightFrom(XCellRange startcell) to get the component from the Desktop is a bad idea and conceptually wrong: the current component depends on the focus, not on the component inside the frame your ProtocolHandler was initialized with. If it is an ADD-IN, the ADD-IN function can take a parameter of "type ::com::sun::star::beans::XPropertySet interface to the SpreadsheetDocument making the function call": http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/AddIn.html Regards -- Ariel Constenla-Haile La Plata, Argentina
signature.asc
Description: This is a digitally signed message part.
