[過去ログ] FreeBSD での Office 環境を語れ! その2 (1002レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
478: 476つづき 2006/07/23(日)03:39 AAS
' Import graphic from URL into the clipboard.
' Inspired from OOoForums Danny's code
Sub ImportGraphicIntoClipboard(cURL)

oDispatcher = createUnoService( "com.sun.star.frame.DispatchHelper" )

' Import the graphic from URL into a new draw document.
Dim arg1(0) As New com.sun.star.beans.PropertyValue
arg1(0).Name = "Hidden"
arg1(0).Value = true
oDrawDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, arg1() )
oDrawDocCtrl = oDrawDoc.getCurrentController()

' Get the shape...
oDrawPage = oDrawDoc.DrawPages(0)
oImportShape = oDrawPage(0)

' Get the dimension of the image...
oShapeSize = oImportShape.Size() <=======ここで落ちる

' Strange bug with the eps and emf format... correction of the size
if sFormat = "eps" then oShapeSize.Width = oShapeSize.Width * 0.99
if sFormat = "eps" then oShapeSize.Height = oShapeSize.Height * 0.91
if sFormat = "emf" then oShapeSize.Width = oShapeSize.Width * 1.13
if sFormat = "emf" then oShapeSize.Height = oShapeSize.Height * 1.1

' Copy the image to clipboard and close the draw document
oDrawDocCtrl.select(oImportShape)
Dim Array()
oDispatcher.executeDispatch( oDrawDocCtrl.Frame, ".uno:Copy", "", 0, Array() )
oDrawDoc.dispose()
End Sub
1-
あと 524 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.009s