[Libreoffice-commits] core.git: include/sfx2 sw/qa sw/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 2 08:55:14 UTC 2018


 include/sfx2/watermarkitem.hxx     |    7 ++++---
 sw/qa/extras/uiwriter/uiwriter.cxx |    2 +-
 sw/source/core/edit/edfcol.cxx     |    4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 7e80b63d8304d435d305ea61988eaf6cf9667886
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 1 15:52:45 2018 +0200

    use more Color in SfxWatermarkItem
    
    Change-Id: Ifbbce6509c02cf3d93d0500104af7c07c3216266
    Reviewed-on: https://gerrit.libreoffice.org/50577
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/watermarkitem.hxx b/include/sfx2/watermarkitem.hxx
index 43abdfeec081..448eb47990f8 100644
--- a/include/sfx2/watermarkitem.hxx
+++ b/include/sfx2/watermarkitem.hxx
@@ -11,6 +11,7 @@
 
 #include <sfx2/dllapi.h>
 #include <svl/poolitem.hxx>
+#include <tools/color.hxx>
 
 class SFX2_DLLPUBLIC SfxWatermarkItem: public SfxPoolItem
 {
@@ -30,15 +31,15 @@ public:
     void                    SetAngle(const sal_Int16 nAngle) { m_nAngle = nAngle; }
     sal_Int16               GetTransparency() const { return m_nTransparency; }
     void                    SetTransparency(const sal_Int16 nTransparency) { m_nTransparency = nTransparency; }
-    sal_uInt32              GetColor() const { return m_nColor; }
-    void                    SetColor(const sal_uInt32 nColor) { m_nColor = nColor; }
+    Color                   GetColor() const { return m_nColor; }
+    void                    SetColor(Color nColor) { m_nColor = nColor; }
 
 private:
     OUString                m_aText;
     OUString                m_aFont;
     sal_Int16               m_nAngle;
     sal_Int16               m_nTransparency;
-    sal_uInt32              m_nColor;
+    Color                   m_nColor;
 };
 
 #endif
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d6838d8acf89..a5c9282d3121 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -980,7 +980,7 @@ void SwUiWriterTest::testWatermarkDOCX()
     CPPUNIT_ASSERT_EQUAL(OUString("CustomWatermark"), pWatermark->GetText());
     CPPUNIT_ASSERT_EQUAL(OUString("DejaVu Sans Light"), pWatermark->GetFont());
     CPPUNIT_ASSERT_EQUAL(sal_Int16(45), pWatermark->GetAngle());
-    CPPUNIT_ASSERT_EQUAL(sal_uInt32(0x548dd4), pWatermark->GetColor());
+    CPPUNIT_ASSERT_EQUAL(Color(0x548dd4), pWatermark->GetColor());
     CPPUNIT_ASSERT_EQUAL(sal_Int16(50), pWatermark->GetTransparency());
 }
 
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 4a0fcd5e6266..572dc6078de1 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1442,7 +1442,7 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
     if (xWatermark.is())
     {
         drawing::HomogenMatrix3 aMatrix;
-        sal_uInt32 nColor = 0xc0c0c0;
+        Color nColor = 0xc0c0c0;
         sal_Int16 nTransparency = 50;
         sal_Int16 nAngle = 45;
         OUString aFont = "";
@@ -1476,7 +1476,7 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
     OUString sFont = rWatermark.GetFont();
     sal_Int16 nAngle = rWatermark.GetAngle();
     sal_Int16 nTransparency = rWatermark.GetTransparency();
-    sal_uInt32 nColor = rWatermark.GetColor();
+    Color nColor = rWatermark.GetColor();
 
     // Calc the ratio.
     double fRatio = 0;


More information about the Libreoffice-commits mailing list