summaryrefslogtreecommitdiff
path: root/libreofficekit/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 20:21:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-22 07:43:22 +0100
commit968b64d054eb164cee9fb92b6bf7dd93f478bf24 (patch)
tree80d92181e4796cf77b37b1faa03a3ccf106aef22 /libreofficekit/source
parent1d21a51d814b39711cb1cc7f925b0c620b42eaa7 (diff)
loplugin:flatten in l10ntools..lotuswordpro
Change-Id: Ie6de142db1987094fdf538148ac5ee33379a3e4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'libreofficekit/source')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx36
1 files changed, 17 insertions, 19 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 2d7852f3781e..45c9cacedff6 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -555,30 +555,28 @@ handleGraphicSelectionOnButtonRelease(LOKDocView* pDocView, GdkEventButton* pEve
}
}
- if (priv->m_bInDragGraphicSelection)
- {
- g_info("LOKDocView_Impl::signalButton: end of drag graphic selection");
- priv->m_bInDragGraphicSelection = false;
+ if (!priv->m_bInDragGraphicSelection)
+ return false;
- GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr);
- LOEvent* pLOEvent = new LOEvent(LOK_SET_GRAPHIC_SELECTION);
- pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_END;
- pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(pEvent->x, priv->m_fZoom);
- pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(pEvent->y, priv->m_fZoom);
- g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
+ g_info("LOKDocView_Impl::signalButton: end of drag graphic selection");
+ priv->m_bInDragGraphicSelection = false;
- g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), &error);
- if (error != nullptr)
- {
- g_warning("Unable to call LOK_SET_GRAPHIC_SELECTION: %s", error->message);
- g_clear_error(&error);
- }
- g_object_unref(task);
+ GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr);
+ LOEvent* pLOEvent = new LOEvent(LOK_SET_GRAPHIC_SELECTION);
+ pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_END;
+ pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(pEvent->x, priv->m_fZoom);
+ pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(pEvent->y, priv->m_fZoom);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
- return true;
+ g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), &error);
+ if (error != nullptr)
+ {
+ g_warning("Unable to call LOK_SET_GRAPHIC_SELECTION: %s", error->message);
+ g_clear_error(&error);
}
+ g_object_unref(task);
- return false;
+ return true;
}
static void