diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-10 10:55:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 09:38:03 +0100 |
commit | b02216b16dc305f594aeae5f80637a0044cb126f (patch) | |
tree | 79fae663a0d08bbb37c766d56888ce4d728a098a /libreofficekit | |
parent | b2355ed71d1cacff6a27749f66d1fe973105186f (diff) |
lokdocview: return early in lcl_signalMotion()
Change-Id: Ibf9d62c52edeaad4aada7960820e1bb8fa6c2c63
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c index 0862c8a4f15a..636c87280efa 100644 --- a/libreofficekit/source/gtk/lokdocview.c +++ b/libreofficekit/source/gtk/lokdocview.c @@ -70,6 +70,7 @@ void lcl_getDragPoint(GdkRectangle* pHandle, GdkEventButton* pEvent, GdkPoint* p gboolean lcl_signalMotion(GtkWidget* pEventBox, GdkEventButton* pEvent, LOKDocView* pDocView) { GdkPoint aPoint; + int i; (void)pEventBox; if (pDocView->m_bInDragMiddleHandle) @@ -79,31 +80,32 @@ gboolean lcl_signalMotion(GtkWidget* pEventBox, GdkEventButton* pEvent, LOKDocVi pDocView->pDocument->pClass->setTextSelection( pDocView->pDocument, LOK_SETTEXTSELECTION_RESET, pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom); + return FALSE; } - else if (pDocView->m_bInDragStartHandle) + if (pDocView->m_bInDragStartHandle) { g_info("lcl_signalMotion: dragging the start handle"); lcl_getDragPoint(&pDocView->m_aHandleStartRect, pEvent, &aPoint); pDocView->pDocument->pClass->setTextSelection( pDocView->pDocument, LOK_SETTEXTSELECTION_START, pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom); + return FALSE; } - else if (pDocView->m_bInDragEndHandle) + if (pDocView->m_bInDragEndHandle) { g_info("lcl_signalMotion: dragging the end handle"); lcl_getDragPoint(&pDocView->m_aHandleEndRect, pEvent, &aPoint); pDocView->pDocument->pClass->setTextSelection( pDocView->pDocument, LOK_SETTEXTSELECTION_END, pixelToTwip(aPoint.x) / pDocView->fZoom, pixelToTwip(aPoint.y) / pDocView->fZoom); + return FALSE; } - else + for (i = 0; i < GRAPHIC_HANDLE_COUNT; ++i) { - int i; - - for (i = 0; i < GRAPHIC_HANDLE_COUNT; ++i) + if (pDocView->m_bInDragGraphicHandles[i]) { - if (pDocView->m_bInDragGraphicHandles[i]) - g_info("lcl_signalButton: dragging the graphic handle #%d", i); + g_info("lcl_signalButton: dragging the graphic handle #%d", i); + return FALSE; } } return FALSE; |