[Libreoffice] Question about using namespace ::com::sun::star::uno

Kohei Yoshida kohei.yoshida at gmail.com
Sat Mar 5 10:07:23 PST 2011

Hi Julien,

On Fri, Mar 4, 2011 at 5:48 PM, Julien Nabet <serval2412 at yahoo.fr> wrote:
> Hello,
> I just finished the removing of using reference ::rtl:: in each directory
> (binfilters included).
> I'd like to be sure of what has to be done for "::com::sun::star::uno" part
> 1) remove "using namespace ::com::sun::star::uno" ok
> 2) replace "Reference" by "uno::Reference" ok
> 3) But what about "use ::com::sun::star" ? Must we replace this :
> using namespace ::com::sun::star::uno
> by this :
> using ::com::sun::star
> ?

I think there are varying opinions on this, but here is how I see it.

It's probably okay to remove using namespace ::com::sun::star::uno,
and replace it with using ::com::sun::star::uno::Reference etc.
However, we tend to use many symbols from this namespace, so you
probably will end up using quite a few of using
::com::sun::star::uno::* declarations.  I personally don't see
anything wrong with it, but that would be a lot of extra work on your
side.  That said, IMO it's probably better than removing the using
namespace ... and replacing Reference with uno::Reference etc across
the file.

Also, I think we generally agree that it's acceptable to use "using
namespace ::com::sun::star".  Some files even re-declare the
com::sun::star namespace as css, but I'm personally not a big fan of
that, as that confuses some context tagging parsers and messes up


More information about the LibreOffice mailing list