From 1e9255303db01786f403253a1487cee0af56525d Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 18 Jan 2021 10:02:20 +0200 Subject: make internals of ::Color private was made public in commit d487d6e082bc7ce652217578ffd37397a59cc3ca rework Color to have R,G,B,A public variables but it's best to keep them private since we're changing the internal representation - and there is surprisingly little that depends on accessing the internals anyhow. Change-Id: I234d80fb33105f7bf5b865fb7c8194d893b09878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109508 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/inc/token.hxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'starmath') diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx index cb485a531ac8..374e23876a9f 100644 --- a/starmath/inc/token.hxx +++ b/starmath/inc/token.hxx @@ -209,7 +209,10 @@ struct SmColorTokenTableEntry return colorname.compareToIgnoreAsciiCaseAscii(pIdent) == 0; } - bool operator==(sal_uInt32 colorcode) const { return colorcode == cColor.mValue; } + bool operator==(sal_uInt32 colorcode) const + { + return colorcode == static_cast(cColor); + } bool operator==(Color colorcode) const { return colorcode == cColor; } @@ -218,7 +221,7 @@ struct SmColorTokenTableEntry return colorname.compareToIgnoreAsciiCaseAscii(pIdent) == 0; } - bool equals(sal_uInt32 colorcode) const { return colorcode == cColor.mValue; } + bool equals(sal_uInt32 colorcode) const { return colorcode == static_cast(cColor); } bool equals(Color colorcode) const { return colorcode == cColor; } }; @@ -283,7 +286,7 @@ struct SmToken void operator=(const SmColorTokenTableEntry& aTokenTableEntry) { - aText = OUString::number(aTokenTableEntry.cColor.mValue, 16); + aText = OUString::number(static_cast(aTokenTableEntry.cColor), 16); eType = aTokenTableEntry.eType; cMathChar = MS_NULLCHAR; nGroup = TG::Color; @@ -294,7 +297,7 @@ struct SmToken void operator=(const SmColorTokenTableEntry* aTokenTableEntry) { - aText = OUString::number(aTokenTableEntry->cColor.mValue, 16); + aText = OUString::number(static_cast(aTokenTableEntry->cColor), 16); eType = aTokenTableEntry->eType; cMathChar = MS_NULLCHAR; nGroup = TG::Color; @@ -305,7 +308,7 @@ struct SmToken void operator=(const std::unique_ptr& aTokenTableEntry) { - aText = OUString::number(aTokenTableEntry->cColor.mValue, 16); + aText = OUString::number(static_cast(aTokenTableEntry->cColor), 16); eType = aTokenTableEntry->eType; cMathChar = MS_NULLCHAR; nGroup = TG::Color; -- cgit