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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.