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

Selecting text in Impress?

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


Joined: 14 Feb 2006
Posts: 4

PostPosted: Tue Feb 14, 2006 2:47 am    Post subject: Selecting text in Impress? Reply with quote

Does anyone know how to select text in a shape in Impress?
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Tue Feb 14, 2006 10:24 am    Post subject: Reply with quote

You can select a shape...
Code:
Sub SelectShape
  Dim oShape
  Dim oController
  REM Get the first shape in the first page
  oShape = ThisComponent.getDrawPages().getByIndex(0).getByIndex(0)
  oController = ThisComponent.getCurrentController()
  oController.select(oShape)
End Sub

I don't think that you can select the text inside of the shape, however.... For example, the obvious way does nothing:
Code:
Sub SelectShapeText
  Dim oShape
  Dim oController
  Dim oCurs
  REM Get the first shape in the first page
  oShape = ThisComponent.getDrawPages().getByIndex(0).getByIndex(0)
  oCurs = oShape.getText().createTextCursor()
  oCurs.gotoStart(False)
  oCurs.gotoEnd(True)
  oController = ThisComponent.getCurrentController()
  oController.select(oCurs)
End Sub

_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
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