[Libreoffice-commits] core.git: libreofficekit/Module_libreofficekit.mk libreofficekit/Package_selectionhandles.mk libreofficekit/source

Pranav Kant pranavk at libreoffice.org
Tue Jan 19 09:05:38 PST 2016


 libreofficekit/Module_libreofficekit.mk    |    1 +
 libreofficekit/Package_selectionhandles.mk |   19 +++++++++++++++++++
 libreofficekit/source/gtk/lokdocview.cxx   |   12 ++++++------
 3 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit 11a3449429c5853c5feedce6ac3f8f3829d1bbf9
Author: Pranav Kant <pranavk at libreoffice.org>
Date:   Tue Jan 19 18:34:56 2016 +0530

    lokdocview: Package and install selection handles
    
    Now since, LOKDocView has started to get clients, we need to ship
    all of its dependencies with the widget.
    
    Reviewed on:
    	https://gerrit.libreoffice.org/21605
    
    Change-Id: I874eb416587a80b7760c5f00183d6004dfca4cce

diff --git a/libreofficekit/Module_libreofficekit.mk b/libreofficekit/Module_libreofficekit.mk
index 70cf40b..cc842b2 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,libreofficekit,\
     Library_libreofficekitgtk \
     Executable_gtktiledviewer \
     Executable_tilebench \
+    Package_selectionhandles \
 ))
 endif # ($(ENABLE_GTK3),)
 
diff --git a/libreofficekit/Package_selectionhandles.mk b/libreofficekit/Package_selectionhandles.mk
new file mode 100644
index 0000000..5d87805
--- /dev/null
+++ b/libreofficekit/Package_selectionhandles.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,libreofficekit_selectionhandles,$(SRCDIR)/android/source/res/drawable))
+
+$(eval $(call gb_Package_add_files,libreofficekit_selectionhandles,$(LIBO_SHARE_FOLDER)/libreofficekit,\
+	handle_image_start.png \
+	handle_image_middle.png \
+	handle_image_end.png \
+	handle_graphic.png \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index bca54bd..f70b15f 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -34,8 +34,8 @@
 #define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
 #endif
 
-// Cursor bitmaps from the Android app.
-#define CURSOR_HANDLE_DIR "/android/source/res/drawable/"
+// Cursor bitmaps from the installation set.
+#define CURSOR_HANDLE_DIR "/../share/libreofficekit/"
 // Number of handles around a graphic selection.
 #define GRAPHIC_HANDLE_COUNT 8
 // Maximum Zoom allowed
@@ -1311,7 +1311,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
     if (priv->m_bEdit && priv->m_bCursorVisible && !isEmptyRectangle(priv->m_aVisibleCursor) && priv->m_aTextSelectionRectangles.empty())
     {
         // Have a cursor, but no selection: we need the middle handle.
-        gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
+        gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
         if (!priv->m_pHandleMiddle)
         {
             priv->m_pHandleMiddle = cairo_image_surface_create_from_png(handleMiddlePath);
@@ -1339,7 +1339,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
         if (!isEmptyRectangle(priv->m_aTextSelectionStart))
         {
             // Have a start position: we need a start handle.
-            gchar* handleStartPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
+            gchar* handleStartPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
             if (!priv->m_pHandleStart)
             {
                 priv->m_pHandleStart = cairo_image_surface_create_from_png(handleStartPath);
@@ -1351,7 +1351,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
         if (!isEmptyRectangle(priv->m_aTextSelectionEnd))
         {
             // Have a start position: we need an end handle.
-            gchar* handleEndPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
+            gchar* handleEndPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
             if (!priv->m_pHandleEnd)
             {
                 priv->m_pHandleEnd = cairo_image_surface_create_from_png(handleEndPath);
@@ -1364,7 +1364,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 
     if (!isEmptyRectangle(priv->m_aGraphicSelection))
     {
-        gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_graphic.png", nullptr);
+        gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_graphic.png", nullptr);
         if (!priv->m_pGraphicHandle)
         {
             priv->m_pGraphicHandle = cairo_image_surface_create_from_png(handleGraphicPath);


More information about the Libreoffice-commits mailing list