diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-11-10 19:03:14 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-11-19 10:25:49 +0100 |
commit | 53c474633c4e658f096669fb0225d751a5701aaf (patch) | |
tree | 3aa7a7c4a8b884a04d5cb3a3d7a232cfb9b14fce /cui | |
parent | 34a3afecaaab3dc4898b33e0981d8b231351fe37 (diff) |
tdf#125449 Fix custom gradient fill settings being lost
Change-Id: Ia2377274e0fc9da5873bf55735af25ed6ae3d65c
Reviewed-on: https://gerrit.libreoffice.org/82393
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index f8affa0f044e..170d63fb96be 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -186,11 +186,11 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) { pXGradient.reset(new XGradient( m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetGradient() )); aString = m_xGradientLB->GetItemText( m_xGradientLB->GetSelectedItemId() ); + rSet->Put( XFillGradientItem( aString, *pXGradient ) ); } else // gradient was passed (unidentified) { - aString = "gradient"; pXGradient.reset(new XGradient( m_xLbColorFrom->GetSelectEntryColor(), m_xLbColorTo->GetSelectEntryColor(), static_cast<css::awt::GradientStyle>(m_xLbGradientType->get_active()), @@ -201,6 +201,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) static_cast<sal_uInt16>(m_xMtrColorFrom->get_value(FieldUnit::NONE)), static_cast<sal_uInt16>(m_xMtrColorTo->get_value(FieldUnit::NONE)), static_cast<sal_uInt16>(m_xMtrIncrement->get_value()) )); + rSet->Put( XFillGradientItem( OUString(), *pXGradient ) ); } sal_uInt16 nValue = 0; @@ -209,7 +210,6 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) assert( pXGradient && "XGradient could not be created" ); rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); - rSet->Put( XFillGradientItem( aString, *pXGradient ) ); rSet->Put( XGradientStepCountItem( nValue ) ); return true; } |