Bug 96348 - Get rid of unnecessary DLLPUBLIC decorations in module-internal include files
Summary: Get rid of unnecessary DLLPUBLIC decorations in module-internal include files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2015-12-09 09:26 UTC by How can I remove my account?
Modified: 2017-02-14 08:57 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description How can I remove my account? 2015-12-09 09:26:14 UTC
In many cases, classes (or individual functions) that are used only internally in a library are still marked as DLLPUBLIC. The task is to get rid of such. Please submit each removal as a separate change to gerrit. Sample commits: e9e3124e00676194a10c52ca1a064c44cb668f98 and cbac44cec42985593f27d315266ac43de4dbf3eb . 

Don't submit such a change unless you have tested that the code still builds, of course. And in case of platform-specific code (mainly in the vcl module), you need to test build on the affected platform(s).
Comment 1 How can I remove my account? 2015-12-09 09:36:27 UTC
Alternatively, for extra points, write a Clang plug-in that automates this;)
Comment 2 Stephan Bergmann 2015-12-09 10:06:19 UTC
(In reply to Tor Lillqvist from comment #0)
> Don't submit such a change unless you have tested that the code still builds,

...and passes "make check", as some DLLPUBLICs might only be there for test code to be able to access otherwise internal entities.  (In which case those uses of DLLPUBLIC should arguably be commented accordingly.)

Also, note that there is different behaviour between GCC (as typically used on Linux) and Clang (as typically used on Mac OS X, but also on Linux) whether to treat non-exported RTTI of types with identical identifiers as identical.  This can e.g. have consequences for uses of dynamic_cast, and can be relevant e.g. when a class in vcl/inc/ has erroneously been marked VCL_DLLPUBLIC instead of VCL_PLUGIN_PUBLIC.
Comment 3 Robinson Tryon (qubit) 2015-12-14 06:29:42 UTC Comment hidden (obsolete)
Comment 4 Robinson Tryon (qubit) 2016-02-18 14:51:59 UTC Comment hidden (obsolete)
Comment 5 jani 2016-04-22 06:52:50 UTC
A couple of example code pointers, would make it more likely that this easy hack get done. sample commits are good, but a relative high ladder for new people
Comment 6 How can I remove my account? 2016-04-22 08:10:10 UTC
"code pointer":

git log -p -1 e9e3124e00676194a10c52ca1a064c44cb668f98
Comment 7 Commit Notification 2016-05-09 06:05:25 UTC
Tomofumi Yagi committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6046732216279ff349f683cea6c2f6d151f41f17

tdf#96348 Get rid of unnecessary DLLPUBLIC decorations - VclEventListeners

It will be available in 5.2.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.
Comment 8 jani 2016-06-14 09:42:32 UTC
Look solved