[Libreoffice] [PATCH] Remove "using namespace ::rtl" in sc

Kohei Yoshida kyoshida at novell.com
Thu Feb 24 07:53:32 PST 2011


On Thu, 2011-02-24 at 15:30 +0000, Caolán McNamara wrote:
> On Thu, 2011-02-24 at 10:11 -0500, Kohei Yoshida wrote:
> > On Thu, 2011-02-24 at 15:26 +0100, Julien Nabet wrote:
> > > 2) must we remove all the "rtl::" stuff ?
> > 
> > If you mean "using namespace rtl;", yes, because that could cause
> > conflict between com::sun::star::uno::Reference and rtl::Reference.  I
> > prefer we don't have any of those lines in our code base.
> 
> Just to clarify here, and looking at the patch. The goal is to remove
> "using namespace rtl;", right ?
> not to remove rtl:: off the front of everything.

Well, the task itself on the easy hack page *seems to imply* that
removing rtl:: off of e.g. rtl::OUString is part of it.  BTW, I'm not
the author of this task just to clarify. ;-)

> but I see some
> 
> -rtl::OUString
> +OUString
> 
> which would be unnecessary, and likely cause a huge amount of churn,
> no ?

I personally wouldn't mind this change, since my personal preference is
to define "using rtl::OUString" at the top and just use OUString
thereafter (to save some keystrokes and horizontal space).  But at the
same time I'm not sure on whether we should remove all of rtl::Foo
across the board by way of "using rtl::Foo;" at the top of each file.
That should be a case-by-case based decision, I guess.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>



More information about the LibreOffice mailing list