To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=54336
                  Issue #:|54336
                  Summary:|OOo Basic Macro drawing a tab-aligned line makes
                          |writer crash
                Component:|Word processor
                  Version:|OOO 2.0 Beta2
                 Platform:|Opteron/x86_64
                      URL:|
               OS/Version:|Linux
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|programming
              Assigned to:|mru
              Reported by:|patf





------- Additional comments from [EMAIL PROTECTED] Wed Sep  7 09:43:53 -0700 
2005 -------
When my macro draws a line that is aligned by tabs writer crashes. I'm not sure
what exactly creates the problem, but it seems to have to do with the line being
as broad as it overlaps the text.

Steps to reproduce:

- Create a text document
- Enter text: "[tab]xyz[tab]"
- Move cursor after second tab
- Run the macro:
--- snip ---

Sub Main
        Dim range
        Dim tabs(1) As New com.sun.star.style.TabStop
        Dim shape
        Dim size As New com.sun.star.awt.Size
        
        range = 
ThisComponent.getCurrentController().getSelection().getByIndex(0)
        
        tabs(0).Position = 1350
        tabs(1).Position = 2450
        
        tabs(0).Alignment = com.sun.star.style.TabAlign.LEFT
        tabs(1).Alignment = com.sun.star.style.TabAlign.CENTER
        
        range.ParaTabStops = Array(tabs(0), tabs(1))
        
        shape = ThisComponent.createInstance("com.sun.star.drawing.LineShape")
        range.getText().insertTextContent(range, shape, false)
        size.Height = 1
        size.Width = 1600
        shape.setSize(size)
        shape.AnchorType = com.sun.star.text.TextContentAnchorType.AS_CHARACTER
End Sub

---snap---

You can also use the document I'll submit as attachment, of course.
Hope that'll be fixed soon so my macro can do its work...

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to