Issue 94459 - InsertByName from com.sun.star.drawing.ColorTable didn't work
Summary: InsertByName from com.sun.star.drawing.ColorTable didn't work
Status: CLOSED FIXED
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: clippka
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-30 09:48 UTC by aladdin2k7
Modified: 2013-02-24 21:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description aladdin2k7 2008-09-30 09:48:57 UTC
InsertByName from com.sun.star.drawing.ColorTable didn't work as expected.

I was trying to add a color (insertByName) to the color palette but it doesn't
add the color.
Is there a workaround ? something else to do ?

Here is the source code :
Sub addColorPalette()
dim serviceColor As Object
serviceColor = createUnoService("com.sun.star.drawing.ColorTable")

'Error IllegalArgumentException
serviceColor.insertByName("myColor",RGB(100,100,100))

'Do nothing
'serviceColor.insertByName("myColor","123456")
End Sub

The second argument is a variant representing the RGB Color.

Tested on OOo3 RC3 and OOo 2.4 => Not OK.
Comment 1 jsc 2008-09-30 10:51:07 UTC
jsc -> cl: maybe you see directly what is wrong. At least the service
description is missing the IDL reference.
Comment 2 clippka 2008-09-30 11:14:08 UTC
I can confirm that there is a bug in the code for both insertByName and
replaceByName. Unfortunately there are no workarounds
Comment 3 clippka 2008-12-08 15:43:49 UTC
fixed in cws impressfontsize for OOo 3.1
Comment 4 groucho266 2008-12-09 10:21:59 UTC
Fix looks good. Verified.
Comment 5 clippka 2009-01-12 10:58:45 UTC
fix integrated, closing
Comment 6 maretto 2009-07-29 07:33:08 UTC
Working with OOo 3.1 and SDK 3.1, changes done by insertByName(removeByName) are
not persisted into any of files (eg. standard.soc).
Comment 7 aladdin2k7 2009-07-29 10:15:13 UTC
I concur : changes are not written in any soc files.
Tested with OOo 3.1 and OOo 3.2 (Dev300 m52).
Comment 8 clippka 2009-07-29 10:54:12 UTC
This API is currently not designed to work with the soc files. You can use xml
libraries to edit soc files.

I agree that there must be an API to work with these files but this has low
priority at the moment because a complete color managment update would be done
first which would change the handling of soc files altogether.

If you still think someone should do an api for soc files now, please open a new
issue for this (not this one)