summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-04-08 14:38:25 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-04-08 14:38:25 -0300
commit6347d39f4ae78abd057b996070f13aadb02f0348 (patch)
tree277899a40117daeb85387a7536be76df00ce6c2e
parent6532410ff0da36079cfd62057d0b8e0afa021bee (diff)
downloadabslibre-6347d39f4ae78abd057b996070f13aadb02f0348.tar.gz
abslibre-6347d39f4ae78abd057b996070f13aadb02f0348.tar.bz2
abslibre-6347d39f4ae78abd057b996070f13aadb02f0348.zip
abiword-libre-3.0.0-2: fix saving pdf documents; FS#39652 => https://bugs.archlinux.org/task/39652
-rw-r--r--libre/abiword-libre/PKGBUILD9
-rw-r--r--libre/abiword-libre/fix_crash_saving_pdf.patch86
2 files changed, 93 insertions, 2 deletions
diff --git a/libre/abiword-libre/PKGBUILD b/libre/abiword-libre/PKGBUILD
index 301ffd497..0139961e0 100644
--- a/libre/abiword-libre/PKGBUILD
+++ b/libre/abiword-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 203024 2014-01-01 19:07:24Z andyrtr $
+# $Id: PKGBUILD 209913 2014-04-08 14:24:40Z andyrtr $
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Maël Lavault <moimael@neuf.fr>
# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
@@ -7,7 +7,7 @@ _pkgbase=abiword
pkgbase=abiword-libre
pkgname=('abiword-libre' 'abiword-libre-plugins')
pkgver=3.0.0
-pkgrel=1.1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url='http://www.abisource.com'
@@ -17,8 +17,10 @@ makedepends=('pkgconfig' 'asio' 'boost' 'fribidi' 'goffice' 'libwmf' 'wv'
'redland' 'libical')
options=('!makeflags')
source=(http://abisource.com/downloads/$_pkgbase/$pkgver/source/$_pkgbase-$pkgver.tar.gz
+ fix_crash_saving_pdf.patch
liberation-fonts.patch)
md5sums=('8d9c41cff3a8fbef8d0c835c65600e65'
+ 'c3336f5ac7d227ff755c7e42459f20e1'
'e7ef4d436469ae4b24b0f784b09ab023')
prepare() {
@@ -48,6 +50,9 @@ build() {
#./../../../backends/tcp/xp/Session.h:34:63: error: expected class-name before ',' token
# class Session : public Synchronizer, public boost::noncopyable, public boost::enable_shared_from_this<Session>
+ # fix FS#39652 - http://bugzilla.abisource.com/show_bug.cgi?id=13586#c2
+ patch -Np2 -i ${srcdir}/fix_crash_saving_pdf.patch
+
./configure --prefix=/usr \
--enable-shared \
--disable-static \
diff --git a/libre/abiword-libre/fix_crash_saving_pdf.patch b/libre/abiword-libre/fix_crash_saving_pdf.patch
new file mode 100644
index 000000000..6dd78c7f9
--- /dev/null
+++ b/libre/abiword-libre/fix_crash_saving_pdf.patch
@@ -0,0 +1,86 @@
+--- abiword/trunk/src/text/fmt/gtk/fv_UnixSelectionHandles.cpp 2013/12/23 03:20:34 33661
++++ abiword/trunk/src/text/fmt/gtk/fv_UnixSelectionHandles.cpp 2013/12/28 02:04:39 33662
+@@ -36,42 +36,60 @@
+
+ mode = _fv_text_handle_get_mode (handle);
+
+- if (pos == FV_TEXT_HANDLE_POSITION_SELECTION_START)
++ if (pos == FV_TEXT_HANDLE_POSITION_SELECTION_START) {
+ handles->updateSelectionStart ((UT_sint32)x, (UT_sint32)y);
++ }
+ else {
+- if (mode == FV_TEXT_HANDLE_MODE_SELECTION)
++ if (mode == FV_TEXT_HANDLE_MODE_SELECTION) {
+ handles->updateSelectionEnd ((UT_sint32)x, (UT_sint32)y);
+- else
++ }
++ else {
+ handles->updateCursor((UT_sint32)x, (UT_sint32)y);
++ }
+ }
+ }
+
+ FV_UnixSelectionHandles::FV_UnixSelectionHandles(FV_View *view, FV_Selection selection)
+ : FV_SelectionHandles (view, selection)
++ , m_text_handle(NULL)
+ {
+ XAP_Frame * pFrame = static_cast<XAP_Frame*>(m_pView->getParentData());
+- XAP_UnixFrameImpl * pFrameImpl =static_cast<XAP_UnixFrameImpl *>( pFrame->getFrameImpl());
+- GtkWidget * pWidget = pFrameImpl->getViewWidget();
+-
+- m_text_handle = _fv_text_handle_new (pWidget);
+- _fv_text_handle_set_relative_to (m_text_handle,
+- gtk_widget_get_window (pWidget));
+- g_signal_connect (m_text_handle, "handle-dragged",
+- G_CALLBACK(handle_dragged_cb), this);
++ // When saving to PDF (and printing) we don't have a frame
++ // See bug 13586
++ if (pFrame) {
++ XAP_UnixFrameImpl * pFrameImpl = static_cast<XAP_UnixFrameImpl *>(pFrame->getFrameImpl());
++ GtkWidget * pWidget = pFrameImpl->getViewWidget();
++
++ m_text_handle = _fv_text_handle_new (pWidget);
++ _fv_text_handle_set_relative_to (m_text_handle,
++ gtk_widget_get_window (pWidget));
++ g_signal_connect (m_text_handle, "handle-dragged",
++ G_CALLBACK(handle_dragged_cb), this);
++ }
+ }
+
+ FV_UnixSelectionHandles::~FV_UnixSelectionHandles()
+ {
++ if(!m_text_handle) {
++ return;
++ }
+ g_object_unref (m_text_handle);
+ }
+
+ void FV_UnixSelectionHandles::hide()
+ {
++ if(!m_text_handle) {
++ return;
++ }
+ _fv_text_handle_set_mode (m_text_handle, FV_TEXT_HANDLE_MODE_NONE);
+ }
+
+ void FV_UnixSelectionHandles::setCursorCoords(UT_sint32 x, UT_sint32 y, UT_uint32 height, bool visible)
+ {
++ if(!m_text_handle) {
++ return;
++ }
++
+ GdkRectangle rect;
+
+ _fv_text_handle_set_mode(m_text_handle, FV_TEXT_HANDLE_MODE_CURSOR);
+@@ -92,6 +110,10 @@
+ void FV_UnixSelectionHandles::setSelectionCoords(UT_sint32 start_x, UT_sint32 start_y, UT_uint32 start_height, bool start_visible,
+ UT_sint32 end_x, UT_sint32 end_y, UT_uint32 end_height, bool end_visible)
+ {
++ if(!m_text_handle) {
++ return;
++ }
++
+ GdkRectangle rect;
+
+ _fv_text_handle_set_mode(m_text_handle, FV_TEXT_HANDLE_MODE_SELECTION);
+