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.
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.
Migrating Whiteboard tags to Keywords: (easyHack, difficultyBeginner, skillCpp) [NinjaEdit]
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Missing code pointers (mandatory for easy hacks)
(In reply to jan iversen from comment #4) > Missing code pointers (mandatory for easy hacks) See comment #1
(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.
@Markus, I looked into some files but I am getting little problem in implementing, as I am not sure what should be the cppu::UnoType for above mentioned "optional function". I think it should be sal_Int32 but to make sure, Could you please tell me How to find this.
(In reply to Ekansh Jha from comment #7) > @Markus, I looked into some files but I am getting little problem in > implementing, as I am not sure what should be the cppu::UnoType > for above mentioned "optional function". I think it should be sal_Int32 but > to make sure, Could you please tell me How to find this. @Markus, Could you please help Ekansh Jha here?
I was looking into this from the EasyHacks wiki page and it would be helpful (for all beginners) if someone could clear the question of whether the `cppu::UnoType` of the "optional" should be `sal_Int32` in comment #7 TL;DR: friendly ping