User Tools

Site Tools


pyuno

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pyuno [2010/07/21 01:31] suapapapyuno [2013/08/03 05:04] (current) – external edit 127.0.0.1
Line 39: Line 39:
 ctx.ServiceManager ctx.ServiceManager
 </code> </code>
 +====== ooclac ======
 +그냥 ooclac 실행하고 해도 되나??
 +<code python>
 +#!/usr/bin/python
 +
 +import uno
 +localContext = uno.getComponentContext()
 +resolver = localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localContext )
 +ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
 +smgr = ctx.ServiceManager
 +desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
 +oDoc = desktop.getCurrentComponent()
 +
 +# sheet to be activated
 +oSheet = oDoc.getSheets().getByIndex(2)
 +
 +# activate the sheet
 +oController = oDoc.getCurrentController()
 +oController.setActiveSheet(oSheet)
 +
 +# set first visible row
 +oController.setFirstVisibleRow(3)
 +</code>
 +
 +====== ooimpress ======
 +UNO service : com.sun.star.presentation.SlideShow
 +  *[[http://api.openoffice.org/docs/common/ref/com/sun/star/presentation/Presentation2.html|service Presentation2]]
 +  *[[http://www.oooforum.org/forum/viewtopic.phtml?t=54716|ooimpress: slide show. Python]]
 +  *[[http://wiki.services.openoffice.org/wiki/Slideshow|Slideshow]]
 +
 ====== references ====== ====== references ======
 +  *[[http://api.openoffice.org/docs/common/ref/com/sun/star/frame/Desktop.html|service Desktop API]]
   *[[http://wiki.services.openoffice.org/wiki/Using_Python_on_Linux|Using Python on Linux]]   *[[http://wiki.services.openoffice.org/wiki/Using_Python_on_Linux|Using Python on Linux]]
   *[[http://wiki.services.openoffice.org/wiki/PyUNO_bridge|PyUNO bridge]]   *[[http://wiki.services.openoffice.org/wiki/PyUNO_bridge|PyUNO bridge]]
 +  *[[http://lucasmanual.com/mywiki/OpenOffice|OpenOffice]] another good reference
 +  *[[http://m10s.blogspot.com/2010/07/select-activate-sheet-in-calc-by-python.html|select (activate) a sheet in openoffice calc by python code]] oocalc 예제 많음!!
pyuno.1279675872.txt.gz · Last modified: 2013/08/03 05:04 (external edit)