summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2015-12-22 18:31:19 +1000
committerAndras Timar <andras.timar@collabora.com>2016-01-07 10:35:37 +0000
commit30eaaad63faca5908c4c8e30e0967ee262fd7e3f (patch)
treed6c6bd03d4a24626c11ca376e31a27be3dba3ded /svx
parentab1eed777a2e5fa94fdde1cc8260cf8ad264c145 (diff)
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 <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 3b4059dc53ec764be5423517363223043d6dbfad) Reviewed-on: https://gerrit.libreoffice.org/21104
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx7
3 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 9d3fe0747384..a500958a86b8 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -148,7 +148,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
bInfoChanged=false;
bPagNumsDirty=false;
bMPgNumsDirty=false;
- bPageNotValid=false;
+ bTransportContainer = false;
bSavePortable=false;
bSaveCompressed=false;
bSaveNative=false;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 1e51ae6935fb..6304c471dd5d 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1432,7 +1432,7 @@ const Rectangle& SdrObjCustomShape::GetLogicRect() const
// state of the ResizeShapeToFitText flag to correctly set TextMinFrameWidth/Height
void SdrObjCustomShape::AdaptTextMinSize()
{
- if(!pModel || !pModel->IsPasteResize())
+ if (!pModel || (!pModel->IsCreatingDataObj() && !pModel->IsPasteResize()))
{
const bool bResizeShapeToFitText(static_cast< const SdrOnOffItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue());
SfxItemSet aSet(
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b0b602ad4f3d..3dd1449632a5 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1752,12 +1752,7 @@ OString SdrObject::stringify() const
//append(maBLIPSizeRectangle).
append(mnLayerID);
- SvMemoryStream aStream;
- SfxItemSet aSet(GetMergedItemSet());
- aSet.InvalidateDefaultItems();
- aSet.Store(aStream, true);
- aStream.Flush(); // for correct results from aStream.GetEndOfData()
- aString.append(static_cast<const char *>(aStream.GetBuffer()), aStream.GetEndOfData());
+ aString.append(GetMergedItemSet().stringify());
return aString.makeStringAndClear();
}