List Info

Thread: Smart Tags in Openoffice Writer




Smart Tags in Openoffice Writer
user name
2006-09-12 15:53:31
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?

Thanks in advance!
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.lechnerfabalabs.org
Web: http://www.fabalabs.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesw.openoffice.org
For additional commands, e-mail: dev-helpsw.openoffice.org

Smart Tags in Openoffice Writer
user name
2006-09-13 06:11:10
Jakob Lechner schrieb:
> 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).
> 
What about XController.GetFrame.Title =
"MyTitle" ?

Peter

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesw.openoffice.org
For additional commands, e-mail: dev-helpsw.openoffice.org

Smart Tags in Openoffice Writer
user name
2006-09-13 16:39:28
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.lechnerfabalabs.org
Web: http://www.fabalabs.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesw.openoffice.org
For additional commands, e-mail: dev-helpsw.openoffice.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )