Bug 70285

Summary: cleanup generated C++ code ...
Product: LibreOffice Reporter: Michael Meeks <michael.meeks>
Component: LibreofficeAssignee: Noel Grandin <noelgrandin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: libreoffice, sbergman
Version: 4.2.0.0.alpha0+ Master   
Hardware: Other   
OS: All   
Whiteboard: EasyHack DifficultyBeginner SkillCpp TopicCleanup target:4.2.0
i915 platform: i915 features:

Description Michael Meeks 2013-10-08 14:43:02 UTC
The existing 

codemaker/source/cppumaker/cpputype.cxx

generates lots of ugly / old-world: com::sun::star:: namespace blurb.

These should all be replaced with css:: prefixes which should make the generated code much easier to read.

Checkout eg.

workdir/unxlngi6.pro/UnoApiHeadersTarget/offapi/comprehensive/com/sun/star/frame/FrameLoaderFactory.hpp:

to see the before / after - and re-run 'make' in the top-level to re-generate.

Thanks !
Comment 1 Stephan Bergmann 2013-10-08 16:51:06 UTC
* Use "::css", not just "css" in the generated code, to avoid name clashes.

* Ensure sal/types.h (where css is defined) is included in generated files using css.
Comment 2 Commit Notification 2013-10-20 14:21:00 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=44b96b1d76bb1c7b6d78344ee54e31ffee54e342

fdo#70285 cleanup generated C++ code



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 3 Michael Meeks 2013-10-21 16:02:26 UTC
Thanks Noel - looks prettier :-)

Of course - it's really best to leave the easiest EasyHacks for people who are just getting into the project - they are difficult to create and serve a much more useful purpose than the issues they are fixes for as easy hacks :-)

ie. if an expert developer spent a week they could fix some big proportion of our easy-hacks, but ... the real trouble is then creating / finding & annotating new ones (along with restraining ourselves from doing them ;-)

Anyhow - good to see it cleaned up :-)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.