[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 18 09:31:03 UTC 2020
sd/source/ui/func/fupage.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 6b161f615712f6daa11f66d0dfe45eef0877c860
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Sat Dec 5 19:48:36 2020 +0300
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Dec 18 10:30:30 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 <xiscofauli at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 0c37e164dbbff89ecac843e1b182fdbce70cda34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107898
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(
More information about the Libreoffice-commits
mailing list