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

[Solved]how to set up pictures and text wrapping style?

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


Joined: 13 Jun 2011
Posts: 25

PostPosted: Tue Jul 19, 2011 6:36 pm    Post subject: [Solved]how to set up pictures and text wrapping style? Reply with quote

anybody ,could help me ?!
im write a program ,I need to set the pictures style,i use delphi ,openoffice 3,3,winxp

The writer, how to set up pictures and text wrapping style, for example, surround, dynamic surround


Last edited by myoper on Thu Jul 28, 2011 12:06 am; edited 1 time in total
Back to top
View user's profile Send private message
myoper
General User
General User


Joined: 13 Jun 2011
Posts: 25

PostPosted: Mon Jul 25, 2011 5:11 pm    Post subject: Reply with quote

Hi,nobody can help me ?!
I try to describe my problem:
1.I select a graphic by click on it
2.Right-click to display the context menu and move the mouse pointer to Warp to Display
the Various wrap modes.
3.select In back ground.

I want to write code above ,anybody help me ?!
Thaks again!
Back to top
View user's profile Send private message
DVezina
OOo Advocate
OOo Advocate


Joined: 29 Sep 2006
Posts: 248
Location: Orlando

PostPosted: Tue Jul 26, 2011 6:18 am    Post subject: Reply with quote

This will set all graphics in the document to Wrap -> Background

Code:

Sub setGraphicProperties
   oGraphs = thisComponent.getGraphicObjects
   iCount = oGraphs.Count - 1
   For i = 0 to iCount
      oGraph = oGraphs.getByIndex(i)
      oGraph.Surround = 1
      oGraph.TextWrap = 1
      oGraph.Opaque = false
   Next
End Sub
Back to top
View user's profile Send private message
myoper
General User
General User


Joined: 13 Jun 2011
Posts: 25

PostPosted: Wed Jul 27, 2011 5:30 pm    Post subject: Reply with quote

Thaks very much ! Very Happy
Can you say more under it? I do not know the type of object you said!
Thanks a advace!
Back to top
View user's profile Send private message
myoper
General User
General User


Joined: 13 Jun 2011
Posts: 25

PostPosted: Thu Jul 28, 2011 12:04 am    Post subject: Reply with quote

thaks every one!
Thanks very much !
I Solution it !
Code:

var
xPropertySet  : Variant;
begin
xPropertySet := fDocument.getGraphicObjects ;
   iCount :=  xPropertySet.count -1;
   for i := 0 to iCount do
   begin
      xPropertySet := xPropertySet.getByIndex(i) ;
      xPropertySet.Surround := 1 ;
      xPropertySet.TextWrap := 1 ;
      xPropertySet.Opaque := false;
   end;
end;
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