[Libreoffice] Proposing a new Easy Hack - project consistent namespaces
Júlio Hoffimann
julio.hoffimann at gmail.com
Fri Apr 15 14:27:45 PDT 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110415/9248469a/attachment-0001.htm>
More information about the LibreOffice
mailing list