Description: In the special characters dialog there exists two almost identical implementations of drawing the grid, i.e., svx/source/dialog/charmap.cxx and svx/source/dialog/searchcharmap.cxx They differ in only in very few lines in SvxSearchCharSet::DrawChars_Impl and SvxShowCharSet::DrawChars_Impl. These leads to code duplication when enhancing the the special characters dialog grid like in https://gerrit.libreoffice.org/c/core/+/148051 Steps to Reproduce: None Actual Results: Implementation is duplicated. Expected Results: Implementation is unified. This could also solve the problem of Bug 154087. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6c2542306bcc7caaab947664f252265058964fc2 CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL threaded
I can see the code duplication. Fair request for consolidation/simplification. Hossein, what kind of easyHack could that be?
(In reply to Stéphane Guillou (stragu) from comment #1) > I can see the code duplication. Fair request for > consolidation/simplification. > > Hossein, what kind of easyHack could that be? This is a cleanup task, and I would say it is a relatively easy refactoring task. One should move the common code to a common function.
AmosAidoo committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/94d2d9a59450fa4bccd0a3a450d8b273271d2ff2 tdf#154088 Merge code snippets for character retrieval and string construction It will be available in 24.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.