summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKira Tubo <kira.tubo@gmail.com>2023-12-07 21:59:48 -0800
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-12-21 06:43:54 +0100
commit8555c3180c367d684af48b7ecb7ceb333fcd0962 (patch)
treeba0683a3b143d4536043b2b039e70aef480f3572 /sw
parent324a12413f28ca506487f677d68b840529130aef (diff)
tdf#141908: replace hex colors with color keywords
Update hex colors 0x000000, 0xFFFFFF, and 0xFF0000 with COL_BLACK, COL_WHITE, and COL_LIGHTRED, respectively. See comment #30 for more details. Change-Id: I82ff851d8c19f9ef4aeeb01bff313160da615222 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160452 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/theme/ThemeTest.cxx10
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx4
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/qa/core/theme/ThemeTest.cxx b/sw/qa/core/theme/ThemeTest.cxx
index 4be895dd3f06..1c2f00e33c65 100644
--- a/sw/qa/core/theme/ThemeTest.cxx
+++ b/sw/qa/core/theme/ThemeTest.cxx
@@ -320,7 +320,7 @@ void checkEffects(std::vector<model::EffectStyle> const& rEffectStyleList)
CPPUNIT_ASSERT_EQUAL(false, rEffect.mbRotateWithShape);
CPPUNIT_ASSERT_EQUAL(model::ColorType::RGB, rEffect.maColor.getType());
- CPPUNIT_ASSERT_EQUAL(Color(0x000000), rEffect.maColor.getRGB());
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, rEffect.maColor.getRGB());
CPPUNIT_ASSERT_EQUAL(size_t(1), rEffect.maColor.getTransformations().size());
CPPUNIT_ASSERT_EQUAL(model::TransformationType::Alpha,
@@ -351,9 +351,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsDOCX)
CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(model::ThemeColorType::Accent4));
CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(model::ThemeColorType::Accent5));
CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(model::ThemeColorType::Accent6));
- CPPUNIT_ASSERT_EQUAL(Color(0x000000), pTheme->GetColor(model::ThemeColorType::Dark1));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, pTheme->GetColor(model::ThemeColorType::Dark1));
CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(model::ThemeColorType::Dark2));
- CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), pTheme->GetColor(model::ThemeColorType::Light1));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pTheme->GetColor(model::ThemeColorType::Light1));
CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(model::ThemeColorType::Light2));
model::FontScheme const& rFontScheme = pTheme->getFontScheme();
@@ -397,9 +397,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsODT)
CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(model::ThemeColorType::Accent4));
CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(model::ThemeColorType::Accent5));
CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(model::ThemeColorType::Accent6));
- CPPUNIT_ASSERT_EQUAL(Color(0x000000), pTheme->GetColor(model::ThemeColorType::Dark1));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, pTheme->GetColor(model::ThemeColorType::Dark1));
CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(model::ThemeColorType::Dark2));
- CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), pTheme->GetColor(model::ThemeColorType::Light1));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pTheme->GetColor(model::ThemeColorType::Light1));
CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(model::ThemeColorType::Light2));
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 3d516a004218..11bd8ab39484 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1780,7 +1780,7 @@ CPPUNIT_TEST_FIXTURE(Test, test158044Tdf)
auto fillStyle = getProperty<drawing::FillStyle>(xPara, "FillStyle");
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, fillStyle);
- CPPUNIT_ASSERT_EQUAL(Color(0xffffff), fillColor);
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, fillColor);
}
{
@@ -1805,7 +1805,7 @@ CPPUNIT_TEST_FIXTURE(Test, test158044Tdf)
CPPUNIT_ASSERT_LESS(sal_Int32(2), tabStops.getLength());
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, fillStyle);
- CPPUNIT_ASSERT_EQUAL(Color(0xff0000), fillColor);
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, fillColor);
}
{