To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=64574
User as changed the following:
What |Old value |New value
================================================================================
Assigned to|as |kendy
--------------------------------------------------------------------------------
------- Additional comments from [EMAIL PROTECTED] Thu Apr 20 22:49:13 -0700
2006 -------
AS->kendy:
Sorry, but replacing of "#define css" with an "using namespace
::com::sun::star"
isnt an option. Because it has some other disatvantages.
Here an example:
using namespace ::com::sun::star::uno; // to work with Reference<>
using namespace ::rtl; // to work with OUString
include <rtl/reference.h>
Reference< XInterface > m_xRef; // these Reference<> cames from css
Reference< CppClass > m_aRef; // these Reference<> cames from rtl
This wont compile. You have to write both(!) Reference<> using completly using
the
full qualified namespace.
Even "using namespace ::com::sun::star" has it's problems.
Example:
using namespace ::com::sun::star;
uno::Reference< uno::XInterface > m_xRef;
But If now a further Reference class exists in the global namespace ::uno::
Reference, you will have the same problems. Then there is no difference between
writing "::uno::Reference" and "uno::Reference". The leading "::" are optional
.-)
My preferred solution is using of namespace alias; e.g. "namespace css = ::com::
sun::star" and then writing "css::uno::Reference<...>". But this will make
problems
in header files, in case they are exported. May be they are used inside "old
code of
OOo", which often enough use "using namespace" and will run into trouble then.
And it's not an option to rewrite the whole office, because only one header
file
"whish to use the BEST solution". There is no "best solution" for such
namespace
related problems.
Further the trick of using a define inside header files is: it can be undefined
at the
end of the header file, so it does not affect any outside code .-)
That's not possible with namespace alias nor even with "using namespace" !
=> Sorry - but it's not acceptable for me to remove this define. Because it
works
well and do not have the mentioned problems.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]