| Summary: | Kill FOREACHPAM_START for good | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Björn Michaelsen <bjoern.michaelsen> |
| Component: | Writer | Assignee: | Julien Nabet <serval2412> |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | CC: | robinson.libreoffice, serval2412 |
| Priority: | low | Keywords: | difficultyBeginner, easyHack, skillCpp, topicCleanup |
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | target:4.5.0 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Björn Michaelsen
2014-12-02 10:40:16 UTC
adding LibreOffice developer list as CC to unresolved Writer EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details FWIW, C++11 range-based for-loops are OK on libreoffice-4-4 and master, best to not use BOOST_FOREACH in new code, I guess. We cant for now have sw::Ring<> implement STL-like begin()/end() functions, see: https://gerrit.libreoffice.org/gitweb?p=core.git;a=blob;f=sw/inc/ring.hxx;h=d58733f1459fda302a99d1ea9d56da82c55f9ca9;hb=2dd7cc5b925d0b4c62553eeba9f6524ce7b6217b#l105 So for now, BOOST_FOREACH should still be an improvement over the old const-eating homegrown macros. Once none of the derived classes of sw::Ring<> are deriving from any other STL-container, we should be able to trivially replace BOOST_FOREACH with a proper C++11 style for() iteration. Bjoern Michaelsen committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=02ef3abd83f2d5f702349a8cd47928621ee5c620 fdo#86929: Kill FOREACHPAM_START for good It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. With some additional thinking, I found a way to get C++11 for(:) iteration right away, without using the BOOST_FOREACH hack as an intermediate solution. See: http://cgit.freedesktop.org/libreoffice/core/commit/?id=02ef3abd83f2d5f702349a8cd47928621ee5c620 for an example change. Thus also not depending on fdo#75757 anymore. This should make this Easy Hack even simpler. I submitted for review these: - https://gerrit.libreoffice.org/#/c/13465/ - https://gerrit.libreoffice.org/#/c/13466/ but I don't know how to do for those in sw/source/core/doc/, see http://opengrok.libreoffice.org/search?q=FOREACHPAM_START&project=core&defs=&refs=&path=&hist= Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bbf59cb82eabee984926fb11dc5281dc84e62fb6 Related fdo#86929: Kill FOREACHPAM_START for good (part2) It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8286e92417794e68f6a53f887a426d5708fef0f6 Related fdo#86929: Kill FOREACHPAM_START for good (part1) It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a44e785da22fe08da295208c2819af813e63447 Related fdo#86929: Kill FOREACHPAM_START for good (final part) It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Migrating Whiteboard tags to Keywords: (EasyHack SkillCpp DifficultyBeginner TopicCleanup ) [NinjaEdit] Remove LibreOffice Dev List from CC on EasyHacks (curtailing excessive email to list) [NinjaEdit] |