Hello Konstantin,

On Wednesday 19 August 2009, 17:14, Konstantin Tokarev wrote:
> 13.08.09, 04:20, "Ariel Constenla-Haile" 
<[email protected]>:
> > Hello Konstantin,
> >
> > On Tuesday 11 August 2009, 08:06, Konstantin Tokarev wrote:
> > > Hello!
> > >
> > > I think every chemist which wants to use Linux faces with one serious
> > > problem: structural formulae cannot be inserted into the text in
> > > editable way. Also I think that only OpenOffice.org can provide this
> > > functionality today.
> > >
> > > In MS Windows there are many GUI based editors, which can be used to
> > > create and edit formulae incorporated into documents. In *nix-like
> > > systems there are no OLE-like interfaces. Only possibilities for user
> > > are to insert formula as image, SVG, or use OLE objects, incorporated
> > > in files which were created in Windows, Objects, created by external
> > > software and inserted into document cannot be edited after
> > > incorporation.
> > >
> > > On the other hand, there is an extension for OpenOffice.org called
> > > 'quick formule', which provides a language for textual description of
> > > chemical structural formulae. It constructs formula as OOo Draw object
> > > from text string. But created object cannot be edited as chemical
> > > structure. If a possibility to store this text string alongside with
> > > drawing, it could be used for further edit, and required functionality
> > > would be achieved.
> > >
> > > I see solution of this problem in creating new OOo application working
> > > the same way as OOo Math and based on its code. Using simple GUI
> > > (probably jchempaint), user will actually change text string with
> > > formula description, and when string changes, drawing object will be
> > > re-constructed. This complex document may be incorporated using OOo OLE
> > > implementation like OO Math objects are incorporated.
> > >
> > > My question for OOo developers: is it the simplest way to achieve such
> > > functionality? Or it is simpler to realize through OOo extension?
> >
> > I think that Jürgen gave you the best advice: develop your own embedded
> > object.
> > I once developed a propotype following the SDK example, "embedding" JMol:
> > inside the document I stored the pdb file, and as replacement graphic one
> > generated by JMol from this pdb together with some JMol specific data in
> > order to store Jmol's state. When the user activated the embedded object
> > I opened Jmol's frame, etc.
> > The prototype worked fine (until  - I guess - the changes in OOo
> > classpath policy) but didn't have time to play with this again.
> > But this shows the big potential of the embedded object API.
> > You could do something similar with JChemPaint (and of course you're free
> > to take the Jmol idea and create two embedded object types, this may make
> > OOo very popular among scholars)
> >
> > > I'm C++ developer,
> >
> > well, both JMol and JChemPaint are Java applications, you could benefit
> > of the Netbeans OOo API plug-in
> >
> > > but I've never worked with OpenOffice.org API.
> >
> > the embedded API is rather undocumented (by documented I mean there is
> > nothing AFAIK in the Developer's Guide), though you have the abstract API
> > specification, and the SDK example (it's helpful but hard to follow, I
> > remember it took me a 2 weeks winter holiday to understand this stuff)
> > Regards
> 
> Could you provide me with this code? I think this example can help me to
>  learn OOo API

sorry for the late answer (didn't have time to find and fix the example).
You can find it here 
http://arielch.fedorapeople.org/devel/JmolEmbeddedObject.tar.gz
It's just the SDK example with basic Jmol support (and several issues).

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to