sd/source/ui/func/fupage.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 0c37e164dbbff89ecac843e1b182fdbce70cda34 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Dec 5 19:48:36 2020 +0300 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Thu Dec 17 18:41:51 2020 +0100 tdf#137729 sd UI: unique hatch names in slide/page area dlg A custom hatch on a page background was not getting a name, so it was exported referring to an empty string, which was implemented as using the first available hatch. Ensuring that a name exists causes the hatch to be exported in the styles, and thus can be referred to in content.xml All praise goes to Katarina since this just copies her similar fix for grandients in tdf#125449. Too bad it took me a whole day to find that. Unfortunately, Katarina didn't provide any unit tests for me to copycat as well. Change-Id: If2be0830b521946fb1b88b247319a7e6c2c61c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107258 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 3779feec3f82..6d44b70d5a9d 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -37,6 +37,7 @@ #include <svx/xflbstit.hxx> #include <svx/xflbmtit.hxx> #include <svx/xflgrit.hxx> +#include <svx/xflhtit.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lrspitem.hxx> #include <svx/sdr/properties/properties.hxx> @@ -394,6 +395,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc); } + const XFillHatchItem* pTempHatchItem = pTempSet->GetItem<XFillHatchItem>(XATTR_FILLHATCH); + if (pTempHatchItem && pTempHatchItem->GetName().isEmpty()) + { + // MigrateItemSet guarantees unique hatch names + SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLHATCH, XATTR_FILLHATCH>{} ); + aMigrateSet.Put( XFillHatchItem("hatch", pTempHatchItem->GetHatchValue()) ); + 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