aboutsummaryrefslogtreecommitdiff
path: root/office/abiword
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2014-01-30 15:41:21 -0600
committerRobby Workman <rworkman@slackbuilds.org>2014-01-30 17:13:55 -0600
commit3eafd205e5a84c8b5ca7668407fa7ee25b77eca7 (patch)
tree90daa90d27dbb94b1f5e68bd4392ade558e3d093 /office/abiword
parent4d9d1c2a6f1c607ea96d2a101fb8b61f5b149c94 (diff)
office/abiword: Fix a segfault when trying save to pdf
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'office/abiword')
-rw-r--r--office/abiword/abiword.SlackBuild9
-rw-r--r--office/abiword/fix-segfault-on-save-pdf.patch86
2 files changed, 93 insertions, 2 deletions
diff --git a/office/abiword/abiword.SlackBuild b/office/abiword/abiword.SlackBuild
index 5361f3345d0f..692375f06742 100644
--- a/office/abiword/abiword.SlackBuild
+++ b/office/abiword/abiword.SlackBuild
@@ -22,9 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Now maintained by Robby Workman <rworkman@slackbuilds.org>
# Thanks to Tim Goya for all of the hard work in making the 2.8.x releases
-# work correctly on Slackware - the patches are all from him
+# work correctly on Slackware
+# Now maintained by Robby Workman <rworkman@slackbuilds.org>
PRGNAM=abiword
VERSION=3.0.0
@@ -76,6 +76,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix http://bugzilla.abisource.com/show_bug.cgi?id=13586
+# svn co http://svn.abisource.com/abiword/trunk abiword
+# svn diff -r 33659:33662 > fix-segfault-on-save-pdf.patch
+patch -p0 < $CWD/fix-segfault-on-save-pdf.patch
+
CPPFLAGS="-I$TMP/$PRGNAM-$VERSION" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/office/abiword/fix-segfault-on-save-pdf.patch b/office/abiword/fix-segfault-on-save-pdf.patch
new file mode 100644
index 000000000000..95eef0b1894c
--- /dev/null
+++ b/office/abiword/fix-segfault-on-save-pdf.patch
@@ -0,0 +1,86 @@
+Index: src/text/fmt/gtk/fv_UnixSelectionHandles.cpp
+===================================================================
+--- src/text/fmt/gtk/fv_UnixSelectionHandles.cpp (revision 33659)
++++ src/text/fmt/gtk/fv_UnixSelectionHandles.cpp (revision 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();
++ // 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);
++ 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);