incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianlizhao <jianlizh...@hotmail.com>
Subject question about aoo record macro?
Date Mon, 04 Jun 2012 10:09:43 GMT
hello my friend:

I have two question as below:
1)  in aoo , record macro of Insert picture,Why insert picture code written
two times?
  Example code  as below:

sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(3) as new com.sun.star.beans.PropertyValue
args1(0).Name = "FileName"
args1(0).Value = "file:///C:/2.png"
args1(1).Name = "FilterName"
args1(1).Value = "<All formats>"
args1(2).Name = "AsLink"
args1(2).Value = true
args1(3).Name = "Style"
args1(3).Value = "Graphics"

dispatcher.executeDispatch(document, ".uno:InsertGraphic", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(3) as new com.sun.star.beans.PropertyValue
args2(0).Name = "FileName"
args2(0).Value = "file:///C:/2.png"
args2(1).Name = "FilterName"
args2(1).Value = "<All formats>"
args2(2).Name = "AsLink"
args2(2).Value = true
args2(3).Name = "Style"
args2(3).Value = "Graphics"

dispatcher.executeDispatch(document, ".uno:InsertGraphic", "", 0, args2())

end sub

2)  after insert picture, how get the image object.
    The image will be  processing of rotation  eg.


Mime
View raw message