From 3b4059dc53ec764be5423517363223043d6dbfad Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 22 Dec 2015 18:31:19 +1000 Subject: tdf#96708: don't modify document while copying to clipboard I.e., don't try to create auto-layout for clipboard pages which don't contain one; don't resize objects to text. Also, don't invalidate items that are equal to defaults, because explicitly set items are not the same as absent items: pasting an object without an item makes the property to inherit new target's default, while when the item is present, the default doesn't apply. Also, don't consider selected state of the page while stringifying - this makes selected page string to differ from not-selected clipboard page. Change-Id: I172e03e1a8c428e5fcae3a116cc9ad8de79f1a87 Reviewed-on: https://gerrit.libreoffice.org/20871 Tested-by: Jenkins Reviewed-by: Andras Timar --- svl/source/items/itemset.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'svl') diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index a4e2c8a33702..2d146e0f8541 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1552,9 +1552,7 @@ sal_Int32 SfxItemSet::getHash() const OString SfxItemSet::stringify() const { SvMemoryStream aStream; - SfxItemSet aSet(*this); - aSet.InvalidateDefaultItems(); - aSet.Store(aStream, true); + Store(aStream, true); aStream.Flush(); return OString( static_cast(aStream.GetData()), aStream.GetEndOfData()); -- cgit