OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to do "Deselect" in Writer?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
vv0s
General User
General User


Joined: 16 Mar 2006
Posts: 21

PostPosted: Mon May 22, 2006 2:52 am    Post subject: How to do "Deselect" in Writer? Reply with quote

I notice there is a dispatch command for calc, however, seems it doesn't fit for writer

does any one get idea of that? thanks!
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Mon May 22, 2006 10:19 am    Post subject: Reply with quote

What are you trying to deselect - text, frame, graphic, etc?
Back to top
View user's profile Send private message
vv0s
General User
General User


Joined: 16 Mar 2006
Posts: 21

PostPosted: Mon May 22, 2006 10:26 am    Post subject: Reply with quote

Actually whatever...

If it's a shape, then deselect that shape, if it's a graphic, then deselect it as well...

What I want to achieve is just to make the text view cursor positioning at the text string...

is there any elegant method to do that?


Code:
XDispatchHelper.executeDispatch(XDispatchProvider, ".uno:Escape", "", 0, null);

This one seems can work, which I think is quite ugly also...
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Mon May 22, 2006 10:50 am    Post subject: Reply with quote

If it is just text then you can do something like ViewCursor.collapseToEnd or Start. If an object or frame I think you are stuck with "uno:Escape" and it may take more than one. From inside a frame takes at least two - the first selects the frame and the second jumps back into the text.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group