[Libreoffice-commits] core.git: svx/source
Caolán McNamara
caolanm at redhat.com
Mon Nov 7 15:33:07 UTC 2016
svx/source/svdraw/svdpage.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit fc64c335be26ebd4828973168fd69265c6285872
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 7 13:18:03 2016 +0000
ensure checkForUniqueItem on inserting a new slide
On copying slides from another presentation into one, we end up
with two XBitmapItems with the same name and different properties.
because the names are supposed to be unique, only one gets exported
so the presentation looses graphics on export
there is a bunch of places which use checkForUniqueItem to block
this from happening, add another at the point where we insert
the new page into the model
Change-Id: If708b1997c7e83e4787d9d54f84c8b0516e6cf6b
Reviewed-on: https://gerrit.libreoffice.org/30664
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 3bb3fe9..147a4ba 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1483,7 +1483,14 @@ void SdrPage::SetModel(SdrModel* pNewModel)
if(!IsMasterPage())
{
- pNew->PutItemSet(getSdrPageProperties().GetItemSet());
+ const SfxItemSet& rOldSet = getSdrPageProperties().GetItemSet();
+ SfxItemSet* pNewSet = rOldSet.Clone(false, &pNewModel->GetItemPool());
+ //ensure checkForUniqueItem is called so new pages which have e.g.
+ //XFillBitmapItem set, do not conflict with an existing XFillBitmapItem
+ //with the same name but different properties
+ SdrModel::MigrateItemSet(&rOldSet, pNewSet, pNewModel);
+ pNew->PutItemSet(*pNewSet);
+ delete pNewSet;
}
pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet());
More information about the Libreoffice-commits
mailing list