summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx20
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport2.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx2
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx4
-rw-r--r--sw/qa/extras/rtfexport/rtfexport2.cxx6
-rw-r--r--sw/qa/extras/rtfexport/rtfexport4.cxx2
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx6
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx16
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx8
-rw-r--r--sw/source/core/access/acccell.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx10
-rw-r--r--sw/source/core/access/acctable.cxx2
-rw-r--r--sw/source/core/inc/wrong.hxx8
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/html/htmlforw.cxx4
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx6
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx18
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx5
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/config/modcfg.cxx8
-rw-r--r--sw/source/uibase/shells/basesh.cxx2
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx2
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx2
30 files changed, 81 insertions, 80 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 8569a93b29cd..936c7d03d348 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -51,9 +51,9 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx")
{
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
- CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, Color(getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, Color(ColorTransparency, getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(2), "FillStyle"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(getParagraph(2), "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(getParagraph(2), "ParaBackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAuto, "tdf90906_colAuto.docx")
@@ -65,7 +65,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAuto, "tdf90906_colAuto.docx")
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(getRun(xPara, 1, "Nazwa"), "CharBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(getRun(xPara, 1, "Nazwa"), "CharBackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
@@ -75,23 +75,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
- CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, Color(getProperty<sal_uInt32>(xCell, "BackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, Color(ColorTransparency, getProperty<sal_uInt32>(xCell, "BackColor")));
xCell.set(xTable->getCellByName("A2"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xCell, "BackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xCell, "BackColor")));
xCell.set(xTable->getCellByName("B1"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xCell, "BackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xCell, "BackColor")));
xCell.set(xTable->getCellByName("B2"));
- CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, Color(getProperty<sal_uInt32>(xCell, "BackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, Color(ColorTransparency, getProperty<sal_uInt32>(xCell, "BackColor")));
uno::Reference<text::XTextRange> xText(getParagraph(2, "Paragraphs too"));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xText, "ParaBackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf92524_autoColor, "tdf92524_autoColor.doc")
{
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf116436_rowFill, "tdf116436_rowFill.odt")
@@ -1323,7 +1323,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123189_tableBackground, "table-black_fill.docx")
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
- CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, Color(getProperty<sal_uInt32>(xCell, "BackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, Color(ColorTransparency, getProperty<sal_uInt32>(xCell, "BackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf116084, "tdf116084.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index 857f27ee636d..aa1378398992 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -1077,7 +1077,7 @@ DECLARE_OOXMLEXPORT_TEST(testParaShadow, "para-shadow.docx")
{
// The problem was that in w:pBdr, child elements had a w:shadow attribute, but that was ignored.
table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getParagraph(2), "ParaShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
// w:sz="48" is in eights of a point, 1 pt is 20 twips.
CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(24/8*20)), aShadow.ShadowWidth);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index a7cca71375f3..5d973cc0551e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -133,7 +133,7 @@ DECLARE_OOXMLEXPORT_TEST(testCharacterBorder, "charborder.odt")
width: any -> border width */
{
const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xRun, "CharShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
}
@@ -143,7 +143,7 @@ DECLARE_OOXMLEXPORT_TEST(testCharacterBorder, "charborder.odt")
{
uno::Reference<beans::XPropertySet> xMiddleRun(getRun(getParagraph(2),2), uno::UNO_QUERY);
const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xMiddleRun, "CharShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 3a099e4a5df9..f11b7d8ae140 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -1012,7 +1012,7 @@ DECLARE_OOXMLEXPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
{
// The problem was that in w:pgBorders, child elements had a w:shadow attribute, but that was ignored.
table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
// w:sz="48" is in eights of a point, 1 pt is 20 twips.
CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(48/8*20)), aShadow.ShadowWidth);
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 9cd64eebf6f6..737821f73286 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -690,7 +690,7 @@ DECLARE_RTFEXPORT_TEST(testParaShadow, "para-shadow.rtf")
// The problem was that \brdrsh was ignored.
table::ShadowFormat aShadow
= getProperty<table::ShadowFormat>(getParagraph(2), "ParaShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(60)), aShadow.ShadowWidth);
}
@@ -733,7 +733,7 @@ DECLARE_RTFEXPORT_TEST(testCharacterBorder, "charborder.odt")
{
const table::ShadowFormat aShadow
= getProperty<table::ShadowFormat>(xRun, "CharShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
}
diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx
index 62154c0eaaca..d34e8cb5a969 100644
--- a/sw/qa/extras/rtfexport/rtfexport2.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport2.cxx
@@ -922,7 +922,8 @@ DECLARE_RTFEXPORT_TEST(testDoDhgtOld, "do-dhgt-old.rtf")
xShape.set(getShape(2), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(xShape, "ZOrder"));
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(getProperty<sal_uInt32>(xShape, "FillColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK,
+ Color(ColorTransparency, getProperty<sal_uInt32>(xShape, "FillColor")));
xShape.set(getShape(3), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(xShape, "ZOrder"));
@@ -935,7 +936,8 @@ DECLARE_RTFEXPORT_TEST(testFdo61909, "fdo61909.rtf")
// Was the Writer default font.
CPPUNIT_ASSERT_EQUAL(OUString("Courier New"),
getProperty<OUString>(xTextRange, "CharFontName"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xTextRange, "CharBackColor")));
+ CPPUNIT_ASSERT_EQUAL(
+ COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xTextRange, "CharBackColor")));
}
DECLARE_RTFEXPORT_TEST(testFdo62288, "fdo62288.rtf")
diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx
index 55eb4a2b8c48..cf9a25e40d7c 100644
--- a/sw/qa/extras/rtfexport/rtfexport4.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport4.cxx
@@ -275,7 +275,7 @@ DECLARE_RTFEXPORT_TEST(testTdf129631_lostBorders, "tdf129631_lostBorders.rtf")
CPPUNIT_ASSERT(sal_uInt32(0) != aBorderLine.LineWidth);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"The border style has normal black borders", COL_BLACK,
- Color(getProperty<table::BorderLine>(xStyleProps, "RightBorder").Color));
+ Color(ColorTransparency, getProperty<table::BorderLine>(xStyleProps, "RightBorder").Color));
aBorderLine = getProperty<table::BorderLine2>(getParagraph(2), "RightBorder");
CPPUNIT_ASSERT(sal_uInt32(0) != aBorderLine.LineWidth);
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 3857cd895422..333b26b5230e 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -892,7 +892,7 @@ DECLARE_WW8EXPORT_TEST(testFdo45724, "fdo45724.odt")
// The text and background color of the control shape was not correct.
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
uno::Reference<form::validation::XValidatableFormComponent> xComponent(xControlShape->getControl(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(getProperty<sal_uInt32>(xComponent, "BackgroundColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, getProperty<sal_uInt32>(xComponent, "BackgroundColor")));
CPPUNIT_ASSERT_EQUAL(OUString("xxx"), xComponent->getCurrentValue().get<OUString>());
}
@@ -1015,7 +1015,7 @@ DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt")
width: any -> border width */
{
const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xRun, "CharShadowFormat");
- CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
}
@@ -1556,7 +1556,7 @@ DECLARE_WW8EXPORT_TEST(testTdf99474, "tdf99474.odt")
uno::Reference<beans::XPropertySet> xStyle(
getStyles("CharacterStyles")->getByName(charStyleName),
uno::UNO_QUERY);
- Color charColor(getProperty<util::Color>(xStyle, "CharColor"));
+ Color charColor(ColorTransparency, getProperty<util::Color>(xStyle, "CharColor"));
CPPUNIT_ASSERT_EQUAL(sal_uInt32(COL_AUTO), sal_uInt32(charColor));
}
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 5bb4d752cd41..b8e2117d4d6e 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -361,10 +361,10 @@ DECLARE_WW8EXPORT_TEST(testTdf134948, "tdf134948.odt")
DECLARE_WW8EXPORT_TEST(testTdf132726, "tdf132726.odt")
{
uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1, "What sentence has a yellow background? ");
- CPPUNIT_ASSERT_EQUAL( COL_AUTO, Color(getProperty<sal_uInt32>(xRun, "CharBackColor")) );
+ CPPUNIT_ASSERT_EQUAL( COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xRun, "CharBackColor")) );
xRun = getRun(getParagraph(1), 2, "Why, this sentence of course");
- CPPUNIT_ASSERT_EQUAL( COL_YELLOW, Color(getProperty<sal_uInt32>(xRun, "CharBackColor")) );
+ CPPUNIT_ASSERT_EQUAL( COL_YELLOW, Color(ColorTransparency, getProperty<sal_uInt32>(xRun, "CharBackColor")) );
}
DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.odt")
@@ -409,18 +409,18 @@ DECLARE_WW8EXPORT_TEST(testTdf133453_realFontSize, "tdf133453_realFontSize.doc")
DECLARE_WW8EXPORT_TEST(testTdf116194, "tdf116194.doc")
{
- CPPUNIT_ASSERT_EQUAL( Color(192,0,0), Color(getProperty<sal_uInt32>(getRun(getParagraph(1), 1), "CharColor")) );
+ CPPUNIT_ASSERT_EQUAL( Color(192,0,0), Color(ColorTransparency, getProperty<sal_uInt32>(getRun(getParagraph(1), 1), "CharColor")) );
}
DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.docx")
{
uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Numbering - First level"),
uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(Color(184,204,228), Color(getProperty<sal_uInt32>(xStyle, "ParaBackColor")));//R:184 G:204 B:228
+ CPPUNIT_ASSERT_EQUAL(Color(184,204,228), Color(ColorTransparency, getProperty<sal_uInt32>(xStyle, "ParaBackColor")));//R:184 G:204 B:228
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
uno::Reference<text::XTextRange> xText(getParagraph(12));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xText, "ParaBackColor")));
CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
}
@@ -428,7 +428,7 @@ DECLARE_WW8EXPORT_TEST(testTdf128608_fillStyleNoneB, "tdf128608_fillStyleNoneB.o
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xText(getParagraph(1));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xText, "ParaBackColor")));
CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
}
@@ -463,7 +463,7 @@ DECLARE_WW8EXPORT_TEST(testTdf123433_fillStyleStop, "tdf123433_fillStyleStop.doc
{
uno::Reference<text::XTextRange> xText(getParagraph(12));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xText, "ParaBackColor")));
}
DECLARE_WW8EXPORT_TEST(testTdf127862_pageFillStyle, "tdf127862_pageFillStyle.odt")
@@ -484,7 +484,7 @@ DECLARE_WW8EXPORT_TEST(testTdf128608_tableParaBackColor, "tdf128608_tableParaBac
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
// ParaBackColor doesn't seem to be used in this case, but keep it here to make sure it stays as AUTO.
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xPara, "ParaBackColor")));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, getProperty<sal_uInt32>(xPara, "ParaBackColor")));
// No paragraph background colour/fill. (The cell background colour should be used.)
CPPUNIT_ASSERT_EQUAL_MESSAGE("No fillstyle", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xPara, "FillStyle"));
}
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index b8dc54b69ccf..82589ef9f715 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -343,7 +343,7 @@ private:
uno::Reference<text::XTextContent> const& xParagraph,
const SwTextNode* pTextNode)
{
- sal_Int32 nParaBackColor(COL_AUTO);
+ Color nParaBackColor(COL_AUTO);
uno::Reference<beans::XPropertySet> xParagraphProperties(xParagraph, uno::UNO_QUERY);
if (!(xParagraphProperties->getPropertyValue("ParaBackColor") >>= nParaBackColor))
{
@@ -362,7 +362,7 @@ private:
SAL_WARN("sw.a11y", "CharColor void");
return;
}
- Color aForegroundColor(nCharColor);
+ Color aForegroundColor(ColorTransparency, nCharColor);
if (aForegroundColor == COL_AUTO)
return;
@@ -381,7 +381,7 @@ private:
aPageBackground = rXFillColorItem->GetColorValue();
}
- sal_Int32 nCharBackColor(COL_AUTO);
+ Color nCharBackColor(COL_AUTO);
if (!(xProperties->getPropertyValue("CharBackColor") >>= nCharBackColor))
{
@@ -394,7 +394,7 @@ private:
// If not character background color, try paragraph background color
if (aBackgroundColor == COL_AUTO)
- aBackgroundColor = Color(nParaBackColor);
+ aBackgroundColor = nParaBackColor;
// If not paragraph background color, try page color
if (aBackgroundColor == COL_AUTO)
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 9d2aa207cfc8..206dd51b5784 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -419,7 +419,7 @@ sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
uno::Reference<XAccessibleComponent> xComponentDoc(xAccDoc, uno::UNO_QUERY);
if (xComponentDoc.is())
{
- crBack = Color(xComponentDoc->getBackground());
+ crBack = Color(ColorTransparency, xComponentDoc->getBackground());
}
}
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 29bd4be8a1e0..05cd3f4e2bc4 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1917,7 +1917,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
uno::Any &anyChar = rValue.Value;
sal_uInt32 crBack = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
- if (COL_AUTO == Color(crBack))
+ if (COL_AUTO == Color(ColorTransparency, crBack))
{
uno::Reference<XAccessibleComponent> xComponent(this);
if (xComponent.is())
@@ -1937,12 +1937,12 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
uno::Any &anyChar = rValue.Value;
sal_uInt32 crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
- if( COL_AUTO == Color(crChar) )
+ if( COL_AUTO == Color(ColorTransparency, crChar) )
{
uno::Reference<XAccessibleComponent> xComponent(this);
if (xComponent.is())
{
- Color cr(xComponent->getBackground());
+ Color cr(ColorTransparency, xComponent->getBackground());
crChar = sal_uInt32(cr.IsDark() ? COL_WHITE : COL_BLACK);
rValue.Value <<= crChar;
}
@@ -1993,12 +1993,12 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
uno::Any &anyChar = rValue.Value;
sal_uInt32 crUnderline = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
- if ( COL_AUTO == Color(crUnderline) )
+ if ( COL_AUTO == Color(ColorTransparency, crUnderline) )
{
uno::Reference<XAccessibleComponent> xComponent(this);
if (xComponent.is())
{
- Color cr(xComponent->getBackground());
+ Color cr(ColorTransparency, xComponent->getBackground());
crUnderline = sal_uInt32(cr.IsDark() ? COL_WHITE : COL_BLACK);
rValue.Value <<= crUnderline;
}
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index c9de6594f484..679b23fc9d37 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1496,7 +1496,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getBackground()
uno::Reference<XAccessibleComponent> xComponentDoc(xAccDoc,uno::UNO_QUERY);
if (xComponentDoc.is())
{
- crBack = Color(xComponentDoc->getBackground());
+ crBack = Color(ColorTransparency, xComponentDoc->getBackground());
}
}
}
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index ac1e2a4db165..dcd8503ef6aa 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -94,11 +94,11 @@ private:
if (xPropertyBag.is())
{
css::uno::Any aLineColor = xPropertyBag->getValue("LineColor");
- css::util::Color lineColor = 0;
+ ::Color lineColor;
if (aLineColor >>= lineColor)
{
- return Color( lineColor );
+ return lineColor;
}
}
}
@@ -160,11 +160,11 @@ private:
if (xPropertyBag.is())
{
css::uno::Any aLineColor = xPropertyBag->getValue("LineColor");
- css::util::Color lineColor = 0;
+ ::Color lineColor;
if (aLineColor >>= lineColor)
{
- return Color( lineColor );
+ return lineColor;
}
}
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index ebddb8ebab27..0ec7d5cd6362 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2257,10 +2257,10 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
case MID_GRID_COLOR:
{
- sal_Int32 nTmp = 0;
+ Color nTmp;
bRet = (rVal >>= nTmp);
if( bRet )
- SetColor( Color(nTmp) );
+ SetColor( nTmp );
}
break;
case MID_GRID_LINES:
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 90f8894bc08a..132a43a55a62 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -171,7 +171,7 @@ namespace
static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
{
- rSvxLine.SetColor(Color(rLine.Color));
+ rSvxLine.SetColor(Color(ColorTransparency, rLine.Color));
rSvxLine.GuessLinesWidths( SvxBorderLineStyle::NONE,
convertMm100ToTwip( rLine.OuterLineWidth ),
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 2e99b3d770b2..91262fac3763 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1049,7 +1049,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue( "BackgroundColor" );
if( auto n = o3tl::tryAccess<sal_Int32>(aTmp) )
{
- Color aCol(*n);
+ Color aCol(ColorTransparency, *n);
aItemSet.Put( SvxBrushItem( aCol, RES_CHRATR_BACKGROUND ) );
}
}
@@ -1058,7 +1058,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue( "TextColor" );
if( auto n = o3tl::tryAccess<sal_Int32>(aTmp) )
{
- Color aColor( *n );
+ Color aColor( ColorTransparency, *n );
aItemSet.Put( SvxColorItem( aColor, RES_CHRATR_COLOR ) );
}
}
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 6a699d6c0674..6c16d3c139ef 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -193,7 +193,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
bool bTable )
{
- if( Color(0xffffffff) == m_nBorderColor )
+ if( Color(ColorTransparency, 0xffffffff) == m_nBorderColor )
{
if( !pBorderLine->GetColor().IsRGBEqual( COL_GRAY ) )
m_nBorderColor = pBorderLine->GetColor();
@@ -730,7 +730,7 @@ void SwWriteTable::FillTableRowsCols( tools::Long nStartRPos, sal_uInt16 nStartR
SwWriteTable::SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, tools::Long nWidth,
sal_uInt32 nBWidth, bool bRel, sal_uInt16 nMaxDepth, sal_uInt16 nLSub, sal_uInt16 nRSub, sal_uInt32 nNumOfRowsToRepeat)
- : m_pTable(pTable), m_nBorderColor(sal_uInt32(-1)), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
+ : m_pTable(pTable), m_nBorderColor(ColorTransparency, sal_uInt32(-1)), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
m_nInnerBorder(0), m_nBaseWidth(nBWidth), m_nHeadEndRow(USHRT_MAX),
m_nLeftSub(nLSub), m_nRightSub(nRSub), m_nTabWidth(nWidth), m_bRelWidths(bRel),
m_bUseLayoutHeights(true),
@@ -763,7 +763,7 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, to
}
SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayoutInfo)
- : m_pTable(pTable), m_nBorderColor(sal_uInt32(-1)), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
+ : m_pTable(pTable), m_nBorderColor(ColorTransparency, sal_uInt32(-1)), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
m_nInnerBorder(0), m_nBaseWidth(pLayoutInfo->GetWidthOption()), m_nHeadEndRow(0),
m_nLeftSub(0), m_nRightSub(0), m_nTabWidth(pLayoutInfo->GetWidthOption()),
m_bRelWidths(pLayoutInfo->HasPercentWidthOption()), m_bUseLayoutHeights(false),
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 29da55150a6a..991f6335539b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3355,7 +3355,7 @@ static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementT
// no need to write them.
if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
pBorderLine->GetBorderLineStyle() == static_cast<SvxBorderLineStyle>(rStyleProps->LineStyle) &&
- pBorderLine->GetColor() == Color(rStyleProps->Color) &&
+ pBorderLine->GetColor() == Color(ColorTransparency, rStyleProps->Color) &&
pBorderLine->GetWidth() == convertMm100ToTwip( rStyleProps->LineWidth ) )
return;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index b79641c5372a..aedca139434b 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -524,8 +524,8 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
{
WW8_BRCVer9 aBrc90 = WW8Export::TranslateBorderLine( *pLn,
pBox->GetDistance( i ), bShadow );
- sal_uInt8 ico = msfilter::util::TransColToIco(msfilter::util::BGRToRGB(
- aBrc90.cv()));
+ sal_uInt8 ico = msfilter::util::TransColToIco(Color(ColorTransparency, msfilter::util::BGRToRGB(
+ aBrc90.cv())));
aBrc = WW8_BRC(aBrc90.dptLineWidth(), aBrc90.brcType(), ico,
aBrc90.dptSpace(), aBrc90.fShadow(), aBrc90.fFrame());
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e6501dc34ca3..2d5ae8d3a31a 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4408,7 +4408,7 @@ void WW8Export::Out_BorderLine(ww::bytes& rO, const SvxBorderLine* pLine,
if( pLine && pLine->GetBorderLineStyle() != SvxBorderLineStyle::NONE )
{
aBrcVer9 = TranslateBorderLine( *pLine, nDist, bShadow );
- sal_uInt8 ico = msfilter::util::TransColToIco( msfilter::util::BGRToRGB(aBrcVer9.cv()) );
+ sal_uInt8 ico = msfilter::util::TransColToIco( Color(ColorTransparency, msfilter::util::BGRToRGB(aBrcVer9.cv())) );
aBrcVer8 = WW8_BRC( aBrcVer9.dptLineWidth(), aBrcVer9.brcType(), ico,
aBrcVer9.dptSpace(), aBrcVer9.fShadow(), aBrcVer9.fFrame() );
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 762ea0c81869..e717e797a2a9 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1458,7 +1458,7 @@ static void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
aLine.SetWidth(fConverted);
//No AUTO for borders as yet, so if AUTO, use BLACK
- Color col = (cv==0xff000000) ? COL_BLACK : msfilter::util::BGRToRGB(cv);
+ Color col = (cv==0xff000000) ? COL_BLACK : Color(ColorTransparency, msfilter::util::BGRToRGB(cv));
aLine.SetColor(col);
@@ -2631,7 +2631,7 @@ void SwWW8ImplReader::StopApo()
if (nNewWidth)
m_xSFlyPara->BoxUpWidth(nNewWidth);
- Color aBg(0xFE, 0xFF, 0xFF, 0xFF); //Transparent by default
+ Color aBg(ColorTransparency, 0xFE, 0xFF, 0xFF, 0xFF); //Transparent by default
SwTextNode* pNd = aPref.GetNode().GetTextNode();
SwTextNode* pJoinNext = nullptr;
@@ -3600,7 +3600,7 @@ void SwWW8ImplReader::Read_TextForeColor(sal_uInt16, const sal_uInt8* pData, sho
m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- Color aColor(msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)));
+ Color aColor(ColorTransparency, msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)));
// At least when transparency is 0xff and the color is black, Word renders that as black.
if (aColor.IsTransparent() && aColor != COL_AUTO)
@@ -3634,7 +3634,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
{
const SwAttrSet& aSet = m_pCurrentColl->GetAttrSet();
std::unique_ptr<SvxUnderlineItem> pUnderline(aSet.Get(RES_CHRATR_UNDERLINE, false).Clone());
- pUnderline->SetColor( msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)) );
+ pUnderline->SetColor( Color(ColorTransparency, msfilter::util::BGRToRGB(SVBT32ToUInt32(pData))) );
m_pCurrentColl->SetFormatAttr( *pUnderline );
}
}
@@ -3646,7 +3646,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
if (nLen >= 4)
{
std::unique_ptr<SvxUnderlineItem> pUnderline(m_xCurrentItemSet->Get(RES_CHRATR_UNDERLINE, false).Clone());
- pUnderline->SetColor( msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)) );
+ pUnderline->SetColor( Color(ColorTransparency,msfilter::util::BGRToRGB(SVBT32ToUInt32(pData))) );
m_xCurrentItemSet->Put( std::move(pUnderline) );
}
}
@@ -3655,7 +3655,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
{
SvxUnderlineItem* pUnderlineAttr = const_cast<SvxUnderlineItem*>(static_cast<const SvxUnderlineItem*>(m_xCtrlStck->GetOpenStackAttr( *m_pPaM->GetPoint(), RES_CHRATR_UNDERLINE )));
if (pUnderlineAttr && nLen >= 4)
- pUnderlineAttr->SetColor( msfilter::util::BGRToRGB(SVBT32ToUInt32( pData ) ));
+ pUnderlineAttr->SetColor( Color(ColorTransparency, msfilter::util::BGRToRGB(SVBT32ToUInt32( pData ) )));
}
}
}
@@ -4945,15 +4945,15 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
Color SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData, bool bVer67)
{
OSL_ENSURE(!bVer67, "Impossible");
- Color nFore = msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData));
+ Color nFore(ColorTransparency, msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData)));
rpData+=4;
- Color nBack = msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData));
+ Color nBack(ColorTransparency, msfilter::util::BGRToRGB(SVBT32ToUInt32(rpData)));
rpData+=4;
sal_uInt16 nIndex = SVBT16ToUInt16(rpData);
rpData+=2;
//Being a transparent background colour doesn't actually show the page
//background through, it merely acts like white
- if (nBack == Color(0xFF000000))
+ if (nBack == Color(ColorTransparency, 0xFF000000))
nBack = COL_AUTO;
OSL_ENSURE(nBack == COL_AUTO || !nBack.IsTransparent(),
"ww8: don't know what to do with such a transparent bg colour, report");
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 2d0ea2bc046d..bfb29a7af264 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -694,7 +694,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
SvxBrushItem& rBrush = dynamic_cast<SvxBrushItem&>(rItem);
- sal_Int32 nTempColor(0);
+ Color aTempColor;
switch( nMemberId )
{
case MID_BACK_COLOR:
@@ -703,9 +703,8 @@ bool SvXMLImportItemMapper::PutXMLValue(
rBrush.GetColor().SetAlpha(0);
bOk = true;
}
- else if (::sax::Converter::convertColor(nTempColor, rValue))
+ else if (::sax::Converter::convertColor(aTempColor, rValue))
{
- Color aTempColor(nTempColor);
aTempColor.SetAlpha(255);
rBrush.SetColor( aTempColor );
bOk = true;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index fcab21afe6d2..e916c877304d 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1258,7 +1258,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs->GetItemState( SID_WATERMARK_TRANSPARENCY, false, &pItem ) == SfxItemState::SET )
aItem.SetTransparency( static_cast<const SfxInt16Item*>( pItem )->GetValue() );
if ( pArgs->GetItemState( SID_WATERMARK_COLOR, false, &pItem ) == SfxItemState::SET )
- aItem.SetColor( Color(static_cast<const SfxUInt32Item*>( pItem )->GetValue()) );
+ aItem.SetColor( Color(ColorTransparency, static_cast<const SfxUInt32Item*>( pItem )->GetValue()) );
pSh->SetWatermark( aItem );
}
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index 9fc5f70f1d95..f5a9b4a201ad 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -341,13 +341,13 @@ void SwRevisionConfig::Load()
switch (nProp)
{
case 0 : lcl_ConvertCfgToAttr(nVal, m_aInsertAttr); break;
- case 1 : m_aInsertAttr.m_nColor = Color(nVal); break;
+ case 1 : m_aInsertAttr.m_nColor = Color(ColorTransparency, nVal); break;
case 2 : lcl_ConvertCfgToAttr(nVal, m_aDeletedAttr, true); break;
- case 3 : m_aDeletedAttr.m_nColor = Color(nVal); break;
+ case 3 : m_aDeletedAttr.m_nColor = Color(ColorTransparency, nVal); break;
case 4 : lcl_ConvertCfgToAttr(nVal, m_aFormatAttr); break;
- case 5 : m_aFormatAttr.m_nColor = Color(nVal); break;
+ case 5 : m_aFormatAttr.m_nColor = Color(ColorTransparency, nVal); break;
case 6 : m_nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break;
- case 7 : m_aMarkColor = Color(nVal); break;
+ case 7 : m_aMarkColor = Color(ColorTransparency, nVal); break;
}
}
}
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 1523f40c5a84..ed92f2c35ee5 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2381,7 +2381,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
else
{
- Color aColor(sColor.toInt32(16));
+ Color aColor(ColorTransparency, sColor.toInt32(16));
aBrushItem->SetColor(aColor);
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 114b7f33b055..47b4064642e0 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -229,7 +229,7 @@ namespace
if (sColor == "transparent")
aColor = COL_TRANSPARENT;
else
- aColor = Color(sColor.toInt32(16));
+ aColor = Color(ColorTransparency, sColor.toInt32(16));
switch (nSlot)
{
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 6350f2548b2d..7bec3a0f82d4 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -98,7 +98,7 @@ namespace
if (sColor == "transparent")
aColor = COL_TRANSPARENT;
else
- aColor = Color(sColor.toInt32(16));
+ aColor = Color(ColorTransparency, sColor.toInt32(16));
switch (nSlot)
{
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 1344ecacf894..1aae087262d0 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1187,7 +1187,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
{
OUString sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
- aSet = Color(sColor.toInt32(16));
+ aSet = Color(ColorTransparency, sColor.toInt32(16));
bHasItem = true;
}
@@ -1221,7 +1221,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (sColor == "transparent")
aSet = COL_TRANSPARENT;
else
- aSet = Color(sColor.toInt32(16));
+ aSet = Color(ColorTransparency, sColor.toInt32(16));
}
else if (pItem)
aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx
index dfe40700d726..72b313fb7d0d 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -74,7 +74,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, tools::Long nHeight, sal_uInt
pWin->SetMapMode(MapMode(MapUnit::MapPixel));
pWin->SetRasterOp( RasterOp::Xor );
- pWin->SetLineColor( Color( sal_uInt32(aCol) ^ sal_uInt32(COL_WHITE) ) );
+ pWin->SetLineColor( Color( ColorTransparency, sal_uInt32(aCol) ^ sal_uInt32(COL_WHITE) ) );
// 1. The Line:
pWin->DrawLine( Point( rPt.X(), rPt.Y() + 1),