StoreAsURL IOException after GraphicObjectShape add

Keyboard macros or custom scripts

StoreAsURL IOException after GraphicObjectShape add

Postby japozo » Thu Jun 02, 2016 1:14 pm

Hi all. I am using OpenOffice Base 3.2 under Ubuntu 10.04. Inside a Basic macro of Base I open Calc and I add a jpg file with GraphicObjectShape. I am getting an ErrorCodeIOException (message: .) from StoreAsURL only after call to ADD of the object GraphicObjectShape. This is the code that I use:
Code: Select all   Expand viewCollapse view
'Opening Calc      
oPath = CreateUnoService( "" )
oDocument = StarDesktop.LoadComponentFromURL("private:factory/scalc", "_blank", 0, oArgs())
'Here I save the spreadsheet without problems
oDocument.StoreAsURL(oPath.Work+"/sample.ods", oArgs())
'Inserting jpg file in spreadsheet
oLogo = ThisComponent.CreateInstance("")
oLogo.GraphicURL = convertToURL("\\SAB-SERV-001\Base de datos\Plantillas\Logo\Logo FLM rojo.jpg")
oSize = oLogo.Size
oSize.Height = 607
oSize.Width = 3757
oLogo.Size = oSize
oPos = oLogo.Position
oPos.X = 1
oPos.Y = 1
oLogo.Position = oPos
oHojaParaLogo = oDocument.DrawPages.getByIndex(0)
'Just after last intruction (add) I have the exception If I make
oDocument.StoreAsURL(oPath.Work+"/sample1.ods", oArgs())

Please, help me!! Thank you in advance.
OpenOffice 3.2 on Ubuntu 10.04 lucid (kernel 2.6.32-45-generic-pae)
Posts: 1
Joined: Thu Jun 02, 2016 12:37 pm

Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 4 guests