sc/source/ui/view/viewfun4.cxx |    3 ++-
 sc/source/ui/view/viewfun5.cxx |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit b0f0096fbbccc212931501c5c879b65f9b0d7477
Author: Varun Dhall <varun.dh...@studentpartner.com>
Date:   Wed Jun 7 01:06:46 2017 +0530

    EditEngine: Added ODF_TEXT_FLAT paste for sc
    
    Change-Id: I40acd32229faa9a4ec9941592a4a952b7d05ef01
    Reviewed-on: https://gerrit.libreoffice.org/38464
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index f5c7db96bf7e..49631800c989 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -79,7 +79,8 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
                                 const css::uno::Reference< 
css::datatransfer::XTransferable >& rxTransferable )
 {
     TransferableDataHelper aDataHelper( rxTransferable );
-    if ( aDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE ) )
+    if ( aDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE ) ||
+            aDataHelper.HasFormat( 
SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT ) )
     {
         HideAllCursors();
 
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index a4c955d16478..75f1c2d99830 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -282,9 +282,11 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
     {
         bRet = PasteLink( rxTransferable );
     }
-    else if ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == 
SotClipboardFormatId::RTF )
+    else if ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == 
SotClipboardFormatId::RTF ||
+                nFormatId == SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT )
     {
-        if ( nFormatId == SotClipboardFormatId::RTF && aDataHelper.HasFormat( 
SotClipboardFormatId::EDITENGINE ) )
+        if ( nFormatId == SotClipboardFormatId::RTF && ( 
aDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE ) ||
+                aDataHelper.HasFormat( 
SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT ) ) )
         {
             //  use EditView's PasteSpecial / Drop
             PasteRTF( nPosX, nPosY, rxTransferable );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to