Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi devs,

How hard is to rename all the C++ namespaces to most comprehensive and
consistent names with the project?

It would help us, external contributors, to understand the code and make
substantial changes. I'm trying to get familiar, but there is a complex mix
of namespaces from StarOffice/OpenOffice and other previous versions. This
really don't helps.

I know, sounds crazy to rename everything, but you could pass this task for
us, Easy Hackers.

And what i have in mind?

You could map the old namespaces to the names you want putting in a single
header file:

$ cat changingNames.hpp

// this map should list all namespace trees:namespace oldNameLevel_0 {
    namespace oldNameLevel_1 {

    }}
// and you developers choose the better names:namespace newNameLevel_0 {
    using namespace oldNameLevel_0;
    namespace newNameLevel_1 {
        using namespace oldNameLevel_1;
    }}
// -----------------------------------------------
// another examplenamespace com { namespace sun { namespace star {
namespace uno {} } } }
// defining the new names for LibreOffice!namespace libre {
    using namespace com::sun;
    namespace writer {
        using namespace star;
        namespace writerSomething {
            using namespace uno;
        }
    }}


This file would be added in all LibreOffice source code by regexp, then even
we change the names to the new ones gradually, the build would not break. In
a far future, when someone remove the last trace, we done.

I think this Easy Hack is an important step for LibreOffice growth.

Regards,
Júlio.

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.