From 2fb0948fdd166d0cb4ef83a601fafbfe2cf5c9f9 Mon Sep 17 00:00:00 2001 From: kwm Date: Thu, 26 Mar 2009 13:34:58 +0000 Subject: Update to 2.6.8. Add upstream patch to fix a issue where abiword wouldn't detect older ms word mail merge fields. [1] Requested by: Michael Camden [1] Obtained from: Abiword SVN [1] --- editors/abiword/Makefile | 5 +- editors/abiword/distinfo | 6 +- .../patch-src_af_xap_unix_xap_UnixTableWidget.cpp | 12 ++-- .../files/patch-src_wp_xp_ie-imp-MsWord-97.cpp | 78 ++++++++++++++++++++++ editors/abiword/pkg-plist | 2 - 5 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 editors/abiword/files/patch-src_wp_xp_ie-imp-MsWord-97.cpp (limited to 'editors/abiword') diff --git a/editors/abiword/Makefile b/editors/abiword/Makefile index fb3d0ee2f8fc..6c9d5bf7b74c 100644 --- a/editors/abiword/Makefile +++ b/editors/abiword/Makefile @@ -7,8 +7,7 @@ # PORTNAME= abiword -PORTVERSION= 2.6.3 -PORTREVISION= 2 +PORTVERSION= 2.6.8 CATEGORIES= editors MASTER_SITES= http://www.abisource.com/downloads/%SUBDIR%/${PORTVERSION}/source/ MASTER_SITE_SUBDIR= abiword @@ -79,7 +78,7 @@ pre-everything:: @${ECHO_MSG} "" @${ECHO_MSG} "AbiWord2 has the following tunable option(s):" @${ECHO_MSG} " WITH_DEBUG=yes Enable debug." - @${ECHO_MSG} " WITH_GUCHARMAP=yes Enable use of Gucharmap as the symbol insertion tool (default: auto)" +# @${ECHO_MSG} " WITH_GUCHARMAP=yes Enable use of Gucharmap as the symbol insertion tool (default: auto)" @${ECHO_MSG} " WITHOUT_GTKSPELL=yes Don't use Enchant, but still enable spellchecking and install the dictionary." @${ECHO_MSG} "" diff --git a/editors/abiword/distinfo b/editors/abiword/distinfo index 99be7876669a..bd08a2ad98d3 100644 --- a/editors/abiword/distinfo +++ b/editors/abiword/distinfo @@ -1,3 +1,3 @@ -MD5 (AbiWord/abiword-2.6.3.tar.gz) = 40d9da8b04c70035b89f8ad7fcc4519d -SHA256 (AbiWord/abiword-2.6.3.tar.gz) = e5ffecc423e2a9214cb4abd9dbd086552a0d45387b7bc2072738f5e2a8dd90ec -SIZE (AbiWord/abiword-2.6.3.tar.gz) = 9265456 +MD5 (AbiWord/abiword-2.6.8.tar.gz) = fab04d8ef999c303f720197adf261310 +SHA256 (AbiWord/abiword-2.6.8.tar.gz) = b6656a0da13d94b334f02637c89d8fe13aa54752040ad1b8f14f668d8cb96e93 +SIZE (AbiWord/abiword-2.6.8.tar.gz) = 9516443 diff --git a/editors/abiword/files/patch-src_af_xap_unix_xap_UnixTableWidget.cpp b/editors/abiword/files/patch-src_af_xap_unix_xap_UnixTableWidget.cpp index 352357fb5df8..40d60607f904 100644 --- a/editors/abiword/files/patch-src_af_xap_unix_xap_UnixTableWidget.cpp +++ b/editors/abiword/files/patch-src_af_xap_unix_xap_UnixTableWidget.cpp @@ -1,13 +1,13 @@ ---- abiword/trunk/src/af/xap/unix/xap_UnixTableWidget.cpp 2007/03/04 23:35:03 20016 -+++ src/af/xap/unix/xap_UnixTableWidget.cpp 2007/09/21 04:03:45 21991 -@@ -123,7 +123,9 @@ +--- src/af/xap/unix/xap_UnixTableWidget.cpp.orig 2008-08-13 00:22:24.000000000 +0200 ++++ src/af/xap/unix/xap_UnixTableWidget.cpp 2009-03-10 19:42:33.000000000 +0100 +@@ -123,7 +123,9 @@ abi_table_resize(AbiTable* table) g_return_if_fail(table); if (table->selected_rows == 0 && table->selected_cols == 0) -- text = g_strdup_printf(table->szCancel); +- text = g_strdup(table->szCancel); + // RIVERA changed as suggested by uwog (OSX X11 was crashing) -+ //text = g_strdup_printf(table->szCancel); -+ text = (table->szCancel ? g_strdup_printf(table->szCancel) : NULL); ++ //text = g_strdup(table->szCancel); ++ text = (table->szCancel ? g_strdup(table->szCancel) : NULL); else { UT_UTF8String prText = "%d x %d "; diff --git a/editors/abiword/files/patch-src_wp_xp_ie-imp-MsWord-97.cpp b/editors/abiword/files/patch-src_wp_xp_ie-imp-MsWord-97.cpp new file mode 100644 index 000000000000..1d7a5fec4441 --- /dev/null +++ b/editors/abiword/files/patch-src_wp_xp_ie-imp-MsWord-97.cpp @@ -0,0 +1,78 @@ +--- src/wp/impexp/xp/ie_imp_MsWord_97.cpp.orig 2008-04-18 23:12:21.000000000 +0200 ++++ src/wp/impexp/xp/ie_imp_MsWord_97.cpp 2009-03-25 10:50:53.000000000 +0100 +@@ -354,6 +354,7 @@ typedef enum { + F_TOC_FROM_RANGE, + F_DATEINAME, + F_SPEICHERDAT, ++ F_MERGEFIELD, + F_OTHER + } Doc_Field_t; + +@@ -399,7 +400,7 @@ static Doc_Field_Mapping_t s_Tokens[] = + {"NUMCHARS", F_NUMCHARS}, + {"NUMPAGES", F_NUMPAGES}, + {"NUMWORDS", F_NUMWORDS}, +- ++ {"MERGEFIELD", F_MERGEFIELD}, + // these below aren't handled by AbiWord, but they're known about + {"HYPERLINK", F_HYPERLINK}, + {"PAGEREF", F_PAGEREF}, +@@ -3336,7 +3337,7 @@ int IE_Imp_MsWord_97::_beginChar (wvPars + // inserting a symbol char ... + iFontType = ps->fonts.ffn[achp->ftcSym].chs; + } +- else if(ps->fonts.ffn) ++ else if(ps->fonts.ffn && (achp->ftcAscii < ps->fonts.nostrings)) + { + iFontType = ps->fonts.ffn[achp->ftcAscii].chs; + } +@@ -3637,6 +3638,49 @@ bool IE_Imp_MsWord_97::_handleFieldEnd ( + tokenIndex = s_mapNameToField (token); + switch (tokenIndex) + { ++ case F_MERGEFIELD: ++ { ++ const gchar* atts[5]; ++ atts[0] = "type"; ++ atts[1] = "mail_merge"; ++ atts[2] = "param"; ++ atts[3] = 0; ++ atts[4] = 0; ++ ++ token = strtok (NULL, "\"\" "); ++ ++ UT_return_val_if_fail(f->argument[f->fieldI - 1] == 0x15, false); ++ ++ f->argument[f->fieldI - 1] = 0; ++ UT_UCS2Char * a = f->argument; ++ ++ UT_UTF8String param; ++ ++ if(*a == 0x14) ++ { ++ a++; ++ } ++ ++ while(*a) ++ { ++ if (!((171 == *a) || (187 == *a))) { ++ // @argument looks like <>. ++ // strip off the '<<' (171) and '>>' (187) ++ param.appendUCS2(a, 1); ++ } ++ ++ a++; ++ } ++ ++ atts[3] = param.utf8_str(); ++ ++ if (!_appendObject (PTO_Field, static_cast(&atts[0]))) ++ { ++ UT_DEBUGMSG(("Dom: couldn't append field (type = '%s')\n", atts[1])); ++ } ++ } ++ break; ++ + case F_HYPERLINK: + { + token = strtok (NULL, "\"\" "); diff --git a/editors/abiword/pkg-plist b/editors/abiword/pkg-plist index 2ea865f5523f..c6a8e8338225 100644 --- a/editors/abiword/pkg-plist +++ b/editors/abiword/pkg-plist @@ -39,7 +39,6 @@ share/abiword-%%ABIVERSION%%/glade/xap_UnixDlg_WindowMore.glade share/abiword-%%ABIVERSION%%/glade/xap_UnixDlg_Zoom.glade share/abiword-%%ABIVERSION%%/readme.abw share/abiword-%%ABIVERSION%%/readme.txt -share/abiword-%%ABIVERSION%%/scripts/abw2html.pl share/abiword-%%ABIVERSION%%/strings/am-ET.strings share/abiword-%%ABIVERSION%%/strings/ar.strings share/abiword-%%ABIVERSION%%/strings/ast-ES.strings @@ -248,7 +247,6 @@ share/pixmaps/abiword_48.png @dirrmtry share/applications @dirrm share/abiword-%%ABIVERSION%%/templates @dirrm share/abiword-%%ABIVERSION%%/strings -@dirrm share/abiword-%%ABIVERSION%%/scripts @dirrm share/abiword-%%ABIVERSION%%/glade @dirrm share/abiword-%%ABIVERSION%% @exec /bin/mkdir -p %D/lib/abiword-%%ABIVERSION%%/plugins -- cgit