[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 25 07:56:15 UTC 2020
sd/source/ui/view/drviews7.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit cf557c0c2e79810dd957ffeb48513e3731ae533c
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Fri Apr 24 10:23:43 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Apr 25 09:55:44 2020 +0200
resolved: page gradient reset on reopening doc
in mobile phone Slide background set to gradient becomes black/white after reopening
Change-Id: Ib579856c3df8b89c74b381f3d79870c467802848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92830
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index cdf81cdfe364..318a36af8856 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1805,9 +1805,15 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
{
const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
- XFillGradientItem aGradient( XGradient::fromJSON(pJSON->GetValue()) );
+ XFillGradientItem aGradientItem( XGradient::fromJSON(pJSON->GetValue()) );
+
+ // MigrateItemSet guarantees unique gradient names
+ SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
+ aMigrateSet.Put( aGradientItem );
+ SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
+
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
- rPageProperties.PutItem( aGradient );
+ rPageProperties.PutItemSet( *pTempSet );
}
else
{
@@ -1818,8 +1824,8 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
- rPageProperties.PutItemSet( *pTempSet );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
+ rPageProperties.PutItemSet( *pTempSet );
}
}
break;
More information about the Libreoffice-commits
mailing list