com.sun.star.comp documentation

The Application Programming Interface and the OASIS Open Document Format

com.sun.star.comp documentation

Postby intuited » Sun Nov 09, 2008 12:57 am

Hi
I'm looking for documentation for the com.sun.star.comp.forms section of the IDL hierarchy. more specifically I'm hoping to find a convenient way to resize an edit control to fit its contents without having to reverse-engineer the com.sun.star.comp.forms.OEditControl type by setting a watch in the Basic editor, expanding various sub-properties, and having it crash repeatedly when I click on the variable name instead of the + sign.
Although the much of the hierarchy is documented, the forms section is not documented in the usual places. The online IDL reference, http://api.openoffice.org/docs/common/r ... le-ix.html, does not contain the comp section at all, and /usr/share/doc/openoffice.org-dev/docs only has information on the "helper" subsection of comp.
Does anyone know where to find this information? Thanks!
intuited
 
Posts: 25
Joined: Sat Nov 08, 2008 11:51 pm

Re: com.sun.star.comp documentation

Postby bobban » Sun Nov 09, 2008 3:26 am

OOo 3.1.1 on Ms Windows XP
User avatar
bobban
Volunteer
 
Posts: 535
Joined: Sat Nov 01, 2008 3:12 pm
Location: Australia

Re: com.sun.star.comp documentation

Postby intuited » Sun Nov 09, 2008 6:03 am

Well, my guess after an extended RTFM session is that since components are not explicitly defined in the API, but rather instantiated dynamically from interfaces and services, they're not actually documented, and that the comp "module" is sort of a virtual module that exists in order to give such items a taxonomy. but I could be wrong.

in any case i've been doing things more or less correctly, according to the developers' guide.
http://wiki.services.openoffice.org/wik ... _I_Have%3F
though i find it easier to browse this stuff in the debug window than to try to read it off of a message box that doesn't fit on the screen. putting it in an edit box is pretty easy:
Code: Select all   Expand viewCollapse view
   forms = ThisComponent.DrawPage.Forms
   Form = ThisComponent.DrawPage.Forms.GetByName("FormName")
   CtlModelEdit = Form.GetByName("txtedit control")

   CtlTrace = Form.GetByName("trace")

   Doc = StarDesktop.CurrentComponent
      DocController = Doc.getCurrentController()
     CtlEdit = DocController.GetControl(CtlModelEdit)
     
     CtlTrace.Text = CtlStoreName.dbg_supportedInterfaces

this code being placed in a macro that's called on the event of the form being loaded.
That prescribed strategy informs me of the following:
Supported interfaces by object
"com.sun.star.comp.forms.OEditControl":
com.sun.star.accessibility.XAccessible
com.sun.star.awt.XControl
com.sun.star.lang.XComponent
com.sun.star.awt.XFocusListener
com.sun.star.lang.XEventListener
com.sun.star.awt.XKeyListener
com.sun.star.lang.XEventListener
com.sun.star.awt.XLayoutConstrains
com.sun.star.awt.XTextComponent
com.sun.star.awt.XTextLayoutConstrains
com.sun.star.awt.XTextListener
com.sun.star.lang.XEventListener
com.sun.star.awt.XView
com.sun.star.awt.XWindow2
com.sun.star.awt.XWindow
com.sun.star.lang.XComponent
com.sun.star.beans.XPropertiesChangeListener
com.sun.star.lang.XEventListener
com.sun.star.form.XBoundControl
com.sun.star.form.XChangeBroadcaster
com.sun.star.frame.XDispatchProvider
com.sun.star.lang.XComponent
com.sun.star.lang.XEventListener
com.sun.star.lang.XServiceInfo
com.sun.star.lang.XTypeProvider
com.sun.star.uno.XAggregation
com.sun.star.uno.XWeak
com.sun.star.util.XModeChangeBroadcaster

some of those interfaces are in comp.sun.star.form, but the ones that seem likely to provide a means to resize a control are in the awt module, XWindow2 being the most likely. Actually the XWindow2 interface provides a method called SetOutputSize that would seem to be just the thing but it's not working. see my post at viewtopic.php?f=39&t=11875 if you're interested.
intuited
 
Posts: 25
Joined: Sat Nov 08, 2008 11:51 pm

Re: com.sun.star.comp documentation

Postby ms777 » Sun Nov 09, 2008 1:02 pm

Did you install xray ? It is less buggy than the OO Basic UI watch window ...

I do not understand what you target at. Do you want to program a dialog with self-readjusting control sizes ? If yes, on what should the size depend ?
ms777
Volunteer
 
Posts: 131
Joined: Mon Oct 08, 2007 1:33 am

Re: com.sun.star.comp documentation

Postby intuited » Sun Nov 09, 2008 6:26 pm

Thanks for the tip on X-Ray. It seems to be pretty helpful. I don't know for sure because when its dialog opens it's about 100x100 pixels and is not resizeable.

That statement in itself being almost completely off-topic, i'm not going to venture further off the path by answering your question. At least not here; i will post more information about the specifics of what I'm hoping to accomplish at the other thread mentioned in my last reply (viewtopic.php?f=39&t=11875)
OOo 3.2 on Ubuntu 10.04
intuited
 
Posts: 25
Joined: Sat Nov 08, 2008 11:51 pm


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest