Summary: | get rid of prewin.h / postwin.h wrapper headers | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Michael Stahl (allotropia) <michael.stahl> |
Component: | LibreOffice | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | mentoring |
Priority: | medium | Keywords: | difficultyMedium, easyHack, skillCpp, topicCleanup |
Version: | Inherited From OOo | ||
Hardware: | Other | ||
OS: | Windows (All) | ||
Whiteboard: | target:5.4.0 reviewed:2022 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 143781 |
Description
Michael Stahl (allotropia)
2014-08-13 20:12:30 UTC
One note, that I sadly think needs to be spelled out: Please don't attempt to do this unless you actually have Windows, Visual Studio, etc and are able to build LibreOffice on Windows. Don't submit changes without verifying yourself that they don't break the compilation. Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a8669b56b194a7cd6da771dfb9904710da24c0b4 fdo#82580: Win32 GetObject() simplification 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. (In reply to comment #0) > 2) in some cases it can be avoided to have the Win32 type > and the LO type visible in the same LO source file > by not including both the defining LO and Win32 headers Note, that this could be complicated, because we (mostly) use precompiled headers on Windows, which include nearly all headers needed by a module. See for example oox/inc/pch/precompiled_oox.hxx, which includes all headers from the oox module. And thus avoiding to include one file could be problematic. Personally I think we should do what Cygwin have done and create our own copy of the win32 header that only contains the definitions we need, thus minimizing the odds of conflict. That is madness. We can't cross-compile a complete LibreOffice because the reverse-engineered headers provided by mingw-w64 are incomplete. And those headers have a very long history. So you expect us to be able to create something similar, and in a legally valid clean-room fashion, just like that? Please don't just sign a bug to yourself out of the blue. That is not how it works. Assign this bug to me. I think it is good start before refactoring god objects at gsoc. It is enough to say you are working on this. If somebody else (another GSoC hopeful?) is rude enough to jump onto this task just at the same time (for a few weeks), we will notice, and take that as a sign that he/she is not good at cooperation. any chance you need help on this? Still not need help. Eclipse searchs well. Darn ok. I will find another easy hack to be my first Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup ) [NinjaEdit] JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit] Please be aware, that this easyhack is considered an important but large scale cosmetic change as described in https://wiki.documentfoundation.org/Development/LargeScaleChanges It was in decided by the ESC to close this kind of easyhacks, and send them directly as mail, to new contributors. https://lists.freedesktop.org/archives/libreoffice/2016-August/074920.html Please do not submit patches with many files !! This particular easyhack is kept open as an exception to the rule. Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a5a571307fb3306b74ab46b085cde6388270a770 tdf#82580 tools: rename Rectangle to tools::Rectangle It will be available in 5.4.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. Re-evaluating the EasyHack in 2022 This enhancement is still relevant. Both prewin.h and postwin.h wrapper headers are still present and used in many files: $ git grep postwin.h|wc -l 57 $ git grep prewin.h|wc -l 54 |