There is a namespace alias "starutil": namespace starutil = ::com::sun::star::util; find them: git grep -w starutil starutil should be replaced by "css::util" which is obvious to everyone. For example: starutil::Date should become css::util::Date Please leave this EasyHack for real beginners!!! If you are one please feel free to catch it.
It seems like someone already fixed all of the occurrences. I found one additional namespace alias "utl" for the same namespace and changed it (dbconversion.cxx). In addition there are some other inconsistencies with namespace aliases for "::com::sun::star::util::NumberFormat" and "::com::sun::star::util::MeasureUnit" by sometimes using an alias and sometimes not using it. Shall I fix them as well? As I am new to LibreOffice and C++ I'd like to offer my patch for this bug. Do I have to follow these steps (https://wiki.documentfoundation.org/Development/gerrit) after testing my changes? Best regards, Stefan
Oups, you're right. I accidentally converted this while converting some other star* aliases. Aliases in sources files are ok, but there are many alias definitions inside header files. Those are problematic, because if you rely on this definition in your source (cxx) file you have to always include this header. And much worse: If some other header use this definition you have to account for the order of header includes... Otherwise the build breaks. Commit 150df3c020613bd956c4ad38ab4b5e247801296b fixed such occurrences (those aliases were formerly defined in comphelper...). Here you get a list of all com::sun:: aliases in header files: git grep 'namespace.*=.*com::sun' -- '*.hxx' To your gerrit question: Yes, it is the best way to get your patches in the tree :) So please do it :)
1. Shall I fix these headers or are these the fixed ones? :) 2. Ok, I will use the gerrit tutorial to commit my small changes (shall I open a separate bug or is it fixed with this ticket?)
1. Yes, those headers shall be fixed :) 2. You can refer to this ticket "Related fdo#82088: remove using namespace in headers" or something else :)
I committed my small changes and will start with the header files right now. https://gerrit.libreoffice.org/#/c/11171/
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b450d32260e1f3d2bc83297ca9cb54b62e36ac20 fdo#82088: changed namespace from utl to css::util The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ec55fd6a1f79e19bb3654953919260a9ff29ece Related fdo#82088: removing namespace alias in hxx The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4b9bfb993e9d724431befd1295b107f7758c8fd Related fdo#82088: removing and shortening aliases The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
With my last push there are about 20 headers to fix.
Sounds great! Feel free to fix some more :)
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9fba10b5a5f1e56dde0cdc4859622fb40db1c13a Related fdo#82088: removing another bunch of alias The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=35354e6ceffc580ef2d9d817e5bbbe1417b63250 Related fdo#82088: removing aliases in headers The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stefan Weiberg committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9c6e517a77d4453d6c653df98e82c0db8da33d81 Related fdo#82088: dropping aliases again :) The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I removed all but one header alias that is pretty persistent through the whole system. Can I close this bug?
Leave it, if it's too much work. This bug is already closed. Thanks for your great work! :)
Thanks for your help and feedback. I don't think it is too hard to fix, but as far as if have seen there are way to many source files depending on this namespace.
You could also move the namespace alias definition from the header into the source files. That's ok.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup) [NinjaEdit]