[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 13 08:00:48 UTC 2021


 sw/source/uibase/dochdl/swdtflvr.cxx |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 2012d5b90b64cb3a28862267dafb162c2f85d832
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 12 11:12:47 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 13 10:00:16 2021 +0200

    tdf#143257 like graphics defer creating transfer data for drawings until needed
    
    don't create when a drawing is selected, wait until its actually dropped
    into something (I experimented with dropping into gimp)
    
    Change-Id: I3edaf79537d5723565adf8c45d6f7408026a93e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118770
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index ff7ee5e872a3..f4f56326faf6 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -487,7 +487,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
         const bool bPending(m_pWrtShell->ActionPend());
 
         // SEL_GRF is from ContentType of editsh
-        if(bPending || ((SelectionType::Graphic | SelectionType::DbForm) & nSelectionType))
+        if(bPending || ((SelectionType::Graphic | SelectionType::DrawObject | SelectionType::DbForm) & nSelectionType))
         {
             m_pClpGraphic.reset(new Graphic);
             if( !m_pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *m_pClpGraphic ))
@@ -3605,13 +3605,6 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
             }
             m_eBufferType = TransferBufferType::Graphic | m_eBufferType;
 
-            m_pClpGraphic.reset(new Graphic);
-            if( !m_pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *m_pClpGraphic ))
-                m_pOrigGraphic = m_pClpGraphic.get();
-            m_pClpBitmap.reset(new Graphic);
-            if( !m_pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::BITMAP, *m_pClpBitmap ))
-                m_pOrigGraphic = m_pClpBitmap.get();
-
             // is it a URL-Button ?
             OUString sURL;
             OUString sDesc;


More information about the Libreoffice-commits mailing list