To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=100796
                 Issue #|100796
                 Summary|changes in the css.drawing.ColorTable are not saved
               Component|api
                 Version|current
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|jsc
             Reported by|arielch





------- Additional comments from [email protected] Thu Apr  2 16:56:42 
+0000 2009 -------
The changes in the color palette do *not* persist after the UNO object 
dies.

Try the following:

Sub Main
        Dim oColorTable as Object
        oColorTable = CreateUnoService("com.sun.star.drawing.ColorTable")
        
        Dim sNewName$, bHas as Boolean
        sNewName = "My New Color"
        
        If NOT oColorTable.hasByName(sNewName) Then
                oColorTable.insertByName(sNewName, RGB(0,124,197))
                bHas = oColorTable.hasByName(sNewName)
        End If
End Sub

The first time you run the macro, the condition evaluates to false, so you 
insert a new color and bHas returns true, saying this went OK.
The second time you run the macro, the condition should evaluate to true, as 
you already inserted a new color with that name; but this is not the case, 
changes are not made persistent.

This is because the implementation of SvxUnoColorTable 

http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/svx/source/unodraw/unoctabl.cxx

misses the point that changes to the XColorTable must be saved for them to 
really take place... well, at least this is what the color tab page does 
invoking XColorTable::Save().

http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/svx/source/dialog/tpcolor.cxx#757
http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/svx/source/dialog/tpcolor.cxx#915

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