Issue 121448 - Inconsistent fill and line color across applications
Summary: Inconsistent fill and line color across applications
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 15:13 UTC by Ariel Constenla-Haile
Modified: 2022-10-28 12:54 UTC (History)
1 user (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 Ariel Constenla-Haile 2012-12-07 15:13:01 UTC
1) Insert a chart in a Writer document. Draw a rectangle on the chart. Default line color is Black, default fill color is Blue 8

2) Install the Report Builder extension, draw a rectangle. Default line color is Black, default fill color is Blue 8

3) Create a new Writer document. Insert a rectangle. Default line color is Gray, default fill color is Blue 9. 

4) Create a new Writer document. Insert a rectangle from the Basic Shapes toolbar: though the toolbars say line color is Gray and fill color is Blue 9, in the view the line color is Black and fill color is Blue 8.

The different behavior between both rectangles can be reproduced also in Calc, but not in Draw/Impress. In Writer/Calc all custom shapes have this misbehavior: the shape model informs fill color = Blue 8, line color = Gray; but the view shows the old defaults.

(3) and (4) seems to be fixed by changing the defaults in XOutdevItemPool constructor:
svx/source/xoutdev/xpool.cxx

	const Color aNullLineCol(RGB_Color(COL_BLACK));
	const Color aNullFillCol(RGB_COLORDATA( 153, 204, 255 ));

replacing them with the new default defined in svx/inc/svx/xdef.hxx

#define COL_DEFAULT_SHAPE_FILLING	RGB_COLORDATA( 0xCF, 0xE7, 0xF5 )
#define COL_DEFAULT_SHAPE_STROKE	RGB_COLORDATA( 128, 128, 128 )


In (1) and (2) both model and view have old defaults, this seems to happen because in chart2 and reportdesign there is no call to SetDrawingLayerPoolDefaults like in the other modules.
Comment 1 Ariel Constenla-Haile 2012-12-07 15:25:11 UTC
Assigning to the expert.
@Armin: I just git grepped blue 8 nad found the svx/source/xoutdev/xpool.cxx:52 which seems to work

[ariel@localhost main]$ git grep -n "153, *204, *255"

binfilter/bf_sch/source/core/sch_chtmode2.cxx:837:/*N*/         aRowColors[7]   = Color(153, 204, 255);

binfilter/bf_svx/source/xoutdev/svx_xtabcolr.cxx:334:/*N*/      Insert(48, new XColorEntry( Color(153,204,255 ), aStr ) );

sd/source/core/drawdoc4.cxx:677:        Any aBlue1( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue1") ), aDefaultCellStyleName, RGB_COLORDATA(153,204

svx/source/xoutdev/xpool.cxx:52:        const Color aNullFillCol(RGB_COLORDATA( 153, 204, 255 ));

svx/source/xoutdev/xtabcolr.cxx:301:    Insert(48, new XColorEntry( Color(153,204,255 ), aStr ) );
Comment 2 Armin Le Grand 2012-12-10 09:31:29 UTC
ALG: Taking a look...
Comment 3 Armin Le Grand 2012-12-10 11:42:22 UTC
ALG: I see no reason why not to set the values used in SetDrawingLayerPoolDefaults() directly in XOutdevItemPool::XOutdevItemPool, it does anyways nothing else than changing these. Leaving it the way it is just leads to the possibility that modules might forget to call it :-/

It should have no drawbacks to load/asve, file formats or data exchange, but I need to ckeck this deeply...
Comment 4 Armin Le Grand 2012-12-10 14:32:35 UTC
ALG: Filkeformat and exchange are okay, the defaults are part of ODF. Works as expected, comitting.
Comment 5 SVN Robot 2012-12-10 14:34:29 UTC
"alg" committed SVN revision 1419491 into trunk:
#121448# Aligned default fill color/ line style for all apps
Comment 6 Armin Le Grand 2012-12-10 14:36:27 UTC
ALG: Okay, done.