diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-11-24 08:22:47 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-11-24 09:33:30 +0100 |
commit | a557a1c4ac0b73668452f80169870bdfb204aeb6 (patch) | |
tree | 5e7b2b4aa3a9d531b6bbbdff17643878f37f6707 /editeng | |
parent | ecfce0ff23d9f1ed5a51b29b14a7043dce87b300 (diff) |
PPTX import: implement native handling of a color's luminance offset
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, and also the last transform
which is easy to generate from the PowerPoint UI and we didn't import to
the doc model.
Change-Id: Ica4e738d8dc8e0409160ceab941a82f2475ddc68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125749
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-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 73ce5c3fd1f1..32c269480c5a 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1358,7 +1358,8 @@ SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : mColor( COL_BLACK ), maThemeIndex(-1), maTintShade(0), - mnLumMod(10000) + mnLumMod(10000), + mnLumOff(0) { } @@ -1367,7 +1368,8 @@ SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : mColor( rCol ), maThemeIndex(-1), maTintShade(0), - mnLumMod(10000) + mnLumMod(10000), + mnLumOff(0) { } @@ -1383,7 +1385,8 @@ bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const return mColor == rColorItem.mColor && maThemeIndex == rColorItem.maThemeIndex && maTintShade == rColorItem.maTintShade && - mnLumMod == rColorItem.mnLumMod; + mnLumMod == rColorItem.mnLumMod && + mnLumOff == rColorItem.mnLumOff; } bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const @@ -1417,6 +1420,11 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= mnLumMod; break; } + case MID_COLOR_LUM_OFF: + { + rVal <<= mnLumOff; + break; + } default: { rVal <<= mColor; @@ -1471,6 +1479,14 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) mnLumMod = nLumMod; } break; + case MID_COLOR_LUM_OFF: + { + sal_Int16 nLumOff = -1; + if (!(rVal >>= nLumOff)) + return false; + mnLumOff = nLumOff; + } + break; default: { return rVal >>= mColor; |