diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-11-23 08:11:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-11-23 09:07:42 +0100 |
commit | ed662bcc20804e8b8d5946904f1b577a825f09de (patch) | |
tree | d6726268de898b476ba2345819d83b37085a9800 /editeng/source/items | |
parent | cea0b1f894bfd29af5a4f9392d4fb45db9a1a938 (diff) |
PPTX import: implement native handling of a color's luminance modulation
This was already handled in oox/ at import-time: this adds it to the doc
model, including UNO API and PPTX import.
This is a dependency PPTX export and UI.
Change-Id: I5d875b53d715beb10c13ef616d06cf958d43f70f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125684
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/textitem.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 02f8d6a9be4e..73ce5c3fd1f1 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1357,7 +1357,8 @@ SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : SfxPoolItem(nId), mColor( COL_BLACK ), maThemeIndex(-1), - maTintShade(0) + maTintShade(0), + mnLumMod(10000) { } @@ -1365,7 +1366,8 @@ SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : SfxPoolItem( nId ), mColor( rCol ), maThemeIndex(-1), - maTintShade(0) + maTintShade(0), + mnLumMod(10000) { } @@ -1380,7 +1382,8 @@ bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const return mColor == rColorItem.mColor && maThemeIndex == rColorItem.maThemeIndex && - maTintShade == rColorItem.maTintShade; + maTintShade == rColorItem.maTintShade && + mnLumMod == rColorItem.mnLumMod; } bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const @@ -1409,6 +1412,11 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= maTintShade; break; } + case MID_COLOR_LUM_MOD: + { + rVal <<= mnLumMod; + break; + } default: { rVal <<= mColor; @@ -1455,6 +1463,14 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) maTintShade = nTintShade; } break; + case MID_COLOR_LUM_MOD: + { + sal_Int16 nLumMod = -1; + if (!(rVal >>= nLumMod)) + return false; + mnLumMod = nLumMod; + } + break; default: { return rVal >>= mColor; |