Re: Automatic using ::rtl::OUString etc.

2012-09-18 Thread Stephan Bergmann
On 09/18/2012 12:43 PM, Norbert Thiebaud wrote: On Tue, Sep 18, 2012 at 3:38 AM, Stephan Bergmann wrote: It turns out that one drawback of this is with header files that are careful to only declare the incomplete type via namespace rtl { class OUString; } (instead of including rtl/ustring.

Re: Automatic using ::rtl::OUString etc.

2012-09-18 Thread Norbert Thiebaud
On Tue, Sep 18, 2012 at 3:38 AM, Stephan Bergmann wrote: > It turns out that one drawback of this is with header files that are careful > to only declare the incomplete type via > > namespace rtl { class OUString; } > > (instead of including rtl/ustring.hxx) if that is all they need. They would

Re: Automatic using ::rtl::OUString etc.

2012-09-18 Thread Lubos Lunak
On Tuesday 18 of September 2012, Stephan Bergmann wrote: > On 07/16/2012 04:03 PM, Lubos Lunak wrote: > > FYI, this is now in. The stable modules (sal/, salhelper/, cppu/, > > cppuhelper/) build without it and there's additionally a check including > > all their .hxx's to verify them. The rest of

Re: Automatic using ::rtl::OUString etc.

2012-09-18 Thread Stephan Bergmann
On 07/16/2012 04:03 PM, Lubos Lunak wrote: On Thursday 12 of April 2012, Lubos Lunak wrote: would somebody see a problem with this? sal/inc/rtl/ustring.hxx : +#ifdef RTL_AUTOMATIC_USING +using ::rtl::OUString; +using ::rtl::OStringToOUString; +using ::rtl::OUStringToOString; +#endif I seri

Re: Automatic using ::rtl::OUString etc.

2012-07-16 Thread Lubos Lunak
On Thursday 12 of April 2012, Lubos Lunak wrote: > Hello, > > would somebody see a problem with this? > > sal/inc/rtl/ustring.hxx : > +#ifdef RTL_AUTOMATIC_USING > +using ::rtl::OUString; > +using ::rtl::OStringToOUString; > +using ::rtl::OUStringToOString; > +#endif > > I seriously doubt there

Re: Automatic using ::rtl::OUString etc.

2012-04-20 Thread Stephan Bergmann
On 04/16/2012 11:33 AM, Stephan Bergmann wrote: I am not objecting to the goal of frequently used entities having reasonably short names. I am objecting to the hacky implementation. Just so I don't appear too negative, I really do like your recent work on strings etc., Lubos. Even something l

Re: Automatic using ::rtl::OUString etc.

2012-04-16 Thread Stephan Bergmann
On 04/13/2012 07:42 PM, Lubos Lunak wrote: Strings already kind of are a magic special case. They are the one non-builtin type that is by far the most used one, close to the builtin ones (which is part of the reason why many programming languages do have strings as a builtin type). So I see not

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Lubos Lunak
On Friday 13 of April 2012, Bjoern Michaelsen wrote: > I tend to agree on all points. If something like that is essential, we > could have something like a: > salhelper/inc/rtl/stringhelper.hxx: > #include > using ::rtl::OUString; > using ::rtl::OStringToOUString; > using ::rtl::OUStringToOString;

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Lubos Lunak
On Friday 13 of April 2012, Stephan Bergmann wrote: > On 04/12/2012 03:59 PM, Lubos Lunak wrote: > > would somebody see a problem with this? > > > > sal/inc/rtl/ustring.hxx : > > +#ifdef RTL_AUTOMATIC_USING > > +using ::rtl::OUString; > > +using ::rtl::OStringToOUString; > > +using ::rtl::OUStrin

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Stephan Bergmann
On 04/13/2012 10:24 AM, Tor Lillqvist wrote: On the other hand, any kind of duplication is always bad, isn't it, as is inconsistency. So isn't it, from that point of view, bad that some percentage of the source files contain those "using" statements (duplication), some a subset of them (inconsist

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Stephan Bergmann
On 04/13/2012 10:13 AM, Bjoern Michaelsen wrote: I tend to agree on all points. If something like that is essential, we could have something like a: salhelper/inc/rtl/stringhelper.hxx: #include using ::rtl::OUString; using ::rtl::OStringToOUString; using ::rtl::OUStringToOString; and allow that

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Tor Lillqvist
On the other hand, any kind of duplication is always bad, isn't it, as is inconsistency. So isn't it, from that point of view, bad that some percentage of the source files contain those "using" statements (duplication), some a subset of them (inconsistency), others not, some use ::rtl::foo, others

Re: Automatic using ::rtl::OUString etc.

2012-04-13 Thread Bjoern Michaelsen
On Fri, Apr 13, 2012 at 08:21:35AM +0200, Stephan Bergmann wrote: > On 04/12/2012 03:59 PM, Lubos Lunak wrote: > > would somebody see a problem with this? > > > >sal/inc/rtl/ustring.hxx : > >+#ifdef RTL_AUTOMATIC_USING > >+using ::rtl::OUString; > >+using ::rtl::OStringToOUString; > >+using ::rtl:

Re: Automatic using ::rtl::OUString etc.

2012-04-12 Thread Stephan Bergmann
On 04/12/2012 03:59 PM, Lubos Lunak wrote: would somebody see a problem with this? sal/inc/rtl/ustring.hxx : +#ifdef RTL_AUTOMATIC_USING +using ::rtl::OUString; +using ::rtl::OStringToOUString; +using ::rtl::OUStringToOString; +#endif I am not too excited about this. For one, we need to ens

Automatic using ::rtl::OUString etc.

2012-04-12 Thread Lubos Lunak
Hello, would somebody see a problem with this? sal/inc/rtl/ustring.hxx : +#ifdef RTL_AUTOMATIC_USING +using ::rtl::OUString; +using ::rtl::OStringToOUString; +using ::rtl::OUStringToOString; +#endif I seriously doubt there will ever be any O(U)String anywhere in LO build that will not be th