summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 10:32:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 16:11:58 +0100
commit97448039e1e63f3bd6b61ab3215ede721ca368e4 (patch)
treee2ea6d151df11160f2922e9e6c0c8b502a98c2fe /sw
parente95618d754ee4e75632ed5f2bc29b8a021f45731 (diff)
use less RGB_COLORDATA
part of removing ColorData Change-Id: If31b5b88545529863377e9a178f45f4516bf6cbb Reviewed-on: https://gerrit.libreoffice.org/50345 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/PostItMgr.hxx4
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx6
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx6
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx6
-rw-r--r--sw/source/core/text/inftxt.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
8 files changed, 16 insertions, 16 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index dade2cd0026b..1f60c50c15a8 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -66,8 +66,8 @@ class OutlinerSearchable;
class OutlinerParaObject;
namespace i18nutil { struct SearchOptions2; }
-#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
-#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
+#define COL_NOTES_SIDEPANE_ARROW_ENABLED Color(0,0,0)
+#define COL_NOTES_SIDEPANE_ARROW_DISABLED Color(172,168,153)
typedef std::list<SwSidebarItem*> SwSidebarItem_list;
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index a638dd818574..5ab5c5910ba3 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -458,7 +458,7 @@ DECLARE_ODFIMPORT_TEST(testFdo75872_ooo33, "fdo75872_ooo33.odt")
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_BLACK),
getProperty<sal_Int32>(xShape, "LineColor"));
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RGB_COLORDATA(153, 204, 255)),
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(153, 204, 255)),
getProperty<sal_Int32>(xShape, "FillColor"));
}
@@ -466,9 +466,9 @@ DECLARE_ODFIMPORT_TEST(testFdo75872_aoo40, "fdo75872_aoo40.odt")
{
// graphics default style: line color and fill color changed
uno::Reference<drawing::XShape> xShape = getShape(1);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RGB_COLORDATA(128, 128, 128)),
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(128, 128, 128)),
getProperty<sal_Int32>(xShape, "LineColor"));
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RGB_COLORDATA(0xCF, 0xE7, 0xF5)),
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(0xCF, 0xE7, 0xF5)),
getProperty<sal_Int32>(xShape, "FillColor"));
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index bacdd60ea0cb..0f1adf0c25c7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -365,9 +365,9 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
CPPUNIT_ASSERT_EQUAL(341L, pAccess->Width());
CPPUNIT_ASSERT_EQUAL(181L, pAccess->Height());
Color aColor(pAccess->GetPixel(30, 120).GetColor());
- CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xb1, 0xc8, 0xdd ));
+ CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
aColor = pAccess->GetPixel(130, 260).GetColor();
- CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xb1, 0xc8, 0xdd ));
+ CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
}
DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
@@ -543,7 +543,7 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx"
CPPUNIT_ASSERT_EQUAL(58L, pAccess->Width());
CPPUNIT_ASSERT_EQUAL(320L, pAccess->Height());
Color aColor(pAccess->GetPixel(30, 20).GetColor());
- CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xce, 0xce, 0xce ));
+ CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xce, 0xce, 0xce ));
}
DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 6a22cff6f059..be1c5e2c6273 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -43,7 +43,7 @@ struct SwFillData;
class SwPortionHandler;
class SwScriptInfo;
-#define NON_PRINTING_CHARACTER_COLOR RGB_COLORDATA(0x26, 0x8b, 0xd2)
+#define NON_PRINTING_CHARACTER_COLOR Color(0x26, 0x8b, 0xd2)
/// Represents the visualization of a paragraph. Typical upper is an
/// SwBodyFrame. The first text portion of the first line is az SwParaPortion.
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index f692ff446eb0..e79c37e4564e 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -106,9 +106,9 @@
#include <vcl/BitmapTools.hxx>
-#define COL_NOTES_SIDEPANE RGB_COLORDATA(230,230,230)
-#define COL_NOTES_SIDEPANE_BORDER RGB_COLORDATA(200,200,200)
-#define COL_NOTES_SIDEPANE_SCROLLAREA RGB_COLORDATA(230,230,220)
+#define COL_NOTES_SIDEPANE Color(230,230,230)
+#define COL_NOTES_SIDEPANE_BORDER Color(200,200,200)
+#define COL_NOTES_SIDEPANE_SCROLLAREA Color(230,230,220)
using namespace ::editeng;
using namespace ::com::sun::star;
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ef5e6be5086e..814d7fad91a4 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -941,7 +941,7 @@ void SwTextPaintInfo::DrawTab( const SwLinePortion &rPor ) const
const sal_Unicode cChar = GetTextFrame()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB;
const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER | DRAW_SPECIAL_OPTIONS_ROTATE;
- lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions );
+ lcl_DrawSpecial( *this, rPor, aRect, NON_PRINTING_CHARACTER_COLOR, cChar, nOptions );
}
}
@@ -961,7 +961,7 @@ void SwTextPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
const sal_uInt8 nOptions = 0;
- lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions );
+ lcl_DrawSpecial( *this, rPor, aRect, NON_PRINTING_CHARACTER_COLOR, cChar, nOptions );
}
const_cast<SwLinePortion&>(rPor).Width( nOldWidth );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 7b40379abb9d..40768a132e84 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1753,7 +1753,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
FontLineStyle aPreviousOverline = pTmpFont->GetOverline();
FontStrikeout aPreviousStrikeout = pTmpFont->GetStrikeout();
- pTmpFont->SetColor( Color(NON_PRINTING_CHARACTER_COLOR) );
+ pTmpFont->SetColor( NON_PRINTING_CHARACTER_COLOR );
pTmpFont->SetUnderline(LINESTYLE_NONE);
pTmpFont->SetOverline(LINESTYLE_NONE);
pTmpFont->SetStrikeout(STRIKEOUT_NONE);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 073c0913480b..085e2ea6d75b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4764,7 +4764,7 @@ void SwWW8Shade::SetShade(Color nFore, Color nBack, sal_uInt16 nIndex)
nGreen += aBackColor.GetGreen()* (1000 - nWW8BrushStyle);
nBlue += aBackColor.GetBlue() * (1000 - nWW8BrushStyle);
- aColor = RGB_COLORDATA( nRed/1000, nGreen/1000, nBlue/1000 );
+ aColor = Color( nRed/1000, nGreen/1000, nBlue/1000 );
}
break;
}