Bug 39635 - [EasyHack] Remove "using namespace ::rtl"
Summary: [EasyHack] Remove "using namespace ::rtl"
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2011-07-28 09:50 UTC by Björn Michaelsen
Modified: 2015-12-15 12:17 UTC (History)
1 user (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 Björn Michaelsen 2011-07-28 09:50:27 UTC
=== Remove "using namespace ::rtl" ===

Both namespaces contain a class Reference thus using these can be the source of much confusion (and problems when using precompiled headers). As for ::rtl, most of the time it is enough to explicitly use the string classes with "using ::rtl::OUString;" etc. and not the whole namespace. In the end, a ::rtl::Reference should never end up in the general namespace. An example of what could be done is http://cgit.freedesktop.org/libreoffice/libs-core/commit/?id=79b8edd85443a60c589fe9ef35079c60d80c102e . Removing "using namespace ::com::sun::star::uno" is optional, but can be done for files where it is rarely used.

'''finished the part on the namespace ::rtl: (also binfilters)''' Julien NABET, 2011-03-04
Comment 1 Björn Michaelsen 2011-07-28 09:52:15 UTC
finished the part on the namespace ::rtl => RESOLVED WORKSFORME

please reopen if this need to be rechecked ....
Comment 2 Robinson Tryon (qubit) 2015-12-15 12:17:04 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp)
[NinjaEdit]