Am Dienstag, den 12.09.2006, 17:53 +0200 schrieb Jakob
Lechner:
> Am Dienstag, den 12.09.2006, 13:56 +0200 schrieb Frank
Meies:
> > [...]
> > Yes, you are right. We should pass the TextRange
and the Controller to
> > the invokeAction methor. A better way to obtain
the Controller would be
> > to use the GetController() method of the SwView
object (which in turn
> > inherits it from the SfxViewShell object). This
way we make sure that we
> > get the correct controller and do not run into any
focus related issues.
>
> Ok, I've done that and passed the controller to the
uno component. I've
> managed to access the whole text of the document and to
modify it from within
> the uno component. Now I'm trying to change the title
of the document
> (just as proof of concept to show what is possible in a
smarttag action).
>
> As far as I've seen this is possible with a
XDocumentInfoSupplier instance.
> But how is it possible to get the XDocumentInfoSupplier
instance with the
> controller?
I have solved the problem by myself. The controller I was
passing just
provides access to the TextDocumentView service. But I
actually want
to be able to access the TextDocument and not only its view.
Therefore I'm now passing a XTextDocument reference to the
invokeAction method. As far as I see all important data of a
text
document can be read and/or changed using this reference.
Best regards
--
Jakob Lechner
Research & Development
Fabalabs Software GmbH
Honauerstraße 4
A-4020 Linz
Tel.: [+43] (70) 60 61 62
Fax: [+43] (70) 60 61 62-609
E-Mail: jakob.lechner fabalabs.org
Web: http://www.fabalabs.org
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|