To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=73311
                 Issue #|73311
                 Summary|Adding macros with icons to toolbar crashes Writer
               Component|Word processor
                 Version|OOo 2.1
                Platform|PC
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|configuration
             Assigned to|mru
             Reported by|mallarj





------- Additional comments from [EMAIL PROTECTED] Tue Jan  9 08:33:30 -0800 
2007 -------
I have several macros I create and add to the standard toolbar.  First, I record
the macros by selecting text, changing the font color and saving.  Macros are
included towards the end of the email for reference.

After recording the macros, I add them to the standard toolbar.  I click the
toolbar's customize button, select Customize Toolbar, scroll down to the end of
the menu item list, and click Add.  From the add menu, I choose OpenOffice.org
Macros | My Macros | Standard | Module1 and then click each macro (blue, green,
magenta, normal, red, yellow), adding each one to the toolbar.  When done, you
should see the macro names at the end of the standard toolbar.  This all works
fine, no crashes.

I have some .bmp files that I had created a few years ago as icons for each of
these macros.  The name of the icon file is related to the name of the macro.  I
 then use the Change Icon from the Customize Toolbar option to Import the bmp
file and assign it to each macro toolbar item.  This all appears to work fine.

Now, restart OO.  Immediately upon restarting it will crash.  This happens
consistently, although every now and then it will finally load.  However if it
does load, one (and only one) of the macro buttons is still showing the name
instead of the button image.  It always appears to be the middle item that
doesn't get the icon attached correctly, regardless of the order of the icons or
how I rearrange them.

Here's my macros:


sub blue
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = 255

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub


sub green
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = 3394662

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub


sub yellow
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = 13421568

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub


sub red
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = 15425853

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub


sub magenta
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = 16711935

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub


sub normal
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
args1(0).Value = -1

dispatcher.executeDispatch(document, ".uno:Color", "", 0,
args1())


end sub

---------------------------------------------------------------------
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