[Libreoffice] [PATCH] Replace (Byte)String with O(U)String in sw
sbergman at redhat.com
Tue Oct 4 05:07:26 PDT 2011
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
> ::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...
More information about the LibreOffice