vcl/qa/cppunit/pdfexport/pdfexport.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 40b87fa8fb40f8edf443d840a69524ec1bd7184f Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Mar 17 11:56:05 2026 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Tue Mar 17 15:19:00 2026 +0100 Fix declaration of operator << overload > In file included from vcl/qa/cppunit/pdfexport/pdfexport.cxx:21: > In file included from include/test/unoapi_test.hxx:18: > In file included from include/test/bootstrapfixture.hxx:16: > In file included from include/unotest/bootstrapfixturebase.hxx:18: > In file included from workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:8: > workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h:25:9: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup > 25 | ost << x; > | ^ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:74:42: note: in instantiation of function template specialization 'CppUnit::StringHelper::toString<std::set<rtl::OString>>' requested here > 74 | return CPPUNIT_NS::StringHelper::toString(x); > | ^ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:168:50: note: in instantiation of member function 'CppUnit::assertion_traits<std::set<rtl::OString>>::toString' requested here > 168 | Asserter::failNotEqual( assertion_traits<T>::toString(expected), > | ^ > vcl/qa/cppunit/pdfexport/pdfexport.cxx:2126:5: note: in instantiation of function template specialization 'CppUnit::assertEquals<std::set<rtl::OString>>' requested here > 2126 | CPPUNIT_ASSERT_EQUAL(aExpected, aFontNames); > | ^ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:343:17: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL' > 343 | ( CPPUNIT_NS::assertEquals( (expected), \ > | ^ > vcl/qa/cppunit/pdfexport/pdfexport.cxx:40:22: note: 'operator<<' should be declared prior to the call site or in namespace 'rtl' > 40 | static std::ostream& operator<<(std::ostream& rStream, const std::set<OString>& rSet) > | ^ Change-Id: I4430d2c8f25e9454e31f834b705c5edd4ceb6150 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201898 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 2d8ac206e939..364d1616206f 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -29,7 +29,10 @@ #if defined MACOSX || defined _WIN32 #include <set> +namespace rtl +{ static std::ostream& operator<<(std::ostream& rStream, const std::set<rtl::OString>& rSet); +} #endif #include <test/unoapi_test.hxx> @@ -37,6 +40,8 @@ static std::ostream& operator<<(std::ostream& rStream, const std::set<rtl::OStri using namespace ::com::sun::star; #if defined MACOSX || defined _WIN32 +namespace rtl +{ static std::ostream& operator<<(std::ostream& rStream, const std::set<OString>& rSet) { rStream << "{ "; @@ -49,6 +54,7 @@ static std::ostream& operator<<(std::ostream& rStream, const std::set<OString>& rStream << " }"; return rStream; } +} #endif namespace
