incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120369] New: oDrawDoc.Drawpages(0).Add(oShape) in OSX version cause error
Date Wed, 25 Jul 2012 20:41:16 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120369

          Priority: P3
            Bug ID: 120369
          Assignee: ooo-issues@incubator.apache.org
           Summary: oDrawDoc.Drawpages(0).Add(oShape) in OSX version cause
                    error
          Severity: critical
        Issue Type: DEFECT
    Classification: Code
                OS: Mac OSX, 10.6
          Reporter: lucalcin@tin.it
          Hardware: Mac
            Status: CONFIRMED
           Version: AOO 3.4.0
         Component: code
           Product: scripting

Created attachment 78729
  --> https://issues.apache.org/ooo/attachment.cgi?id=78729&action=edit
example macro causing crash

When I try to add a new shape to a Draw document with the command 

oDrawDoc.Drawpages(0).Add(oShape) 

it returns the error:

Type: com.sun.star.beans.UnknownPropertyException
Message: .

The same command works perfectly with AOO 3.4.0 Win version, LibreOffice
3.5.5.3 Mac version and NeoOffice 3.2.1 patch 0 Mac.
The same issue happens in a MacOSX 10.5 with fresh AOO 3.4.0 installed.
Please note tat the shape I wish to insert is a formula, I don't try with other
shapes kind.

Attached a sample Basic Macro useful to verify the problem. Running the only
macro present in the Draw document you will get the error.
The example macro is:


REM  *****  BASIC  *****
Sub InsertFormula()
    Dim oDrawDoc As Object
    Dim oShape As Object
    Dim p As new com.sun.star.awt.Point
    Dim s As new com.sun.star.awt.Size

    p.X = 500
    p.Y = 500
    s.Width = 10000
    s.Height = 5000

    ODrawDoc = ThisComponent

    oShape = ThisComponent.createInstance("com.sun.star.drawing.OLE2Shape")
    oShape.CLSID = "078B7ABA-54FC-457F-8551-6147e776a997"
    oDrawDoc.Drawpages(0).Add(oShape)
    oShape.Model.Formula = "size 20 e^{i%pi} + 1 = 0"
    oShape.MoveProtect = False
    oShape.SizeProtect = False
    oShape.setPosition(p)
    oShape.setSize(s)

End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message