summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2023-02-05 17:47:34 +0100
committerTomaž Vajngerl <quikee@gmail.com>2023-02-07 07:29:38 +0000
commit4855dbf52bc3f371beef41561d271a9da362171b (patch)
tree29303673d582a089d0a02c7b13ffa7705f534c98 /svx
parent28b55ce5943712ffa17f5e9a35d5945765fc71fe (diff)
lok: form controls: rendering and mouse event forwarding
What we got - Most controls rendered on Writer and Impress (on Calc already implemented by Tomaž Vajngerl) - Text labels rendered correctly - Mouse events forwarded to controls - Control state changed on click for Writer and Calc - Control invalidation for all apps - Fixed broken LOK_CALLBACK_MOUSE_POINTER msg - Correct pointer style when mouse is hovering over a control Need to be improved - in impress click method for a control is not executed even if the mouse event is forwarded correctly - avoid not needed control invalidations (as the one occurring on document autosaving) Change-Id: I4d5012af7f90a2c726b6b6b5b068e2be1ed5568a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146569 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx6
-rw-r--r--svx/source/svdraw/svdpntv.cxx3
2 files changed, 8 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 4f186b4d9072..e22545e00b1f 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -43,6 +43,8 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XContainer.hpp>
+#include <comphelper/lok.hxx>
+
#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
@@ -276,6 +278,10 @@ namespace sdr::contact {
static void adjustControlGeometry_throw( const ControlHolder& _rControl, const tools::Rectangle& _rLogicBoundingRect,
const basegfx::B2DHomMatrix& _rViewTransformation, const ::basegfx::B2DHomMatrix& _rZoomLevelNormalization )
{
+ // In the LOK case, control geometry is handled by LokControlHandler
+ if (comphelper::LibreOfficeKit::isActive())
+ return;
+
OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::adjustControlGeometry_throw: illegal control!" );
if ( !_rControl.is() )
return;
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 310c024c1972..3f080ecc972c 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -631,7 +631,8 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo
{
// draw postprocessing, only for known devices
// it is necessary to always paint FormLayer
- if(bPaintFormLayer)
+ // In the LOK case control rendering is performed through LokControlHandler
+ if(!comphelper::LibreOfficeKit::isActive() && bPaintFormLayer)
{
ImpFormLayerDrawing(rPaintWindow);
}