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 identify my Selection contains TextFrame

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


Joined: 13 Aug 2007
Posts: 34

PostPosted: Fri Sep 21, 2007 12:12 am    Post subject: How to identify my Selection contains TextFrame Reply with quote

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
View user's profile Send private message
vitcaro
OOo Advocate
OOo Advocate


Joined: 20 Feb 2007
Posts: 256
Location: Italy

PostPosted: Fri Sep 21, 2007 5:00 am    Post subject: Reply with quote

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
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