diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-16 09:03:03 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-17 06:15:48 +0200 |
commit | 964e2eaae9d32df201574e6f083acc630fed2f1d (patch) | |
tree | a4508d47247bd46ae3c317828e9832de3cf4ed8c /sc/source/ui/app/transobj.cxx | |
parent | 5386e561204af47a7a5eac3e56850478980bbc15 (diff) |
tdf#142635: use the same ScDocument for clipboard and GlobalDrawPersist
This way, the document used for chart copy has the proper sheets, and
the data ranges are created correctly.
This reverts commit 8d98dd8b3896c14af057e90e3a327172a9262e03
Author Mike Kaganski <mike.kaganski@collabora.com>
Date Thu Jun 03 13:15:11 2021 +0200
tdf#142635: skip UITest for now
Change-Id: I0a3aa6028f49ded278f8665556007b1f722e21b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134251
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/ui/app/transobj.cxx')
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index fcc5158e0001..d0be7e0aecc2 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -109,8 +109,8 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument& rDoc, double nPr ScPrintFunc::DrawToDev( rDoc, pDev, nPrintFactor, aBound, &aViewData, false/*bMetaFile*/ ); } -ScTransferObj::ScTransferObj( ScDocumentUniquePtr pClipDoc, const TransferableObjectDescriptor& rDesc ) : - m_pDoc( std::move(pClipDoc ) ), +ScTransferObj::ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, const TransferableObjectDescriptor& rDesc ) : + m_pDoc( pClipDoc ), m_nNonFiltered(0), m_aObjDesc( rDesc ), m_nDragHandleX( 0 ), @@ -813,14 +813,14 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) rDestDoc.UpdateChartListenerCollection(); } -SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle ) +SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle, const std::shared_ptr<ScDocument>& pDoc ) { // update ScGlobal::xDrawClipDocShellRef ScGlobal::xDrawClipDocShellRef.clear(); if (bAnyOle) { - ScGlobal::xDrawClipDocShellRef = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS); // there must be a ref + ScGlobal::xDrawClipDocShellRef = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS, pDoc); // there must be a ref ScGlobal::xDrawClipDocShellRef->DoInitNew(); } |