| View previous topic :: View next topic |
| Author |
Message |
ramlogu General User

Joined: 13 Aug 2007 Posts: 34
|
Posted: Fri Sep 21, 2007 12:12 am Post subject: How to identify my Selection contains TextFrame |
|
|
Hi
My writer document contains some text and some TextFrames. Now i am selecting one line , which may contain Text and TextFrame.
How do i get the number of TextFrames in the Selected line
I am trying this scenario with TextViewCursor, here i can get only the Text. So kindly suggest me how to get theTextFrames also.
Any help would be greatfull.
Thanks,
Ram |
|
| Back to top |
|
 |
vitcaro OOo Advocate


Joined: 20 Feb 2007 Posts: 256 Location: Italy
|
Posted: Fri Sep 21, 2007 5:00 am Post subject: |
|
|
Hi Ramlogu,
in my view you cannot select text and frame (when you select the frame, the text becomes unselected)
Any case, you can try this code:
| Code: |
oDoc = ThisComponent
oController = oDoc.getCurrentController
Selection = oController.getSelection
if Selection.supportsService("com.sun.star.text.TextFrame") Then
msgbox Selection.getName
end if
|
|
|
| Back to top |
|
 |
|