diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-15 14:49:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-16 10:07:07 +0100 |
commit | 63a68064bb33f180b8a231f7524d99405d910226 (patch) | |
tree | 7ecf05b057c5ca4d80a48af045998a4b34484561 /sw/source/uibase/config/modcfg.cxx | |
parent | d534a4c7b45ff254b339e806c6a11f13d9ff0043 (diff) |
make the Color constructors explicitly specify transparency
to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.
i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)
Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/config/modcfg.cxx')
-rw-r--r-- | sw/source/uibase/config/modcfg.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } } |