Le 04/03/2011 23:48, Julien Nabet a écrit :
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
?
Julien.
Hello,
I attached a patch which is a first try.
The patched file, sc/source/filter/xml/xmlstyli.cxx already had
using com::sun::star::uno::Reference;
but he had too :
using namespace ::com::sun::star:uno;
So I removed the using namespace and had to add :
using com::sun::star::uno::UNO_QUERY;
for the compilation.
Is this patch ok ?
If it's ok, 2 remarks :
1) this file also has this :
using namespace ::com::sun::star;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
Is the Reference problem which needs the removing of "using namespace
::com::sun::star::uno" the only one or may there be some others "using
namespace" to remove ?
I read in some websites that it's better to remove "using namespace" in
include files to avoid conflicts.
2) like the other replacement (using namespace ::rtl), the changes will
certainly give some errors that i won't see since, obviously, i don't
compile with all environments and all the combinations of options. The
pb is there may be a lot more errors than when i made replacements for
using namespace ::rtl.
Some ideas/remarks ?
Julien.
commit 7eb6236ba55213c0558f7a4408d6d22a4e011061
Author: Julien Nabet <serval2412@yahoo.fr>
Date: Sun Mar 6 22:57:37 2011 +0100
First try of removing "using namespace ::com::sun::star::uno"
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 302fe8e..bf8478a 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -67,7 +67,6 @@
#define XML_LINE_BLTR 1
using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::frame;
@@ -78,6 +77,7 @@ using namespace ::formula;
using rtl::OUString;
using com::sun::star::uno::Reference;
+using com::sun::star::uno::UNO_QUERY;
ScXMLCellImportPropertyMapper::ScXMLCellImportPropertyMapper(
const UniReference< XMLPropertySetMapper >& rMapper,
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.