On 10/03/2011 04:48 PM, Chr. Rossmanith wrote:
One improvement suggested by Norbert on IRC: using OUString instead of
::rtl::OUString. What is the preferred syntax

using ::rtl::OUString at the beginning of the file and OUString
throughout the remaining source code

or

::rtl::OUString everywhere in the source code.

I would stick with a pattern that does use a namespace prefix (i.e., "rtl::OUString" rather than "OUString"). Even if it is slightly longer, it helps avoid ambiguities should one of the #included headers in the future drag in another entity with the same plain name (probably unlikely for "OUString," but it does happen, cf. rtl::Reference vs. com::sun::star::uno::Reference; another measure against this is to explicitly "using rtl::OUString;" instead of the more general "using namespace rtl;"). The initial "::" in "::rtl::OUString" is probably not really worth it, more noise than of practical value.

But there's a lot of personal taste involved...

-Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to