sw/source/uibase/dochdl/swdtflvr.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c7178a12e6e57e3d85cecd09e9c0373ececbb33f
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Fri Feb 7 12:08:21 2020 +0530
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Mon Feb 10 12:51:39 2020 +0100

    Classify shape(s) selections as 'complex'...
    
    in isComplex() of XTransferable2 implementation SwTransferable.
    This method is used by online via doc_getSelectionType() to determine the
    type of selection. In writer this method used to classify shape objects as
    non-complex which translates to 'text' in online, so if a shape is selected
    in online, the js code there would treat it as text. This is problematic
    when you want to send the correct align uno commands based on selection 
type.
    So returning true in isComplex() for writer would correctly treat the shape
    selections as 'complex' in online Writer.
    
    Change-Id: I09fcd9e4fab48aa0d7e7d04c88bae9e1281a1b0c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88158
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index ea12ee91601a..b9cce5ee9579 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -415,6 +415,9 @@ sal_Bool SAL_CALL SwTransferable::isComplex()
         }
     }
 
+    if (m_pWrtShell->GetSelectionType() == SelectionType::DrawObject)
+        return true; // Complex
+
     // Simple
     return false;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to