Bug 92965 - support some of the optional css::drawing::FillProperties properties in chart2
Summary: support some of the optional css::drawing::FillProperties properties in chart2
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Chart-Enhancements
  Show dependency treegraph
 
Reported: 2015-07-27 22:17 UTC by Markus Mohrhard
Modified: 2017-10-16 06:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Mohrhard 2015-07-27 22:17:59 UTC
Currently chart2 stores the gradient name and you have to look the gradient up in a table when you want to use it.

This is crazy API design as it adds a level of indirection that makes it difficult to resolve for the normal user. We should instead store the css::awt::XGradient directly in the FillProperties class.

This would be trivial if we would not need to care about keeping the old string based property in sync. So now we need to add the new property and write some code that makes sure that the two stay in sync.

For that we need to make the setPropertyValue method explicit in all classes that use FillProperties and handle when either the old or the new property are set to also set the other one.
Comment 1 Markus Mohrhard 2015-07-27 23:25:22 UTC
Let us make it more generic.

So the properties:

FillTransparenceGradient
FillGradient
FillHatch
FillBitmap

are defined as optional in css::drawing::FillProperties.

We should implement them in chart2/source/tools/FillProperties.cxx and make sure that the non-optional name property is handled correctly. The name and the new property always need to be in sync.

See the first post for some more details.
Comment 2 Robinson Tryon (qubit) 2015-12-13 10:58:00 UTC Comment hidden (obsolete)
Comment 3 Robinson Tryon (qubit) 2016-02-18 14:52:35 UTC Comment hidden (obsolete)
Comment 4 jani 2016-04-29 06:05:01 UTC
Missing code pointers (mandatory for easy hacks)
Comment 5 jani 2016-07-06 06:03:54 UTC
(In reply to jan iversen from comment #4)
> Missing code pointers (mandatory for easy hacks)

See comment #1
Comment 6 Ekansh Jha 2017-10-16 06:09:29 UTC
(In reply to Markus Mohrhard from comment #1)

Hi, I would like to work on this issue.
> Let us make it more generic.
> 
> So the properties:
> 
> FillTransparenceGradient
> FillGradient
> FillHatch
> FillBitmap
> 
> are defined as optional in css::drawing::FillProperties.

defined optional in FillProperties.cxx?
> 
> We should implement them in chart2/source/tools/FillProperties.cxx and make
got that

> sure that the non-optional name property is handled correctly. The name and
> the new property always need to be in sync.
I didn't really get what this line says.
> 
> See the first post for some more details.

Help will be really appreciated.