While fixing bug 136924, I found the code manually restores the line and fill colors it changed in the ColumnValueSet::UserDraw function. There is a more "modern" API (Push/Pop) in RenderContext using PushFlags to restore these more automatically. So get rid of the manual backup of the colors and call the API instead. Code is in sw/source/ui/frmdlg/column.cxx There are probably more places in the codebase, which could be converted, but I don't see a way to identify them, so this is just a single easy hack.
Moving to NEW
Hi, I would like to work on this. I looked in rendercontext.cxx and can't figure out which function(API) to use. Can someone point me in the right direction? Thanks!
(In reply to Shubham Jain from comment #2) > Hi, I would like to work on this. I looked in rendercontext.cxx and can't > figure out which function(API) to use. Can someone point me in the right > direction? Thanks! Does the following help: "typedef OutputDevice RenderContext;"?
Fixed in https://gerrit.libreoffice.org/c/core/+/165587, among a few other instances of the same problem. I believe this issue can be marked resolved as it was for one particular case in the code. Using the command "git grep -E 'Old.*pDev->Get'", there seem to be yet more places in the code that need upgrading to the Push/Pop API. I think the rest could be made into a difficultyBeginner EasyHack, since the above gerrit patch and grep command would make for decent code pointers.
RMZeroFour committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5aeb53c4b09e8c5fa8f67268e97cce00cab0f186 tdf#137525 Update ColumnValueSet (and others) to use push/pop It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.