[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sd/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 19 16:48:11 UTC 2019


 sd/source/ui/func/fupage.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit c00775925325b04b3d707df0d494464f864f6fc0
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Nov 12 00:08:25 2019 +0100
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Tue Nov 19 17:47:28 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.Behrens at cib.de>
    (cherry picked from commit 34a3afecaaab3dc4898b33e0981d8b231351fe37)
    Reviewed-on: https://gerrit.libreoffice.org/83185
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index bad262357f47..7c2654e0bba0 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -36,6 +36,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>
@@ -387,6 +388,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
                 }
             }
 
+            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(


More information about the Libreoffice-commits mailing list