bin/find-unneeded-includes | 2 +- starmath/qa/cppunit/test_cursor.cxx | 2 -- starmath/qa/cppunit/test_nodetotextvisitors.cxx | 2 -- starmath/qa/cppunit/test_parse.cxx | 2 -- starmath/source/edit.cxx | 1 - starmath/source/mathml/import.cxx | 1 - starmath/source/mathml/mathmlimport.cxx | 1 - 7 files changed, 1 insertion(+), 10 deletions(-)
New commits: commit ff9373bd7271f37fd4cc8c35987a2477c5913b22 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Sun Mar 31 20:47:39 2024 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Tue Apr 9 18:53:23 2024 +0200 tdf#146619 Drop unused 'using namespace' in: starmath/ Change-Id: I382ca117484b0928580f4bed765799e915e7b8a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165693 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx index 002a445745c9..89d4e6fe9a8e 100644 --- a/starmath/qa/cppunit/test_cursor.cxx +++ b/starmath/qa/cppunit/test_cursor.cxx @@ -23,8 +23,6 @@ typedef rtl::Reference<SmDocShell> SmDocShellRef; -using namespace ::com::sun::star; - namespace { class Test : public test::BootstrapFixture diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index d4981445d8bb..0fbcfa1a81a1 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -25,8 +25,6 @@ typedef rtl::Reference<SmDocShell> SmDocShellRef; -using namespace ::com::sun::star; - namespace { class Test : public test::BootstrapFixture diff --git a/starmath/qa/cppunit/test_parse.cxx b/starmath/qa/cppunit/test_parse.cxx index cb158a15491d..2e240c04a2ac 100644 --- a/starmath/qa/cppunit/test_parse.cxx +++ b/starmath/qa/cppunit/test_parse.cxx @@ -21,8 +21,6 @@ namespace { -using namespace ::com::sun::star; - typedef rtl::Reference<SmDocShell> SmDocShellRef; class ParseTest : public test::BootstrapFixture diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f36634a16b14..464498262b2f 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -42,7 +42,6 @@ #include <cfgitem.hxx> #include <smediteng.hxx> -using namespace com::sun::star::accessibility; using namespace com::sun::star; diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index d857e56930d6..31d92a355cc7 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -58,7 +58,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; using namespace ::com::sun::star::document; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 7bc3e5b913e3..d6a9b8d10ad8 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -74,7 +74,6 @@ one go*/ #include <cfgitem.hxx> using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; using namespace ::com::sun::star::document; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; commit 6f10dc11015ed1640b847e7f0c0be5498b777c5b Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Mon Apr 1 10:41:39 2024 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Tue Apr 9 18:53:11 2024 +0200 find-unneeded-includes: improve grepping for namespaces for example this was not found: extensions/source/update/check/updatecheck.cxx:58:namespace frame = com::sun::star::frame ; due to the missing using and the space before the semicolon but IWYU correctly detected it as unused Change-Id: I404c93d41aec1a571c9ac49db7b7c7e8da824bf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165698 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 99c77b654d3e..718ee67a2561 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -392,7 +392,7 @@ def processIWYUOutput(iwyuOutput, moduleRules, fileName, noexclude, checknamespa print("WARNING:", fileName, "This 'using namespace' is likely unnecessary:", nameSpace) # Get the row number, normal IWYU output does not contain this info - subprocess.run(["git", "grep", "-n", "using namespace.*"+nameSpace+";", fileName]) + subprocess.run(["git", "grep", "-n", "namespace.*[^a-zA-Z]"+nameSpace+" *;", fileName]) for remove in sorted(toRemove): print("ERROR: %s: remove not needed include" % remove)