Re: list of supported Dispatch commands

Ariel Constenla-Haile <[email protected]> Thu, 9 Dec 2010 00:00:38 -0300
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
Hello Andrew,

On Wednesday 08 December 2010, 20:59, Andrew Douglas Pitonyak wrote:
> I last documented the dispatch commands (meaning I enumerated them)
> based off of these very outdated links:
> 
> http://framework.openoffice.org/servlets/ProjectDocumentList
> http://api.openoffice.org/servlets/ProjectDownloadList
> http://api.openoffice.org/servlets/ProjectDownloadList?action=download&dlID
> =12
> 

there is 
http://wiki.services.openoffice.org/wiki/Framework/Article/OpenOffice.org_3.x_Commands

I'm not sure how complete this list is (it does not contain some common 
commands I needed, like ".uno:ObjectTitleDescription").

> If there is some means to document the currently supported dispatches, I
> will likely do that

there is some API like the interface css.frame.XDispatchInformationProvider 
(supported by some controller implementations) and the service 
css.frame.UICommandDescription (by an issue documented under the ui module, 
not the frame one). You can see some sample code inside the following document 
http://arielch.fedorapeople.org/devel/ooo/UICommands.ods

Here, I'm not sure how accurate the list here: if you take a look at the 
Bibliographic commands,  the UICommandDescription gives you among others the 
.uno:ArrowShapes command, which has no sense in this context.

> (even if it means writing a script to troll the
> code). It would be even better if I had some way to document the
> accepted parameters, but, I doubt that I can easily do that.

For the SFX2 based modules is possible, even the parameters can be extracted, 
and it's not that hard to do this: you have to parse SDI files inside every 
sfx2 based module (look at the folder <module>/sdi/); or even parse the header 
files generated in the build environment (*).
This last approach is the one I took to get what I needed, you can see the 
results on http://arielch.fedorapeople.org/devel/ooo/uicommands.tar.gz

For the new modules it may be easier, though some browsing through the source 
code is needed. 
For example, in chart2:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m94/chart2/source/controller/main/ChartController.cxx#1533
http://svn.services.openoffice.org/opengrok/xref/DEV300_m94/chart2/source/controller/main/DrawCommandDispatch.cxx#428
http://svn.services.openoffice.org/opengrok/xref/DEV300_m94/chart2/source/controller/main/ShapeController.cxx#229


Regards


(*) for example:
sfx2     	sfx2/<unxlngx6>/inc/sfxslots.hxx
svx     	svx/<unxlngx6>/inc/svxslots.hxx
sc		sc/<unxlngx6>/inc/scslots.hxx
sd		sd/<unxlngx6>/inc/sdslots.hxx
sw		sw/<unxlngx6>/inc/swslots.hxx
basctl	basctl/<unxlngx6>/inc/basslots.hxx
starmath	starmath/<unxlngx6>/inc/smslots.hxx

-- 
Ariel Constenla-Haile
La Plata, Argentina
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iQIcBAABCAAGBQJNAEZcAAoJEMjP1bm45QNWcT4P/3a4k6taaNUxtx9LAI9aY3kf
qSXMUkZHg6xuJgfzBbzBYVai+mMhTn80meTVKIaZWYl51KR6oZqk3jfm7AoiNCxL
MQBh77wt+pLV1nx0x+Wp4ovHh5yhJSKBlq0IzYPT8CW5YW3A/Cm+EroSwleVRg2L
AP/gG1pBN7i7nXgZRb+nptpSXy5PpXR7Ja+oE7OTfOo7cvOhbyVmKJge2uegdMsL
f8FUY0SFx+paOwQKmgnZLV/tI0ivx10lqc/iqijhr3VGgrEpgYA4DupvFNx6xhRm
je9cc8+wkeku6zwSUpjSni2VCz3HMTvIaxVv/YUEyIkeS7RxkpxKl2XRu0EFjuYU
mEHbtuOStNY2RYvoYBhZfuQAzSzjN7Bi6h/MpuQ6S4VgmwdDj3u66P0BV1HVovBm
2sKsI+OcA7BTm/kxKqIiUaO30inUA9wOkNXv0JQOt36hKs6u3sPY3ev8DrhRBPAJ
z+PYASXr5dypHtRK3kKnaD4w3nIFVyfHdG/krzoaMJsB502oPJToga8WbpSJjM72
lp7lmlKdzhfcNLDOoaRjGmVJS9i2u/Bg7dEVmNXbwPgAs9Wpn4llB0zvhtWbbb0X
1z7wvrKlRhQRl8cqCHWlLx0MxHRuU67qzCA2gZgaowrk7xu7/gmdXq97X5X/rffa
Tkn+Ff0DsU+WmvGrK2n0
=+tBF
-----END PGP SIGNATURE-----