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
This commit is contained in:
committed by
Miklos Vajna
parent
2737a187a6
commit
11a3449429
@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,libreofficekit,\
|
|||||||
Library_libreofficekitgtk \
|
Library_libreofficekitgtk \
|
||||||
Executable_gtktiledviewer \
|
Executable_gtktiledviewer \
|
||||||
Executable_tilebench \
|
Executable_tilebench \
|
||||||
|
Package_selectionhandles \
|
||||||
))
|
))
|
||||||
endif # ($(ENABLE_GTK3),)
|
endif # ($(ENABLE_GTK3),)
|
||||||
|
|
||||||
|
19
libreofficekit/Package_selectionhandles.mk
Normal file
19
libreofficekit/Package_selectionhandles.mk
Normal file
@@ -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:
|
@@ -34,8 +34,8 @@
|
|||||||
#define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
|
#define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Cursor bitmaps from the Android app.
|
// Cursor bitmaps from the installation set.
|
||||||
#define CURSOR_HANDLE_DIR "/android/source/res/drawable/"
|
#define CURSOR_HANDLE_DIR "/../share/libreofficekit/"
|
||||||
// Number of handles around a graphic selection.
|
// Number of handles around a graphic selection.
|
||||||
#define GRAPHIC_HANDLE_COUNT 8
|
#define GRAPHIC_HANDLE_COUNT 8
|
||||||
// Maximum Zoom allowed
|
// 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())
|
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.
|
// 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)
|
if (!priv->m_pHandleMiddle)
|
||||||
{
|
{
|
||||||
priv->m_pHandleMiddle = cairo_image_surface_create_from_png(handleMiddlePath);
|
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))
|
if (!isEmptyRectangle(priv->m_aTextSelectionStart))
|
||||||
{
|
{
|
||||||
// Have a start position: we need a start handle.
|
// 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)
|
if (!priv->m_pHandleStart)
|
||||||
{
|
{
|
||||||
priv->m_pHandleStart = cairo_image_surface_create_from_png(handleStartPath);
|
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))
|
if (!isEmptyRectangle(priv->m_aTextSelectionEnd))
|
||||||
{
|
{
|
||||||
// Have a start position: we need an end handle.
|
// 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)
|
if (!priv->m_pHandleEnd)
|
||||||
{
|
{
|
||||||
priv->m_pHandleEnd = cairo_image_surface_create_from_png(handleEndPath);
|
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))
|
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)
|
if (!priv->m_pGraphicHandle)
|
||||||
{
|
{
|
||||||
priv->m_pGraphicHandle = cairo_image_surface_create_from_png(handleGraphicPath);
|
priv->m_pGraphicHandle = cairo_image_surface_create_from_png(handleGraphicPath);
|
||||||
|
Reference in New Issue
Block a user