pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Tue Feb 14, 2006 10:24 am Post subject: |
|
|
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 |
|