sc/qa/extras/new_cond_format.cxx       |    6 ------
 sc/qa/unit/helper/qahelper.cxx         |    6 ------
 sc/qa/unit/helper/qahelper.hxx         |    2 --
 sd/qa/unit/sdmodeltestbase.hxx         |   14 --------------
 svl/qa/unit/svl.cxx                    |    6 ------
 sw/qa/inc/swmodeltestbase.hxx          |    9 ---------
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |    9 ---------
 7 files changed, 52 deletions(-)

New commits:
commit 19b586543b08325897278ef8b4a65ac81615978d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Nov 9 20:40:51 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Nov 21 15:47:38 2022 +0100

    qa: remove duplicated operators
    
    it's already defined in include/tools/color.hxx
    
    Change-Id: I26eaba4a1279fadd8669e9702b695e02871052d9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142512
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx
index dd4d2354f546..9cab2bdd1edc 100644
--- a/sc/qa/extras/new_cond_format.cxx
+++ b/sc/qa/extras/new_cond_format.cxx
@@ -21,12 +21,6 @@
 
 using namespace css;
 
-static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << 
static_cast<int>(rColor.GetGreen()) << " B: " << 
static_cast<int>(rColor.GetBlue());
-    return rStrm;
-}
-
 namespace sc_apitest {
 
 class ScConditionalFormatTest : public UnoApiTest
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 73250ba299e1..17f169b9e090 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -92,12 +92,6 @@ std::ostream& operator<<(std::ostream& rStrm, const 
ScRangeList& rList)
     return rStrm;
 }
 
-std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << 
static_cast<int>(rColor.GetGreen()) << " B: " << 
static_cast<int>(rColor.GetBlue());
-    return rStrm;
-}
-
 std::ostream& operator<<(std::ostream& rStrm, const OpCode& rCode)
 {
     rStrm << static_cast<sal_uInt16>(rCode);
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index dd41622a579c..6ad03dc1fa67 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -109,8 +109,6 @@ SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& 
rStrm, const ScRange
 
 SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
ScRangeList& rList);
 
-SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor);
-
 SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
OpCode& rCode);
 
 bool checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* 
pExpected);
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 210301b8452a..fa342154cd9d 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -140,20 +140,6 @@ public:
 
 CPPUNIT_NS_BEGIN
 
-template <> struct assertion_traits<Color>
-{
-    static bool equal(const Color& c1, const Color& c2) { return c1 == c2; }
-
-    static std::string toString(const Color& c)
-    {
-        OStringStream ost;
-        ost << "Color: R:" << static_cast<int>(c.GetRed())
-            << " G:" << static_cast<int>(c.GetGreen()) << " B:" << 
static_cast<int>(c.GetBlue())
-            << " A:" << static_cast<int>(255 - c.GetAlpha());
-        return ost.str();
-    }
-};
-
 template <> struct assertion_traits<tools::Rectangle>
 {
     static bool equal(const tools::Rectangle& r1, const tools::Rectangle& r2) 
{ return r1 == r2; }
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 88add0a71793..29bbde9b999d 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -42,12 +42,6 @@
 using namespace ::com::sun::star;
 using namespace svl;
 
-static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << 
static_cast<int>(rColor.GetGreen()) << " B: " << 
static_cast<int>(rColor.GetBlue());
-    return rStrm;
-}
-
 namespace svl
 {
 static std::ostream& operator<<(std::ostream& rStrm, const SharedString& 
string )
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index f00b16272e16..8b7775f1ae23 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -373,15 +373,6 @@ inline void assertBorderEqual(
 #define CPPUNIT_ASSERT_BORDER_EQUAL(aExpected, aActual) \
         assertBorderEqual( aExpected, aActual, CPPUNIT_SOURCELINE() ) \
 
-inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed())
-          << " G:" << static_cast<int>(rColor.GetGreen())
-          << " B:" << static_cast<int>(rColor.GetBlue())
-          << " A:" << static_cast<int>(255 - rColor.GetAlpha());
-    return rStrm;
-}
-
 #endif // INCLUDED_SW_QA_INC_SWMODELTESTBASE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 4e081e0fba94..18fec76da3a4 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -48,15 +48,6 @@
 
 using namespace ::com::sun::star;
 
-static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed())
-          << " G:" << static_cast<int>(rColor.GetGreen())
-          << " B:" << static_cast<int>(rColor.GetBlue())
-          << " A:" << static_cast<int>(255 - rColor.GetAlpha());
-    return rStrm;
-}
-
 namespace
 {
 /// Tests the PDF export filter.

Reply via email to