summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-02-07 12:08:21 +0530
committerJan Holesovsky <kendy@collabora.com>2020-02-10 12:51:39 +0100
commitc7178a12e6e57e3d85cecd09e9c0373ececbb33f (patch)
tree3007344c9b8d04d7c205cba324fa11cdb4f622b2 /sw
parent4a885a4da2e7baaa8c1827a1483b76894d3c0967 (diff)
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 <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx3
1 files changed, 3 insertions, 0 deletions
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;
}