diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-18 10:02:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-18 11:44:00 +0100 |
commit | 1e9255303db01786f403253a1487cee0af56525d (patch) | |
tree | 346f00391833e538b00dd015aa8db5d8a57c1a64 /starmath | |
parent | fea7b531a4c9e8326a644cccc26325b16585675a (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/token.hxx | 13 |
1 files changed, 8 insertions, 5 deletions
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<sal_uInt32>(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<sal_uInt32>(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<sal_uInt32>(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<sal_uInt32>(aTokenTableEntry->cColor), 16); eType = aTokenTableEntry->eType; cMathChar = MS_NULLCHAR; nGroup = TG::Color; @@ -305,7 +308,7 @@ struct SmToken void operator=(const std::unique_ptr<SmColorTokenTableEntry>& aTokenTableEntry) { - aText = OUString::number(aTokenTableEntry->cColor.mValue, 16); + aText = OUString::number(static_cast<sal_uInt32>(aTokenTableEntry->cColor), 16); eType = aTokenTableEntry->eType; cMathChar = MS_NULLCHAR; nGroup = TG::Color; |