Drawbacks of using declarations/namespace aliases (was: [Libreoffice-commits] rtl:: prefix removal from configmgr)

Stephan Bergmann sbergman at redhat.com
Tue Dec 11 08:16:30 PST 2012


> commit 3e64874e7cd234ff563ac11450cfb2b6e2db4bf6
> Author: Radu Ioan <ioan.radu.g at gmail.com>
> Date:   Mon Dec 10 23:06:10 2012 +0200
>
>      rtl:: prefix removal from configmgr
>
>      - removed rtl:: prefix
>      - removed RTL_CONSTASCII_USTRINGPARAM
>      - corrected some misspells
>
>      Change-Id: I88bb0beec718a7fe38c61220aa61401419f23b42
>      Reviewed-on: https://gerrit.libreoffice.org/1291
>      Reviewed-by: Luboš Luňák <l.lunak at suse.cz>
>      Tested-by: Luboš Luňák <l.lunak at suse.cz>
>
> diff --git a/configmgr/source/access.hxx b/configmgr/source/access.hxx
> index 1e91fed..6703568 100644
> --- a/configmgr/source/access.hxx
> +++ b/configmgr/source/access.hxx
> @@ -82,7 +82,6 @@ namespace com { namespace sun { namespace star {
>       }
>       namespace util { struct ElementChange; }
>   } } }
> -namespace rtl { class OUString; }

Changes like this are, strictly speaking, unsound.  They rely on at 
least one of the included headers happening to in turn include 
rtl/ustring.hxx.

The underlying intransparency wrt forward declarations is IMO a 
fundamental drawback of the recent efforts of beautification via using 
declarations or namespace aliases, for rtl and com::sun::star.

Stephan


More information about the LibreOffice mailing list