sd/source/ui/func/fupage.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 308249b43f8d62967f7bfa974f3e4f3f6182a010 Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Tue Nov 12 00:08:25 2019 +0100 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Wed Nov 20 23:46:06 2019 +0100 tdf#125449 follow-up: unique gradient names in Impress area dlg as seen in tdf#94300 chart prefers to name anonymous (non-preset) gradients all by itself However tdf#99908 shows that ODF import doesn't like anonymous gradients. This is a bug in xmloff style import and should eventually be fixed there. Here we implement the same band-aid solution tdf#99908 implements for Impress sidebar Change-Id: Ia39f581aee875ac95faa5c502a3479ed5d7974d8 Reviewed-on: https://gerrit.libreoffice.org/82522 Tested-by: Jenkins Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> (cherry picked from commit 34a3afecaaab3dc4898b33e0981d8b231351fe37) Reviewed-on: https://gerrit.libreoffice.org/83185 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> (cherry picked from commit c00775925325b04b3d707df0d494464f864f6fc0) Reviewed-on: https://gerrit.libreoffice.org/83286 diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index ba77b29c54ef..b5d73efa4367 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -33,6 +33,7 @@ #include <svx/xbtmpit.hxx> #include <svx/xflbstit.hxx> #include <svx/xflbmtit.hxx> +#include <svx/xflgrit.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lrspitem.hxx> #include <svx/sdr/properties/properties.hxx> @@ -347,6 +348,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent) ( aMergedAttr.GetItem<XFillStyleItem>( XATTR_FILLSTYLE )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; + const XFillGradientItem* pTempGradItem = pTempSet->GetItem<XFillGradientItem>(XATTR_FILLGRADIENT); + if (pTempGradItem && pTempGradItem->GetName().isEmpty()) + { + // MigrateItemSet guarantees unique gradient names + SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} ); + aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) ); + SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc); + } + if( !mbMasterPage && bChanges && mbPageBckgrdDeleted ) { mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits