Issue 100796 - changes in the css.drawing.ColorTable are not saved
Summary: changes in the css.drawing.ColorTable are not saved
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2009-04-02 17:56 UTC by Ariel Constenla-Haile
Modified: 2014-07-02 11:17 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: 4.1.0
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2009-04-02 17:56:42 UTC
The changes in the color palette do *not* persist after the UNO object 

Try the following:

Sub Main
        Dim oColorTable as Object
        oColorTable = CreateUnoService("")
        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

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().
Comment 1 jsc 2009-04-03 07:05:31 UTC
jsc: depending on i100795
Comment 2 clippka 2009-06-02 14:42:00 UTC
The problem is not in SvxUnoColorTable but in the fact that the current drawing
layer has no color managment and colors that are not used are not kept
persistent. This will be taken into account as soon as we implement a proper
color managment for all applications.