create a new page, using OOobbs3/34 as a template.
Front page
Search
掲示板
Reload
Help
Browse Log
掲示板の使い方
OOo 掲示板3
OOo 掲示板2
OOo 掲示板
掲示板
雑談掲示板
New
List of pages
Recent changes
Backup
簡単ヘルプ
整形ルール
Start:
** [[OOobbs3/34]] [#p0f2f4cb]
-''サマリ'': ImpressへのOLE2Shapeについて
-''環境'': Impress
-''状態'': 解決
-''投稿者'': [[new_OOo3]]
-''投稿日'': 2010-10-23 (土) 19:56:16
*** 質問 [#ndf92169]
お世話になります。
下記Codeにて、Title & OjectのSlideをmacroにて作成しようと...
しかしながら、Macroは最後までError無く実行されるのですが...
OLE2ShapeをDouble ClickするとCalcが起動して、入力した値や...
Slide showを実行しても表示されません。
つきましては、Macro実行後にSlide画面及びSlide Showにて表...
******** [ Code ] **********
Sub oPageImpress
Dim oDoc
Dim oPage
Dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factor...
oPage = oDoc.getDrawPages().getByIndex(0)
'
oPage.Layout = 11
'
oShapeNum = oPage.getCount - 1
'
Dim oShape
for i = 0 to oShapeNum
oShape = oPage.getByIndex(i)
If oShape.supportsService("com.sun.star.presentation.T...
oShape.setString("Slide 1 / TitleTextShape")
End If
'
If oShape.getShapeType = "com.sun.star.presentation.OL...
' Calc Object
oShape.CLSID = "47bbb4cb-ce4c-4e80-a591-42d9ae74950f"
'
Dim oEmbeded
Dim oOLEComponent
Dim oCalcSheets
Dim oObj
oEmbedded = oShape.EmbeddedObject
oOLEComponent = oEmbedded.getComponent()
oCalcSheets = oOLEComponent.getSheets()
oObj = oCalcSheets.getByIndex( 0 )
oObj.getCellByPosition(0,0).String = "OLE Calc Do...
oObj.getCellByPosition(0,1).Value = 10
oObj.getCellByPosition(0,2).Value = 20
oObj.getCellByPosition(0,3).Formula = "=A2+A3"
'
End If
next i
msgbox "Success"
End Sub
********************************************
*** 回答 [#m63036c1]
- スライドの Layout = 11 がダメなようです。自分で OLEShap...
#comment
*** 感想,コメント,メモ [#c7309197]
- ご指摘通りでした。 -- new_OOo3 &new{2010-10-24 (日) 11:...
ご教示ありがとうございました。ご指摘通り
com.sun.star.presentation.OLE2Shape => Slideに表示され...
com.sun.star.drawing.OLE2Shape => Slideに表示される。
でした。最終的なCodeを以下に記しますので本Siteの糧に少し...
******** [ Code ] **************
Sub oImpShape
Dim oDoc
Dim oImpPage
Dim oPoint as new com.sun.star.awt.Point
Dim oSize as new com.sun.star.awt.Size
Dim oIShape
Dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factor...
oImpPage = oDoc.getDrawPages().getByIndex(0)
oImpPage.Layout = 20
'
' TitleTextShape
'Position
oPoint.X = 1000
oPoint.Y = 1000
'Size
'Get page size
oPageH = oImpPage.Height
oPageW = oImpPage.Width
' Shape Size
oSize.Height = 5000 ' unit : 1/100 mm
oSize.Width = oPageW - 1000*2
' Instance
oIShape = oDoc.createInstance("com.sun.star.presenta...
oIShape.setPosition(oPoint)
oIShape.setSize(oSize)
oIShape.LineStyle = com.sun.star.drawing.LineStyle....
oImpPage.add(oIShape)
oIShape.setString("TitleTextShape")
'
'
' OLE2Shape
'Position
oPoint.X = 1000
oPoint.Y = 6500
'Size
' Shape Size
oSize.Height = 10000 ' unit : 1/100 mm
oSize.Width = oPageW - 1000*2
' Instance
oIShape = oDoc.createInstance("com.sun.star.drawing....
' Calc
oIShape.CLSID = "47bbb4cb-ce4c-4e80-a591-42d9ae7495...
oIShape.setPosition(oPoint)
oIShape.setSize(oSize)
oImpPage.add(oIShape)
'
'
Dim oEmbeded
Dim oOLEComponent
Dim oCalcSheets
Dim oObj
oEmbedded = oIShape.EmbeddedObject
oOLEComponent = oEmbedded.getComponent()
oCalcSheets = oOLEComponent.getSheets()
oObj = oCalcSheets.getByIndex(0)
oObj.getCellByPosition(0,0).String = "OLE Calc Do...
oObj.getCellByPosition(0,1).Value = 10
oObj.getCellByPosition(0,2).Value = 20
oObj.getCellByPosition(0,3).Formula = "=A2+A3"
End Sub
********************************
#comment
End:
** [[OOobbs3/34]] [#p0f2f4cb]
-''サマリ'': ImpressへのOLE2Shapeについて
-''環境'': Impress
-''状態'': 解決
-''投稿者'': [[new_OOo3]]
-''投稿日'': 2010-10-23 (土) 19:56:16
*** 質問 [#ndf92169]
お世話になります。
下記Codeにて、Title & OjectのSlideをmacroにて作成しようと...
しかしながら、Macroは最後までError無く実行されるのですが...
OLE2ShapeをDouble ClickするとCalcが起動して、入力した値や...
Slide showを実行しても表示されません。
つきましては、Macro実行後にSlide画面及びSlide Showにて表...
******** [ Code ] **********
Sub oPageImpress
Dim oDoc
Dim oPage
Dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factor...
oPage = oDoc.getDrawPages().getByIndex(0)
'
oPage.Layout = 11
'
oShapeNum = oPage.getCount - 1
'
Dim oShape
for i = 0 to oShapeNum
oShape = oPage.getByIndex(i)
If oShape.supportsService("com.sun.star.presentation.T...
oShape.setString("Slide 1 / TitleTextShape")
End If
'
If oShape.getShapeType = "com.sun.star.presentation.OL...
' Calc Object
oShape.CLSID = "47bbb4cb-ce4c-4e80-a591-42d9ae74950f"
'
Dim oEmbeded
Dim oOLEComponent
Dim oCalcSheets
Dim oObj
oEmbedded = oShape.EmbeddedObject
oOLEComponent = oEmbedded.getComponent()
oCalcSheets = oOLEComponent.getSheets()
oObj = oCalcSheets.getByIndex( 0 )
oObj.getCellByPosition(0,0).String = "OLE Calc Do...
oObj.getCellByPosition(0,1).Value = 10
oObj.getCellByPosition(0,2).Value = 20
oObj.getCellByPosition(0,3).Formula = "=A2+A3"
'
End If
next i
msgbox "Success"
End Sub
********************************************
*** 回答 [#m63036c1]
- スライドの Layout = 11 がダメなようです。自分で OLEShap...
#comment
*** 感想,コメント,メモ [#c7309197]
- ご指摘通りでした。 -- new_OOo3 &new{2010-10-24 (日) 11:...
ご教示ありがとうございました。ご指摘通り
com.sun.star.presentation.OLE2Shape => Slideに表示され...
com.sun.star.drawing.OLE2Shape => Slideに表示される。
でした。最終的なCodeを以下に記しますので本Siteの糧に少し...
******** [ Code ] **************
Sub oImpShape
Dim oDoc
Dim oImpPage
Dim oPoint as new com.sun.star.awt.Point
Dim oSize as new com.sun.star.awt.Size
Dim oIShape
Dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factor...
oImpPage = oDoc.getDrawPages().getByIndex(0)
oImpPage.Layout = 20
'
' TitleTextShape
'Position
oPoint.X = 1000
oPoint.Y = 1000
'Size
'Get page size
oPageH = oImpPage.Height
oPageW = oImpPage.Width
' Shape Size
oSize.Height = 5000 ' unit : 1/100 mm
oSize.Width = oPageW - 1000*2
' Instance
oIShape = oDoc.createInstance("com.sun.star.presenta...
oIShape.setPosition(oPoint)
oIShape.setSize(oSize)
oIShape.LineStyle = com.sun.star.drawing.LineStyle....
oImpPage.add(oIShape)
oIShape.setString("TitleTextShape")
'
'
' OLE2Shape
'Position
oPoint.X = 1000
oPoint.Y = 6500
'Size
' Shape Size
oSize.Height = 10000 ' unit : 1/100 mm
oSize.Width = oPageW - 1000*2
' Instance
oIShape = oDoc.createInstance("com.sun.star.drawing....
' Calc
oIShape.CLSID = "47bbb4cb-ce4c-4e80-a591-42d9ae7495...
oIShape.setPosition(oPoint)
oIShape.setSize(oSize)
oImpPage.add(oIShape)
'
'
Dim oEmbeded
Dim oOLEComponent
Dim oCalcSheets
Dim oObj
oEmbedded = oIShape.EmbeddedObject
oOLEComponent = oEmbedded.getComponent()
oCalcSheets = oOLEComponent.getSheets()
oObj = oCalcSheets.getByIndex(0)
oObj.getCellByPosition(0,0).String = "OLE Calc Do...
oObj.getCellByPosition(0,1).Value = 10
oObj.getCellByPosition(0,2).Value = 20
oObj.getCellByPosition(0,3).Formula = "=A2+A3"
End Sub
********************************
#comment
Page: