Hi libwpd Developers,

As mentioned in the "open discussion" forum, i made a patch to 
convert a collection of classical philology texts written in
WP 5.1 in combination with "Printer Polyglott" by Mikdo GmbH, Berlin.

I found out that libwpd does a near perfect Job in converting these
files into open office including  all the needed accents, breathings
etc. This allows to reuse and share these texts without media disruption. 

In my patch i did some little corrections (see CHANGES file in the
patch) to make the conversion work 1:1.  in WP 5.1. I only treated
conversion from WP. The patch was tested on opensuse 11.1, where 
i rebuild the package (SPEC file attachted, the only change from
the opensuse SPEC file is the patch and a test only release number)

In pre Windows times WP 5.1 in combination with "Printer Polyglott"
was the first working solution for classical philologists in Germany to
write ancient Greek with all the needed accents, breathings etc. 

There may be more classical philologists wanting to use or share their
classical greep WP text files, this brings me to publish this
patch and to ask for it's inclusion in libwpd.

Johannes Poehlmann



diff -up ./CHANGES.orig ./CHANGES
--- ./CHANGES.orig      2009-11-11 23:24:51.000000000 +0100
+++ ./CHANGES   2009-11-11 23:29:36.000000000 +0100
@@ -1,4 +1,11 @@
 CHANGES:
+0.8.14 - head
+- fix some greek characters so that Text written in WP5.1 with Printer 
Polyglott
+  convert correct.
+  - replace lunate small sigma with small stigma
+  - replate one occurence of capital Sigma by lunate capital sigma
+  - replace one occurence of capital Ypsilon by small eta with tonos
+  - replace variant of small rho by rho with tonos
 0.8.13 - 0.8.14
 - Fix some warnings due to unused variables
 - Fix a warning due to a name hiding.
diff -up ./src/lib/libwpd_internal.cpp.orig ./src/lib/libwpd_internal.cpp
--- ./src/lib/libwpd_internal.cpp.orig  2009-11-11 23:22:25.000000000 +0100
+++ ./src/lib/libwpd_internal.cpp       2009-11-11 23:23:39.000000000 +0100
@@ -737,11 +737,11 @@ static const uint16_t greekWP5[] = {
   0x0394, 0x03b4, 0x0395, 0x03b5, 0x0396, 0x03b6, 0x0397, 0x03b7,
   0x0398, 0x03b8, 0x0399, 0x03b9, 0x039a, 0x03ba, 0x039b, 0x03bb,
   0x039c, 0x03bc, 0x039d, 0x03bd, 0x039e, 0x03be, 0x039f, 0x03bf,
-  0x03a0, 0x03c0, 0x03a1, 0x03c1, 0x03a3, 0x03c3, 0x03a3, 0x03c2,
+  0x03a0, 0x03c0, 0x03a1, 0x03c1, 0x03a3, 0x03c3, 0x03f9, 0x03db,
   0x03a4, 0x03c4, 0x03a5, 0x03c5, 0x03a6, 0x03d5, 0x03a7, 0x03c7,
-  0x03a8, 0x03c8, 0x03a9, 0x03c9, 0x03ac, 0x03ad, 0x03a5, 0x03af,
+  0x03a8, 0x03c8, 0x03a9, 0x03c9, 0x03ac, 0x03ad, 0x03ae, 0x03af,
   0x03ca, 0x03cc, 0x03cd, 0x03cb, 0x03ce, 0x03b5, 0x03d1, 0x03f0,
-  0x03d6, 0x03f1, 0x03d2, 0x03c6, 0x03c9, 0x037e, 0x0387, 0x0384,
+  0x03d6, 0x1fe5, 0x03d2, 0x03c6, 0x03c9, 0x037e, 0x0387, 0x0384,
   0x00a8, 0x0385, 0x1fed, 0x1fef, 0x1fc0, 0x1fbd, 0x1fbf, 0x1fbe,
   0x1fce, 0x1fde, 0x1fcd, 0x1fdd, 0x1fcf, 0x1fdf, 0x0384, 0x1fef,
   0x1fc0, 0x1fbd, 0x1fbf, 0x1fce, 0x1fde, 0x1fcd, 0x1fdd, 0x1fcf,
#
# spec file for package libwpd (Version 0.8.14)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libwpd
# note: the main package is empty, it only sets a sane name for the source rpm
BuildRequires:  doxygen gcc-c++ libgsf-devel
License:        LGPL v2.1 or later
Group:          System/Libraries
AutoReqProv:    on
Version:        0.8.14
Release:        4.23_jpoehlmann2
Summary:        Library for Importing WordPerfect (tm) Documents
Source:         libwpd-%{version}.tar.bz2
Patch0:         libwpd-0.8.14-install-docs.patch
Patch1:         libwpd-0.8.14-greek-wp5-fixes.patch
Url:            http://libwpd.sourceforge.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libwpd-0_8-8 = %{version}-%{release}

%description
libwpd is a general purpose library for reading or interpreting data
from WordPerfect files. The library is not a stand-alone utility: it is
designed to be used by another program (for example, a word processor)
as an in-process component.



Authors:
--------
    William Lachance <william.lacha...@sympatico.ca>
    Marc Maurer <j.m.mau...@student.utwente.nl>
    Fridrich Strba <fridrich.st...@bluewin.ch>

%package -n libwpd-0_8-8
License:        LGPL v2.1 or later
%define libname libwpd-0_8-8
Group:          System/Libraries
# remove the old non-versioned package (built in the bs for instance)
Obsoletes:      libwpd < %version
Summary:        Library for Importing WordPerfect (tm) Documents

%description -n %libname
libwpd is a general purpose library for reading or interpreting data
from WordPerfect files. The library is not a stand-alone utility: it is
designed to be used by another program (for example, a word processor)
as an in-process component.



Authors:
--------
    William Lachance <william.lacha...@sympatico.ca>
    Marc Maurer <j.m.mau...@student.utwente.nl>
    Fridrich Strba <fridrich.st...@bluewin.ch>


%package devel
License:        LGPL v2.1 or later
Group:          System/Libraries
Summary:        Library for importing WordPerfect (tm) documents
Provides:       libwpd-devel = %{version}-%{release}
Requires:       %{libname} = %{version} libstdc++-devel libgsf-devel

%description devel
libwpd is a general purpose library for reading (or, interpreting data
from) WordPerfect files. The library is not a stand-alone utility: it
is designed to be used by another program (e.g.: a word processor) as
an in-process component.



Authors:
--------
    William Lachance <william.lacha...@sympatico.ca>
    Marc Maurer <j.m.mau...@student.utwente.nl>
    Fridrich Strba <fridrich.st...@bluewin.ch>

%package devel-doc
License:        LGPL v2.1 or later
Group:          System/Libraries
Summary:        Documentation for the libwpd API
Requires:       libwpd-devel

%description devel-doc
This package contains documentation for the libwpd API.



Authors:
--------
    William Lachance <william.lacha...@sympatico.ca>
    Marc Maurer <j.m.mau...@student.utwente.nl>
    Fridrich Strba <fridrich.st...@bluewin.ch>

%package tools
License:        LGPL v2.1 or later
Group:          Productivity/Publishing/Word
Summary:        Library for importing WordPerfect (tm) documents

%description tools
Tools to transform WordPerfect Documents into other formats. Currently
supported: html, raw, text



Authors:
--------
    William Lachance <william.lacha...@sympatico.ca>
    Marc Maurer <j.m.mau...@student.utwente.nl>
    Fridrich Strba <fridrich.st...@bluewin.ch>

%prep
%setup -q
%patch0
%patch1

%build
AUTOMAKE="automake --foreign" autoreconf -fi
%configure --disable-static --docdir=%_docdir/%name
make %{?jobs:-j%jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%_libdir/*.la
# not needed in binary packages
rm $RPM_BUILD_ROOT/%_docdir/%name/{HACKING,INSTALL,README}

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %libname -p /sbin/ldconfig

%postun -n %libname -p /sbin/ldconfig

%files -n %libname
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/libwpd*.pc
%{_includedir}/libwpd-*

%files devel-doc
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/html
%doc %{_docdir}/%{name}/libwpd.*

%files tools
%defattr(-,root,root)
%{_bindir}/*
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/[A-Z]*

%changelog
* Wed Oct 22 2008 mrueck...@suse.de
- fix debug_packages_requires define
* Fri Aug  1 2008 r...@suse.de
- fix requires for debuginfo package
* Fri Apr  4 2008 mma...@suse.cz
- rename the library package to libwpd-0_8-8, as required by the
  library policy (libwpd-0.8.so.8 -> libwpd-0_8-8)
- don't version the devel package after discussion with pmladek
  we'll do it only if the need arises
* Wed Apr  2 2008 mma...@suse.cz
- update to version 0.8.14:
  - Fix some warnings due to unused variables
  - Fix a warning due to a name hiding.
  - Fix two loops with corrupted documents (Thank you, sum1!)
  - Implement readahead in the WPXStreamImplementation class (Jan
    Holesovsky, Fridrich)
  - Fix some memory issues properly (each class deletes what it
    allocated) (Fridrich)
  - Work around an issue with relative seeks backward and certain
    versions of libstdc++ in the buffered stream implementation
    (Fridrich, sum1)
  - Fix a problem of conversion of some page breaks due to an
    unreachable block in the code (Fridrich)
  - Fix a crasher in a rare case of a footnote/endnote being
    defined in a table and the footnote/endnote having itself a
    table (Fridrich).
  - Fix some null pointer crashes with corrupted documents in table
    code and in cases where there is no prefix ID present (sum1,
    Fridrich).
  - Fix a out of bounds array in parsing WP5 extended characters
    with broken documents (sum1).
  - Remove some abuse of pointers (Fridrich).
  - In "wpd2raw --callback", return "-1" if no one callback was
    called (Fridrich).
  - Fix some issues with incorrect indents in some rear cases
    (Fridrich).
  - Fix some signedness problems (Fridrich).
- don't install static libraries and libtool archives
- renamed library and devel package to libwpd-0_8 and
  libwpd-0_8-devel respectively, to allow parallel installation
- split off libwpd-devel-doc subpackage
- cleaned up spec a bit
* Mon Nov 26 2007 pmla...@suse.cz
- update to version 0.8.12:
  - Convert Tab Set function for WP5 parser
  - Basic conversion of tabulators and indents in WP3 parser
  - Basic conversion of tabulators and indents in WP5 parser
  - Convert the most usual Macintosh fonts from fontId to font name in
    WP1 parser
  - Fix compilation with the upcoming gcc 4.3
* Mon Oct  1 2007 stbin...@suse.de
- update to version 0.8.11:
  - Fix incorrect conversion of tables with cells spanning more
    then 127 rows due to incorrect information in the file-format
  - Fix incorrect reading of font name information in prefix packets
* Sun Jun 17 2007 stbin...@suse.de
- update to version 0.8.10:
  * Fix a locale dependency in our float to string conversion
  * Enhance our reading of document meta data for WP6
  * Fix some sillies and be gracious with documents with corrupted
    prefix packets (Fridrich)
  * Prevent the heuristic typedetection from throwing
  * Add a new stream implementation based on C++ streams, rendering
    libgsf dependency very optional; deprecate GSFInputStream
* Fri Mar 16 2007 stbin...@suse.de
- update to version 0.8.9:
  * Fix a bug in WP1 document type detection where we could try to
    seek to a negative place in document (Fridrich)
  * Fix a regression wrt. 0.8.7 preventing the conversion of tab table
    in WP1 and WP3 file-format (Fridrich)
  * Fixed several overflow bugs reported by iDefense. An attacker
    could create a carefully crafted Word Perfect file that could
    cause an application linked with libwpd, such as OpenOffice, to
    crash or possibly execute arbitrary code if the file was opened
    by a victim. (CVE-2007-0002) (iDefense's Sean Larsson, Fridrich)
* Sun Jan 14 2007 dmuel...@suse.de
- update to version 0.8.8:
  * Add unit tests for the stream class
  * Ignore foot/endnotes that are referenced inside other foot/endnotes
    fixes http://www.openoffice.org/issues/show_bug.cgi?id=71487
  * Handle graciously unsupported password-protected documents;
    fixes http://www.openoffice.org/issues/show_bug.cgi?id=72307
  * Remove some potential memory leaks in the WPXPropertyList class and optimize
    the WPXPropertyList subscription operator
* Mon Dec 18 2006 sbra...@suse.cz
- Spec file cleanup.
* Tue Nov  7 2006 r...@suse.de
- fix docu permissions
* Mon Oct  9 2006 stbin...@suse.de
- update to version 0.8.7:
  * Revert the alignment fix, in order to mimick the way WP for
    Mac renders the documents
  * Support for WP Mac 1.x documents
  * Fix memory leak in standalone converters
  * Miscellaneous code cleanups
* Mon Jul 17 2006 stbin...@suse.de
- update to version 0.8.6:
  * Initial support of WP Mac 2.x documents
  * Initial conversion of headers/footers in WP42 parser
  * General improvement of libwpd's conversion-success-rate and
    extensive QA with more than 46'000 real life documents
* Thu Jun  1 2006 stbin...@suse.de
- update to version 0.8.5
  * adds header and footer conversion in WP5.x and WP3.x for
    Macintosh file formats.
  * adds support for footnotes and endnotes in WP5.x file format
  * improves the conversion of page margins and corrects issues
    with conversion of the position of tables and tabstops in
    multicolumn sections
* Wed Jan 25 2006 m...@suse.de
- converted neededforbuild to BuildRequires
* Thu Dec  8 2005 stbin...@suse.de
- update to version 0.8.4
* Wed Oct 19 2005 sbra...@suse.cz
- Package documentation.
- Split to subpackages.
* Sat Oct  8 2005 co...@suse.de
- make it build with gcc 4.1 (sent upstream)
* Tue Oct  4 2005 stbin...@suse.de
- initial package of version 0.8.3
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Libwpd-devel mailing list
Libwpd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libwpd-devel

Reply via email to