diff -pruN 1:2.3.3-1/cmake/modules/FindIconv.cmake 1:2.3.3-0ubuntu9/cmake/modules/FindIconv.cmake
--- 1:2.3.3-1/cmake/modules/FindIconv.cmake	2011-02-17 12:10:35.000000000 +0000
+++ 1:2.3.3-0ubuntu9/cmake/modules/FindIconv.cmake	2011-12-06 13:37:09.000000000 +0000
@@ -15,8 +15,8 @@ ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRA
 
 FIND_PATH(ICONV_INCLUDE_DIR iconv.h) 
  
-FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
- 
+SET(ICONV_LIBRARIES c) 
+
 IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
    SET(ICONV_FOUND TRUE) 
 ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
diff -pruN 1:2.3.3-1/cmake/modules/FindLIBGSF.cmake 1:2.3.3-0ubuntu9/cmake/modules/FindLIBGSF.cmake
--- 1:2.3.3-1/cmake/modules/FindLIBGSF.cmake	2011-02-17 12:10:35.000000000 +0000
+++ 1:2.3.3-0ubuntu9/cmake/modules/FindLIBGSF.cmake	2011-12-06 13:37:09.000000000 +0000
@@ -34,6 +34,7 @@ FIND_PATH(LIBGSF_INCLUDE_DIR gsf/gsf.h
    HINTS
    ${PC_LIBGSF_INCLUDEDIR}
    ${PC_LIBGSF_INCLUDE_DIRS}
+   /usr/include/libgsf-1
    PATH_SUFFIXES libgsf-1
    )
 
diff -pruN 1:2.3.3-1/debian/changelog 1:2.3.3-0ubuntu9/debian/changelog
--- 1:2.3.3-1/debian/changelog	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/changelog	2011-12-06 11:10:07.000000000 +0000
@@ -1,77 +1,180 @@
-koffice (1:2.3.3-1) unstable; urgency=low
+koffice (1:2.3.3-0ubuntu9) precise; urgency=low
 
-  * New upstream release.
-  * Add build-depend on libqtwebkit-dev. (Closes: #618164)
-  * Improve krita description, thanks Pascal De Vuyst. (Closes: #618038)
-  * Update installed files for kformula, I am not sure anymore what
-    it is being supposed to ship...
+  * Rebuild against libpoppler19. 
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Sun, 03 Apr 2011 14:19:28 +0200
+ -- James Page <james.page@ubuntu.com>  Tue, 06 Dec 2011 11:09:56 +0000
 
-koffice (1:2.3.1-3) unstable; urgency=low
+koffice (1:2.3.3-0ubuntu8) precise; urgency=low
 
-  * Add 20_arm_fix to fix build in arm. (Closes: #613158)
+  * Rebuild for libmysqlclient transition
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Sun, 13 Feb 2011 13:04:55 +0100
+ -- Clint Byrum <clint@ubuntu.com>  Wed, 23 Nov 2011 23:52:27 -0800
 
-koffice (1:2.3.1-2) unstable; urgency=low
+koffice (1:2.3.3-0ubuntu7) precise; urgency=low
 
-  * Upload to unstable.
-  * Update build dependencies of libwpd to >=0.9.1 and libwpg to >=0.2.0.
-   (Closes: #604827)
+  * Transition from libjpeg62-dev to libjpeg-dev, fixing a FTBFS
 
-  [ Pino Toscano ]
-  * Add patch 15_new_libwpd, to make the wpg filter of karbon compile with
-    newer libwpd & libwpg (sort of backport from Calligra upstream).
-  * Fix typo in description of krita. (Closes: #593133)
+ -- Michael Terry <mterry@ubuntu.com>  Wed, 09 Nov 2011 13:30:09 -0500
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Sun, 06 Feb 2011 17:57:29 +0100
+koffice (1:2.3.3-0ubuntu6) oneiric; urgency=low
 
-koffice (1:2.3.1-1) experimental; urgency=low
+  * Add missing build-dep on libx11-dev
 
-  * New upstream release.
-  * Update installed files in krita.
+ -- Scott Kitterman <scott@kitterman.com>  Sun, 24 Jul 2011 11:29:24 -0400
 
-  [ Pino Toscano ]
-  * Explicitly build depend on libpoppler-dev (needed by karbon), to not rely
-    on the implicit dependency of libpoppler-qt4-dev.
+koffice (1:2.3.3-0ubuntu5) oneiric; urgency=low
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Mon, 31 Jan 2011 22:57:37 +0100
+  * Add libqtwebkit-dev to build-depends
+  * Add debian/patches/kubuntu_07_krita_plugins_errors.diff to fix compilation
+    errors (Thanks to Dave Gilbert for the patch)
+  * Add Kubuntu Vcs-* fields to debian/control
+  * Rebuild for libkdcraw9 transition
 
-koffice (1:2.3.0-1) experimental; urgency=low
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 23 Jul 2011 02:00:14 -0400
 
-  * New upstream release.
-  
-  [ Raúl Sánchez Siles ]
-  * Remove fixes_arm.diff patch. Included upstream.
-  * Not include KChart application but rather the chart shape plugin.
-  * Add koreport desktop files.
-  * Add 10_nokcharpart to avoid installing unwanted desktop files.
-  * Split out kexi plugins packages.
-  * Replace and conflict koffice-lib with older kchart packages.
-  * Move menu icons to application binary package.
-  * Prevent building Google docs support.
-  * Add patch 16_kformula_kdeinit4 to make kformula kdeinit library 
-    name compliant.
-  * Make koffice-data and koffice-libs breaks and replaces old kchart versions.
-
-  [ Modestas Vainius ]
-  * Add Vcs-* fields to debian/control.
-  * Drop kspread_backport_fix_time_values_in_ods.diff, stolen from upstream.
-
- -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Wed, 05 Jan 2011 02:39:26 +0100
-
-koffice (1:2.2.1-4) unstable; urgency=low
-
-  [ Modestas Vainius ]
-  * Add patch kspread_backport_fix_time_values_in_ods.diff to fix saving of
-    time values in ods files in kspread. (Closes: #604773)
-  * Remove quilt from Build-Depends. The package is 3.0 (quilt) and quilt build
-    dependency makes debian-qt-kde.mk automatically (un)apply patches as if
-    source format was 1.0. This is definitely wrong and might lead to weird
-    FTBFSes sometimes.
+koffice (1:2.3.3-0ubuntu4) natty; urgency=low
+
+  * Only build-dep on libqt4-opengl-dev and libglew1.5-dev on [i386 amd64
+    powerpc] to fix armel FTBFS due to the GL/GLES transition (LP: #707794)
+    - Add debian/patches/kubuntu_06_krita_link_x.diff to fix indirect linking
+      in krita (Thanks to Jonathan Riddell for the patch)
+
+ -- Scott Kitterman <scott@kitterman.com>  Sun, 27 Mar 2011 14:56:26 -0400
+
+koffice (1:2.3.3-0ubuntu3) natty; urgency=low
+
+  * Drop dependency on kformula which no longer exists
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 18 Mar 2011 12:31:46 +0000
+
+koffice (1:2.3.3-0ubuntu2) natty; urgency=low
+
+  * Add kubuntu_05_libc_multiarch.diff, workaround libc now in multiarch
+    directory where cmake can not find it, proper solution should be in
+    cmake find_library(), to discuss with upstream
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 16 Mar 2011 14:51:36 +0000
+
+koffice (1:2.3.3-0ubuntu1) natty; urgency=low
+
+  * New upstream release (LP: #733227)
+  * Removed debian/kformula.install
+  * debian/control: commented lines regarding kformula, upstream
+    recommends removing kformula atm.
+
+ -- Tarun Kumar Mall <c2tarun@gmail.com>  Sat, 12 Mar 2011 11:19:59 +0000
+
+koffice (1:2.3.1-0ubuntu3) natty; urgency=low
+
+  * Add build-dep on libglib2.0-dev and libgsf-1-dev
+  * Add kubuntu_04_findlibgsf.diff to find gsf includes
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 28 Jan 2011 12:10:54 +0000
+
+koffice (1:2.3.1-0ubuntu2) natty; urgency=low
+
+  * Rebuild without dcmtk until it passes MIR
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 27 Jan 2011 18:23:22 +0000
+
+koffice (1:2.3.1-0ubuntu1) natty; urgency=low
+
+  * New upstream release
+  * Add kubuntu_03_libwpg_02.diff from Fedora for libwpg 0.2 support,
+    add back libwpg-dev build-depend
+  * Depend on libwpd-dev not libwpd8-dev
+  * Remove kubuntu_02_kpresenterpart.diff now upstream
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 19 Jan 2011 12:29:32 +0000
+
+koffice (1:2.3.0b-0ubuntu2) natty; urgency=low
+
+  * Remove build-depend on libwpg-dev, remove files from karbon.install
+  * Add kubuntu_02_kpresenterpart.diff to fix kpresenter okular plugin
+  * Build-dep on okular-dev, add package okular-odp-backend
+  * Add file debian/missing-build-depends to remind us why we don't have all
+    upstream requested the build-depends
+  * Add build-dep on libdcmtk1-dev, add new files to kword.install
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 11 Jan 2011 15:43:44 +0000
+
+koffice (1:2.3.0b-0ubuntu1) natty; urgency=low
+
+  * New tar from upstream
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 29 Dec 2010 13:30:15 +0000
+
+koffice (1:2.3.0a-0ubuntu1) natty; urgency=low
+
+  * New tar from upstream
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 28 Dec 2010 22:29:27 +0000
+
+koffice (1:2.3.0-0ubuntu1) natty; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 27 Dec 2010 17:42:35 +0000
+
+koffice (1:2.2.91-0ubuntu2) natty; urgency=low
+
+  * Add kubuntu_01_arm_compile.diff to fix compile on ARM
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 09 Dec 2010 15:48:04 +0000
+
+koffice (1:2.2.91-0ubuntu1) natty; urgency=low
+
+  * New upstream RC release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 06 Dec 2010 15:30:09 +0000
+
+koffice (1:2.2.83-0ubuntu1) natty; urgency=low
+
+  * Merge with Debian git remaining changes:
+   - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
+     create-resources, libspnav-dev
+   - Remove needless build-dep on libwv2-dev
+   - koffice-libs recommends create-resources
+   - krita recommends pstoedit
+   - Keep our patches
+  * New upstream release 2.3 beta 3
+    - Remove debian/patches fixed by upstream
+    - Update install files
+
+ -- Alessandro Ghersi <alessandro-ghersi@kubuntu.org>  Tue, 27 Oct 2010 17:52:57 +0200
+
+koffice (1:2.2.80-1) UNRELEASED; urgency=low
+
+  * New upstream test-build.
+    - Removed fixes_arm.diff patch. Included upstream.
+  * Not including KChart application but rather the chart shape plugin.
+  * Adding koreport desktop files.
+  * Added 10_nokcharpart to avoid installing unwanted desktop files.
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Mon, 29 Nov 2010 02:01:30 +0200
+ -- Raúl Sánchez Siles <rasasi78@gmail.com>  Wed, 18 Aug 2010 18:24:52 +0200
+
+koffice (1:2.2.2-0ubuntu3) maverick; urgency=low
+
+  * Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
+    kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
+    recommended by upstream http://kexi-
+    project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
+    ility
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 21 Sep 2010 15:36:35 +0100
+
+koffice (1:2.2.2-0ubuntu2) maverick; urgency=low
+
+  * Add kubuntu_01_arm_needs_qreal.diff to fix assumed qreal=double
+    Allows succesful compilation on armel (LP: #625204)
+
+ -- Emmet Hikory <persia@ubuntu.com>  Sun, 19 Sep 2010 20:16:58 +0900
+
+koffice (1:2.2.2-0ubuntu1) maverick; urgency=low
+
+  * New upstream release
+
+ -- Rohan Garg <rohangarg@ubuntu.com>  Sun, 22 Aug 2010 04:50:34 +0530
 
 koffice (1:2.2.1-3) unstable; urgency=low
 
@@ -96,9 +199,58 @@ koffice (1:2.2.1-2) unstable; urgency=lo
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Mon, 12 Jul 2010 15:54:01 +0200
 
-koffice (1:2.2.1-1) experimental; urgency=low
+koffice (1:2.2.1-0ubuntu2) maverick; urgency=low
+
+  * Remove build-depend libopenjpeg-dev, openjpeg failed MIR
+    - Update krita.install
+  
+ -- Christian Mangold <neversfelde@ubuntu.com>  Tue, 06 Jul 2010 22:47:03 +0200
+
+koffice (1:2.2.1-0ubuntu1) maverick; urgency=low
+
+  [ Christian Mangold ]
+  * New upstream bugfix release
+    - Remove kubuntu_01_kpluginselector_compile.diff and 
+      kubuntu_03_file_copy_fixes.diff, went upstream 
+    - Update krita.install, krita-data.install and
+      koffice-libs.install
+
+  [ Jonathan Riddell ]
+  * Move ttf-lyx to suggests from koffice-libs recommends, not in main
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 05 Jul 2010 21:37:34 +0100
+
+koffice (1:2.2.0-1~pre1ubuntu3) maverick; urgency=low
+
+  * krita-data replaces krita for all versions under 1:2.2.0-1~pre1
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Thu, 01 Jul 2010 10:58:02 -0400
+
+koffice (1:2.2.0-1~pre1ubuntu2) maverick; urgency=low
+
+  * Build with libgmm-dev not libgmm++-dev, that's the version in main
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 29 Jun 2010 15:23:22 +0100
+
+koffice (1:2.2.0-1~pre1ubuntu1) maverick; urgency=low
+
+  * Merge with Debian, remaining changes:
+   - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
+     create-resources, libspnav-dev
+   - Remove needless build-dep on libwv2-dev
+   - koffice-libs recommends create-resources
+   - krita recommends pstoedit
+   - Add kubuntu_01_kpluginselector_compile.diff from upstream, fixes compile
+   - Add kubuntu_02_freetds_library.diff from upstream, fixes support for freetds in Kexi
+   - koffice-dev Replaces various apps << 1:2.2.0
+   - koffice replaces/conflicts koreport
+   - Kexi Replaces: koffice-libs (<< 1:2.2.0-1~pre1ubuntu1)
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 21 Jun 2010 14:29:17 +0100
+
+koffice (1:2.2.0-1~pre1) experimental; urgency=low
 
-  * New upstream release, KOffice 2.2.1:
+  * New upstream release, KOffice 2.2:
     - fixes connecters in Kivio not moving back to their old position on undo.
       (Closes: #431581)
     - KWord autocorrection now retains capitalisation when replacing words.
@@ -119,17 +271,85 @@ koffice (1:2.2.1-1) experimental; urgenc
     - Add libsqlite3-dev, libpq-dev, libpqxx3-dev, libxbase2.0-dev for kexi.
     - Add libgif-dev, libopenjpeg-dev and libfftw3-dev.
   * Update installed files and lintian overrides.
-  * Update to Standards-Version 3.9.0, no changes required.
+  * Update to Standards-Version 3.8.4, no changes required.
   * Remove README.Debian, koffice 2 is not so unstable anymore.
-  * Update debian/copyright, years and remove reference to BSD license, include
-    BSD license instead.
   * Bump pkg-kde-tools build dependency to (>= 0.9) for HTML_INSTALL_DIR, move
     documentation from usr/share/doc/kde4 references to usr/share/doc/kde.
 
   [ Pino Toscano ]
   * Few touches to the descriptions.
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Sun, 11 Jul 2010 20:49:01 +0200
+ -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 02 Jun 2010 11:14:48 +0200
+
+koffice (1:2.2.0-0ubuntu2) maverick; urgency=low
+
+  * Add build-dep on shared-mime-info.
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 26 May 2010 09:12:00 +0000
+
+koffice (1:2.2.0-0ubuntu1) maverick; urgency=low
+
+  * New upstream release
+  * Add build-dep on libxbase2.0-dev
+  * koffice-dev Replaces various apps << 1:2.2.0
+  * Add kubuntu_01_kpluginselector_compile.diff from upstream, fixes compile
+  * Add kubuntu_02_freetds_library.diff from upstream, fixes support for freetds in Kexi
+  * Add build-dep on freetds-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 24 May 2010 23:35:44 +0000
+
+koffice (1:2.1.91-0ubuntu1~ppa1) lucid; urgency=low
+
+  * New upstream beta release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 23 Apr 2010 17:44:10 +0200
+
+koffice (1:2.1.82-0ubuntu1) lucid; urgency=low
+
+  * New upstream beta
+  * Bump in libs names (form 6 to 7)
+  * Changes in *.install files
+
+ -- Michał Zając <michal.zajac@gmail.com>  Sat, 17 Apr 2010 14:42:56 +0200
+
+koffice (1:2.1.81-0ubuntu1) lucid; urgency=low
+
+  * New upstream beta release.
+  * Build against 4.4 libs and Qt 4.6.1
+  * New koreport package created
+  * Added freetds-dev, libfftw3-dev, libgif-dev, libwpg-dev, libpqxx-dev,
+    libxdb-dev, libopenjpeg-dev, libwpg-dev
+  * Updated install files
+
+ -- Michał Zając <michal.zajac@gmail.com>  Tue, 16 Mar 2010 16:32:46 +0100
+
+koffice (1:2.1.1-1ubuntu2) UNRELEASED; urgency=low
+
+  * Make kspread recommend krosspython and krossruby (LP: #391829)
+  * Remove .desktop file from kformula.install (LP: #527919)
+  * A few nitpicky changes on the merge. Most re-arragning build-dep order
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Thu, 25 Feb 2010 18:35:20 -0500
+
+koffice (1:2.1.1-1ubuntu1) lucid; urgency=low
+
+  * Merge from Debian Experimental, remaining Ubuntu changes:
+    - Add missing epoch to Qt build-depends version
+    - Add libspnav-dev and libopenctl-dev to build-depends
+  * Rename everything by removing -kde4 (ie. kword-kde4 is now kword)
+    - Conflict with old -kde4 package
+    - Replace with old -kde4 package
+  * Bumped build-depends on libkdcraw7 to libkdcraw8
+  * Added kubuntu_01_fix_createresources_cmakelists.diff to fix case typo.
+    This can be dropped with the next upstream release, as it is fixed and
+    backported upstream.
+  * debian/koffice-doc-html.install - changed doc dir from kde4 to kde
+  * Install KFormula as it is partially usable at this time.
+  * Updated multiple .install files to add missing files
+  * Bumped standards version to 3.8.4
+  * Add quilt back to build deps to fix FTBFS
+
+ -- Richard A. Johnson <nixternal@ubuntu.com>  Tue, 23 Feb 2010 16:54:30 -0600
 
 koffice (1:2.1.1-1) experimental; urgency=low
 
@@ -148,6 +368,54 @@ koffice (1:2.1.0-1) experimental; urgenc
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Thu, 26 Nov 2009 00:47:41 +0100
 
+koffice (1:2.1.0-0ubuntu3) lucid; urgency=low
+
+  * Add missing epoch to Qt build-depends version
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 25 Nov 2009 13:47:02 +0000
+
+koffice (1:2.1.0-0ubuntu2) lucid; urgency=low
+
+  * Rebuild against Qt 4.6 rc 1, which is binary incompatible with 4.6
+    beta
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 24 Nov 2009 08:59:56 +0000
+
+koffice (1:2.1.0-0ubuntu1) lucid; urgency=low
+
+  * New upstream release
+  * Update koffice-doc-html-kde4.install, kword-data-kde4.install and
+    kplato-kde4.install
+
+ -- Christian Mangold <neversfelde@ubuntu.com>  Sat, 21 Nov 2009 01:41:52 +0100
+
+koffice (1:2.0.91-1ubuntu1~ppa12) karmic; urgency=low
+
+  * Merge with Debian experimental, remaining changes:
+    - Keep our *-kde4 packages
+    - Build on libboost1.38-dev instead of libboost-dev
+    - Add libspnav-dev and libopenctl-dev to build-deps
+    - krita recommends spacenavd, update krita-kde4.install and
+      krita-data-kde4.install
+    - Install doc in /usr/share/kde instead of /usr/share/kde4,
+      update koffice-doc-kde4.install and not-installed
+    - koffice-libs-kde4 recommends latex-xft-fonts instead of ttf-lyx
+    - Build-dep on libqt4-phonon-dev instead of libphonon-dev, change
+      version to 4.5.3really4.5.2-0ubuntu1
+    - koffice-doc-html-kde4 conflicts karbon
+    - kpresenter-kde4 conflicts kpresenter-data
+  * Remove build-dep quilt to avoid lintian warning, no patches
+  * Update koffice-data-kde4.install with some icons
+  * Update not-installed, we are not shipping kformula
+  * krita-kde4 replaces krita-data-kde4 (<< 1:2.0.91-1ubuntu1)
+  * kword-kde4 replaces kword-data-kde4 (<< 1:2.0.91-1ubuntu1)
+  * kword-data-kde4 replaces kword-kde4 (<< 1:2.0.91-1ubuntu1)
+  * koffice-libs-kde4 replaces karbon-kde4 (<< 1:2.0.91-1ubuntu1)
+  * koffice-data-kde4 replaces replaces krita-kde4 (<< 1:2.0.91-1ubuntu1),
+    krita-data-kde4 (<< 1:2.0.91-1ubuntu1), karbon-kde4 (<< 1:2.0.91-1ubuntu1)
+
+ -- Christian Mangold <neversfelde@ubuntu.com>  Thu, 29 Oct 2009 17:02:54 +0100
+
 koffice (1:2.0.91-1) experimental; urgency=low
 
   * New upstream release, KOffice 2.1 Release Candidate 1.
@@ -169,7 +437,7 @@ koffice (1:2.0.83-1) experimental; urgen
   * Switch from the transitional latex-xft-fonts to ttf-lyx. (Closes: #539533)
 
   +++ Changes by Ana Beatriz Guerrero Lopez:
-  
+
   * Add versioned build-depend on wv2 (>= 0.4.0).
   * Update installed files.
 
@@ -195,6 +463,31 @@ koffice (1:2.0.81-1) experimental; urgen
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 02 Sep 2009 18:17:35 +0200
 
+koffice2 (1:2.0.2-2ubuntu3) karmic; urgency=low
+
+  * The koffice-doc-html-kde4 package conflicts karbon (LP: #453497)
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Fri, 16 Oct 2009 17:34:47 -0400
+
+koffice2 (1:2.0.2-2ubuntu2) karmic; urgency=low
+
+  * Make the kpresenter-kde4 package conflict kpresenter-data (LP: #264499)
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Mon, 05 Oct 2009 13:50:10 -0400
+
+koffice2 (1:2.0.2-2ubuntu1) karmic; urgency=low
+
+  * Merge with Debian experimental, remaining changes:
+    - Keep our -kde4 packages
+    - Build on libboost1.38-dev
+    - Add libspnav-dev, libopenctl-dev to build-deps
+      (see 2.0.0-1ubuntu3 changelog) and add files to
+      krita-data-kde4.install and krita-kde4.install
+    - krita recommends spacenavd
+    - Install doc in /usr/share/kde
+
+ -- Alessandro Ghersi <alessandro-ghersi@kubuntu.org>  Sat, 15 Aug 2009 01:24:28 +0200
+
 koffice (1:2.0.2-2) experimental; urgency=low
 
   * Update build depend from libmysqlclient15-dev to libmysqlclient-dev.
@@ -212,6 +505,43 @@ koffice (1:2.0.2-1) experimental; urgenc
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Mon, 10 Aug 2009 00:18:16 +0200
 
+koffice2 (1:2.0.1-0ubuntu2) karmic; urgency=low
+
+  * Move boost from libboost-1.35-dev to 1.38-dev
+
+ -- Scott Kitterman <scott@kitterman.com>  Fri, 31 Jul 2009 13:35:40 -0400
+
+koffice2 (1:2.0.1-0ubuntu1) karmic; urgency=low
+
+  * New upstream release:
+    - Update krita-kde4.install
+    - Update krita-data-kde4.install
+    - Update koffice-data-kde4.install
+
+ -- Alessandro Ghersi <alessandro-ghersi@kubuntu.org>  Mon, 22 Jun 2009 02:48:56 +0200
+
+koffice2 (1:2.0.0-1ubuntu3) karmic; urgency=low
+
+  * Re-add build-deps lost during the merge
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Wed, 03 Jun 2009 10:20:19 -0400
+
+koffice2 (1:2.0.0-1ubuntu2) karmic; urgency=low
+
+  * Fix FTBFS by removing non-existant file from kchart-kde4.install
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Tue, 02 Jun 2009 13:40:13 -0400
+
+koffice2 (1:2.0.0-1ubuntu1) karmic; urgency=low
+
+  * Rebuild upload for new opengtl
+  * Merge with Debian experimental, remaining changes:
+    - Keep our -kde4 packages
+    - Keep libboost1.35 and libqt4-phonon-dev build-depends
+    - krita recommends spacenavd
+
+ -- Jonathan Thomas <echidnaman@kubuntu.org>  Mon, 01 Jun 2009 11:01:46 -0400
+
 koffice (1:2.0.0-1) experimental; urgency=low
 
   * New upstream release. First final release of the koffice 2 series.
@@ -221,6 +551,24 @@ koffice (1:2.0.0-1) experimental; urgenc
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 27 May 2009 01:29:09 +0000
 
+koffice2 (1:2.0.0-0ubuntu2) karmic; urgency=low
+
+  * Phonon transition, build-dep on libqt4-phonon-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 26 May 2009 07:45:11 +0000
+
+koffice2 (1:2.0.0-0ubuntu1) karmic; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 22 May 2009 17:39:07 +0000
+
+koffice2 (1:1.9.99.9-0ubuntu1) jaunty; urgency=low
+
+  * New upstream RC release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 02 Apr 2009 15:53:27 +0100
+
 koffice (1:1.9.99.0-1) experimental; urgency=low
 
   * New upstream release, Release Candidate 1.
@@ -239,6 +587,61 @@ koffice (1:1.9.98.7-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Fri, 27 Feb 2009 19:35:09 +0100
 
+koffice2 (1:1.9.98.7-0ubuntu2) jaunty; urgency=low
+
+  * No-change rebuild for exiv2 0.18 (LP: 309684)
+
+ -- Luka Renko <lure@ubuntu.com>  Tue, 17 Mar 2009 19:21:57 +0100
+
+koffice2 (1:1.9.98.7-0ubuntu1) jaunty; urgency=low
+
+  * New upstream beta release 
+  * Remove kubuntu_01_spnav_link.diff - fixed upstream
+  * Update krita-data-kde4.install
+    - remove kritashape.png/.desktop
+    - remove invalid plugin ref's:
+      bigbrother.rc/.desktop, kritaglsl.rc/.desktop
+    - add items from list-missing:
+      usr/share/kde4/apps/krita/metadata/schemas/dc.schema
+      usr/share/kde4/apps/krita/metadata/schemas/exif.schema
+      usr/share/kde4/apps/krita/metadata/schemas/mkn.schema
+      usr/share/kde4/apps/krita/metadata/schemas/tiff.schema
+      usr/share/kde4/apps/krita/metadata/schemas/xmp.schema
+      usr/share/kde4/apps/krita/metadata/schemas/xmprights.schema
+      usr/share/kde4/apps/kritaplugins/dynamicbrush.rc
+      usr/share/kde4/services/kritadynamicbrush.desktop
+  * Update kword-data-kde4.install
+    - remove kword_msword_import.desktop
+  * Update karbon-kde4.install
+    - remove libkarbon1ximport.so, libkarbonpngexport.so,
+      libkarbonsvgexport.so, libkarbonsvgimport.so, libwmfexport.so,
+      libwmfimport.so, karbon_1x_import.desktop, karbon_png_export.desktop,
+      karbon_svg_export.desktop, karbon_svg_import.desktop,
+      karbon_svgz_import.desktop, karbon_wmf_export.desktop,
+      karbon_wmf_import.desktop
+  * Update krita-kde4.install
+    - remove kritabigbrother.so, kritaglsl.so, kritashape.so
+    - add items from list-missing:
+      usr/share/icons/oxygen/16x16/actions/object-ungroup-koffice.png
+      usr/lib/kde4/kritadynamicbrushpaintop.so
+      usr/lib/libkritabasicdynamiccoloringprogram.so.5
+      usr/lib/libkritabasicdynamiccoloringprogram.so.5.0.0
+      usr/lib/libkritabasicdynamicshapeprogram.so.5
+      usr/lib/libkritabasicdynamicshapeprogram.so.5.0.0
+      usr/lib/libkritadynamicbrush.so.5
+      usr/lib/libkritadynamicbrush.so.5.0.0
+  * Update kword-kde4.install
+    - remove libmswordimport.so
+    - add items from list-missing
+      usr/share/kde4/apps/kword/styles/defaultstyles.xml
+  * Update koffice-dev-kde4.install
+    - add items from list-missing
+      usr/lib/libkritabasicdynamiccoloringprogram.so
+      usr/lib/libkritabasicdynamicshapeprogram.so
+      usr/lib/libkritadynamicbrush.so
+
+ -- Roderick B. Greening <roderick.greening@gmail.com>  Tue, 03 Mar 2009 14:17:24 -0330
+
 koffice (1:1.9.98.6-1) experimental; urgency=low
 
   * New upstream beta release.
@@ -255,6 +658,14 @@ koffice (1:1.9.98.6-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Tue, 03 Feb 2009 14:14:09 +0100
 
+koffice2 (1:1.9.98.6-0ubuntu1) jaunty; urgency=low
+
+  * New upstream Beta release
+  * Removed patch kubuntu_02_cmake_thumbnails_fix_svn_907760.diff
+  * Fixed koffice-doc-html-kde4.install for doc path.
+
+ -- Anthony Mercatante <tonio@ubuntu.com>  Thu, 05 Feb 2009 14:31:52 +0100
+
 koffice (1:1.9.98.5-2) experimental; urgency=low
 
   +++ Changes by Modestas Vainius:
@@ -267,7 +678,7 @@ koffice (1:1.9.98.5-2) experimental; urg
   * Rename debian/*.lintian to debian/*.lintian-overrides.
 
   +++ Changes by Ana Beatriz Guerrero Lopez:
-  
+
   * Update packaging for usage with KDE 4.2.0:
     - Bump build depends to 4.2.0.
     - Bump phonon build depends to 4.3.0.
@@ -290,6 +701,42 @@ koffice (1:1.9.98.5-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 14 Jan 2009 22:36:16 +0100
 
+koffice2 (1:1.9.98.5-0ubuntu3) jaunty; urgency=low
+
+  * Fixed koffice-data-kde4.install:
+    - don't install object-order-*.png files since those
+      are already in kde-icons-oxygen, and this creates a conflict.
+
+ -- Anthony Mercatante <tonio@ubuntu.com>  Thu, 29 Jan 2009 02:34:26 +0100
+
+koffice2 (1:1.9.98.5-0ubuntu2) jaunty; urgency=low
+
+  * Fixed upgrading issue due to moved .desktop for kword-kde4 and
+    krita-kde4 (LP: #302029) (LP: #299898)
+
+ -- Andrea Gasparini <gaspa@yattaweb.it>  Thu, 22 Jan 2009 17:09:24 +0000
+
+koffice2 (1:1.9.98.5-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 09 Jan 2009 16:53:06 +0000
+
+koffice2 (1:1.9.98.4-0ubuntu1) jaunty; urgency=low
+
+  * New upstream Beta release
+  * debian/control:
+    + Update kchart description
+  * debian/rules:
+    + Use cdbs kde4.mk instead of internal one
+  * debian/koffice-doc-html-kde4.install:
+    + Use wildcard instead of manual file listing
+  * debian/koffice-dev-kde4.install:
+    + Use wildcard instead of manual file listing for usr/include
+  * Add Vcs fields
+
+ -- Harald Sitter <apachelogger@ubuntu.com>  Wed, 31 Dec 2008 14:47:29 +0100
+
 koffice (1:1.9.98.3-2) experimental; urgency=low
 
   * Remove files that are provided already by kde-icons-oxygen.
@@ -309,6 +756,27 @@ koffice (1:1.9.98.3-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 10 Dec 2008 17:37:52 +0100
 
+koffice2 (1:1.9.98.2-0ubuntu3) jaunty; urgency=low
+
+  * Rebuild against fixed libopenctl-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 14 Nov 2008 21:12:48 +0000
+
+koffice2 (1:1.9.98.2-0ubuntu2) jaunty; urgency=low
+
+  * Fix patch kubuntu_01_spnav_link.diff
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 14 Nov 2008 16:18:37 +0000
+
+koffice2 (1:1.9.98.2-0ubuntu1) jaunty; urgency=low
+
+  * New upstream Beta release
+  * Add build-deps on libspnav-dev, libopenctl-dev
+  * Add kubuntu_01_spnav_link.diff patch to fix libspnav linking
+  * Krita recommends spacenavd
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 12 Nov 2008 17:37:35 +0000
+
 koffice (1:1.9.98.1-1) experimental; urgency=low
 
   * New upstream release, second beta.
@@ -317,6 +785,12 @@ koffice (1:1.9.98.1-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Tue, 14 Oct 2008 15:34:15 +0200
 
+koffice2 (1:1.9.98.1-0ubuntu1) intrepid; urgency=low
+
+  * New upstream beta 
+
+ -- Roderick B. Greening <roderick.greening@gmail.com>  Fri, 10 Oct 2008 04:14:58 -0230
+
 koffice (1:1.9.98.0-1) experimental; urgency=low
 
   * New upstream release, first beta.
@@ -334,6 +808,12 @@ koffice (1:1.9.98.0-1) experimental; urg
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Thu, 25 Sep 2008 07:53:31 +0200
 
+koffice2 (1:1.9.98.0-0ubuntu1) intrepid; urgency=low
+
+  * New upstream beta
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 19 Sep 2008 15:52:28 +0100
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.10-1) experimental; urgency=low
 
   * New upstream release 1.9.95.8, alpha 10.
@@ -348,6 +828,19 @@ koffice (1:1.9.96.0~that.is.really.1.9.9
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 27 Aug 2008 14:21:55 +0200
 
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.10-0ubuntu2) intrepid; urgency=low
+
+  * Corrected installation files to account for files that
+    were removed with the last alpha.
+
+ -- Michael Casadevall <sonicmctails@gmail.com>  Fri, 05 Sep 2008 01:10:08 -0400
+
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.10-0ubuntu1) intrepid; urgency=low
+
+  * New upstream alpha
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 20 Aug 2008 18:57:29 +0100
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.9-2) experimental; urgency=low
 
   * Add back build depend on libpqxx-dev and postgresql. 
@@ -359,6 +852,23 @@ koffice (1:1.9.96.0~that.is.really.1.9.9
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Fri, 01 Aug 2008 17:04:24 +0200
 
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.9-1ubuntu1.3) intrepid; urgency=low
+
+  * New upstream release 1.9.95.9 (LP: #249533).
+  * Add build-dep on libgmm-dev, fix FTBFS.
+  * Update debian/*install files.
+  * Provide the koffice-kde4-dbg package, LP: #248829.
+  * Fix "file * has no final newline (either original or modified version)"
+    dpkg-source warnings.
+  * Fix malformed-override lintian errors.
+  * Fix unused-override lintian infos.
+  * Fix pkg-not-in-package-test lintian warnings.
+  * Fix depends-on-obsolete-package lintian error.
+  * Update lintian-overrides.
+  * Bump Standards-Version to 3.8.0.
+
+ -- Devid Filoni <d.filoni@techemail.com>  Wed, 23 Jul 2008 00:25:02 +0200
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.9-1) experimental; urgency=low
 
   * New upstrem release 1.9.95.8, alpha 9.
@@ -368,6 +878,21 @@ koffice (1:1.9.96.0~that.is.really.1.9.9
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Fri, 18 Jul 2008 16:49:18 +0200
 
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.8-1ubuntu2) intrepid; urgency=low
+
+  * Add build-dep on kdelibs5-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 12 Jun 2008 00:33:08 +0100
+
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.8-1ubuntu1) intrepid; urgency=low
+
+  * Merge with Debian, remaining changes:
+   - rename to koffice2, rename packages to -kde4 and conflict with kde 3 versions
+   - Remove 97_fix_target_link_libraries.diff
+   - Use Kubuntu debian/cdbs/kde.mk
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 05 Jun 2008 15:42:46 +0100
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.8-1) experimental; urgency=low
 
   * New upstream release 1.9.95.8.
@@ -379,6 +904,12 @@ koffice (1:1.9.96.0~that.is.really.1.9.9
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Sun, 01 Jun 2008 04:51:06 +0200
 
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.8-0ubuntu1) intrepid; urgency=low
+
+  * New upstream alpha release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 05 Jun 2008 12:12:13 +0100
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.4-1) experimental; urgency=low
 
   * New upstream release 1.9.95.4.
@@ -395,6 +926,25 @@ koffice (1:1.9.96.0~that.is.really.1.9.9
 
  -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Mon, 05 May 2008 21:43:55 +0200
 
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.3-1ubuntu3) hardy; urgency=low
+
+  * Remove build-dep on libgsl, causes build failure
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 20 Feb 2008 10:24:38 +0000
+
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.3-1ubuntu2) hardy; urgency=low
+
+  * Add build-dep on libgsl0-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 19 Feb 2008 23:58:39 +0000
+
+koffice2 (1:1.9.96.0~that.is.really.1.9.95.3-1ubuntu1) hardy; urgency=low
+
+  * Kubuntu upload, using our kde.mk
+  * Add build-dep on libgmm-dev, libgsl0-dev
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 12 Feb 2008 10:20:22 +0000
+
 koffice (1:1.9.96.0~that.is.really.1.9.95.3-1) experimental; urgency=low
 
   * New upstream release 1.9.95.3.
diff -pruN 1:2.3.3-1/debian/control 1:2.3.3-0ubuntu9/debian/control
--- 1:2.3.3-1/debian/control	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/control	2011-11-09 18:42:30.000000000 +0000
@@ -1,32 +1,36 @@
 Source: koffice
 Section: kde
 Priority: optional
-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
+Maintainer: Kubuntu Developers <kubuntu-devel@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
 Uploaders: Ana Beatriz Guerrero Lopez <ana@debian.org>, Raúl Sánchez Siles <rasasi78@gmail.com>
-Build-Depends: cdbs, debhelper (>= 7), cmake (>= 2.6.2), pkg-kde-tools (>= 0.9),
- kdelibs5-dev (>= 4:4.4.3), kdepimlibs5-dev (>= 4:4.4.3), libkdcraw-dev (>= 4:4.4.3), 
+Build-Depends: cdbs, debhelper (>= 7), quilt, cmake (>= 2.6.2), pkg-kde-tools (>= 0.9),
+ kdelibs5-dev (>= 4:4.5.2-0ubuntu1), kdepimlibs5-dev (>= 4:4.4.3), libkdcraw-dev (>= 4:4.4.3), 
  libphonon-dev (>= 4:4.6.0really4.4.0),
  shared-mime-info, 
  libboost-dev, libopenexr-dev, libeigen2-dev (>= 2.0~beta6),
- libqimageblitz-dev, libqca2-dev, libglew1.5-dev,
- libexiv2-dev, libpng12-dev, liblcms1-dev, libtiff4-dev, libjpeg62-dev,
- libgif-dev, libopenjpeg-dev,
- libwv2-dev (>= 0.4.1), libmysqlclient-dev, libpoppler-dev, libpoppler-qt4-dev,
- libgsl0-dev, libwpd-dev (>=0.9.1), libwpg-dev (>=0.2.0),
- libxslt1-dev, libqt4-opengl-dev (>= 4.5.0), libqtwebkit-dev,
- pstoedit, libgmm++-dev, libfftw3-dev,
- libsqlite3-dev, libpq-dev, libpqxx3-dev, libxbase2.0-dev
+ libqimageblitz-dev, libqca2-dev, libglew1.5-dev [i386 amd64 powerpc],
+ libexiv2-dev, libpng12-dev, liblcms1-dev, libtiff4-dev, libjpeg-dev,
+ libgif-dev, libwpg-dev,
+ libmysqlclient-dev, libpoppler-qt4-dev, 
+ libgsl0-dev, libwpd-dev,
+ libxslt1-dev, libqt4-opengl-dev (>= 4.5.0) [i386 amd64 powerpc], 
+ pstoedit, libgmm-dev, libfftw3-dev, libqtwebkit-dev,
+ libsqlite3-dev, libpq-dev, libpqxx3-dev, libxbase2.0-dev,
+ librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev, create-resources, libspnav-dev,
+ okular-dev, libglib2.0-dev, libgsf-1-dev,
+ libx11-dev
 Standards-Version: 3.9.0
 Homepage: http://www.koffice.org/
-Vcs-Git: git://git.debian.org/pkg-kde/kde-std/koffice.git
-Vcs-Browser: http://git.debian.org/?p=pkg-kde/kde-std/koffice.git
+Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/koffice
+Vcs-Bzr: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/koffice
 
 Package: koffice
 Architecture: all
 Depends: karbon (>= ${source:Version}), kchart (>= ${source:Version}), kplato (>= ${source:Version}),
  kpresenter (>= ${source:Version}), krita (>= ${source:Version}), kspread (>= ${source:Version}),
  kword (>= ${source:Version}), kthesaurus (>= ${source:Version}),
- kexi (>= ${source:Version}), kformula (>= ${source:Version})
+ kexi (>= ${source:Version})
 Suggests: koffice-doc-html (>= ${source:Version})
 Description: KDE Office Suite
  KOffice is an integrated office suite for KDE, the K Desktop
@@ -39,8 +43,8 @@ Package: koffice-doc-html
 Architecture: all
 Section: doc
 Suggests: konqueror | www-browser, koffice
-Breaks: kpresenter-data (<< 1:2.0.0)
-Replaces: kpresenter-data (<< 1:2.0.0)
+Breaks: kpresenter-data (<< 1:2.2.0)
+Replaces: kpresenter-data (<< 1:2.2.0)
 Description: KDE Office Suite documentation in HTML format
  KOffice is an integrated office suite for KDE, the K Desktop
  Environment.  It offers a word processor, spreadsheet, presentation
@@ -52,8 +56,8 @@ Description: KDE Office Suite documentat
  format so it can be read with any web browser.
  .
  The documentation will be installed into the usual directories
- /usr/share/doc/kde/HTML/<language>/<app>/, for instance
- /usr/share/doc/kde/HTML/en/kword/.
+ /usr/share/doc/kde4/HTML/<language>/<app>/, for instance
+ /usr/share/doc/kde4/HTML/en/kword/.
  .
  This package is part of the KDE Office Suite.
 
@@ -61,8 +65,8 @@ Package: karbon
 Architecture: any
 Section: graphics
 Depends: ${shlibs:Depends}, koffice-libs (>= ${source:Version})
-Replaces: kword (<< 1:2.0.2-1), kchart (<= 1:2.2.1-3)
-Conflicts: kword (<< 1:2.0.2-1), kchart (<= 1:2.2.1-3)
+Replaces: kword (<< 1:2.0.2-1)
+Conflicts: kword (<< 1:2.0.2-1)
 Homepage: http://www.koffice.org/karbon/
 Description: a vector graphics application for the KDE Office Suite
  Karbon is a vector drawing application with an user interface that is easy to
@@ -115,6 +119,7 @@ Package: kexi
 Architecture: any
 Depends: ${shlibs:Depends}, koffice-libs (>= ${source:Version})
 #Suggests: kexi-mdb-plugin
+Replaces: koffice-libs (<< 1:2.2.0-1~pre1ubuntu1)
 Description: integrated database environment for the KDE Office Suite
  Kexi is an integrated data management application. It can be used for
  creating database schemas, inserting data, performing queries, and
@@ -130,72 +135,19 @@ Description: integrated database environ
  .
  This package is part of the KDE Office Suite.
 
-Package: kexi-plugin-kspread
-Architecture: any
-Depends: ${shlibs:Depends}, kexi (>= ${source:Version}),
- kspread (>= ${source:Version})
-Description: Plugins for integrated database environment for KDE Office Suite
- Kexi is an integrated data management application. It can be used for
- creating database schemas, inserting data, performing queries, and
- processing data. Forms can be created to provide a custom interface to
- your data. All database objects - tables, queries and forms - are stored
- in the database, making it easy to share data and design.
- .
- This package is part of the KDE Office Suite and provides KSpread
- plugin for Kexi.
-
-Package: kexi-plugin-mysql
-Architecture: any
-Depends: ${shlibs:Depends}, kexi (>= ${source:Version}), libmysqlclient16
-Description: Plugins for integrated database environment for KDE Office Suite
- Kexi is an integrated data management application. It can be used for
- creating database schemas, inserting data, performing queries, and
- processing data. Forms can be created to provide a custom interface to
- your data. All database objects - tables, queries and forms - are stored
- in the database, making it easy to share data and design.
- .
- This package is part of the KDE Office Suite and provides mysql
- plugin for Kexi.
-
-Package: kexi-plugin-postgresql
-Architecture: any
-Depends: ${shlibs:Depends}, kexi (>= ${source:Version}), libpqxx-3.0
-Description: Plugins for integrated database environment for KDE Office Suite
- Kexi is an integrated data management application. It can be used for
- creating database schemas, inserting data, performing queries, and
- processing data. Forms can be created to provide a custom interface to
- your data. All database objects - tables, queries and forms - are stored
- in the database, making it easy to share data and design.
- .
- This package is part of the KDE Office Suite and provides PostgreSQL 
- plugin for Kexi.
-
-Package: kexi-plugin-xbase
-Architecture: any
-Depends: ${shlibs:Depends}, kexi (>= ${source:Version}), libxbase2.0-0
-Description: Plugins for integrated database environment for KDE Office Suite
- Kexi is an integrated data management application. It can be used for
- creating database schemas, inserting data, performing queries, and
- processing data. Forms can be created to provide a custom interface to
- your data. All database objects - tables, queries and forms - are stored
- in the database, making it easy to share data and design.
- .
- This package is part of the KDE Office Suite and provides XBase 
- plugin for Kexi.
-
-Package: kformula
-Architecture: any
-Depends: ${shlibs:Depends}, koffice-libs (>= ${source:Version})
+#Package: kformula
+#Architecture: any
+#Depends: ${shlibs:Depends}, koffice-libs (>= ${source:Version})
 #Suggests: khelpcenter4, koffice-doc-html
-Description: formula drawing component for the KDE Office Suite
- KFormula contains the formula drawing components.  It can be used to embed
- formulas into KOffice documents.
- .
- Features include easy Greek letter insertion, intelligent cursor
- movement, advanced syntax highlighting, multi-level undo support,
- LaTeX export and MathML import.
- .
- This package is part of the KDE Office Suite.
+#Description: formula drawing component for the KDE Office Suite
+# KFormula contains the formula drawing components.  It can be used to embed
+# formulas into KOffice documents.
+# .
+# Features include easy Greek letter insertion, intelligent cursor
+# movement, advanced syntax highlighting, multi-level undo support,
+# LaTeX export and MathML import.
+# .
+# This package is part of the KDE Office Suite.
 # KFormula is a formula editor that provides the basic input facilities
 # and the support functionality expected of a KOffice application.
 # .
@@ -233,7 +185,7 @@ Package: kpresenter
 Architecture: any
 Depends: ${shlibs:Depends}, ${perl:Depends}, koffice-libs (>= ${source:Version})
 Suggests: khelpcenter4, koffice-doc-html
-Replaces: kpresenter-data (<< 1:1.9.90)
+Replaces: kpresenter-data (<< 1:1.9.90), koffice-libs (<< 1:2.2.0-1~pre1ubuntu1)
 Homepage: http://www.koffice.org/kpresenter/
 Description: a presentation program for the KDE Office Suite
  KPresenter is an easy to use yet still flexible presentation application. You
@@ -253,24 +205,24 @@ Description: a presentation program for 
 Package: krita
 Architecture: any
 Depends: ${shlibs:Depends}, krita-data (>= ${source:Version}), koffice-libs (>= ${source:Version})
-Recommends: dcraw
+Recommends: dcraw, pstoedit
 Suggests: khelpcenter4, koffice-doc-html
-Replaces: krita-data (<< 1:1.9.98.6)
+Replaces: krita-data (<< 1:2.2.83)
 Homepage: http://www.krita.org/
 Description: a pixel-based image manipulation program for the KDE Office Suite
  Krita is a creative application for raster images. Whether you want to create
  from scratch or work with existing images, Krita is for you. You can work with
- photos, scanned images or start with a blank slate. Krita supports most
- graphics tablets out of the box.
+ photos, scanned images or start for a blank slate. Krita supports most graphics
+ tablets out of the box.
  .
  Krita is different from other graphics design programs in that it has
  pluggable brush engines, some supporting brush resources like Gimp brush files,
- others offering sophisticated simulation of real brushes, and again others
- offering deformation of images and color mixing. Moreover, Krita has full
- support for graphics tablets, including features as pressure, tilt and rate,
- making it a great choice for artists. There are easy to use tools for drawing
- lines, ellipses and rectangles, and the freehand tool is supported by pluggable
- “drawing assistants” that help you draw shapes that still have a freehand
+ and other offering sophisticated simulation of real brushes, and others again
+ offering deforming your image or mixing colors. Moreover, Krita has full 
+ support for graphics tablets, including features as pressure, tilt and rate, 
+ making it a great choice for artists. There are easy to use tools for drawing 
+ lines, ellipses and rectangles, and the freehand tool is supported by pluggable 
+ “drawing assistants” that help you draw shapes that still have a freehand 
  feeling to them.
  .
  This package is part of the KDE Office Suite.
@@ -278,6 +230,7 @@ Description: a pixel-based image manipul
 Package: krita-data
 Architecture: all
 Conflicts: krita (<<1:1.9.96.0~that.is.really.1.9.95.10-1)
+Replaces: krita (<< 1:2.2.83)
 Homepage: http://www.krita.org/
 Description: data files for Krita painting program
  This package contains architecture-independent data files for Krita,
@@ -291,6 +244,7 @@ Package: kspread
 Architecture: any
 Depends: ${shlibs:Depends}, koffice-libs (>= ${source:Version})
 Suggests: khelpcenter4, koffice-doc-html
+Replaces: koffice-libs (<< 1:2.2.83)
 Homepage: http://www.koffice.org/kspread/
 Description: a spreadsheet for the KDE Office Suite
  KSpread is a powerful spreadsheet application.  It is scriptable and
@@ -303,7 +257,7 @@ Package: kword
 Architecture: any
 Depends: ${shlibs:Depends}, kword-data (>= ${source:Version}), koffice-libs (>= ${source:Version})
 Suggests: khelpcenter4, koffice-doc-html
-Replaces: kword-data (<< 1:1.9.98.6)
+Replaces: kword-data (<< 1:1.9.98.6), koffice-libs (<< 1:2.2.83)
 Homepage: http://www.koffice.org/kword/
 Description: a word processor for the KDE Office Suite
  KWord is a FrameMaker-like word processing and desktop publishing
@@ -340,10 +294,10 @@ Package: koffice-libs
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, koffice-data (>= ${source:Version})
-Recommends: ttf-lyx, ruby, python
-Suggests: wordnet, texlive
-Breaks: kchart (<=1:2.2.2-1)
-Replaces: kchart (<=1:2.2.2-1)
+Recommends: ruby, python, create-resources
+Suggests: ttf-lyx, wordnet, texlive
+Replaces: koreport, kchart (<< 1:2.2.83)
+Conflicts: koreport, kchart (<< 1:2.2.83)
 Description: common libraries and binaries for the KDE Office Suite
  This package provides the libraries and binaries that are shared amongst
  the various components of KOffice.
@@ -354,9 +308,8 @@ Package: koffice-data
 Section: libs
 Architecture: all
 Suggests: khelpcenter4, koffice-doc-html
-Conflicts: krita-data (<< 1.9.96.0~that.is.really.1.9.95.10-2), karbon (<< 1.9.96.0~that.is.really.1.9.95.10-2), kformula (<< 1.9.96.0~that.is.really.1.9.95.10-2)
-Breaks: kchart (<=1:2.2.2-1)
-Replaces: kchart (<=1:2.2.2-1)
+Replaces: kchart (<< 1:2.2.83)
+Conflicts: krita-data (<< 1.9.96.0~that.is.really.1.9.95.10-2), karbon (<< 1.9.96.0~that.is.really.1.9.95.10-2), kformula (<< 1.9.96.0~that.is.really.1.9.95.10-2), kchart (<< 1:2.2.83)
 Description: common shared data for the KDE Office Suite
  This package provides the architecture-independent data that is shared
  amongst the various components of KOffice.
@@ -366,12 +319,25 @@ Description: common shared data for the 
 Package: koffice-dev
 Architecture: any
 Depends: koffice-libs (>= ${source:Version}), karbon (>= ${source:Version}), kchart (>= ${source:Version}), kplato (>= ${source:Version}), kpresenter (>= ${source:Version}), krita (>= ${source:Version}), kspread (>= ${source:Version}), kthesaurus (>= ${source:Version}), kword (>= ${source:Version}), kdelibs5-dev 
+Replaces: koffice-dev-kde4, karbon (<< 1:2.1.91-0ubuntu1), kchart (<< 1:2.2.83),
+ koffice-libs (<< 1:2.2.0-1~pre1ubuntu1), kpresenter (<< 1:2.2.0), krita (<< 1:2.2.0),
+ kspread  (<< 1:2.2.0), kword (<< 1:2.2.0)
+Conflicts: kchart (<< 1:2.2.83)
 Description: common libraries for KOffice (development files)
  This package provides the development files for the libraries that are
  shared amongst the various components of KOffice.
  .
  This package is part of the KDE Office Suite.
 
+Package: okular-odp-backend
+Section: graphics
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Okular backend for ODP OpenDocument Presentation files
+ A plugin for Okular to read ODP OpenDocument Presentation files.
+ .
+ This package is part of the KDE Office Suite.
+
 Package: koffice-dbg
 Section: debug
 Architecture: any
diff -pruN 1:2.3.3-1/debian/karbon.install 1:2.3.3-0ubuntu9/debian/karbon.install
--- 1:2.3.3-1/debian/karbon.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/karbon.install	2011-11-09 18:42:30.000000000 +0000
@@ -15,7 +15,6 @@ usr/lib/kde4/karbonsvgexport.so
 usr/lib/kde4/karbonsvgimport.so
 usr/lib/kde4/wmfexport.so
 usr/lib/kde4/wmfimport.so
-usr/lib/kde4/wpgimport.so
 usr/lib/libkarboncommon.so.8
 usr/lib/libkarboncommon.so.8.0.0
 usr/lib/libkarbonui.so.8
@@ -41,6 +40,7 @@ usr/share/kde4/services/karbon_svgz_impo
 usr/share/kde4/services/karbontools.desktop
 usr/share/kde4/services/karbon_wmf_export.desktop
 usr/share/kde4/services/karbon_wmf_import.desktop
-usr/share/kde4/services/karbon_wpg_import.desktop
 usr/share/kde4/services/ServiceMenus/karbon_konqi.desktop
 usr/share/kde4/servicetypes/karbon_module.desktop
+usr/share/kde4/services/karbon_wpg_import.desktop
+usr/lib/kde4/wpgimport.so
diff -pruN 1:2.3.3-1/debian/karbon.lintian-overrides 1:2.3.3-0ubuntu9/debian/karbon.lintian-overrides
--- 1:2.3.3-1/debian/karbon.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/karbon.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1 +1 @@
-karbon: package-name-doesnt-match-sonames libkarboncommon8 libkarbonui8
+karbon: package-name-doesnt-match-sonames libkarboncommon7 libkarbonui7
diff -pruN 1:2.3.3-1/debian/kexi.install 1:2.3.3-0ubuntu9/debian/kexi.install
--- 1:2.3.3-1/debian/kexi.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi.install	2011-11-09 18:42:30.000000000 +0000
@@ -2,6 +2,7 @@ usr/bin/kexi
 usr/lib/kde4/kexidb_mysqldriver.so
 usr/lib/kde4/kexidb_pqxxsqldriver.so
 usr/lib/kde4/kexidb_sqlite3driver.so
+usr/lib/kde4/kexidb_sybasedriver.so
 usr/lib/kde4/kexidb_xbasedriver.so
 usr/lib/kde4/kexihandler_csv_importexport.so
 usr/lib/kde4/kexihandler_form.so
@@ -10,8 +11,13 @@ usr/lib/kde4/kexihandler_query.so
 usr/lib/kde4/kexihandler_report.so
 usr/lib/kde4/kexihandler_script.so
 usr/lib/kde4/kexihandler_table.so
-usr/lib/kde4/keximigrate_txt.so
+usr/lib/kde4/keximigrate_kspread.so
 usr/lib/kde4/keximigrate_mdb.so
+usr/lib/kde4/keximigrate_mysql.so
+usr/lib/kde4/keximigrate_pqxx.so
+usr/lib/kde4/keximigrate_sybase.so
+usr/lib/kde4/keximigrate_txt.so
+usr/lib/kde4/keximigrate_xbase.so
 usr/lib/kde4/kexirelationdesignshape.so
 usr/lib/kde4/kformdesigner_containers.so
 usr/lib/kde4/kformdesigner_kexidbwidgets.so
@@ -39,18 +45,34 @@ usr/lib/libkexiutils.so.8
 usr/lib/libkexiutils.so.8.0.0
 usr/lib/libkformdesigner.so.8
 usr/lib/libkformdesigner.so.8.0.0
+usr/lib/libkspreadodf.so.8
+usr/lib/libkspreadodf.so.8.0.0
 usr/share/applications/kde4/kexi.desktop
 usr/share/kde4/apps/kexi/
 usr/share/kde4/config/kexirc
 usr/share/kde4/services/kexidb_mysqldriver.desktop
 usr/share/kde4/services/kexidb_pqxxsqldriver.desktop
 usr/share/kde4/services/kexidb_sqlite3driver.desktop
+usr/share/kde4/services/kexidb_sybasedriver.desktop
 usr/share/kde4/services/kexidb_xbasedriver.desktop
-usr/share/kde4/services/keximigrate_txt.desktop
+usr/share/kde4/services/kexi/kexicsv_importexporthandler.desktop
+usr/share/kde4/services/kexi/kexiformhandler.desktop
+usr/share/kde4/services/kexi/keximigrationhandler.desktop
+usr/share/kde4/services/kexi/kexiqueryhandler.desktop
+usr/share/kde4/services/kexi/kexireporthandler.desktop
+usr/share/kde4/services/kexi/kexiscripthandler.desktop
+usr/share/kde4/services/kexi/kexitablehandler.desktop
+usr/share/kde4/services/keximigrate_kspread.desktop
 usr/share/kde4/services/keximigrate_mdb.desktop
-usr/share/kde4/services/kexi/
+usr/share/kde4/services/keximigrate_mysql.desktop
+usr/share/kde4/services/keximigrate_pqxx.desktop
+usr/share/kde4/services/keximigrate_sybase.desktop
+usr/share/kde4/services/keximigrate_txt.desktop
+usr/share/kde4/services/keximigrate_xbase.desktop
 usr/share/kde4/services/kexirelationdesignshape.desktop
-usr/share/kde4/services/kformdesigner/
+usr/share/kde4/services/kformdesigner/kformdesigner_containers.desktop
+usr/share/kde4/services/kformdesigner/kformdesigner_kexidbfactory.desktop
+usr/share/kde4/services/kformdesigner/kformdesigner_stdwidgets.desktop
 usr/share/kde4/servicetypes/kexidb_driver.desktop
 usr/share/kde4/servicetypes/kexihandler.desktop
 usr/share/kde4/servicetypes/keximigration_driver.desktop
diff -pruN 1:2.3.3-1/debian/kexi.lintian-overrides 1:2.3.3-0ubuntu9/debian/kexi.lintian-overrides
--- 1:2.3.3-1/debian/kexi.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1 +1 @@
-kexi: package-name-doesnt-match-sonames libkexicore8 libkexidatatable8 libkexidb8 libkexiextendedwidgets8.0.0 libkexiformutils8 libkexiguiutils8 libkeximain8 libkeximigrate8 libkexirelationsview8 libkexiutils8 libkformdesigner8
+kexi: package-name-doesnt-match-sonames libkexicore7 libkexidatatable7 libkexidb7 libkexiextendedwidgets7.0.0 libkexiformutils7 libkexiguiutils7 libkeximain7 libkeximigrate7 libkexirelationsview7 libkexiutils7 libkformdesigner7
diff -pruN 1:2.3.3-1/debian/kexi-plugin-kspread.install 1:2.3.3-0ubuntu9/debian/kexi-plugin-kspread.install
--- 1:2.3.3-1/debian/kexi-plugin-kspread.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi-plugin-kspread.install	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-usr/lib/kde4/keximigrate_kspread.so
-usr/share/kde4/services/keximigrate_kspread.desktop
diff -pruN 1:2.3.3-1/debian/kexi-plugin-mysql.install 1:2.3.3-0ubuntu9/debian/kexi-plugin-mysql.install
--- 1:2.3.3-1/debian/kexi-plugin-mysql.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi-plugin-mysql.install	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-usr/lib/kde4/keximigrate_mysql.so
-usr/share/kde4/services/keximigrate_mysql.desktop
diff -pruN 1:2.3.3-1/debian/kexi-plugin-postgresql.install 1:2.3.3-0ubuntu9/debian/kexi-plugin-postgresql.install
--- 1:2.3.3-1/debian/kexi-plugin-postgresql.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi-plugin-postgresql.install	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-usr/lib/kde4/keximigrate_pqxx.so
-usr/share/kde4/services/keximigrate_pqxx.desktop
diff -pruN 1:2.3.3-1/debian/kexi-plugin-xbase.install 1:2.3.3-0ubuntu9/debian/kexi-plugin-xbase.install
--- 1:2.3.3-1/debian/kexi-plugin-xbase.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kexi-plugin-xbase.install	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-usr/lib/kde4/keximigrate_xbase.so
-usr/share/kde4/services/keximigrate_xbase.desktop
diff -pruN 1:2.3.3-1/debian/kformula.install 1:2.3.3-0ubuntu9/debian/kformula.install
--- 1:2.3.3-1/debian/kformula.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kformula.install	1970-01-01 00:00:00.000000000 +0000
@@ -1,78 +0,0 @@
-usr/lib/kde4/formulashape.so
-usr/lib/libkformulalib.so.8
-usr/lib/libkformulalib.so.8.0.0
-usr/lib/libkformulaprivate.so.8
-usr/lib/libkformulaprivate.so.8.0.0
-usr/share/icons/hicolor/16x16/apps/kformula.png
-usr/share/icons/hicolor/22x22/apps/kformula.png
-usr/share/icons/hicolor/32x32/apps/kformula.png
-usr/share/icons/hicolor/48x48/apps/kformula.png
-usr/share/kde4/apps/formulashape/fonts/ArevBd.ttf
-usr/share/kde4/apps/formulashape/fonts/ArevBI.ttf
-usr/share/kde4/apps/formulashape/fonts/ArevIt.ttf
-usr/share/kde4/apps/formulashape/fonts/Arev.ttf
-usr/share/kde4/apps/formulashape/fonts/cmex10.ttf
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/abs.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/brackets.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/frac.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/gsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/gsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/int.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/lsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/lsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/matrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/multiline.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/onetwomatrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/over.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/paren.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/prod.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/rsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/rsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/sqrt.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/sum.png
-usr/share/kde4/apps/koffice/icons/hicolor/16x16/actions/under.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/abs.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/brackets.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/formulashape.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/frac.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/gsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/gsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/inscol.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/insrow.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/int.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/lsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/lsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/matrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/multiline.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/onetwomatrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/over.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/paren.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/prod.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/remcol.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/remrow.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/rsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/rsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/sqrt.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/sum.png
-usr/share/kde4/apps/koffice/icons/hicolor/22x22/actions/under.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/abs.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/brackets.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/frac.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/gsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/gsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/int.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/lsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/lsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/matrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/multiline.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/onetwomatrix.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/over.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/paren.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/prod.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/rsub.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/rsup.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/sqrt.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/sum.png
-usr/share/kde4/apps/koffice/icons/hicolor/32x32/actions/under.png
-usr/share/kde4/services/formulashape.desktop
-usr/share/kde4/services/ServiceMenus/kformula_konqi.desktop
diff -pruN 1:2.3.3-1/debian/koffice-data.install 1:2.3.3-0ubuntu9/debian/koffice-data.install
--- 1:2.3.3-1/debian/koffice-data.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/koffice-data.install	2011-11-09 18:42:30.000000000 +0000
@@ -273,19 +273,25 @@ usr/share/kde4/apps/musicshape/fonts/Emm
 usr/share/kde4/services/artistictextshape.desktop
 usr/share/kde4/services/autocorrect.desktop
 usr/share/kde4/services/changecase.desktop
+usr/share/kde4/services/chartshape.desktop
+usr/share/kde4/services/commentshape.desktop
 usr/share/kde4/services/defaulttools.desktop
 usr/share/kde4/services/divineproportionshape.desktop
 usr/share/kde4/services/generic_filter.desktop
-usr/share/kde4/services/kodocinfopropspage.desktop
 usr/share/kde4/services/kofficedockers.desktop
 usr/share/kde4/services/kofficethumbnail.desktop
 usr/share/kde4/services/kolcmsengine.desktop
 usr/share/kde4/services/kopabackgroundtool.desktop
+usr/share/kde4/services/koreport_barcodeplugin.desktop
+usr/share/kde4/services/koreport_chartplugin.desktop
+usr/share/kde4/services/koreport_shapeplugin.desktop
 usr/share/kde4/services/kounavail.desktop
 usr/share/kde4/services/musicshape.desktop
 usr/share/kde4/services/paragraphtool.desktop
 usr/share/kde4/services/pathshapes.desktop
 usr/share/kde4/services/pictureshape.desktop
+usr/share/kde4/services/pluginshape.desktop
+usr/share/kde4/services/spacenavigator.desktop
 usr/share/kde4/services/spellcheck.desktop
 usr/share/kde4/services/textshape.desktop
 usr/share/kde4/services/textvariables.desktop
@@ -293,6 +299,8 @@ usr/share/kde4/services/thesaurustool.de
 usr/share/kde4/services/videoshape.desktop
 usr/share/kde4/services/xslt_export.desktop
 usr/share/kde4/services/xslt_import.desktop
+usr/share/kde4/services/ServiceMenus/kchart_konqi.desktop
+usr/share/kde4/services/kodocinfopropspage.desktop
 usr/share/kde4/servicetypes/filtereffect.desktop
 usr/share/kde4/servicetypes/flake.desktop
 usr/share/kde4/servicetypes/flakedevice.desktop
@@ -305,6 +313,7 @@ usr/share/kde4/servicetypes/kofficepart.
 usr/share/kde4/servicetypes/kofilter.desktop
 usr/share/kde4/servicetypes/kofilterwrapper.desktop
 usr/share/kde4/servicetypes/koplugin.desktop
+usr/share/kde4/servicetypes/koreport_itemplugin.desktop
 usr/share/kde4/servicetypes/pigment.desktop
 usr/share/kde4/servicetypes/pigmentextension.desktop
 usr/share/kde4/servicetypes/presentationeventaction.desktop
@@ -320,14 +329,3 @@ usr/share/templates/.source/SpreadSheet.
 usr/share/templates/.source/TextDocument.kwt
 usr/share/templates/SpreadSheet.desktop
 usr/share/templates/TextDocument.desktop
-usr/share/kde4/services/ServiceMenus/kchart_konqi.desktop
-usr/share/kde4/services/chartshape.desktop
-usr/share/kde4/services/commentshape.desktop
-usr/share/kde4/services/pluginshape.desktop
-usr/share/kde4/servicetypes/kochart.desktop
-usr/share/kde4/servicetypes/koreport_itemplugin.desktop
-usr/share/kde4/services/koreport_chartplugin.desktop
-usr/share/kde4/services/koreport_barcodeplugin.desktop
-usr/share/kde4/services/koreport_shapeplugin.desktop
-
-
diff -pruN 1:2.3.3-1/debian/koffice-dev.install 1:2.3.3-0ubuntu9/debian/koffice-dev.install
--- 1:2.3.3-1/debian/koffice-dev.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/koffice-dev.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,4 +1,5 @@
 usr/include/
+usr/lib/kde4/chartshape.so
 usr/lib/libchartshapelib.so
 usr/lib/libflake.so
 usr/lib/libkarboncommon.so
@@ -41,7 +42,6 @@ usr/lib/libkritalibbrush.so
 usr/lib/libkritalibpaintop.so
 usr/lib/libkritaui.so
 usr/lib/libkspreadcommon.so
-usr/lib/libkspreadodf.so
 usr/lib/libkwmf.so
 usr/lib/libkwordexportfilters.so
 usr/lib/libkwordprivate.so
diff -pruN 1:2.3.3-1/debian/koffice-doc-html.install 1:2.3.3-0ubuntu9/debian/koffice-doc-html.install
--- 1:2.3.3-1/debian/koffice-doc-html.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/koffice-doc-html.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,7 +1,205 @@
-usr/share/doc/kde/HTML/en/karbon/
-usr/share/doc/kde/HTML/en/kexi/
-usr/share/doc/kde/HTML/en/kformula/
-usr/share/doc/kde/HTML/en/koffice/
-usr/share/doc/kde/HTML/en/kpresenter/
-usr/share/doc/kde/HTML/en/kspread/
-usr/share/doc/kde/HTML/en/thesaurus/
+usr/share/doc/kde/HTML/en/karbon/common
+usr/share/doc/kde/HTML/en/karbon/index.cache.bz2
+usr/share/doc/kde/HTML/en/karbon/index.docbook
+usr/share/doc/kde/HTML/en/kexi/basics.docbook
+usr/share/doc/kde/HTML/en/kexi/building.docbook
+usr/share/doc/kde/HTML/en/kexi/common
+usr/share/doc/kde/HTML/en/kexi/comparing.docbook
+usr/share/doc/kde/HTML/en/kexi/configuration.docbook
+usr/share/doc/kde/HTML/en/kexi/contact-example.png
+usr/share/doc/kde/HTML/en/kexi/credits.docbook
+usr/share/doc/kde/HTML/en/kexi/database.docbook
+usr/share/doc/kde/HTML/en/kexi/designingforms.docbook
+usr/share/doc/kde/HTML/en/kexi/enteringdataintotables.docbook
+usr/share/doc/kde/HTML/en/kexi/enteringdatausingforms.docbook
+usr/share/doc/kde/HTML/en/kexi/index.cache.bz2
+usr/share/doc/kde/HTML/en/kexi/index.docbook
+usr/share/doc/kde/HTML/en/kexi/intro.docbook
+usr/share/doc/kde/HTML/en/kexi/menus.docbook
+usr/share/doc/kde/HTML/en/kexi/querydesigning.docbook
+usr/share/doc/kde/HTML/en/kformula/ambiguous-string.png
+usr/share/doc/kde/HTML/en/kformula/common
+usr/share/doc/kde/HTML/en/kformula/correct_index_location.png
+usr/share/doc/kde/HTML/en/kformula/definite_integral.png
+usr/share/doc/kde/HTML/en/kformula/file-toolbar2.png
+usr/share/doc/kde/HTML/en/kformula/file-toolbar.png
+usr/share/doc/kde/HTML/en/kformula/green1.png
+usr/share/doc/kde/HTML/en/kformula/green2.png
+usr/share/doc/kde/HTML/en/kformula/greens.png
+usr/share/doc/kde/HTML/en/kformula/incorrect_index_location.png
+usr/share/doc/kde/HTML/en/kformula/index.cache.bz2
+usr/share/doc/kde/HTML/en/kformula/index.docbook
+usr/share/doc/kde/HTML/en/kformula/index_smear.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst1.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst2.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst3.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst4.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst5.png
+usr/share/doc/kde/HTML/en/kformula/kfontinst6.png
+usr/share/doc/kde/HTML/en/kformula/lower-index.png
+usr/share/doc/kde/HTML/en/kformula/matrix.png
+usr/share/doc/kde/HTML/en/kformula/matrix-view.png
+usr/share/doc/kde/HTML/en/kformula/negative_thin_space.png
+usr/share/doc/kde/HTML/en/kformula/path-integral.png
+usr/share/doc/kde/HTML/en/kformula/rk-edit0.png
+usr/share/doc/kde/HTML/en/kformula/rk-edit1.png
+usr/share/doc/kde/HTML/en/kformula/rk-edit2.png
+usr/share/doc/kde/HTML/en/kformula/scilab-edit.png
+usr/share/doc/kde/HTML/en/kformula/scilab.png
+usr/share/doc/kde/HTML/en/kformula/shortcut0.png
+usr/share/doc/kde/HTML/en/kformula/shortcut1.png
+usr/share/doc/kde/HTML/en/kformula/sin.png
+usr/share/doc/kde/HTML/en/kformula/toolbars.png
+usr/share/doc/kde/HTML/en/kformula/upper-index.png
+usr/share/doc/kde/HTML/en/koffice/common
+usr/share/doc/kde/HTML/en/koffice/index.cache.bz2
+usr/share/doc/kde/HTML/en/koffice/index.docbook
+usr/share/doc/kde/HTML/en/kpresenter/a11y.docbook
+usr/share/doc/kde/HTML/en/kpresenter/autocorrection1.png
+usr/share/doc/kde/HTML/en/kpresenter/autocorrection2.png
+usr/share/doc/kde/HTML/en/kpresenter/autocorrection3.png
+usr/share/doc/kde/HTML/en/kpresenter/autocorrection4.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle1.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle3.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle4.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle5.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle6.png
+usr/share/doc/kde/HTML/en/kpresenter/barstyle7.png
+usr/share/doc/kde/HTML/en/kpresenter/break.png
+usr/share/doc/kde/HTML/en/kpresenter/changeformat.png
+usr/share/doc/kde/HTML/en/kpresenter/common
+usr/share/doc/kde/HTML/en/kpresenter/completion.png
+usr/share/doc/kde/HTML/en/kpresenter/configure1.png
+usr/share/doc/kde/HTML/en/kpresenter/configure2.png
+usr/share/doc/kde/HTML/en/kpresenter/configure3.png
+usr/share/doc/kde/HTML/en/kpresenter/configure4a1.png
+usr/share/doc/kde/HTML/en/kpresenter/configure4a.png
+usr/share/doc/kde/HTML/en/kpresenter/configure4b.png
+usr/share/doc/kde/HTML/en/kpresenter/configure4c.png
+usr/share/doc/kde/HTML/en/kpresenter/configure4.png
+usr/share/doc/kde/HTML/en/kpresenter/configure5.png
+usr/share/doc/kde/HTML/en/kpresenter/configure6b.png
+usr/share/doc/kde/HTML/en/kpresenter/configure6c.png
+usr/share/doc/kde/HTML/en/kpresenter/configure6d.png
+usr/share/doc/kde/HTML/en/kpresenter/configure6e.png
+usr/share/doc/kde/HTML/en/kpresenter/configure6.png
+usr/share/doc/kde/HTML/en/kpresenter/configure7.png
+usr/share/doc/kde/HTML/en/kpresenter/faq.docbook
+usr/share/doc/kde/HTML/en/kpresenter/great-presentations.docbook
+usr/share/doc/kde/HTML/en/kpresenter/guides.docbook
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow1.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow2.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow3.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow4.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow5.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow6.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow7.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow8.png
+usr/share/doc/kde/HTML/en/kpresenter/htmlshow9.png
+usr/share/doc/kde/HTML/en/kpresenter/index.cache.bz2
+usr/share/doc/kde/HTML/en/kpresenter/index.docbook
+usr/share/doc/kde/HTML/en/kpresenter/kbd-focus-ext.png
+usr/share/doc/kde/HTML/en/kpresenter/link.png
+usr/share/doc/kde/HTML/en/kpresenter/menus.docbook
+usr/share/doc/kde/HTML/en/kpresenter/mousenav.png
+usr/share/doc/kde/HTML/en/kpresenter/msexport1.png
+usr/share/doc/kde/HTML/en/kpresenter/msexport2b.png
+usr/share/doc/kde/HTML/en/kpresenter/msexport2.png
+usr/share/doc/kde/HTML/en/kpresenter/msexport3.png
+usr/share/doc/kde/HTML/en/kpresenter/msexport4.png
+usr/share/doc/kde/HTML/en/kpresenter/options.docbook
+usr/share/doc/kde/HTML/en/kpresenter/properties.png
+usr/share/doc/kde/HTML/en/kpresenter/screen.docbook
+usr/share/doc/kde/HTML/en/kpresenter/settings01.png
+usr/share/doc/kde/HTML/en/kpresenter/settings03.png
+usr/share/doc/kde/HTML/en/kpresenter/settings04.png
+usr/share/doc/kde/HTML/en/kpresenter/template02.png
+usr/share/doc/kde/HTML/en/kpresenter/template03.png
+usr/share/doc/kde/HTML/en/kpresenter/template04.png
+usr/share/doc/kde/HTML/en/kpresenter/template05.png
+usr/share/doc/kde/HTML/en/kpresenter/template06.png
+usr/share/doc/kde/HTML/en/kpresenter/template07.png
+usr/share/doc/kde/HTML/en/kpresenter/textmenu1.png
+usr/share/doc/kde/HTML/en/kpresenter/textmenu2.png
+usr/share/doc/kde/HTML/en/kpresenter/toolsmenu01.png
+usr/share/doc/kde/HTML/en/kpresenter/tts.png
+usr/share/doc/kde/HTML/en/kpresenter/tut01.png
+usr/share/doc/kde/HTML/en/kpresenter/tut02.png
+usr/share/doc/kde/HTML/en/kpresenter/tut03.png
+usr/share/doc/kde/HTML/en/kpresenter/tut04.png
+usr/share/doc/kde/HTML/en/kpresenter/tut05.png
+usr/share/doc/kde/HTML/en/kpresenter/tut06.png
+usr/share/doc/kde/HTML/en/kpresenter/tut07.png
+usr/share/doc/kde/HTML/en/kpresenter/tut08.png
+usr/share/doc/kde/HTML/en/kpresenter/tut09.png
+usr/share/doc/kde/HTML/en/kpresenter/tut10.png
+usr/share/doc/kde/HTML/en/kpresenter/tut11.png
+usr/share/doc/kde/HTML/en/kpresenter/tut12.png
+usr/share/doc/kde/HTML/en/kpresenter/tut13.png
+usr/share/doc/kde/HTML/en/kpresenter/tut14.png
+usr/share/doc/kde/HTML/en/kpresenter/tut15.png
+usr/share/doc/kde/HTML/en/kpresenter/tut16.png
+usr/share/doc/kde/HTML/en/kpresenter/tut17.png
+usr/share/doc/kde/HTML/en/kpresenter/tut18.png
+usr/share/doc/kde/HTML/en/kpresenter/tut19.png
+usr/share/doc/kde/HTML/en/kpresenter/tut20.png
+usr/share/doc/kde/HTML/en/kpresenter/tut21.png
+usr/share/doc/kde/HTML/en/kpresenter/tut22.png
+usr/share/doc/kde/HTML/en/kpresenter/tut23.png
+usr/share/doc/kde/HTML/en/kpresenter/tut24.png
+usr/share/doc/kde/HTML/en/kpresenter/tut25.png
+usr/share/doc/kde/HTML/en/kpresenter/tut26.png
+usr/share/doc/kde/HTML/en/kpresenter/tutorial.docbook
+usr/share/doc/kde/HTML/en/kpresenter/zoomfactor.png
+usr/share/doc/kde/HTML/en/kspread/a11y.docbook
+usr/share/doc/kde/HTML/en/kspread/advanced.docbook
+usr/share/doc/kde/HTML/en/kspread/basics.docbook
+usr/share/doc/kde/HTML/en/kspread/cellformat0.png
+usr/share/doc/kde/HTML/en/kspread/cellformat1.png
+usr/share/doc/kde/HTML/en/kspread/cellformat2.png
+usr/share/doc/kde/HTML/en/kspread/cellformat3.png
+usr/share/doc/kde/HTML/en/kspread/cellformat4.png
+usr/share/doc/kde/HTML/en/kspread/cellformat5.png
+usr/share/doc/kde/HTML/en/kspread/cellformat6.png
+usr/share/doc/kde/HTML/en/kspread/cellformat7.png
+usr/share/doc/kde/HTML/en/kspread/cellprotection1.png
+usr/share/doc/kde/HTML/en/kspread/cellprotection2.png
+usr/share/doc/kde/HTML/en/kspread/chart1.png
+usr/share/doc/kde/HTML/en/kspread/commands.docbook
+usr/share/doc/kde/HTML/en/kspread/common
+usr/share/doc/kde/HTML/en/kspread/configdialog.docbook
+usr/share/doc/kde/HTML/en/kspread/config.docbook
+usr/share/doc/kde/HTML/en/kspread/configure1.png
+usr/share/doc/kde/HTML/en/kspread/configure2.png
+usr/share/doc/kde/HTML/en/kspread/configure3.png
+usr/share/doc/kde/HTML/en/kspread/configure4.png
+usr/share/doc/kde/HTML/en/kspread/configure5.png
+usr/share/doc/kde/HTML/en/kspread/configure6.png
+usr/share/doc/kde/HTML/en/kspread/copy1.png
+usr/share/doc/kde/HTML/en/kspread/currency.png
+usr/share/doc/kde/HTML/en/kspread/decreasedecimal.png
+usr/share/doc/kde/HTML/en/kspread/faq.docbook
+usr/share/doc/kde/HTML/en/kspread/format.docbook
+usr/share/doc/kde/HTML/en/kspread/hideformula1.png
+usr/share/doc/kde/HTML/en/kspread/hideformula2.png
+usr/share/doc/kde/HTML/en/kspread/hideformula3.png
+usr/share/doc/kde/HTML/en/kspread/hideformula4.png
+usr/share/doc/kde/HTML/en/kspread/hideformula5.png
+usr/share/doc/kde/HTML/en/kspread/importexport.docbook
+usr/share/doc/kde/HTML/en/kspread/increasedecimal.png
+usr/share/doc/kde/HTML/en/kspread/index.cache.bz2
+usr/share/doc/kde/HTML/en/kspread/index.docbook
+usr/share/doc/kde/HTML/en/kspread/kbd-focus-ext.png
+usr/share/doc/kde/HTML/en/kspread/mousenav.png
+usr/share/doc/kde/HTML/en/kspread/newdocument.png
+usr/share/doc/kde/HTML/en/kspread/percent.png
+usr/share/doc/kde/HTML/en/kspread/sheetproperties.png
+usr/share/doc/kde/HTML/en/kspread/shortcut1.png
+usr/share/doc/kde/HTML/en/kspread/shortcut2.png
+usr/share/doc/kde/HTML/en/kspread/shortcut3.png
+usr/share/doc/kde/HTML/en/kspread/sort1.png
+usr/share/doc/kde/HTML/en/kspread/starting1.png
+usr/share/doc/kde/HTML/en/kspread/tts.png
+usr/share/doc/kde/HTML/en/thesaurus/common
+usr/share/doc/kde/HTML/en/thesaurus/index.cache.bz2
+usr/share/doc/kde/HTML/en/thesaurus/index.docbook
diff -pruN 1:2.3.3-1/debian/koffice-libs.install 1:2.3.3-0ubuntu9/debian/koffice-libs.install
--- 1:2.3.3-1/debian/koffice-libs.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/koffice-libs.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,12 +1,10 @@
 usr/bin/koconverter
 usr/lib/kde4/artistictextshape.so
 usr/lib/kde4/autocorrect.so
-usr/lib/kde4/chartshape.so
 usr/lib/kde4/changecase.so
 usr/lib/kde4/commentshape.so
 usr/lib/kde4/defaulttools.so
 usr/lib/kde4/divineproportionshape.so
-usr/lib/kde4/kodocinfopropspage.so
 usr/lib/kde4/kofficedockers.so
 usr/lib/kde4/kofficescan.so
 usr/lib/kde4/kofficethumbnail.so
@@ -15,6 +13,7 @@ usr/lib/kde4/kopabackgroundtool.so
 usr/lib/kde4/koreport_barcodeplugin.so
 usr/lib/kde4/koreport_chartplugin.so
 usr/lib/kde4/koreport_shapeplugin.so
+usr/lib/kde4/excelimporttodoc.so
 usr/lib/kde4/generickofilter.so
 usr/lib/kde4/kounavailpart.so
 usr/lib/kde4/xsltexport.so
@@ -22,21 +21,23 @@ usr/lib/kde4/xsltimport.so
 usr/lib/kde4/musicshape.so
 usr/lib/kde4/paragraphtool.so
 usr/lib/kde4/pathshapes.so
-usr/lib/kde4/pictureshape.so
 usr/lib/kde4/pluginshape.so
+usr/lib/kde4/pictureshape.so
+usr/lib/kde4/spacenavigator.so
 usr/lib/kde4/spellcheck.so
 usr/lib/kde4/textshape.so
 usr/lib/kde4/textvariables.so
 usr/lib/kde4/thesaurustool.so
 usr/lib/kde4/videoshape.so
+usr/lib/kde4/kodocinfopropspage.so
 usr/lib/libchartshapelib.so.8
 usr/lib/libchartshapelib.so.8.0.0
-usr/lib/libflake.so.8
-usr/lib/libflake.so.8.0.0
 usr/lib/libkdchart.so.8
 usr/lib/libkdchart.so.8.0.0
 usr/lib/libkochart.so.8
 usr/lib/libkochart.so.8.0.0
+usr/lib/libflake.so.8
+usr/lib/libflake.so.8.0.0
 usr/lib/libkokross.so.8
 usr/lib/libkokross.so.8.0.0
 usr/lib/libkomain.so.8
diff -pruN 1:2.3.3-1/debian/koffice-libs.lintian-overrides 1:2.3.3-0ubuntu9/debian/koffice-libs.lintian-overrides
--- 1:2.3.3-1/debian/koffice-libs.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/koffice-libs.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1 +1 @@
-koffice-libs: package-name-doesnt-match-sonames libflake8 libkokross8 libkomain8 libkoodf8 libkopageapp8 libkoplugin8 libkoproperty8 libkoreport8 libkotext8 libkowidgets8 libkowmf8 libkwmf8 libmsooxml8 libpigmentcms8 libkochart8 libchartshapelib8 libkdchart8
+koffice-libs: package-name-doesnt-match-sonames libflake7 libkokross7 libkomain7 libkoodf7 libkopageapp7 libkoplugin7 libkoproperty7 libkoreport7 libkotext7 libkowidgets7 libkowmf7 libkwmf7 libmsooxml7 libpigmentcms7 libkochart7 libchartshapelib7 libkdchart7
diff -pruN 1:2.3.3-1/debian/kplato.install 1:2.3.3-0ubuntu9/debian/kplato.install
--- 1:2.3.3-1/debian/kplato.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kplato.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,5 +1,6 @@
 usr/bin/kplato
 usr/bin/kplatowork
+usr/lib/kde4/kplatorcpsscheduler.so
 usr/lib/kde4/krossmodulekplato.so
 usr/lib/kde4/icalendarexport.so
 usr/lib/kde4/kplatopart.so
@@ -49,13 +50,67 @@ usr/share/icons/hicolor/scalable/apps/kp
 usr/share/icons/hicolor/scalable/apps/kplatowork.svgz
 usr/share/icons/hicolor/scalable/mimetypes/application-x-vnd.kde.kplato.svgz
 usr/share/icons/hicolor/scalable/mimetypes/application-x-vnd.kde.kplato.work.svgz
-usr/share/kde4/apps/kplato/
-usr/share/kde4/apps/kplatowork/
+usr/share/kde4/apps/kplato/about/intro.html
+usr/share/kde4/apps/kplato/about/kplato.css
+usr/share/kde4/apps/kplato/about/main.html
+usr/share/kde4/apps/kplato/about/tips.html
+usr/share/kde4/apps/kplato/about/top-left-kplato.png
+usr/share/kde4/apps/kplato/about/tutorial.html
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/accounts.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/gantt_chart.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/pert_chart.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/resource-calendar-child-insert.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/resource-calendar-insert.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/resource-group-new.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/resources.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-task-add.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-task-child-add.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-baselined-add.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-baselined.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-baselined-remove.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-calculus.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-child-insert.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-edit.png
+usr/share/kde4/apps/kplato/icons/hicolor/22x22/actions/view-time-schedule-insert.png
+usr/share/kde4/apps/kplato/icons/hicolor/32x32/actions/view-task.png
+usr/share/kde4/apps/kplato/icons/hicolor/48x48/actions/template_timechart.png
+usr/share/kde4/apps/kplato/icons/hicolor/scalable/actions/template_timechart.svgz
+usr/share/kde4/apps/kplato/kpartplugins/scripting.rc
+usr/share/kde4/apps/kplato/kplato.rc
+usr/share/kde4/apps/kplato/kplato_readonly.rc
+usr/share/kde4/apps/kplato/scripts/extensions/busyinfoclear.py
+usr/share/kde4/apps/kplato/scripts/extensions/busyinfoexport.py
+usr/share/kde4/apps/kplato/scripts/extensions/busyinfoimport.py
+usr/share/kde4/apps/kplato/scripts/extensions/resourcesimport.py
+usr/share/kde4/apps/kplato/scripts/samples/sample_busyinfocheck.py
+usr/share/kde4/apps/kplato/scripts/samples/sample_project.py
+usr/share/kde4/apps/kplato/scripts/scripts.rc
+usr/share/kde4/apps/kplato/templates/Simple/Basicproject.desktop
+usr/share/kde4/apps/kplato/templates/Simple/8HourDay-40HourWeek.desktop
+usr/share/kde4/apps/kplato/templates/Simple/.directory
+usr/share/kde4/apps/kplato/templates/Simple/Plain.desktop
+usr/share/kde4/apps/kplato/templates/Simple/.source/Basicproject.kplatot
+usr/share/kde4/apps/kplato/templates/Simple/.source/8HourDay-40HourWeek.kplatot
+usr/share/kde4/apps/kplato/templates/Simple/.source/Plain.kplatot
+usr/share/kde4/apps/kplatowork/icons/hicolor/128x128/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/16x16/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/22x22/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/32x32/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/48x48/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/64x64/actions/template_empty.png
+usr/share/kde4/apps/kplatowork/icons/hicolor/scalable/actions/template_empty.svgz
+usr/share/kde4/apps/kplatowork/kplatowork_mainwindow.rc
+usr/share/kde4/apps/kplatowork/kplatowork.rc
+usr/share/kde4/apps/kplatowork/kplatowork_readonly.rc
+usr/share/kde4/apps/kplatowork/templates/Simple/.directory
+usr/share/kde4/apps/kplatowork/templates/Simple/Empty.desktop
+usr/share/kde4/apps/kplatowork/templates/Simple/.source/Empty.kplatoworkt
 usr/share/kde4/config.kcfg/kplatosettings.kcfg
 usr/share/kde4/config/kplatorc
 usr/share/kde4/config/kplatoworkrc
 usr/share/kde4/services/kplato_icalendar_export.desktop
 usr/share/kde4/services/kplatopart.desktop
+usr/share/kde4/services/kplatorcpsscheduler.desktop
 usr/share/kde4/services/kplatoworkpart.desktop
 usr/share/kde4/services/krossmodulekplato.desktop
 usr/share/kde4/servicetypes/kplato_schedulerplugin.desktop
diff -pruN 1:2.3.3-1/debian/kplato.lintian-overrides 1:2.3.3-0ubuntu9/debian/kplato.lintian-overrides
--- 1:2.3.3-1/debian/kplato.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kplato.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1,4 +1,4 @@
-kplato: package-name-doesnt-match-sonames libkplatokernel8 libkplatomodels8 libkplatoprivate8 libkplatoui8 libkplatoworkapp8 libkplatoworkfactory8
+kplato: package-name-doesnt-match-sonames libkplatokernel7 libkplatomodels7 libkplatoprivate7 libkplatoui7 libkplatoworkapp7 libkplatoworkfactory7
 kplato: unusual-interpreter ./usr/share/kde4/apps/kplato/scripts/extensions/busyinfoclear.py #!kross
 kplato: unusual-interpreter ./usr/share/kde4/apps/kplato/scripts/extensions/busyinfoexport.py #!kross
 kplato: unusual-interpreter ./usr/share/kde4/apps/kplato/scripts/extensions/busyinfoimport.py #!kross
diff -pruN 1:2.3.3-1/debian/kpresenter.lintian-overrides 1:2.3.3-0ubuntu9/debian/kpresenter.lintian-overrides
--- 1:2.3.3-1/debian/kpresenter.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kpresenter.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1 +1 @@
-kpresenter: package-name-doesnt-match-sonames libkpresenterprivate8
+kpresenter: package-name-doesnt-match-sonames libkpresenterprivate7
diff -pruN 1:2.3.3-1/debian/krita-data.install 1:2.3.3-0ubuntu9/debian/krita-data.install
--- 1:2.3.3-1/debian/krita-data.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/krita-data.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,3 +1,4 @@
+../icons/krita.xpm usr/share/pixmaps
 usr/share/color/icc/krita/Adobe.icm
 usr/share/color/icc/krita/Apple.icm
 usr/share/color/icc/krita/CIE.icm
@@ -25,5 +26,6 @@ usr/share/icons/hicolor/64x64/apps/krita
 usr/share/kde4/apps/krita/
 usr/share/kde4/apps/kritaplugins/
 usr/share/kde4/config/krita.knsrc
+usr/share/kde4/apps/pigmentcms/
 usr/share/kde4/config/kritarc
 usr/share/mime/packages/krita_ora.xml
diff -pruN 1:2.3.3-1/debian/krita.install 1:2.3.3-0ubuntu9/debian/krita.install
--- 1:2.3.3-1/debian/krita.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/krita.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,14 +1,14 @@
-../icons/krita.xpm usr/share/pixmaps
 usr/bin/krita
 usr/lib/kde4/kritabigbrother.so
 usr/lib/kde4/kritablurfilter.so
 usr/lib/kde4/kritacolorgenerator.so
 usr/lib/kde4/kritacolorrange.so
-usr/lib/kde4/kritacolorselectorng.so
 usr/lib/kde4/kritacolorsfilters.so
 usr/lib/kde4/kritacolorspaceconversion.so
 usr/lib/kde4/krita_colorspaces_extensions.so
+usr/lib/kde4/kritacolorselectorng.so
 usr/lib/kde4/kritaconvolutionfilters.so
+usr/lib/kde4/krita_ctlcs_plugin.so
 usr/lib/kde4/kritacurvepaintop.so
 usr/lib/kde4/kritadefaultdockers.so
 usr/lib/kde4/kritadefaultpaintops.so
@@ -45,6 +45,8 @@ usr/lib/kde4/kritarulerassistanttool.so
 usr/lib/kde4/kritaselectiontools.so
 usr/lib/kde4/kritaseparatechannels.so
 usr/lib/kde4/kritashearimage.so
+usr/lib/kde4/kritashivafilters.so
+usr/lib/kde4/kritashivagenerators.so
 usr/lib/kde4/kritasketchpaintop.so
 usr/lib/kde4/kritasmallcolorselector.so
 usr/lib/kde4/kritaspecificcolorselector.so
@@ -64,9 +66,9 @@ usr/lib/kde4/kritaunsharpfilter.so
 usr/lib/kde4/kritawavefilter.so
 usr/lib/kde4/kritabmpexport.so
 usr/lib/kde4/kritabmpimport.so
+usr/lib/kde4/kritaexrexport.so
+usr/lib/kde4/kritaexrimport.so
 usr/lib/kde4/kritagifimport.so
-usr/lib/kde4/kritajp2export.so
-usr/lib/kde4/kritajp2import.so
 usr/lib/kde4/kritajpegexport.so
 usr/lib/kde4/kritajpegimport.so
 usr/lib/kde4/kritaoraexport.so
@@ -90,10 +92,10 @@ usr/lib/libkritalibpaintop.so.8
 usr/lib/libkritalibpaintop.so.8.0.0
 usr/lib/libkritaui.so.8
 usr/lib/libkritaui.so.8.0.0
-usr/share/applications/kde4/krita.desktop
 usr/share/applications/kde4/krita_bmp.desktop
+usr/share/applications/kde4/krita.desktop
+usr/share/applications/kde4/krita_exr.desktop
 usr/share/applications/kde4/krita_gif.desktop
-usr/share/applications/kde4/krita_jp2.desktop
 usr/share/applications/kde4/krita_jpeg.desktop
 usr/share/applications/kde4/krita_ora.desktop
 usr/share/applications/kde4/krita_pdf.desktop
@@ -113,9 +115,10 @@ usr/share/kde4/services/kritacolorsfilte
 usr/share/kde4/services/kritacolorspaceconversion.desktop
 usr/share/kde4/services/krita_colorspaces_extensions_plugin.desktop
 usr/share/kde4/services/kritaconvolutionfilters.desktop
+usr/share/kde4/services/krita_ctlcs_plugin.desktop
 usr/share/kde4/services/kritacurvepaintop.desktop
-usr/share/kde4/services/kritadefaultdockers.desktop
 usr/share/kde4/services/kritadefaultpaintops.desktop
+usr/share/kde4/services/kritadefaultdockers.desktop
 usr/share/kde4/services/kritadefaulttools.desktop
 usr/share/kde4/services/kritadeformpaintop.desktop
 usr/share/kde4/services/krita_digitalmixer.desktop
@@ -124,6 +127,8 @@ usr/share/kde4/services/kritadropshadow.
 usr/share/kde4/services/kritadynapaintop.desktop
 usr/share/kde4/services/kritaembossfilter.desktop
 usr/share/kde4/services/kritaexample.desktop
+usr/share/kde4/services/krita_exr_export.desktop
+usr/share/kde4/services/krita_exr_import.desktop
 usr/share/kde4/services/kritaextensioncolorsfilters.desktop
 usr/share/kde4/services/kritaextensionsmanager.desktop
 usr/share/kde4/services/kritafastcolortransfer.desktop
@@ -135,8 +140,6 @@ usr/share/kde4/services/kritahatchingpai
 usr/share/kde4/services/kritahistogram.desktop
 usr/share/kde4/services/kritaimageenhancement.desktop
 usr/share/kde4/services/kritaimagesize.desktop
-usr/share/kde4/services/krita_jp2_export.desktop
-usr/share/kde4/services/krita_jp2_import.desktop
 usr/share/kde4/services/krita_jpeg_export.desktop
 usr/share/kde4/services/krita_jpeg_import.desktop
 usr/share/kde4/services/kritalayercompose.desktop
@@ -163,6 +166,8 @@ usr/share/kde4/services/kritarulerassist
 usr/share/kde4/services/kritaselectiontools.desktop
 usr/share/kde4/services/kritaseparatechannels.desktop
 usr/share/kde4/services/kritashearimage.desktop
+usr/share/kde4/services/kritashivafilters.desktop
+usr/share/kde4/services/kritashivagenerators.desktop
 usr/share/kde4/services/kritasketchpaintop.desktop
 usr/share/kde4/services/krita_smallcolorselector.desktop
 usr/share/kde4/services/krita_specificcolorselector.desktop
diff -pruN 1:2.3.3-1/debian/krita.lintian-overrides 1:2.3.3-0ubuntu9/debian/krita.lintian-overrides
--- 1:2.3.3-1/debian/krita.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/krita.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1,2 +1,2 @@
-krita: package-name-doesnt-match-sonames libkritaimage8 libkritalibbrush8 libkritalibpaintop8 libkritaui8 libkrossmodulekrita8
+krita: package-name-doesnt-match-sonames libkritaimage7 libkritalibbrush7 libkritalibpaintop7 libkritaui7 libkrossmodulekrita7
 
diff -pruN 1:2.3.3-1/debian/kspread.install 1:2.3.3-0ubuntu9/debian/kspread.install
--- 1:2.3.3-1/debian/kspread.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kspread.install	2011-11-09 18:42:30.000000000 +0000
@@ -19,7 +19,6 @@ usr/lib/kde4/applixspreadimport.so
 usr/lib/kde4/csvexport.so
 usr/lib/kde4/csvimport.so
 usr/lib/kde4/dbaseimport.so
-usr/lib/kde4/excelimporttodoc.so
 usr/lib/kde4/gnumericexport.so
 usr/lib/kde4/gnumericimport.so
 usr/lib/kde4/kspreadhtmlexport.so
@@ -35,46 +34,236 @@ usr/lib/kde4/spreadsheetshape.so
 usr/lib/libkdeinit4_kspread.so
 usr/lib/libkspreadcommon.so.8
 usr/lib/libkspreadcommon.so.8.0.0
-usr/lib/libkspreadodf.so.8
-usr/lib/libkspreadodf.so.8.0.0
+usr/lib/libkspreadodf.so
 usr/share/applications/kde4/kspread.desktop
 usr/share/icons/hicolor/16x16/apps/kspread.png
 usr/share/icons/hicolor/22x22/apps/kspread.png
 usr/share/icons/hicolor/32x32/apps/kspread.png
 usr/share/icons/hicolor/48x48/apps/kspread.png
-usr/share/kde4/apps/kspread/
+usr/share/kde4/apps/kspread/dtd/kspread.dtd
+usr/share/kde4/apps/kspread/functions/bitops.xml
+usr/share/kde4/apps/kspread/functions/conversion.xml
+usr/share/kde4/apps/kspread/functions/database.xml
+usr/share/kde4/apps/kspread/functions/datetime.xml
+usr/share/kde4/apps/kspread/functions/engineering.xml
+usr/share/kde4/apps/kspread/functions/financial.xml
+usr/share/kde4/apps/kspread/functions/information.xml
+usr/share/kde4/apps/kspread/functions/logic.xml
+usr/share/kde4/apps/kspread/functions/math.xml
+usr/share/kde4/apps/kspread/functions/reference.xml
+usr/share/kde4/apps/kspread/functions/statistical.xml
+usr/share/kde4/apps/kspread/functions/text.xml
+usr/share/kde4/apps/kspread/functions/trig.xml
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/adjustcol.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/adjustrow.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/black_sum.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_all.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_bottom.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_fall.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_horizontal.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_inside.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_left.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_outline.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_remove.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_right.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_top.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_up.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/border_vertical.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/cell_edit.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/cell_layout.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/chart.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/comment.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/deletecell.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/delete_table.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/dissociatecell.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/first_letter_upper.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/funct.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/hide_table_column.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/hide_table_row.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/insertcellcopy.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/insertcell.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/insert_link.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/inserttable.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/mergecell-horizontal.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/mergecell.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/mergecell-vertical.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/middle.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/money.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/multirow.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/oscilloscope.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/percent.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/precminus.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/precplus.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/removecell.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/removecomment.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/resizecol.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/resizerow.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/selection.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/series.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/show_table_column.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/show_table_row.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/sort_decrease.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/sort_incr.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/special_paste.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/text_bottom.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/text_top.png
+usr/share/kde4/apps/kspread/icons/hicolor/16x16/actions/vertical_text.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/black_sum.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_all.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_bottom.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_fall.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_horizontal.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_inside.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_left.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_outline.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_remove.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_right.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_top.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_up.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/border_vertical.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/funct.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/insert_chart.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/insert_link.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/mergecell-horizontal.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/mergecell.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/mergecell-vertical.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/middle.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/money.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/multirow.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/percent.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/prec_minus.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/prec_plus.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/sort_decrease.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/sort_incr.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/text_bottom.png
+usr/share/kde4/apps/kspread/icons/hicolor/22x22/actions/text_top.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_all.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_bottom.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_fall.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_horizontal.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_inside.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_left.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_outline.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_remove.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_right.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_top.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_up.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/border_vertical.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/funct.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/percent.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/prec_minus.png
+usr/share/kde4/apps/kspread/icons/hicolor/32x32/actions/prec_plus.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_balancesheet.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_bmi.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_creditcardtracker.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_expensereport.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_invoice.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_menuplan.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_packingslip.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_pricequotation.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_studentidcard.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_vacationchecklist.png
+usr/share/kde4/apps/kspread/icons/hicolor/48x48/actions/template_worksheet.png
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_balancesheet.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_bmi.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_creditcardtracker.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_expensereport.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_invoice.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_menuplan.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_packingslip.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_pricequotation.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_studentidcard.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_vacationchecklist.svgz
+usr/share/kde4/apps/kspread/icons/hicolor/scalable/actions/template_worksheet.svgz
+usr/share/kde4/apps/kspread/kpartplugins/scripting.rc
+usr/share/kde4/apps/kspread/kpartplugins/solver.rc
+usr/share/kde4/apps/kspread/kspread.notifyrc
+usr/share/kde4/apps/kspread/kspread.rc
+usr/share/kde4/apps/kspread/kspread_readonly.rc
+usr/share/kde4/apps/kspread/scripts/docker/consoledocker.py
+usr/share/kde4/apps/kspread/scripts/docker/snippetsdocker.rb
+usr/share/kde4/apps/kspread/scripts/extensions/csvexport.py
+usr/share/kde4/apps/kspread/scripts/extensions/csvimport.py
+usr/share/kde4/apps/kspread/scripts/extensions/csvoptions.ui
+usr/share/kde4/apps/kspread/scripts/extensions/htmlexportinfos.ui
+usr/share/kde4/apps/kspread/scripts/extensions/htmlexport.py
+usr/share/kde4/apps/kspread/scripts/extensions/kexidbexport.py
+usr/share/kde4/apps/kspread/scripts/extensions/kexidbimport.py
+usr/share/kde4/apps/kspread/scripts/extensions/logger.py
+usr/share/kde4/apps/kspread/scripts/extensions/myorca.py
+usr/share/kde4/apps/kspread/scripts/extensions/odfpyexport.py
+usr/share/kde4/apps/kspread/scripts/extensions/vcardimport.py
+usr/share/kde4/apps/kspread/scripts/extensions/xmlviewer.py
+usr/share/kde4/apps/kspread/scripts/functions/functions.py
+usr/share/kde4/apps/kspread/scripts/functions/pyregexp.py
+usr/share/kde4/apps/kspread/scripts/functions/pytime.py
+usr/share/kde4/apps/kspread/scripts/functions/rpyfunctions.py
+usr/share/kde4/apps/kspread/scripts/functions/yfinance.py
+usr/share/kde4/apps/kspread/scripts/functions/yweather.py
+usr/share/kde4/apps/kspread/scripts/scripts.rc
+usr/share/kde4/apps/kspread/sheetstyles/standard1.ksts
+usr/share/kde4/apps/kspread/sheetstyles/standard1.png
+usr/share/kde4/apps/kspread/sheetstyles/standard1.xml
+usr/share/kde4/apps/kspread/sheetstyles/standard2.ksts
+usr/share/kde4/apps/kspread/sheetstyles/standard2.png
+usr/share/kde4/apps/kspread/sheetstyles/standard2.xml
+usr/share/kde4/apps/kspread/templates/Business/BalanceSheet.desktop
+usr/share/kde4/apps/kspread/templates/Business/.directory
+usr/share/kde4/apps/kspread/templates/Business/ExpenseReport.desktop
+usr/share/kde4/apps/kspread/templates/Business/Invoice.desktop
+usr/share/kde4/apps/kspread/templates/Business/PackingSlip.desktop
+usr/share/kde4/apps/kspread/templates/Business/PriceQuotation.desktop
+usr/share/kde4/apps/kspread/templates/Business/.source/BalanceSheet.kst
+usr/share/kde4/apps/kspread/templates/Business/.source/ExpenseReport.kst
+usr/share/kde4/apps/kspread/templates/Business/.source/Invoice.kst
+usr/share/kde4/apps/kspread/templates/Business/.source/PackingSlip.kst
+usr/share/kde4/apps/kspread/templates/Business/.source/PriceQuotation.kst
+usr/share/kde4/apps/kspread/templates/General/.directory
+usr/share/kde4/apps/kspread/templates/General/.source/StudentIDCard.kst
+usr/share/kde4/apps/kspread/templates/General/.source/Worksheet.kst
+usr/share/kde4/apps/kspread/templates/General/StudentIDCard.desktop
+usr/share/kde4/apps/kspread/templates/General/Worksheet.desktop
+usr/share/kde4/apps/kspread/templates/HomeFamily/BMI.desktop
+usr/share/kde4/apps/kspread/templates/HomeFamily/CreditCardTracker.desktop
+usr/share/kde4/apps/kspread/templates/HomeFamily/.directory
+usr/share/kde4/apps/kspread/templates/HomeFamily/MenuPlan.desktop
+usr/share/kde4/apps/kspread/templates/HomeFamily/.source/BMI.kst
+usr/share/kde4/apps/kspread/templates/HomeFamily/.source/CreditCardTracker.kst
+usr/share/kde4/apps/kspread/templates/HomeFamily/.source/MenuPlan.kst
+usr/share/kde4/apps/kspread/templates/HomeFamily/.source/VacationChecklist.kst
+usr/share/kde4/apps/kspread/templates/HomeFamily/VacationChecklist.desktop
 usr/share/kde4/config.kcfg/kspread.kcfg
 usr/share/kde4/config/kspreadrc
 usr/share/kde4/services/krossmodulekspread.desktop
 usr/share/kde4/services/kspread_applixspread_import.desktop
+usr/share/kde4/services/kspreadbitopsmodule.desktop
+usr/share/kde4/services/kspreadconversionmodule.desktop
 usr/share/kde4/services/kspread_csv_export.desktop
 usr/share/kde4/services/kspread_csv_import.desktop
+usr/share/kde4/services/kspreaddatabasemodule.desktop
+usr/share/kde4/services/kspreaddatetimemodule.desktop
 usr/share/kde4/services/kspread_dbase_import.desktop
+usr/share/kde4/services/kspreadengineeringmodule.desktop
 usr/share/kde4/services/kspread_excel_import.desktop
+usr/share/kde4/services/kspreadfinancialmodule.desktop
 usr/share/kde4/services/kspread_gnumeric_export.desktop
 usr/share/kde4/services/kspread_gnumeric_import.desktop
 usr/share/kde4/services/kspread_html_export.desktop
 usr/share/kde4/services/kspread_html_import.desktop
+usr/share/kde4/services/kspreadinformationmodule.desktop
 usr/share/kde4/services/kspread_latex_export.desktop
+usr/share/kde4/services/kspreadlogicmodule.desktop
+usr/share/kde4/services/kspreadmathmodule.desktop
 usr/share/kde4/services/kspread_opencalc_export.desktop
 usr/share/kde4/services/kspread_opencalc_import.desktop
+usr/share/kde4/services/kspreadpart.desktop
 usr/share/kde4/services/kspread_plugin_tool_calendar.desktop
 usr/share/kde4/services/kspread_qpro_import.desktop
-usr/share/kde4/services/kspread_xlsx_import.desktop
-usr/share/kde4/services/kspreadbitopsmodule.desktop
-usr/share/kde4/services/kspreadconversionmodule.desktop
-usr/share/kde4/services/kspreaddatabasemodule.desktop
-usr/share/kde4/services/kspreaddatetimemodule.desktop
-usr/share/kde4/services/kspreadengineeringmodule.desktop
-usr/share/kde4/services/kspreadfinancialmodule.desktop
-usr/share/kde4/services/kspreadinformationmodule.desktop
-usr/share/kde4/services/kspreadlogicmodule.desktop
-usr/share/kde4/services/kspreadmathmodule.desktop
 usr/share/kde4/services/kspreadreferencemodule.desktop
 usr/share/kde4/services/kspreadstatisticalmodule.desktop
 usr/share/kde4/services/kspreadtextmodule.desktop
 usr/share/kde4/services/kspreadtrigonometrymodule.desktop
-usr/share/kde4/services/kspreadpart.desktop
+usr/share/kde4/services/kspread_xlsx_import.desktop
 usr/share/kde4/services/ServiceMenus/kspread_konqi.desktop
 usr/share/kde4/services/spreadsheetshape.desktop
 usr/share/kde4/servicetypes/kspread_plugin.desktop
diff -pruN 1:2.3.3-1/debian/kspread.lintian-overrides 1:2.3.3-0ubuntu9/debian/kspread.lintian-overrides
--- 1:2.3.3-1/debian/kspread.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kspread.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1,4 +1,4 @@
-kspread: package-name-doesnt-match-sonames libkspreadcommon8
+kspread: package-name-doesnt-match-sonames libkspreadcommon7
 kspread: unusual-interpreter ./usr/share/kde4/apps/kspread/scripts/docker/consoledocker.py #!kross
 kspread: unusual-interpreter ./usr/share/kde4/apps/kspread/scripts/extensions/csvexport.py #!kross
 kspread: unusual-interpreter ./usr/share/kde4/apps/kspread/scripts/extensions/csvimport.py #!kross
diff -pruN 1:2.3.3-1/debian/kword-data.install 1:2.3.3-0ubuntu9/debian/kword-data.install
--- 1:2.3.3-1/debian/kword-data.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kword-data.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,8 +1,95 @@
+../icons/kword.xpm usr/share/pixmaps
 usr/share/icons/hicolor/16x16/apps/kword.png
 usr/share/icons/hicolor/22x22/apps/kword.png
 usr/share/icons/hicolor/32x32/apps/kword.png
 usr/share/icons/hicolor/48x48/apps/kword.png
-usr/share/kde4/apps/kword/
+usr/share/kde4/apps/kword/html-odf/converter.xsl
+usr/share/kde4/apps/kword/icons/hicolor/128x128/actions/template_colorful.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_a4.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_businesscards10.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_colorful.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_envelopec6.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_envelopedl.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_fax.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_labelsl16.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_letter.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_memo.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_plaintext.png
+usr/share/kde4/apps/kword/icons/hicolor/48x48/actions/template_twocolumns.png
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_a4.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_businesscards10.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_envelopec6.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_envelopedl.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_fax.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_labelsl16.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_letter.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_memo.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_plaintext.svgz
+usr/share/kde4/apps/kword/icons/hicolor/scalable/actions/template_twocolumns.svgz
+usr/share/kde4/apps/kword/kpartplugins/scan-kword.rc
+usr/share/kde4/apps/kword/kpartplugins/scripting.rc
+usr/share/kde4/apps/kword/kword.rc
+usr/share/kde4/apps/kword/kword_readonly.rc
+usr/share/kde4/apps/kword/scripts/extensions/doctree.rb
+usr/share/kde4/apps/kword/scripts/extensions/exportfile.py
+usr/share/kde4/apps/kword/scripts/extensions/importdoxyxmloptions.ui
+usr/share/kde4/apps/kword/scripts/extensions/importdoxyxml.py
+usr/share/kde4/apps/kword/scripts/extensions/importdoxyxmlstyle.ui
+usr/share/kde4/apps/kword/scripts/extensions/importfile.py
+usr/share/kde4/apps/kword/scripts/extensions/kwreportlab.py
+usr/share/kde4/apps/kword/scripts/extensions/onlinehelp.py
+usr/share/kde4/apps/kword/scripts/extensions/ooimportconfig.ui
+usr/share/kde4/apps/kword/scripts/extensions/ooimport.py
+usr/share/kde4/apps/kword/scripts/extensions/ooimport.ui
+usr/share/kde4/apps/kword/scripts/extensions/oouno.py
+usr/share/kde4/apps/kword/scripts/extensions/xmlviewer.py
+usr/share/kde4/apps/kword/scripts/samples/sample_actions.py
+usr/share/kde4/apps/kword/scripts/samples/sample_allshapes.py
+usr/share/kde4/apps/kword/scripts/samples/sample_cursor.rb
+usr/share/kde4/apps/kword/scripts/samples/sample_insertshape.py
+usr/share/kde4/apps/kword/scripts/samples/sample_lists_cursor.py
+usr/share/kde4/apps/kword/scripts/samples/sample_lists_html.py
+usr/share/kde4/apps/kword/scripts/samples/sample_progressbar.py
+usr/share/kde4/apps/kword/scripts/samples/sample_tables.py
+usr/share/kde4/apps/kword/scripts/samples/sample_text.py
+usr/share/kde4/apps/kword/scripts/samples/sample_toolactions.py
+usr/share/kde4/apps/kword/scripts/samples/sample_variables.py
+usr/share/kde4/apps/kword/scripts/scripts.rc
+usr/share/kde4/apps/kword/styles/defaultstyles.xml
+usr/share/kde4/apps/kword/templates/CardsAndLabels/BusinessCards10.desktop
+usr/share/kde4/apps/kword/templates/CardsAndLabels/.directory
+usr/share/kde4/apps/kword/templates/CardsAndLabels/LabelsL16.desktop
+usr/share/kde4/apps/kword/templates/CardsAndLabels/.source/BusinessCards10.kwt
+usr/share/kde4/apps/kword/templates/CardsAndLabels/.source/LabelsL16.kwt
+usr/share/kde4/apps/kword/templates/Envelopes/.directory
+usr/share/kde4/apps/kword/templates/Envelopes/EnvelopeC6.desktop
+usr/share/kde4/apps/kword/templates/Envelopes/EnvelopeDL.desktop
+usr/share/kde4/apps/kword/templates/Envelopes/.source/EnvelopeC6.kwt
+usr/share/kde4/apps/kword/templates/Envelopes/.source/EnvelopeDL.kwt
+usr/share/kde4/apps/kword/templates/Normal/A4.desktop
+usr/share/kde4/apps/kword/templates/Normal/ColorfulA4.desktop
+usr/share/kde4/apps/kword/templates/Normal/ColorfulLetter.desktop
+usr/share/kde4/apps/kword/templates/Normal/.directory
+usr/share/kde4/apps/kword/templates/Normal/FaxA4.desktop
+usr/share/kde4/apps/kword/templates/Normal/FaxLetter.desktop
+usr/share/kde4/apps/kword/templates/Normal/Letter.desktop
+usr/share/kde4/apps/kword/templates/Normal/Memo.desktop
+usr/share/kde4/apps/kword/templates/Normal/ProfessionalA4.desktop
+usr/share/kde4/apps/kword/templates/Normal/ProfessionalLetter.desktop
+usr/share/kde4/apps/kword/templates/Normal/.source/A4.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/ColorfulA4.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/ColorfulLetter.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/FaxA4.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/FaxLetter.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/Letter.kwt
+usr/share/kde4/apps/kword/templates/Normal/.source/Memo.kwt
+usr/share/kde4/apps/kword/templates/Normal/.source/PlainText.kwt
+usr/share/kde4/apps/kword/templates/Normal/.source/ProfessionalA4.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/ProfessionalLetter.odt
+usr/share/kde4/apps/kword/templates/Normal/.source/TwoColumns.kwt
+usr/share/kde4/apps/kword/templates/Normal/.source/TwoColumnsLetter.kwt
+usr/share/kde4/apps/kword/templates/Normal/TwoColumns.desktop
+usr/share/kde4/apps/kword/templates/Normal/TwoColumnsLetter.desktop
 usr/share/kde4/apps/xsltfilter/export/kword/xslfo/kword2xslfo-table.xsl
 usr/share/kde4/apps/xsltfilter/export/kword/xslfo/main.xsl
 usr/share/kde4/config/kwordrc
diff -pruN 1:2.3.3-1/debian/kword.install 1:2.3.3-0ubuntu9/debian/kword.install
--- 1:2.3.3-1/debian/kword.install	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kword.install	2011-11-09 18:42:30.000000000 +0000
@@ -1,4 +1,3 @@
-../icons/kword.xpm usr/share/pixmaps
 usr/bin/kword
 usr/lib/kde4/krossmodulekword.so
 usr/lib/kde4/abiwordexport.so
@@ -35,6 +34,7 @@ usr/lib/libkwordexportfilters.so.8.0.0
 usr/lib/libkwordprivate.so.8
 usr/lib/libkwordprivate.so.8.0.0
 usr/share/applications/kde4/kword.desktop
+usr/share/kde4/services/html-odf_export.desktop
 usr/share/kde4/services/krossmodulekword.desktop
 usr/share/kde4/services/kword_abiword_export.desktop
 usr/share/kde4/services/kword_abiword_import.desktop
@@ -48,7 +48,6 @@ usr/share/kde4/services/kword_docx_impor
 usr/share/kde4/services/kword_hancomword_import.desktop
 usr/share/kde4/services/kword_html_export.desktop
 usr/share/kde4/services/kword_html_import.desktop
-usr/share/kde4/services/html-odf_export.desktop
 usr/share/kde4/services/kword_msword-odf_import.desktop
 usr/share/kde4/services/kword_oowriter_export.desktop
 usr/share/kde4/services/kword_oowriter_import.desktop
@@ -62,3 +61,5 @@ usr/share/kde4/services/kword_wml_import
 usr/share/kde4/services/kword_wp_export.desktop
 usr/share/kde4/services/kword_wp_import.desktop
 usr/share/kde4/services/ServiceMenus/kword_konqi.desktop
+#usr/lib/kde4/dcmimport.so
+#usr/share/kde4/services/kword_dcm_import.desktop
diff -pruN 1:2.3.3-1/debian/kword.lintian-overrides 1:2.3.3-0ubuntu9/debian/kword.lintian-overrides
--- 1:2.3.3-1/debian/kword.lintian-overrides	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/kword.lintian-overrides	2011-11-09 18:42:30.000000000 +0000
@@ -1 +1 @@
-kword: package-name-doesnt-match-sonames libkowv2-4 libkwordexportfilters8 libkwordprivate8
+kword: package-name-doesnt-match-sonames libkowv2-4 libkwordexportfilters7 libkwordprivate7
diff -pruN 1:2.3.3-1/debian/missing-build-depends 1:2.3.3-0ubuntu9/debian/missing-build-depends
--- 1:2.3.3-1/debian/missing-build-depends	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/missing-build-depends	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,3 @@
+littlecms: needs 2.1 packaged, I get a glibc double free test failures when trying, jriddell 2011-01
+openjpeg: patent issues:
+libwpg: does not support version 2.0, now added through kubuntu_03_libwpg_02.diff from Fedora
diff -pruN 1:2.3.3-1/debian/okular-odp-backend.install 1:2.3.3-0ubuntu9/debian/okular-odp-backend.install
--- 1:2.3.3-1/debian/okular-odp-backend.install	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/okular-odp-backend.install	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,4 @@
+usr/share/kde4/services/libokularGenerator_odp.desktop
+usr/share/kde4/services/okularOdp.desktop
+usr/share/applications/kde4/okularApplication_odp.desktop
+usr/lib/kde4/okularGenerator_odp.so
diff -pruN 1:2.3.3-1/debian/patches/10_nokcharpart 1:2.3.3-0ubuntu9/debian/patches/10_nokcharpart
--- 1:2.3.3-1/debian/patches/10_nokcharpart	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/10_nokcharpart	2011-11-09 18:42:30.000000000 +0000
@@ -1,6 +1,8 @@
---- a/plugins/chartshape/CMakeLists.txt
-+++ b/plugins/chartshape/CMakeLists.txt
-@@ -66,5 +66,5 @@ install(TARGETS chartshape DESTINATION $
+Index: koffice-2.3.1/plugins/chartshape/CMakeLists.txt
+===================================================================
+--- koffice-2.3.1.orig/plugins/chartshape/CMakeLists.txt	2011-01-15 20:03:40.000000000 +0000
++++ koffice-2.3.1/plugins/chartshape/CMakeLists.txt	2011-01-19 12:29:39.586616005 +0000
+@@ -66,5 +66,5 @@
  ########### install files ###############
  
  install( FILES chartshape.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff -pruN 1:2.3.3-1/debian/patches/15_new_libwpd 1:2.3.3-0ubuntu9/debian/patches/15_new_libwpd
--- 1:2.3.3-1/debian/patches/15_new_libwpd	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/15_new_libwpd	1970-01-01 00:00:00.000000000 +0000
@@ -1,180 +0,0 @@
-Description: porting to pwg & conversion as SVG output
- Reduced version of Calligra's commit 9cda7aed2ea103750172e61f5c800a474913fa59:
-    make wpg import compile again, simplified code by using high level libwpg function to convert to svg,
-    this makes us less dependent on libwpg API changes, code works with old an new libwpg versions
-Author: Jan Hambrecht <jaham@gmx.net>
-Author: Pino Toscano <pino@kde.org>
-Last-Update: 2011-02-06
-Applied-Upstream: Calligra 2.4
-
---- a/filters/karbon/wpg/import/CMakeLists.txt
-+++ b/filters/karbon/wpg/import/CMakeLists.txt
-@@ -4,13 +4,11 @@
- 
- set(wpgimport_PART_SRCS 
- WPGImport.cpp 
--OdgExporter.cxx
--FileOutputHandler.cxx
--GraphicsElement.cxx)
-+)
- 
- kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS})
- 
--target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES})
-+target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES} ${WPD_LIBRARIES})
- 
- install(TARGETS wpgimport DESTINATION ${PLUGIN_INSTALL_DIR})
- install(FILES karbon_wpg_import.desktop DESTINATION ${SERVICES_INSTALL_DIR})
---- a/filters/karbon/wpg/import/WPGImport.cpp
-+++ b/filters/karbon/wpg/import/WPGImport.cpp
-@@ -23,6 +23,7 @@
- #include <QBuffer>
- #include <QByteArray>
- #include <QString>
-+#include <QFile>
- 
- #include <kdebug.h>
- #include <KoFilterChain.h>
-@@ -37,11 +38,9 @@
- #include <libwpg/WPGStreamImplementation.h>
- #else
- #include <libwpd-stream/libwpd-stream.h>
-+#include <libwpd/libwpd.h>
- #endif
- 
--#include "FileOutputHandler.hxx"
--#include "OdgExporter.hxx"
--
- #include <iostream>
- 
- K_PLUGIN_FACTORY(WPGImportFactory, registerPlugin<WPGImport>();)
-@@ -56,35 +55,12 @@
- {
- }
- 
--static QByteArray createManifest()
--{
--    KoXmlWriter* manifestWriter;
--    QByteArray manifestData;
--    QBuffer manifestBuffer(&manifestData);
--
--    manifestBuffer.open(QIODevice::WriteOnly);
--    manifestWriter = new KoXmlWriter(&manifestBuffer);
--
--    manifestWriter->startDocument("manifest:manifest");
--    manifestWriter->startElement("manifest:manifest");
--    manifestWriter->addAttribute("xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0");
--    manifestWriter->addManifestEntry("/", "application/vnd.oasis.opendocument.graphics");
--    //manifestWriter->addManifestEntry( "styles.xml", "text/xml" );
--    manifestWriter->addManifestEntry("content.xml", "text/xml");
--    manifestWriter->endElement();
--    manifestWriter->endDocument();
--    delete manifestWriter;
--
--    return manifestData;
--}
--
--
- KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to)
- {
-     if (from != "application/x-wpg")
-         return KoFilter::NotImplemented;
- 
--    if (to != "application/vnd.oasis.opendocument.graphics")
-+    if (to != "image/svg+xml")
-         return KoFilter::NotImplemented;
- 
- #if LIBWPG_VERSION_MINOR<2
-@@ -96,6 +72,7 @@
-             input = olestream;
-         }
-     }
-+    libwpg::WPGString output;
- #else
-     WPXInputStream* input = new WPXFileStream(m_chain->inputFile().toLocal8Bit());
-     if (input->isOLEStream()) {
-@@ -105,6 +82,7 @@
-             input = olestream;
-         }
-      }
-+     ::WPXString output;
- #endif
- 
-     if (!libwpg::WPGraphics::isSupported(input)) {
-@@ -113,51 +91,21 @@
-         return KoFilter::NotImplemented;
-     }
- 
--    // do the conversion
--    std::ostringstream tmpStringStream;
--    FileOutputHandler tmpHandler(tmpStringStream);
--    OdgExporter exporter(&tmpHandler);
--    libwpg::WPGraphics::parse(input, &exporter);
--    delete input;
--
--
--    // create output store
--    KoStore* storeout;
--    storeout = KoStore::createStore(m_chain->outputFile(), KoStore::Write,
--                                    "application/vnd.oasis.opendocument.graphics", KoStore::Zip);
--
--    if (!storeout) {
--        kWarning() << "Couldn't open the requested file.";
--        return KoFilter::FileNotFound;
--    }
--
--#if 0
--    if (!storeout->open("styles.xml")) {
--        kWarning() << "Couldn't open the file 'styles.xml'.";
--        return KoFilter::CreationError;
--    }
--    //storeout->write( createStyles() );
--    storeout->close();
--#endif
--
--    if (!storeout->open("content.xml")) {
--        kWarning() << "Couldn't open the file 'content.xml'.";
--        return KoFilter::CreationError;
--    }
--    storeout->write(tmpStringStream.str().c_str());
--    storeout->close();
--
--    // store document manifest
--    storeout->enterDirectory("META-INF");
--    if (!storeout->open("manifest.xml")) {
--        kWarning() << "Couldn't open the file 'META-INF/manifest.xml'.";
--        return KoFilter::CreationError;
-+    if (!libwpg::WPGraphics::generateSVG(input, output)) {
-+        kWarning() << "ERROR: SVG Generation failed!";
-+        delete input;
-+        return KoFilter::ParsingError;
-     }
--    storeout->write(createManifest());
--    storeout->close();
--
--    // we are done!
--    delete storeout;
- 
-+    delete input;
-+ 
-+    QFile outputFile(m_chain->outputFile());
-+    if(!outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
-+        kWarning() << "ERROR: Could not open output file" << m_chain->outputFile();
-+        return KoFilter::InternalError;
-+    }
-+    outputFile.write(output.cstr());
-+    outputFile.close();
-+ 
-     return KoFilter::OK;
- }
---- a/filters/karbon/wpg/import/karbon_wpg_import.desktop
-+++ b/filters/karbon/wpg/import/karbon_wpg_import.desktop
-@@ -42,7 +42,7 @@
- Name[x-test]=xxKarbon WPG Import Filterxx
- Name[zh_CN]=Karbon WPG 导入过滤器
- Name[zh_TW]=Karbon WPG 匯入過濾程式
--X-KDE-Export=application/vnd.oasis.opendocument.graphics
-+X-KDE-Export=image/svg+xml
- X-KDE-Import=application/x-wpg
- X-KDE-Weight=1
- X-KDE-Library=wpgimport
diff -pruN 1:2.3.3-1/debian/patches/16_kformula_kdeinit4 1:2.3.3-0ubuntu9/debian/patches/16_kformula_kdeinit4
--- 1:2.3.3-1/debian/patches/16_kformula_kdeinit4	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/16_kformula_kdeinit4	1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
---- a/kformula/CMakeLists.txt
-+++ b/kformula/CMakeLists.txt
-@@ -54,7 +54,7 @@
- 
- install(TARGETS kdeinit_kformula_bin  ${INSTALL_TARGETS_DEFAULT_ARGS})
- 
--set_target_properties(kdeinit_kformula_bin PROPERTIES OUTPUT_NAME kdeinit_kformula)
-+set_target_properties(kdeinit_kformula_bin PROPERTIES OUTPUT_NAME kdeinit4_kformula)
- 
- target_link_libraries( kformula_bin kdeinit_kformula_bin )
- set_target_properties( kformula_bin PROPERTIES OUTPUT_NAME kformula)
diff -pruN 1:2.3.3-1/debian/patches/20_arm_fix 1:2.3.3-0ubuntu9/debian/patches/20_arm_fix
--- 1:2.3.3-1/debian/patches/20_arm_fix	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/20_arm_fix	1970-01-01 00:00:00.000000000 +0000
@@ -1,289 +0,0 @@
-Description: fix build in arm s/double/qreal
-Author: Ana Guerrero <ana@debian.org>
-Last-Update: 2011-02-13
-Applied-Upstream: Calligra master, koffice 2.3 branch
-
---- a/kplato/libs/ui/kptintervaledit.cpp
-+++ b/kplato/libs/ui/kptintervaledit.cpp
-@@ -42,7 +42,7 @@ IntervalEdit::IntervalEdit( CalendarDay
-         setIntervals( intervals );
-         if ( ! intervals.isEmpty() ) {
-             startTime->setTime( intervals.last()->endTime() );
--            double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
-+            qreal l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
-             length->setValue( qMin( l, (qreal) 8.0 ) );
-         }
-     }
---- a/krita/image/brushengine/kis_paintop.cc
-+++ b/krita/image/brushengine/kis_paintop.cc
-@@ -86,7 +86,7 @@ KisFixedPaintDeviceSP KisPaintOp::cached
-     return d->dab;
- }
- 
--void KisPaintOp::splitCoordinate(double coordinate, qint32 *whole, double *fraction)
-+void KisPaintOp::splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction)
- {
-     qint32 i = static_cast<qint32>(coordinate);
- 
---- a/krita/image/brushengine/kis_paintop.h
-+++ b/krita/image/brushengine/kis_paintop.h
-@@ -108,7 +108,7 @@ public:
-     /**
-      * Split the coordinate into whole + fraction, where fraction is always >= 0.
-      */
--    static void splitCoordinate(double coordinate, qint32 *whole, double *fraction);
-+    static void splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction);
- 
-     /**
-      * returns the scale and rotation dynamically computed for the single dab
---- a/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
-+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
-@@ -161,12 +161,12 @@ inline int iconSize(qreal width, qreal h
-     qreal xm = width/2.;
-     qreal ym = height/2.;
-     if(xm>=2*ym || ym>=2*xm)
--        return qBound(5., radius, 32.);
-+        return qBound(qreal(5.), radius, qreal(32.));
- 
-     qreal a=-2;
-     qreal b=2.*(xm+ym);
-     qreal c=radius*radius-xm*xm-ym*ym;
--    return qBound(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
-+    return qBound(qreal(5.), qreal((-b+sqrt(b*b-4*a*c))/(2*a)), qreal(32.));
- }
- 
- void KisColorSelector::resizeEvent(QResizeEvent* e) {
---- a/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
-+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
-@@ -39,7 +39,7 @@ void KisColorSelectorSimple::setColor(co
-         emit paramChanged(-1, -1, -1, c.hslSaturationF(), c.lightnessF());
-         break;
-     case KisColorSelector::LH:
--        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-+        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
-         m_lastClickPos.setY(1.-c.lightnessF());
-         emit paramChanged(c.hueF(), -1, -1, -1, c.lightnessF());
-         break;
-@@ -49,17 +49,17 @@ void KisColorSelectorSimple::setColor(co
-         emit paramChanged(-1, c.saturationF(), c.valueF(), -1, -1);
-         break;
-     case KisColorSelector::VH:
--        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-+        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
-         m_lastClickPos.setY(c.valueF());
-         emit paramChanged(c.hueF(), -1, c.valueF(), -1, -1);
-         break;
-     case KisColorSelector::hsvSH:
--        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-+        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
-         m_lastClickPos.setY(1-c.saturationF());
-         emit paramChanged(c.hueF(), c.saturationF(), -1, -1, -1);
-         break;
-     case KisColorSelector::hslSH:
--        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-+        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
-         m_lastClickPos.setY(1-c.hslSaturationF());
-         emit paramChanged(c.hueF(), -1, -1, c.hslSaturationF(), -1);
-         break;
-@@ -80,7 +80,7 @@ void KisColorSelectorSimple::setColor(co
-         emit paramChanged(-1, -1, -1, c.hslSaturationF(), -1);
-         break;
-     case KisColorSelector::H:
--        m_lastClickPos.setX(1-qBound(0., c.hueF(), 1.));
-+        m_lastClickPos.setX(1-qBound<qreal>(0., c.hueF(), 1.));
-         emit paramChanged(c.hueF(), -1, -1, -1, -1);
-         break;
-     default:
---- a/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
-+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
-@@ -139,9 +139,9 @@ void KisShadeSelectorLine::paintEvent(QP
-         while(hue<0) hue+=1.;
-         while(hue>1) hue-=1.;
- 
--        qreal saturation = qBound(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
-+        qreal saturation = qBound<qreal>(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
- 
--        qreal value = qBound(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
-+        qreal value = qBound<qreal>(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
- 
- 
-         koColor.fromQColor(QColor::fromHsvF(hue, saturation, value));
---- a/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
-+++ b/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
-@@ -51,7 +51,7 @@ public:
-     KisBrushOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-     virtual ~KisBrushOp();
- 
--    double paintAt(const KisPaintInformation& info);
-+    qreal paintAt(const KisPaintInformation& info);
-     virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
- 
- private:
---- a/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
-+++ b/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
-@@ -95,7 +95,7 @@ KisSmudgeOp::~KisSmudgeOp()
-  of the current iteration.
- */
-     
--double KisSmudgeOp::paintAt(const KisPaintInformation& info)
-+qreal KisSmudgeOp::paintAt(const KisPaintInformation& info)
- {
-     KisBrushSP brush = m_brush;
-     
-@@ -118,7 +118,7 @@ double KisSmudgeOp::paintAt(const KisPai
-     is where the dab will be positioned and the fractional part determines
-     the sub-pixel positioning. */
-     qint32 x, y;
--    double xFraction, yFraction;
-+    qreal xFraction, yFraction;
- 
-     splitCoordinate(pt.x(), &x, &xFraction);
-     splitCoordinate(pt.y(), &y, &yFraction);
---- a/krita/plugins/paintops/deform/kis_deform_paintop.cpp
-+++ b/krita/plugins/paintops/deform/kis_deform_paintop.cpp
-@@ -94,9 +94,9 @@ qreal KisDeformPaintOp::paintAt(const Ki
-         KisFixedPaintDeviceSP dab = cachedDab(painter()->device()->colorSpace());
- 
-         qint32 x;
--        double subPixelX;
-+        qreal subPixelX;
-         qint32 y;
--        double subPixelY;
-+        qreal subPixelY;
- 
-         QPointF pt = info.pos();
-         if (m_sizeProperties.jitterEnabled){
-@@ -151,7 +151,7 @@ qreal KisDeformPaintOp::paintAt(const Ki
- }
- 
- 
--double KisDeformPaintOp::spacing(double /*pressure*/) const
-+qreal KisDeformPaintOp::spacing(qreal /*pressure*/) const
- {
-     return m_spacing;
- }
---- a/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
-+++ b/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
-@@ -67,7 +67,7 @@ KisHatchingPaintOp::~KisHatchingPaintOp(
-     delete m_hatchingBrush;
- }
- 
--double KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
-+qreal KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
- {
-     //------START SIMPLE ERROR CATCHING-------
-     if (!painter()->device()) return 1;
-@@ -104,7 +104,7 @@ double KisHatchingPaintOp::paintAt(const
-     QPointF pt = info.pos() - hotSpot;
- 
-     qint32 x, y;
--    double xFraction, yFraction;
-+    qreal xFraction, yFraction;
- 
-     splitCoordinate(pt.x(), &x, &xFraction);
-     splitCoordinate(pt.y(), &y, &yFraction);
---- a/krita/plugins/paintops/hatching/kis_hatching_paintop.h
-+++ b/krita/plugins/paintops/hatching/kis_hatching_paintop.h
-@@ -50,7 +50,7 @@ public:
-      *  Paint a hatched dab around the mouse cursor according to
-      *  sensor settings and user preferences.
-      */
--    double paintAt(const KisPaintInformation& info);
-+    qreal paintAt(const KisPaintInformation& info);
-     
-     /**
-      *  Returns a number between -90 and 90, and corresponds to the
---- a/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
-+++ b/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
-@@ -265,7 +265,7 @@ KisDistanceInformation KisSketchPaintOp:
- 
- 
- 
--double KisSketchPaintOp::paintAt(const KisPaintInformation& info)
-+qreal KisSketchPaintOp::paintAt(const KisPaintInformation& info)
- {
-     return paintLine(info, info).spacing;
- }
---- a/krita/plugins/paintops/sketch/kis_sketch_paintop.h
-+++ b/krita/plugins/paintops/sketch/kis_sketch_paintop.h
-@@ -38,7 +38,7 @@ public:
-     KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-     virtual ~KisSketchPaintOp();
-     virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
--    double paintAt(const KisPaintInformation& info);
-+    qreal paintAt(const KisPaintInformation& info);
- 
- private:
-     // pixel buffer
---- a/krita/plugins/paintops/spray/spray_brush.cpp
-+++ b/krita/plugins/paintops/spray/spray_brush.cpp
-@@ -74,7 +74,7 @@ qreal SprayBrush::rotationAngle()
-     if ( m_shapeDynamicsProperties->randomRotation ){
- 
-         if ( m_properties->gaussian ) {
--                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
-+                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound<qreal>(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
-         } else {
-                 rotation = linearInterpolation(rotation, M_PI * 2.0 * drand48(), m_shapeDynamicsProperties->randomRotationWeight );
-         }
-@@ -322,9 +322,9 @@ void SprayBrush::paint(KisPaintDeviceSP
-             QPointF pt = pos - hotSpot;
- 
-             qint32 ix;
--            double xFraction;
-+            qreal xFraction;
-             qint32 iy;
--            double yFraction;
-+            qreal yFraction;
- 
-             KisPaintOp::splitCoordinate(pt.x(), &ix, &xFraction);
-             KisPaintOp::splitCoordinate(pt.y(), &iy, &yFraction);
---- a/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
-+++ b/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
-@@ -278,7 +278,7 @@ KoPointerEvent KisToolDyna::filterEvent(
- #endif
- 
-     m_pressure =  m_mouse.vel * 100;
--    m_pressure = qBound(0.0,m_pressure, 1.0);
-+    m_pressure = qBound(qreal(0.0),m_pressure, qreal(1.0));
-     
-     m_odelx = delx;
-     m_odely = dely;
---- a/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
-+++ b/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
-@@ -65,7 +65,7 @@ KisWateryMixPaintOp::~KisWateryMixPaintO
- {
- }
- 
--double KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
-+qreal KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
- {
-     //------START SIMPLE ERROR CATCHING-------
-     if (!painter()->device()) return 1;
-@@ -91,7 +91,7 @@ double KisWateryMixPaintOp::paintAt(cons
-     QPointF pt = info.pos() - hotSpot;
- 
-     qint32 x, y;
--    double xFraction, yFraction;
-+    qreal xFraction, yFraction;
- 
-     splitCoordinate(pt.x(), &x, &xFraction);
-     splitCoordinate(pt.y(), &y, &yFraction);
-@@ -187,4 +187,4 @@ void KisWateryMixPaintOp::absorb ()
- void KisWateryMixPaintOp::dilute ()
- {
- }
--*/
-\ No newline at end of file
-+*/
---- a/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
-+++ b/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
-@@ -53,7 +53,7 @@ public:
-     /**
-      *  Document me
-      */
--    double paintAt(const KisPaintInformation& info);
-+    qreal paintAt(const KisPaintInformation& info);
- 
-     /*
-     /// Absorb the color beneath the brush
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_01_arm_compile.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_01_arm_compile.diff
--- 1:2.3.3-1/debian/patches/kubuntu_01_arm_compile.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_01_arm_compile.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,318 @@
+Index: koffice-2.2.91/kplato/libs/ui/kptintervaledit.cpp
+===================================================================
+--- koffice-2.2.91.orig/kplato/libs/ui/kptintervaledit.cpp	2010-12-15 16:07:37.460408118 +0000
++++ koffice-2.2.91/kplato/libs/ui/kptintervaledit.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -43,7 +43,7 @@
+         if ( ! intervals.isEmpty() ) {
+             startTime->setTime( intervals.last()->endTime() );
+             double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
+-            length->setValue( qMin( l, (qreal) 8.0 ) );
++            length->setValue( qMin( (qreal) l, (qreal) 8.0 ) );
+         }
+     }
+     enableButtons();
+Index: koffice-2.2.91/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2010-12-15 16:07:37.364408118 +0000
++++ koffice-2.2.91/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -278,7 +278,7 @@
+ #endif
+ 
+     m_pressure =  m_mouse.vel * 100;
+-    m_pressure = qBound(0.0,m_pressure, 1.0);
++    m_pressure = qBound<qreal>(0.0,m_pressure, 1.0);
+     
+     m_odelx = delx;
+     m_odely = dely;
+Index: koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2010-12-15 16:07:37.148408118 +0000
++++ koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -161,12 +161,12 @@
+     qreal xm = width/2.;
+     qreal ym = height/2.;
+     if(xm>=2*ym || ym>=2*xm)
+-        return qBound(5., radius, 32.);
++      return qBound<qreal>(5., radius, 32.);
+ 
+     qreal a=-2;
+     qreal b=2.*(xm+ym);
+     qreal c=radius*radius-xm*xm-ym*ym;
+-    return qBound(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
++    return qBound<qreal>(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
+ }
+ 
+ void KisColorSelector::resizeEvent(QResizeEvent* e) {
+Index: koffice-2.2.91/krita/image/brushengine/kis_paintop.cc
+===================================================================
+--- koffice-2.2.91.orig/krita/image/brushengine/kis_paintop.cc	2010-12-15 16:07:37.112408118 +0000
++++ koffice-2.2.91/krita/image/brushengine/kis_paintop.cc	2010-12-15 16:07:37.000000000 +0000
+@@ -86,7 +86,7 @@
+     return d->dab;
+ }
+ 
+-void KisPaintOp::splitCoordinate(double coordinate, qint32 *whole, double *fraction)
++void KisPaintOp::splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction)
+ {
+     qint32 i = static_cast<qint32>(coordinate);
+ 
+Index: koffice-2.2.91/krita/image/brushengine/kis_paintop.h
+===================================================================
+--- koffice-2.2.91.orig/krita/image/brushengine/kis_paintop.h	2010-12-15 16:07:37.132408118 +0000
++++ koffice-2.2.91/krita/image/brushengine/kis_paintop.h	2010-12-15 16:07:37.000000000 +0000
+@@ -108,7 +108,7 @@
+     /**
+      * Split the coordinate into whole + fraction, where fraction is always >= 0.
+      */
+-    static void splitCoordinate(double coordinate, qint32 *whole, double *fraction);
++    static void splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction);
+ 
+     /**
+      * returns the scale and rotation dynamically computed for the single dab
+Index: koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	2010-12-15 16:07:37.184408118 +0000
++++ koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -39,7 +39,7 @@
+         emit paramChanged(-1, -1, -1, c.hslSaturationF(), c.lightnessF());
+         break;
+     case KisColorSelector::LH:
+-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
++        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
+         m_lastClickPos.setY(1.-c.lightnessF());
+         emit paramChanged(c.hueF(), -1, -1, -1, c.lightnessF());
+         break;
+@@ -49,17 +49,17 @@
+         emit paramChanged(-1, c.saturationF(), c.valueF(), -1, -1);
+         break;
+     case KisColorSelector::VH:
+-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
++        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
+         m_lastClickPos.setY(c.valueF());
+         emit paramChanged(c.hueF(), -1, c.valueF(), -1, -1);
+         break;
+     case KisColorSelector::hsvSH:
+-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
++        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
+         m_lastClickPos.setY(1-c.saturationF());
+         emit paramChanged(c.hueF(), c.saturationF(), -1, -1, -1);
+         break;
+     case KisColorSelector::hslSH:
+-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
++        m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
+         m_lastClickPos.setY(1-c.hslSaturationF());
+         emit paramChanged(c.hueF(), -1, -1, c.hslSaturationF(), -1);
+         break;
+@@ -80,7 +80,7 @@
+         emit paramChanged(-1, -1, -1, c.hslSaturationF(), -1);
+         break;
+     case KisColorSelector::H:
+-        m_lastClickPos.setX(1-qBound(0., c.hueF(), 1.));
++        m_lastClickPos.setX(1-qBound<qreal>(0., c.hueF(), 1.));
+         emit paramChanged(c.hueF(), -1, -1, -1, -1);
+         break;
+     default:
+Index: koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	2010-12-15 16:07:37.164408118 +0000
++++ koffice-2.2.91/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -139,9 +139,9 @@
+         while(hue<0) hue+=1.;
+         while(hue>1) hue-=1.;
+ 
+-        qreal saturation = qBound(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
++        qreal saturation = qBound<qreal>(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
+ 
+-        qreal value = qBound(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
++        qreal value = qBound<qreal>(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
+ 
+ 
+         koColor.fromQColor(QColor::fromHsvF(hue, saturation, value));
+Index: koffice-2.2.91/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	2010-12-15 16:07:37.220408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	2010-12-15 16:07:37.000000000 +0000
+@@ -51,7 +51,7 @@
+     KisBrushOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+     virtual ~KisBrushOp();
+ 
+-    double paintAt(const KisPaintInformation& info);
++    qreal paintAt(const KisPaintInformation& info);
+     virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
+ 
+ private:
+Index: koffice-2.2.91/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	2010-12-15 16:07:37.200408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	2010-12-16 10:40:25.792320002 +0000
+@@ -95,7 +95,7 @@
+  of the current iteration.
+ */
+     
+-double KisSmudgeOp::paintAt(const KisPaintInformation& info)
++qreal KisSmudgeOp::paintAt(const KisPaintInformation& info)
+ {
+     KisBrushSP brush = m_brush;
+     
+@@ -118,7 +118,7 @@
+     is where the dab will be positioned and the fractional part determines
+     the sub-pixel positioning. */
+     qint32 x, y;
+-    double xFraction, yFraction;
++    qreal xFraction, yFraction;
+ 
+     splitCoordinate(pt.x(), &x, &xFraction);
+     splitCoordinate(pt.y(), &y, &yFraction);
+Index: koffice-2.2.91/krita/plugins/paintops/deform/kis_deform_paintop.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/deform/kis_deform_paintop.cpp	2010-12-15 16:07:37.268408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/deform/kis_deform_paintop.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -94,9 +94,9 @@
+         KisFixedPaintDeviceSP dab = cachedDab(painter()->device()->colorSpace());
+ 
+         qint32 x;
+-        double subPixelX;
++        qreal subPixelX;
+         qint32 y;
+-        double subPixelY;
++        qreal subPixelY;
+ 
+         QPointF pt = info.pos();
+         if (m_sizeProperties.jitterEnabled){
+@@ -151,7 +151,7 @@
+ }
+ 
+ 
+-double KisDeformPaintOp::spacing(double /*pressure*/) const
++qreal KisDeformPaintOp::spacing(qreal /*pressure*/) const
+ {
+     return m_spacing;
+ }
+Index: koffice-2.2.91/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	2010-12-15 16:07:37.328408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -67,7 +67,7 @@
+     delete m_hatchingBrush;
+ }
+ 
+-double KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
++qreal KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
+ {
+     //------START SIMPLE ERROR CATCHING-------
+     if (!painter()->device()) return 1;
+@@ -104,7 +104,7 @@
+     QPointF pt = info.pos() - hotSpot;
+ 
+     qint32 x, y;
+-    double xFraction, yFraction;
++    qreal xFraction, yFraction;
+ 
+     splitCoordinate(pt.x(), &x, &xFraction);
+     splitCoordinate(pt.y(), &y, &yFraction);
+Index: koffice-2.2.91/krita/plugins/paintops/hatching/kis_hatching_paintop.h
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/hatching/kis_hatching_paintop.h	2010-12-15 16:07:37.344408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/hatching/kis_hatching_paintop.h	2010-12-15 16:07:37.000000000 +0000
+@@ -50,7 +50,7 @@
+      *  Paint a hatched dab around the mouse cursor according to
+      *  sensor settings and user preferences.
+      */
+-    double paintAt(const KisPaintInformation& info);
++    qreal paintAt(const KisPaintInformation& info);
+     
+     /**
+      *  Returns a number between -90 and 90, and corresponds to the
+Index: koffice-2.2.91/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	2010-12-15 16:07:37.296408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -265,7 +265,7 @@
+ 
+ 
+ 
+-double KisSketchPaintOp::paintAt(const KisPaintInformation& info)
++qreal KisSketchPaintOp::paintAt(const KisPaintInformation& info)
+ {
+     return paintLine(info, info).spacing;
+ }
+Index: koffice-2.2.91/krita/plugins/paintops/sketch/kis_sketch_paintop.h
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/sketch/kis_sketch_paintop.h	2010-12-15 16:07:37.312408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/sketch/kis_sketch_paintop.h	2010-12-15 16:07:37.000000000 +0000
+@@ -38,7 +38,7 @@
+     KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+     virtual ~KisSketchPaintOp();
+     virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
+-    double paintAt(const KisPaintInformation& info);
++    qreal paintAt(const KisPaintInformation& info);
+ 
+ private:
+     // pixel buffer
+Index: koffice-2.2.91/krita/plugins/paintops/spray/spray_brush.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/spray/spray_brush.cpp	2010-12-15 16:07:37.284408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/spray/spray_brush.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -74,7 +74,7 @@
+     if ( m_shapeDynamicsProperties->randomRotation ){
+ 
+         if ( m_properties->gaussian ) {
+-                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
++                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound<qreal>(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
+         } else {
+                 rotation = linearInterpolation(rotation, M_PI * 2.0 * drand48(), m_shapeDynamicsProperties->randomRotationWeight );
+         }
+@@ -322,9 +322,9 @@
+             QPointF pt = pos - hotSpot;
+ 
+             qint32 ix;
+-            double xFraction;
++            qreal xFraction;
+             qint32 iy;
+-            double yFraction;
++            qreal yFraction;
+ 
+             KisPaintOp::splitCoordinate(pt.x(), &ix, &xFraction);
+             KisPaintOp::splitCoordinate(pt.y(), &iy, &yFraction);
+Index: koffice-2.2.91/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	2010-12-15 16:07:37.252408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	2010-12-15 16:07:37.000000000 +0000
+@@ -65,7 +65,7 @@
+ {
+ }
+ 
+-double KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
++qreal KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
+ {
+     //------START SIMPLE ERROR CATCHING-------
+     if (!painter()->device()) return 1;
+@@ -91,7 +91,7 @@
+     QPointF pt = info.pos() - hotSpot;
+ 
+     qint32 x, y;
+-    double xFraction, yFraction;
++    qreal xFraction, yFraction;
+ 
+     splitCoordinate(pt.x(), &x, &xFraction);
+     splitCoordinate(pt.y(), &y, &yFraction);
+@@ -187,4 +187,4 @@
+ void KisWateryMixPaintOp::dilute ()
+ {
+ }
+-*/
+\ No newline at end of file
++*/
+Index: koffice-2.2.91/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
+===================================================================
+--- koffice-2.2.91.orig/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	2010-12-15 16:07:37.236408118 +0000
++++ koffice-2.2.91/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	2010-12-15 16:07:37.000000000 +0000
+@@ -53,7 +53,7 @@
+     /**
+      *  Document me
+      */
+-    double paintAt(const KisPaintInformation& info);
++    qreal paintAt(const KisPaintInformation& info);
+ 
+     /*
+     /// Absorb the color beneath the brush
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_03_libwpg_02.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_03_libwpg_02.diff
--- 1:2.3.3-1/debian/patches/kubuntu_03_libwpg_02.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_03_libwpg_02.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,1334 @@
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/CMakeLists.txt koffice-2.3.1-libwpg02/filters/karbon/wpg/import/CMakeLists.txt
+--- koffice-2.3.1/filters/karbon/wpg/import/CMakeLists.txt	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/CMakeLists.txt	2011-01-18 07:40:25.000000000 +0100
+@@ -1,16 +1,11 @@
+ 
+-
+ include_directories(${CMAKE_BINARY_DIR}/filters/ ${WPD_INCLUDE_DIR} ${LIBWPG_INCLUDE_DIR}/)
+ 
+-set(wpgimport_PART_SRCS 
+-WPGImport.cpp 
+-OdgExporter.cxx
+-FileOutputHandler.cxx
+-GraphicsElement.cxx)
++set(wpgimport_PART_SRCS WPGImport.cpp)
+ 
+ kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS})
+ 
+-target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES})
++target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES} ${WPD_LIBRARIES})
+ 
+ install(TARGETS wpgimport DESTINATION ${PLUGIN_INSTALL_DIR})
+ install(FILES karbon_wpg_import.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.cxx
+--- koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.cxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.cxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,95 +0,0 @@
+-/* libwpg
+- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Library General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpg.sourceforge.net
+- */
+-
+-/* "This product is not manufactured, approved, or supported by
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#include "FileOutputHandler.hxx"
+-
+-FileOutputHandler::FileOutputHandler(std::ostringstream &contentStream) :
+-	mbIsTagOpened(false),
+-	mContentStream(contentStream)
+-{
+-}
+-
+-void FileOutputHandler::startDocument()
+-{
+-}
+-
+-void FileOutputHandler::startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList)
+-{
+-	if (mbIsTagOpened)
+-	{
+-		mContentStream << ">";
+-		mbIsTagOpened = false;
+-	}
+-	mContentStream << "<" << psName;
+-
+-	for (std::vector<std::pair<std::string, std::string> >::const_iterator i = xPropList.begin(); i != xPropList.end(); i++)
+-	{
+-		mContentStream << " " <<  (*i).first.c_str() << "=\"" << (*i).second.c_str() << "\"";
+-	}
+-	mbIsTagOpened = true;
+-	msOpenedTagName = psName;
+-}
+-
+-void FileOutputHandler::endElement(const char *psName)
+-{
+-	if (mbIsTagOpened)
+-	{
+-		if( msOpenedTagName == psName )
+-		{
+-			mContentStream << "/>";
+-			mbIsTagOpened = false;
+-		}
+-		else // should not happen, but handle it
+-		{
+-			mContentStream << ">";
+-			mContentStream << "</" << psName << ">";
+-			mbIsTagOpened = false;
+-		}
+-	}
+-	else
+-	{
+-		mContentStream << "</" << psName << ">";
+-		mbIsTagOpened = false;
+-	}
+-}
+-
+-void FileOutputHandler::characters(const std::string &sCharacters)
+-{
+-	if (mbIsTagOpened)
+-	{
+-		mContentStream << ">";
+-		mbIsTagOpened = false;
+-	}
+-	mContentStream << sCharacters.c_str();
+-}
+-
+-void FileOutputHandler::endDocument()
+-{
+-	if (mbIsTagOpened)
+-	{
+-		mContentStream << ">";
+-		mbIsTagOpened = false;
+-	}
+-}
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.hxx
+--- koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.hxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.hxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,49 +0,0 @@
+-/* libwpg
+- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Library General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpg.sourceforge.net
+- */
+-
+-/* "This product is not manufactured, approved, or supported by
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#ifndef FILEOUTPUTHANDLER_H
+-#define FILEOUTPUTHANDLER_H
+-
+-#include <iostream>
+-#include <sstream>
+-#include <string>
+-#include "GraphicsHandler.hxx"
+-
+-class FileOutputHandler : public GraphicsHandler
+-{
+-  public:
+-        explicit FileOutputHandler(std::ostringstream &contentStream);
+-        virtual void startDocument();
+-        virtual void endDocument();
+-        virtual void startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList);
+-        virtual void endElement(const char *psName);
+-        virtual void characters(const std::string &sCharacters);
+-
+-  private:
+-	bool mbIsTagOpened;
+-	std::string msOpenedTagName;
+-	std::ostringstream &mContentStream;
+-};
+-#endif
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.cxx
+--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.cxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.cxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,66 +0,0 @@
+-/* GraphicsElement: The items we are collecting to be put into the Writer
+- * document: paragraph and spans of text, as well as section breaks.
+- *
+- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
+- * 
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpg.sourceforge.net
+- *
+- */
+-
+-/* "This product is not manufactured, approved, or supported by 
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#include "GraphicsElement.hxx"
+-#include "GraphicsHandler.hxx"
+-#include <string.h>
+-
+-#define ASCII_SPACE 0x0020
+-
+-void TagGraphicsElement::print() const
+-{
+-}
+-
+-void OpenTagGraphicsElement::write(GraphicsHandler *pHandler) const
+-{
+-	pHandler->startElement(getTagName().c_str(), maAttrList);
+-}
+-
+-void OpenTagGraphicsElement::print() const
+-{ 
+-	TagGraphicsElement::print(); 	
+-}
+-
+-void OpenTagGraphicsElement::addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue)
+-{
+-	std::pair<std::string, std::string> tmpAttribute;
+-	tmpAttribute.first = szAttributeName;
+-	tmpAttribute.second = sAttributeValue;
+-        maAttrList.push_back(tmpAttribute);
+-}
+-
+-void CloseTagGraphicsElement::write(GraphicsHandler *pHandler) const
+-{
+-
+-	pHandler->endElement(getTagName().c_str());
+-}
+-
+-void CharDataGraphicsElement::write(GraphicsHandler *pHandler) const
+-{
+-	pHandler->characters(msData);
+-}
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.hxx
+--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.hxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.hxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,84 +0,0 @@
+-/* GraphicsElement: The items we are collecting to be put into the Writer
+- * document: paragraph and spans of text, as well as section breaks.
+- *
+- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
+- * 
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpd.sourceforge.net
+- *
+- */
+-
+-/* "This product is not manufactured, approved, or supported by 
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#ifndef _GRAPHICSELEMENT_H
+-#define _GRAPHICSELEMENT_H
+-#include <string>
+-#include <map>
+-#include <vector>
+-
+-#include "GraphicsHandler.hxx"
+-
+-class GraphicsElement
+-{
+-public:	
+-	virtual ~GraphicsElement() {}
+-	virtual void write(GraphicsHandler *pHandler) const = 0;
+-	virtual void print() const {}
+-};
+-
+-class TagGraphicsElement : public GraphicsElement
+-{
+-public:
+-	explicit TagGraphicsElement(const char *szTagName) : msTagName(szTagName) {}
+-	const std::string &getTagName() const { return msTagName; }
+-	virtual void print() const;
+-private:
+-	const std::string msTagName;
+-};
+-
+-class OpenTagGraphicsElement : public TagGraphicsElement
+-{
+-public:
+-	explicit OpenTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
+-	~OpenTagGraphicsElement() {}
+-	void addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue);
+-	virtual void write(GraphicsHandler *pHandler) const;
+-	virtual void print () const;
+-private:
+-	std::vector<std::pair<std::string, std::string> > maAttrList;
+-};
+-
+-class CloseTagGraphicsElement : public TagGraphicsElement
+-{
+-public:
+-	explicit CloseTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
+-	virtual void write(GraphicsHandler *pHandler) const;
+-};
+-
+-class CharDataGraphicsElement : public GraphicsElement
+-{
+-public:
+-	CharDataGraphicsElement(const char *sData) : GraphicsElement(), msData(sData) {}
+-	virtual void write(GraphicsHandler *pHandler) const;
+-private:
+-	std::string msData;
+-};
+-
+-
+-#endif
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsHandler.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsHandler.hxx
+--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsHandler.hxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsHandler.hxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2004 William Lachance (wlach@interlog.com)
+- * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com)
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public License
+- * as published by the Free Software Foundation; either version 2
+- * of the License, or (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- *  Contributor(s): Martin Gallwey (gallwey@sun.com)
+- *
+- */
+-
+-/* "This product is not manufactured, approved, or supported by
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-#ifndef _GRAPHICSHANDLER_H
+-#define _GRAPHICSHANDLER_H
+-#include <string>
+-#include <map>
+-#include <vector>
+-
+-class GraphicsHandler
+-{
+-public:
+-	virtual ~GraphicsHandler() {}
+-        virtual void startDocument() = 0;
+-        virtual void endDocument() = 0;
+-        virtual void startElement(const char *psName, const std::vector< std::pair <std::string, std::string> > &xPropList) = 0;
+-        virtual void endElement(const char *psName) = 0;
+-        virtual void characters(const std::string &sCharacters) = 0;
+-};
+-#endif
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/karbon_wpg_import.desktop koffice-2.3.1-libwpg02/filters/karbon/wpg/import/karbon_wpg_import.desktop
+--- koffice-2.3.1/filters/karbon/wpg/import/karbon_wpg_import.desktop	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/karbon_wpg_import.desktop	2011-01-18 07:41:33.000000000 +0100
+@@ -42,7 +42,7 @@
+ Name[x-test]=xxKarbon WPG Import Filterxx
+ Name[zh_CN]=Karbon WPG 导入过滤器
+ Name[zh_TW]=Karbon WPG 匯入過濾程式
+-X-KDE-Export=application/vnd.oasis.opendocument.graphics
++X-KDE-Export=image/svg+xml
+ X-KDE-Import=application/x-wpg
+ X-KDE-Weight=1
+ X-KDE-Library=wpgimport
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.cxx
+--- koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.cxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.cxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,662 +0,0 @@
+-/* libwpg
+- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
+- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Library General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpg.sourceforge.net
+- */
+-
+-/* "This product is not manufactured, approved, or supported by
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#include "OdgExporter.hxx"
+-#include "GraphicsElement.hxx"
+-#include "GraphicsHandler.hxx"
+-#include <locale.h>
+-
+-static std::string doubleToString(const double value)
+-{
+-  std::ostringstream tempStream;
+-  tempStream << value;
+-  std::string decimalPoint(localeconv()->decimal_point);
+-  if ((decimalPoint.size() == 0) || (decimalPoint == "."))
+-    return tempStream.str();
+-  std::string stringValue(tempStream.str());
+-  if (!stringValue.empty())
+-  {
+-    std::string::size_type pos;
+-    while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
+-          stringValue.replace(pos,decimalPoint.size(),".");
+-  }
+-  return stringValue;
+-}
+-
+-
+-OdgExporter::OdgExporter(GraphicsHandler *pHandler, const bool isFlatXML):
+-        mpHandler(pHandler),
+-        m_fillRule(AlternatingFill),
+-        m_gradientIndex(1),
+-        m_dashIndex(1),
+-        m_styleIndex(1),
+-        m_width(0.0f),
+-        m_height(0.0f),
+-        m_isFlatXML(isFlatXML)
+-{
+-}
+-
+-OdgExporter::~OdgExporter()
+-{
+-        for (std::vector <GraphicsElement *>::iterator iterStroke = mStrokeDashElements.begin();
+-                iterStroke != mStrokeDashElements.end(); iterStroke++)
+-                delete (*iterStroke);
+-
+-        for (std::vector <GraphicsElement *>::iterator iterGradient = mGradientElements.begin();
+-                iterGradient != mGradientElements.end(); iterGradient++)
+-                delete (*iterGradient);
+-
+-        for (std::vector <GraphicsElement *>::iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
+-                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
+-                delete (*iterAutomaticStyles);
+-
+-        for (std::vector<GraphicsElement *>::iterator bodyIter = mBodyElements.begin();
+-                bodyIter != mBodyElements.end(); bodyIter++)
+-                delete (*bodyIter);
+-}
+-
+-void OdgExporter::startGraphics(double width, double height)
+-{
+-        m_gradientIndex = 1;
+-        m_dashIndex = 1;
+-        m_styleIndex = 1;
+-        m_width = width;
+-        m_height = height;
+-
+-
+-        mpHandler->startDocument();
+-        OpenTagGraphicsElement tmpOfficeDocumentContent("office:document");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:config", "urn:oasis:names:tc:opendocument:xmlns:config:1.0");
+-        tmpOfficeDocumentContent.addAttribute("xmlns:ooo", "http://openoffice.org/2004/office");
+-        tmpOfficeDocumentContent.addAttribute("office:version", "1.0");
+-        if (m_isFlatXML)
+-                        tmpOfficeDocumentContent.addAttribute("office:mimetype", "application/x-vnd.oasis.openoffice.drawing");
+-        tmpOfficeDocumentContent.write(mpHandler);
+-
+-        OpenTagGraphicsElement("office:settings").write(mpHandler);
+-
+-        OpenTagGraphicsElement configItemSetOpenElement("config:config-item-set");
+-        configItemSetOpenElement.addAttribute("config:name", "ooo:view-settings");
+-        configItemSetOpenElement.write(mpHandler);
+-
+-        OpenTagGraphicsElement configItemOpenElement1("config:config-item");
+-        configItemOpenElement1.addAttribute("config:name", "VisibleAreaTop");
+-        configItemOpenElement1.addAttribute("config:type", "int");
+-        configItemOpenElement1.write(mpHandler);
+-        mpHandler->characters("0");
+-        mpHandler->endElement("config:config-item");
+-
+-        OpenTagGraphicsElement configItemOpenElement2("config:config-item");
+-        configItemOpenElement2.addAttribute("config:name", "VisibleAreaLeft");
+-        configItemOpenElement2.addAttribute("config:type", "int");
+-        configItemOpenElement2.write(mpHandler);
+-        mpHandler->characters("0");
+-        mpHandler->endElement("config:config-item");
+-
+-        OpenTagGraphicsElement configItemOpenElement3("config:config-item");
+-        configItemOpenElement3.addAttribute("config:name", "VisibleAreaWidth");
+-        configItemOpenElement3.addAttribute("config:type", "int");
+-        configItemOpenElement3.write(mpHandler);
+-        m_value.str("");
+-        m_value << (unsigned)(2540 * width);
+-        mpHandler->characters(m_value.str());
+-        mpHandler->endElement("config:config-item");
+-
+-        OpenTagGraphicsElement configItemOpenElement4("config:config-item");
+-        configItemOpenElement4.addAttribute("config:name", "VisibleAreaHeight");
+-        configItemOpenElement4.addAttribute("config:type", "int");
+-        configItemOpenElement4.write(mpHandler);
+-        m_value.str("");
+-        m_value << (unsigned)(2540 * height);
+-        mpHandler->characters(m_value.str());
+-        mpHandler->endElement("config:config-item");
+-
+-        mpHandler->endElement("config:config-item-set");
+-
+-        mpHandler->endElement("office:settings");
+-
+-}
+-
+-void OdgExporter::endGraphics()
+-{
+-        OpenTagGraphicsElement("office:styles").write(mpHandler);
+-
+-        for (std::vector <GraphicsElement *>::const_iterator iterStroke = mStrokeDashElements.begin();
+-                iterStroke != mStrokeDashElements.end(); iterStroke++)
+-                (*iterStroke)->write(mpHandler);
+-
+-        for (std::vector <GraphicsElement *>::const_iterator iterGradient = mGradientElements.begin();
+-                iterGradient != mGradientElements.end(); iterGradient++)
+-                (*iterGradient)->write(mpHandler);
+-
+-        mpHandler->endElement("office:styles");
+-
+-        OpenTagGraphicsElement("office:automatic-styles").write(mpHandler);
+-
+-        for (std::vector <GraphicsElement *>::const_iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
+-                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
+-                (*iterAutomaticStyles)->write(mpHandler);
+-
+-        OpenTagGraphicsElement tmpStylePageLayoutOpenElement("style:page-layout");
+-        tmpStylePageLayoutOpenElement.addAttribute("style:name", "PM0");
+-        tmpStylePageLayoutOpenElement.write(mpHandler);
+-
+-        OpenTagGraphicsElement tmpStylePageLayoutPropertiesOpenElement("style:page-layout-properties");
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-top", "0in");
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-bottom", "0in");
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-left", "0in");
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-right", "0in");
+-        m_value.str("");
+-        m_value <<  doubleToString(m_width) << "in";
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-width", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(m_height)  << "in";
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-height", m_value.str());
+-        m_value.str("");
+-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("style:print-orientation", "portrait");
+-        tmpStylePageLayoutPropertiesOpenElement.write(mpHandler);
+-
+-        mpHandler->endElement("style:page-layout-properties");
+-
+-        mpHandler->endElement("style:page-layout");
+-
+-        OpenTagGraphicsElement tmpStyleStyleOpenElement("style:style");
+-        tmpStyleStyleOpenElement.addAttribute("style:name", "dp1");
+-        tmpStyleStyleOpenElement.addAttribute("style:family", "drawing-page");
+-        tmpStyleStyleOpenElement.write(mpHandler);
+-
+-        OpenTagGraphicsElement tmpStyleDrawingPagePropertiesOpenElement("style:drawing-page-properties");
+-        // tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:background-size", "border");
+-        tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:fill", "none");
+-        tmpStyleDrawingPagePropertiesOpenElement.write(mpHandler);
+-
+-        mpHandler->endElement("style:drawing-page-properties");
+-
+-        mpHandler->endElement("style:style");
+-
+-        mpHandler->endElement("office:automatic-styles");
+-
+-        OpenTagGraphicsElement("office:master-styles").write(mpHandler);
+-
+-        OpenTagGraphicsElement tmpStyleMasterPageOpenElement("style:master-page");
+-        tmpStyleMasterPageOpenElement.addAttribute("style:name", "Default");
+-        tmpStyleMasterPageOpenElement.addAttribute("style:page-layout-name", "PM0");
+-        tmpStyleMasterPageOpenElement.addAttribute("draw:style-name", "dp1");
+-        tmpStyleMasterPageOpenElement.write(mpHandler);
+-
+-        mpHandler->endElement("style:master-page");
+-
+-        mpHandler->endElement("office:master-styles");
+-
+-        OpenTagGraphicsElement("office:body").write(mpHandler);
+-
+-        OpenTagGraphicsElement("office:drawing").write(mpHandler);
+-
+-        OpenTagGraphicsElement tmpDrawPageOpenElement("draw:page");
+-        tmpDrawPageOpenElement.addAttribute("draw:name", "page1");
+-        tmpDrawPageOpenElement.addAttribute("draw:style-name", "dp1");
+-        tmpDrawPageOpenElement.addAttribute("draw:master-page-name", "Default");
+-        tmpDrawPageOpenElement.write(mpHandler);
+-
+-        for (std::vector<GraphicsElement *>::const_iterator bodyIter = mBodyElements.begin();
+-                bodyIter != mBodyElements.end(); bodyIter++)
+-        {
+-                (*bodyIter)->write(mpHandler);
+-        }
+-
+-        mpHandler->endElement("draw:page");
+-        mpHandler->endElement("office:drawing");
+-        mpHandler->endElement("office:body");
+-        mpHandler->endElement("office:document");
+-
+-        mpHandler->endDocument();
+-}
+-
+-void OdgExporter::setPen(const libwpg::WPGPen& pen)
+-{
+-        m_pen = pen;
+-}
+-
+-void OdgExporter::setBrush(const libwpg::WPGBrush& brush)
+-{
+-        m_brush = brush;
+-}
+-
+-void OdgExporter::setFillRule(FillRule rule)
+-{
+-        m_fillRule = rule;
+-}
+-
+-void OdgExporter::startLayer(unsigned int)
+-{
+-}
+-
+-void OdgExporter::endLayer(unsigned int)
+-{
+-}
+-
+-void OdgExporter::drawRectangle(const libwpg::WPGRect& rect, double rx, double )
+-{
+-        writeStyle();
+-        OpenTagGraphicsElement *pDrawRectElement = new OpenTagGraphicsElement("draw:rect");
+-        m_value.str("");
+-        m_value << "gr" << m_styleIndex-1;
+-        pDrawRectElement->addAttribute("draw:style-name", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(rect.x1) << "in";
+-        pDrawRectElement->addAttribute("svg:x", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(rect.y1) << "in";
+-        pDrawRectElement->addAttribute("svg:y", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(rect.x2-rect.x1) << "in";
+-        pDrawRectElement->addAttribute("svg:width", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(rect.y2-rect.y1) << "in";
+-        pDrawRectElement->addAttribute("svg:height", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(rx) << "in";
+-        // FIXME: what to do when rx != ry ?
+-        pDrawRectElement->addAttribute("draw:corner-radius", m_value.str());
+-        m_value.str("");
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawRectElement));
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:rect")));
+-}
+-
+-void OdgExporter::drawEllipse(const libwpg::WPGPoint& center, double rx, double ry)
+-{
+-        writeStyle();
+-        OpenTagGraphicsElement *pDrawEllipseElement = new OpenTagGraphicsElement("draw:ellipse");
+-        m_value.str("");
+-        m_value << "gr" << m_styleIndex-1;
+-        pDrawEllipseElement->addAttribute("draw:style-name", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(center.x - rx) << "in";
+-        pDrawEllipseElement->addAttribute("svg:x", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(center.y - ry) << "in";
+-        pDrawEllipseElement->addAttribute("svg:y", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(2 * rx) << "in";
+-        pDrawEllipseElement->addAttribute("svg:width", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(2 * ry) << "in";
+-        pDrawEllipseElement->addAttribute("svg:height", m_value.str());
+-        m_value.str("");
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawEllipseElement));
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:ellipse")));
+-}
+-
+-void OdgExporter::drawPolygon(const libwpg::WPGPointArray& vertices)
+-{
+-        if(vertices.count() < 2)
+-                return;
+-
+-        if(vertices.count() == 2)
+-        {
+-                const libwpg::WPGPoint& p1 = vertices[0];
+-                const libwpg::WPGPoint& p2 = vertices[1];
+-
+-                writeStyle();
+-                OpenTagGraphicsElement *pDrawLineElement = new OpenTagGraphicsElement("draw:line");
+-                m_value.str("");
+-                m_value << "gr" << m_styleIndex-1;
+-                pDrawLineElement->addAttribute("draw:style-name", m_value.str());
+-                m_value.str("");
+-                pDrawLineElement->addAttribute("draw:text-style-name", "P1");
+-                pDrawLineElement->addAttribute("draw:layer", "layout");
+-                m_value << doubleToString(p1.x)  << "in";
+-                pDrawLineElement->addAttribute("svg:x1", m_value.str());
+-                m_value.str("");
+-                m_value << doubleToString(p1.y)  << "in";
+-                pDrawLineElement->addAttribute("svg:y1", m_value.str());
+-                m_value.str("");
+-                m_value  << doubleToString(p2.x)  << "in";
+-                pDrawLineElement->addAttribute("svg:x2", m_value.str());
+-                m_value.str("");
+-                m_value << doubleToString(p2.y)  << "in";
+-                pDrawLineElement->addAttribute("svg:y2", m_value.str());
+-                m_value.str("");
+-                mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawLineElement));
+-                mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:line")));
+-        }
+-        else
+-        {
+-                // draw as path
+-                libwpg::WPGPath path;
+-                path.moveTo(vertices[0]);
+-                for(unsigned long ii = 1; ii < vertices.count(); ii++)
+-                        path.lineTo(vertices[ii]);
+-                path.closed = true;
+-                drawPath(path);
+-        }
+-}
+-
+-void OdgExporter::drawPath(const libwpg::WPGPath& path)
+-{
+-        if(path.count() == 0)
+-                return;
+-
+-        // try to find the bounding box
+-        // this is simple convex hull technique, the bounding box might not be
+-        // accurate but that should be enough for this purpose
+-        libwpg::WPGPoint p = path.element(0).point;
+-        libwpg::WPGPoint q = path.element(0).point;
+-        for(unsigned k = 0; k < path.count(); k++)
+-        {
+-                libwpg::WPGPathElement element = path.element(k);
+-                p.x = (p.x > element.point.x) ? element.point.x : p.x;
+-                p.y = (p.y > element.point.y) ? element.point.y : p.y;
+-                q.x = (q.x < element.point.x) ? element.point.x : q.x;
+-                q.y = (q.y < element.point.y) ? element.point.y : q.y;
+-                if(element.type == libwpg::WPGPathElement::CurveToElement)
+-                {
+-                        p.x = (p.x > element.extra1.x) ? element.extra1.x : p.x;
+-                        p.y = (p.y > element.extra1.y) ? element.extra1.y : p.y;
+-                        q.x = (q.x < element.extra1.x) ? element.extra1.x : q.x;
+-                        q.y = (q.y < element.extra1.y) ? element.extra1.y : q.y;
+-                        p.x = (p.x > element.extra2.x) ? element.extra2.x : p.x;
+-                        p.y = (p.y > element.extra2.y) ? element.extra2.y : p.y;
+-                        q.x = (q.x < element.extra2.x) ? element.extra2.x : q.x;
+-                        q.y = (q.y < element.extra2.y) ? element.extra2.y : q.y;
+-                }
+-        }
+-        double vw = q.x - p.x;
+-        double vh = q.y - p.y;
+-
+-        writeStyle();
+-
+-        OpenTagGraphicsElement *pDrawPathElement = new OpenTagGraphicsElement("draw:path");
+-        m_value.str("");
+-        m_value << "gr" << m_styleIndex-1;
+-        pDrawPathElement->addAttribute("draw:style-name", m_value.str());
+-        m_value.str("");
+-        pDrawPathElement->addAttribute("draw:text-style-name", "P1");
+-        pDrawPathElement->addAttribute("draw:layer", "layout");
+-        m_value << doubleToString(p.x)  << "in";
+-        pDrawPathElement->addAttribute("svg:x", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(p.y)  << "in";
+-        pDrawPathElement->addAttribute("svg:y", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(vw) << "in";
+-        pDrawPathElement->addAttribute("svg:width", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(vh) << "in";
+-        pDrawPathElement->addAttribute("svg:height", m_value.str());
+-        m_value.str("");
+-        m_value << "0 0 " << (int)(vw*2540) << " " << (int)(vh*2540);
+-        pDrawPathElement->addAttribute("svg:viewBox", m_value.str());
+-        m_value.str("");
+-
+-        for(unsigned i = 0; i < path.count(); i++)
+-        {
+-                libwpg::WPGPathElement element = path.element(i);
+-                libwpg::WPGPoint point = element.point;
+-                switch(element.type)
+-                {
+-                        // 2540 is 2.54*1000, 2.54 in = 1 in
+-                        case libwpg::WPGPathElement::MoveToElement:
+-                                m_value << "M" << (int)((point.x-p.x)*2540) << " ";
+-                                m_value << (int)((point.y-p.y)*2540);
+-                                break;
+-
+-                        case libwpg::WPGPathElement::LineToElement:
+-                                m_value << "L" << (int)((point.x-p.x)*2540) << " ";
+-                                m_value << (int)((point.y-p.y)*2540);
+-                                break;
+-
+-                        case libwpg::WPGPathElement::CurveToElement:
+-                                m_value << "C" << (int)((element.extra1.x-p.x)*2540) << " ";
+-                                m_value << (int)((element.extra1.y-p.y)*2540) << " ";
+-                                m_value << (int)((element.extra2.x-p.x)*2540) << " ";
+-                                m_value << (int)((element.extra2.y-p.y)*2540) << " ";
+-                                m_value << (int)((point.x-p.x)*2540) << " ";
+-                                m_value << (int)((point.y-p.y)*2540);
+-                                break;
+-
+-                        default:
+-                                break;
+-                }
+-        }
+-        if(path.closed)
+-                m_value << " Z";
+-        pDrawPathElement->addAttribute("svg:d", m_value.str());
+-        m_value.str("");
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawPathElement));
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:path")));
+-}
+-
+-
+-void OdgExporter::drawBitmap(const libwpg::WPGBitmap& bitmap)
+-{
+-        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
+-        m_value.str("");
+-        m_value << doubleToString(bitmap.rect.x1) << "in";
+-        pDrawFrameElement->addAttribute("svg:x", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(bitmap.rect.y1) << "in";
+-        pDrawFrameElement->addAttribute("svg:y", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(bitmap.rect.height()) << "in";
+-        pDrawFrameElement->addAttribute("svg:height", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(bitmap.rect.width()) << "in";
+-        pDrawFrameElement->addAttribute("svg:width", m_value.str());
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
+-
+-        libwpg::WPGString base64Binary;
+-        bitmap.generateBase64DIB(base64Binary);
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
+-}
+-
+-void OdgExporter::drawImageObject(const libwpg::WPGBinaryData& binaryData)
+-{
+-        if (binaryData.mimeType.length() <= 0)
+-                return;
+-        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
+-        m_value.str("");
+-        m_value << doubleToString(binaryData.rect.x1) << "in";
+-        pDrawFrameElement->addAttribute("svg:x", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(binaryData.rect.y1) << "in";
+-        pDrawFrameElement->addAttribute("svg:y", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(binaryData.rect.height()) << "in";
+-        pDrawFrameElement->addAttribute("svg:height", m_value.str());
+-        m_value.str("");
+-        m_value << doubleToString(binaryData.rect.width()) << "in";
+-        pDrawFrameElement->addAttribute("svg:width", m_value.str());
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
+-
+-        libwpg::WPGString base64Binary = binaryData.getBase64Data();
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
+-
+-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
+-}
+-
+-
+-static std::string colorToHex(const libwpg::WPGColor& color)
+-{
+-        char hexdigits[] = "0123456789abcdef";
+-        char buffer[] = "123456";
+-        buffer[0] = hexdigits[(color.red >> 4) & 15];
+-        buffer[1] = hexdigits[color.red & 15];
+-        buffer[2] = hexdigits[(color.green >> 4) & 15];
+-        buffer[3] = hexdigits[color.green & 15];
+-        buffer[4] = hexdigits[(color.blue >> 4) & 15];
+-        buffer[5] = hexdigits[color.blue & 15];
+-        return std::string(buffer);
+-}
+-
+-void OdgExporter::writeStyle()
+-{
+-        m_value.str("");
+-        m_name.str("");
+-
+-        if(!m_pen.solid && (m_pen.dashArray.count() >=2 ) )
+-        {
+-                // ODG only supports dashes with the same length of spaces inbetween
+-                // here we take the first space and assume everything else the same
+-                // note that dash length is written in percentage
+-                double distance = m_pen.dashArray.at(1);
+-                OpenTagGraphicsElement *tmpDrawStrokeDashElement = new OpenTagGraphicsElement("draw:stroke-dash");
+-                tmpDrawStrokeDashElement->addAttribute("draw:style", "rect");
+-                m_value << "Dash_" << m_dashIndex++;
+-                tmpDrawStrokeDashElement->addAttribute("draw:name", m_value.str());
+-                m_value.str("");
+-                m_value << doubleToString(distance*100) << "%";
+-                tmpDrawStrokeDashElement->addAttribute("draw:distance", m_value.str());
+-                m_value.str("");
+-                for(unsigned i = 0; i < m_pen.dashArray.count()/2; i++)
+-                {
+-                        m_name << "draw:dots" << i+1;
+-                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), "1");
+-                        m_name.str("");
+-                        m_name << "draw:dots" << i+1 << "-length";
+-                        m_value << doubleToString(100*m_pen.dashArray.at(i*2)) << "%";
+-                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), m_value.str());
+-                        m_name.str("");
+-                        m_value.str("");
+-                }
+-                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(tmpDrawStrokeDashElement));
+-                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:stroke-dash")));
+-        }
+-
+-        if(m_brush.style == libwpg::WPGBrush::Gradient)
+-        {
+-                OpenTagGraphicsElement *tmpDrawGradientElement = new OpenTagGraphicsElement("draw:gradient");
+-                tmpDrawGradientElement->addAttribute("draw:style", "linear");
+-                m_value << "Gradient_" << m_gradientIndex++;
+-                tmpDrawGradientElement->addAttribute("draw:name", m_value.str());
+-                m_value.str("");
+-
+-                // ODG angle unit is 0.1 degree
+-                double angle = -m_brush.gradient.angle();
+-                while(angle < 0)
+-                        angle += 360;
+-                while(angle > 360)
+-                        angle -= 360;
+-
+-                m_value << (unsigned)(angle*10);
+-                tmpDrawGradientElement->addAttribute("draw:angle", m_value.str());
+-                m_value.str("");
+-
+-                libwpg::WPGColor startColor = m_brush.gradient.stopColor(0);
+-                libwpg::WPGColor stopColor = m_brush.gradient.stopColor(1);
+-                m_value << "#" << colorToHex(startColor);
+-                tmpDrawGradientElement->addAttribute("draw:start-color", m_value.str());
+-                m_value.str("");
+-                m_value << "#" << colorToHex(stopColor);
+-                tmpDrawGradientElement->addAttribute("draw:end-color", m_value.str());
+-                m_value.str("");
+-                tmpDrawGradientElement->addAttribute("draw:start-intensity", "100%");
+-                tmpDrawGradientElement->addAttribute("draw:end-intensity", "100%");
+-                tmpDrawGradientElement->addAttribute("draw:border", "0%");
+-                mGradientElements.push_back(static_cast<GraphicsElement *>(tmpDrawGradientElement));
+-                mGradientElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:gradient")));
+-        }
+-
+-        OpenTagGraphicsElement *tmpStyleStyleElement = new OpenTagGraphicsElement("style:style");
+-        m_value << "gr" << m_styleIndex;
+-        tmpStyleStyleElement->addAttribute("style:name", m_value.str());
+-        m_value.str("");
+-        tmpStyleStyleElement->addAttribute("style:family", "graphic");
+-        tmpStyleStyleElement->addAttribute("style:parent-style-name", "standard");
+-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleStyleElement));
+-
+-        OpenTagGraphicsElement *tmpStyleGraphicPropertiesElement = new OpenTagGraphicsElement("style:graphic-properties");
+-
+-        if(m_pen.width > 0.0)
+-        {
+-                m_value << doubleToString(m_pen.width) << "in";
+-                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-width", m_value.str());
+-                m_value.str("");
+-                m_value << "#" << colorToHex(m_pen.foreColor);
+-                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-color", m_value.str());
+-                m_value.str("");
+-
+-                if(!m_pen.solid)
+-                {
+-                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "dash");
+-                        m_value << "Dash_" << m_dashIndex-1;
+-                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke-dash", m_value.str());
+-                        m_value.str("");
+-                }
+-        }
+-        else
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "none");
+-
+-        if(m_brush.style == libwpg::WPGBrush::NoBrush)
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "none");
+-
+-        if(m_brush.style == libwpg::WPGBrush::Solid)
+-        {
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "solid");
+-                m_value << "#" << colorToHex(m_brush.foreColor);
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-color", m_value.str());
+-                m_value.str("");
+-        }
+-
+-        if(m_brush.style == libwpg::WPGBrush::Gradient)
+-        {
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "gradient");
+-                m_value << "Gradient_" << m_gradientIndex-1;
+-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-gradient-name", m_value.str());
+-                m_value.str("");
+-        }
+-
+-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleGraphicPropertiesElement));
+-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:graphic-properties")));
+-
+-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:style")));
+-        m_styleIndex++;
+-}
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.hxx
+--- koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.hxx	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.hxx	1970-01-01 01:00:00.000000000 +0100
+@@ -1,116 +0,0 @@
+-/* libwpg
+- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Library General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Library General Public License for more details.
+- *
+- * You should have received a copy of the GNU Library General Public
+- * License along with this library; if not, write to the 
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+- * Boston, MA  02111-1301 USA
+- *
+- * For further information visit http://libwpg.sourceforge.net
+- */
+-
+-/* "This product is not manufactured, approved, or supported by
+- * Corel Corporation or Corel Corporation Limited."
+- */
+-
+-#ifndef __ODGEXPORTER_H__
+-#define __ODGEXPORTER_H__
+-
+-#include <iostream>
+-#include <sstream>
+-#include <string>
+-
+-#include <libwpg/libwpg.h>
+-#include "GraphicsElement.hxx"
+-
+-class OdgExporter : public libwpg::WPGPaintInterface {
+-public:
+-	explicit OdgExporter(GraphicsHandler *pHandler,
+-			     const bool isFlatXML = false);
+-	~OdgExporter();
+-
+-#if LIBWPG_VERSION_MINOR<2
+-	void startGraphics(double imageWidth, double imageHeight);
+-	void endGraphics();
+-	void startLayer(unsigned int id);
+-	void endLayer(unsigned int id);
+-
+-	void setPen(const libwpg::WPGPen& pen);
+-	void setBrush(const libwpg::WPGBrush& brush);
+-	void setFillRule(FillRule rule);
+-
+-	void drawRectangle(const libwpg::WPGRect& rect, double rx, double ry);
+-	void drawEllipse(const libwpg::WPGPoint& center, double rx, double ry);
+-	void drawPolygon(const libwpg::WPGPointArray& vertices);
+-	void drawPath(const libwpg::WPGPath& path);
+-	void drawBitmap(const libwpg::WPGBitmap& bitmap);
+-	void drawImageObject(const libwpg::WPGBinaryData& binaryData);
+-
+-private:
+-	std::vector <GraphicsElement *> mBodyElements;
+-	std::vector <GraphicsElement *> mAutomaticStylesElements;
+-	std::vector <GraphicsElement *> mStrokeDashElements;
+-	std::vector <GraphicsElement *> mGradientElements;
+-	GraphicsHandler *mpHandler;
+-
+-	libwpg::WPGPen m_pen;
+-	libwpg::WPGBrush m_brush;
+-	FillRule m_fillRule;
+-	int m_gradientIndex;
+-	int m_dashIndex;
+-	int m_styleIndex;
+-	void writeStyle();
+-	std::ostringstream m_value, m_name;
+-	double m_width, m_height;
+-	const bool m_isFlatXML;
+-#else
+-	virtual void startGraphics(const ::WPXPropertyList &propList);
+-	virtual void endGraphics();
+-	virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
+-	virtual void startLayer(const ::WPXPropertyList &propList);
+-	virtual void endLayer();
+-	virtual void drawRectangle(const ::WPXPropertyList& propList);
+-	virtual void drawEllipse(const ::WPXPropertyList& propList);
+-	virtual void drawPolygon(const ::WPXPropertyListVector &vertices);
+-	virtual void drawPath(const ::WPXPropertyListVector &path);
+-	virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
+-	virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList);
+-	virtual void endEmbeddedGraphics();
+-	virtual void drawPolyline(const ::WPXPropertyListVector &vertices);
+-	virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
+-	virtual void endTextObject();
+-	virtual void startTextLine(const ::WPXPropertyList &propList);
+-	virtual void endTextLine();
+-	virtual void startTextSpan(const ::WPXPropertyList &propList);
+-	virtual void endTextSpan();
+-	virtual void insertText(const ::WPXString &str);
+-
+-
+-private:
+-	std::vector <GraphicsElement *> mBodyElements;
+-	std::vector <GraphicsElement *> mAutomaticStylesElements;
+-	std::vector <GraphicsElement *> mStrokeDashElements;
+-	std::vector <GraphicsElement *> mGradientElements;
+-	GraphicsHandler *mpHandler;
+-
+-	int m_gradientIndex;
+-	int m_dashIndex;
+-	int m_styleIndex;
+-	void writeStyle();
+-	std::ostringstream m_value, m_name;
+-	double m_width, m_height;
+-	const bool m_isFlatXML;
+-#endif
+-};
+-
+-#endif // __ODGEXPORTER_H__
+diff -Nur koffice-2.3.1/filters/karbon/wpg/import/WPGImport.cpp koffice-2.3.1-libwpg02/filters/karbon/wpg/import/WPGImport.cpp
+--- koffice-2.3.1/filters/karbon/wpg/import/WPGImport.cpp	2011-01-15 21:05:35.000000000 +0100
++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/WPGImport.cpp	2011-01-02 17:46:15.000000000 +0100
+@@ -20,28 +20,26 @@
+ #include <WPGImport.h>
+ #include <WPGImport.moc>
+ 
+-#include <QBuffer>
+-#include <QByteArray>
+-#include <QString>
+-
+-#include <kdebug.h>
+ #include <KoFilterChain.h>
+ #include <KoGlobal.h>
+ #include <KoUnit.h>
++#include <KoXmlWriter.h>
++
+ #include <kpluginfactory.h>
++#include <KDebug>
+ 
+-#include <KoXmlWriter.h>
++
++#include <QtCore/QString>
++#include <QtCore/QFile>
+ 
+ #include <libwpg/libwpg.h>
+ #if LIBWPG_VERSION_MINOR<2
+ #include <libwpg/WPGStreamImplementation.h>
+ #else
+ #include <libwpd-stream/libwpd-stream.h>
++#include <libwpd/libwpd.h>
+ #endif
+ 
+-#include "FileOutputHandler.hxx"
+-#include "OdgExporter.hxx"
+-
+ #include <iostream>
+ 
+ K_PLUGIN_FACTORY(WPGImportFactory, registerPlugin<WPGImport>();)
+@@ -56,35 +54,13 @@
+ {
+ }
+ 
+-static QByteArray createManifest()
+-{
+-    KoXmlWriter* manifestWriter;
+-    QByteArray manifestData;
+-    QBuffer manifestBuffer(&manifestData);
+-
+-    manifestBuffer.open(QIODevice::WriteOnly);
+-    manifestWriter = new KoXmlWriter(&manifestBuffer);
+-
+-    manifestWriter->startDocument("manifest:manifest");
+-    manifestWriter->startElement("manifest:manifest");
+-    manifestWriter->addAttribute("xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0");
+-    manifestWriter->addManifestEntry("/", "application/vnd.oasis.opendocument.graphics");
+-    //manifestWriter->addManifestEntry( "styles.xml", "text/xml" );
+-    manifestWriter->addManifestEntry("content.xml", "text/xml");
+-    manifestWriter->endElement();
+-    manifestWriter->endDocument();
+-    delete manifestWriter;
+-
+-    return manifestData;
+-}
+-
+ 
+ KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to)
+ {
+     if (from != "application/x-wpg")
+         return KoFilter::NotImplemented;
+ 
+-    if (to != "application/vnd.oasis.opendocument.graphics")
++    if (to != "image/svg+xml")
+         return KoFilter::NotImplemented;
+ 
+ #if LIBWPG_VERSION_MINOR<2
+@@ -96,6 +72,7 @@
+             input = olestream;
+         }
+     }
++    libwpg::WPGString output;
+ #else
+     WPXInputStream* input = new WPXFileStream(m_chain->inputFile().toLocal8Bit());
+     if (input->isOLEStream()) {
+@@ -105,59 +82,31 @@
+             input = olestream;
+         }
+      }
++     ::WPXString output;
+ #endif
+ 
+     if (!libwpg::WPGraphics::isSupported(input)) {
+-        std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
++        kWarning() << "ERROR: Unsupported file format (unsupported version) or file is encrypted!";
+         delete input;
+         return KoFilter::NotImplemented;
+     }
+ 
+-    // do the conversion
+-    std::ostringstream tmpStringStream;
+-    FileOutputHandler tmpHandler(tmpStringStream);
+-    OdgExporter exporter(&tmpHandler);
+-    libwpg::WPGraphics::parse(input, &exporter);
+-    delete input;
+-
+-
+-    // create output store
+-    KoStore* storeout;
+-    storeout = KoStore::createStore(m_chain->outputFile(), KoStore::Write,
+-                                    "application/vnd.oasis.opendocument.graphics", KoStore::Zip);
+-
+-    if (!storeout) {
+-        kWarning() << "Couldn't open the requested file.";
+-        return KoFilter::FileNotFound;
+-    }
+-
+-#if 0
+-    if (!storeout->open("styles.xml")) {
+-        kWarning() << "Couldn't open the file 'styles.xml'.";
+-        return KoFilter::CreationError;
++    if (!libwpg::WPGraphics::generateSVG(input, output)) {
++        kWarning() << "ERROR: SVG Generation failed!";
++        delete input;
++        return KoFilter::ParsingError;
+     }
+-    //storeout->write( createStyles() );
+-    storeout->close();
+-#endif
+ 
+-    if (!storeout->open("content.xml")) {
+-        kWarning() << "Couldn't open the file 'content.xml'.";
+-        return KoFilter::CreationError;
+-    }
+-    storeout->write(tmpStringStream.str().c_str());
+-    storeout->close();
++    delete input;
+ 
+-    // store document manifest
+-    storeout->enterDirectory("META-INF");
+-    if (!storeout->open("manifest.xml")) {
+-        kWarning() << "Couldn't open the file 'META-INF/manifest.xml'.";
+-        return KoFilter::CreationError;
++    QFile outputFile(m_chain->outputFile());
++    if(!outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
++        kWarning() << "ERROR: Could not open output file" << m_chain->outputFile();
++        return KoFilter::InternalError;
+     }
+-    storeout->write(createManifest());
+-    storeout->close();
+ 
+-    // we are done!
+-    delete storeout;
++    outputFile.write(output.cstr());
++    outputFile.close();
+ 
+     return KoFilter::OK;
+ }
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_04_findlibgsf.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_04_findlibgsf.diff
--- 1:2.3.3-1/debian/patches/kubuntu_04_findlibgsf.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_04_findlibgsf.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,10 @@
+--- orig/koffice-2.3.1/cmake/modules/FindLIBGSF.cmake	2011-01-15 20:03:35.000000000 +0000
++++ koffice-2.3.1/cmake/modules/FindLIBGSF.cmake	2011-01-28 12:24:39.000000000 +0000
+@@ -34,6 +34,7 @@
+    HINTS
+    ${PC_LIBGSF_INCLUDEDIR}
+    ${PC_LIBGSF_INCLUDE_DIRS}
++   /usr/include/libgsf-1
+    PATH_SUFFIXES libgsf-1
+    )
+ 
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_05_libc_multiarch.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_05_libc_multiarch.diff
--- 1:2.3.3-1/debian/patches/kubuntu_05_libc_multiarch.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_05_libc_multiarch.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,15 @@
+Index: koffice-2.3.3/cmake/modules/FindIconv.cmake
+===================================================================
+--- koffice-2.3.3.orig/cmake/modules/FindIconv.cmake	2011-03-16 14:50:07.281514916 +0000
++++ koffice-2.3.3/cmake/modules/FindIconv.cmake	2011-03-16 14:50:38.731514908 +0000
+@@ -15,8 +15,8 @@
+ 
+ FIND_PATH(ICONV_INCLUDE_DIR iconv.h) 
+  
+-FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
+- 
++SET(ICONV_LIBRARIES c) 
++
+ IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
+    SET(ICONV_FOUND TRUE) 
+ ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_06_krita_link_x.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_06_krita_link_x.diff
--- 1:2.3.3-1/debian/patches/kubuntu_06_krita_link_x.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_06_krita_link_x.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,19 @@
+Origin: vendor
+Bug: <url in upstream bugtracker>
+Bug-Ubuntu: https://launchpad.net/bugs/707794
+Forwarded: no
+Author: Jonathan Riddell <jr@ubuntu.com>
+Reviewed-By: Scott Kitterman <scott@kitterman.com>
+Last-Update: <2011-03-28>
+
+--- koffice-2.3.3.orig/krita/ui/CMakeLists.txt
++++ koffice-2.3.3/krita/ui/CMakeLists.txt
+@@ -214,7 +214,7 @@ kde4_add_ui_files(kritaui_LIB_SRCS
+ 
+ kde4_add_library(kritaui SHARED ${kritaui_LIB_SRCS} )
+ 
+-target_link_libraries(kritaui ${KDE4_THREADWEAVER_LIBRARIES} kritaimage komain kowidgets ${PNG_LIBRARIES} ${EXIV2_LIBRARIES})
++target_link_libraries(kritaui ${KDE4_THREADWEAVER_LIBRARIES} kritaimage komain kowidgets ${PNG_LIBRARIES} ${EXIV2_LIBRARIES} -lX11)
+ 
+ if(HAVE_OPENGL)
+     target_link_libraries(kritaui ${OPENGL_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${OPENEXR_LIBRARIES})
diff -pruN 1:2.3.3-1/debian/patches/kubuntu_07_krita_plugins_errors.diff 1:2.3.3-0ubuntu9/debian/patches/kubuntu_07_krita_plugins_errors.diff
--- 1:2.3.3-1/debian/patches/kubuntu_07_krita_plugins_errors.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/kubuntu_07_krita_plugins_errors.diff	2011-11-09 18:42:30.000000000 +0000
@@ -0,0 +1,22 @@
+Patch from Dave Gilbert.
+See https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/815141
+Index: koffice-2.3.3/krita/plugins/formats/exr/exr_converter.cc
+===================================================================
+--- koffice-2.3.3.orig/krita/plugins/formats/exr/exr_converter.cc	2011-07-23 20:34:53.284495407 -0400
++++ koffice-2.3.3/krita/plugins/formats/exr/exr_converter.cc	2011-07-23 20:36:41.068495351 -0400
+@@ -81,6 +81,7 @@
+     case Imf::FLOAT:
+         return IT_FLOAT32;
+     }
++    return IT_UNSUPPORTED;
+ }
+ 
+ const KoColorSpace* kisTypeToColorSpace(QString model, ImageType imageType)
+@@ -94,6 +95,7 @@
+     case IT_UNSUPPORTED:
+         return 0;
+     }
++    return 0;
+ }
+ 
+ template<typename _T_>
diff -pruN 1:2.3.3-1/debian/patches/series 1:2.3.3-0ubuntu9/debian/patches/series
--- 1:2.3.3-1/debian/patches/series	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/patches/series	2011-11-09 18:42:30.000000000 +0000
@@ -1,4 +1,7 @@
 10_nokcharpart
-#16_kformula_kdeinit4
-15_new_libwpd
-20_arm_fix
+kubuntu_01_arm_compile.diff
+kubuntu_03_libwpg_02.diff
+kubuntu_04_findlibgsf.diff
+kubuntu_05_libc_multiarch.diff
+kubuntu_06_krita_link_x.diff
+kubuntu_07_krita_plugins_errors.diff
diff -pruN 1:2.3.3-1/debian/rules 1:2.3.3-0ubuntu9/debian/rules
--- 1:2.3.3-1/debian/rules	2011-04-03 15:24:47.000000000 +0000
+++ 1:2.3.3-0ubuntu9/debian/rules	2011-11-09 18:42:30.000000000 +0000
@@ -1,7 +1,3 @@
 #!/usr/bin/make -f
 
-#Do not build staging dir
-DEB_CMAKE_EXTRA_FLAGS += -DBUILD_staging=FALSE
-
 include /usr/share/pkg-kde-tools/qt-kde-team/1/debian-qt-kde.mk
-
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/CMakeLists.txt 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/CMakeLists.txt
--- 1:2.3.3-1/filters/karbon/wpg/import/CMakeLists.txt	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/CMakeLists.txt	2011-12-06 13:37:09.000000000 +0000
@@ -1,10 +1,7 @@
 
-
 include_directories(${CMAKE_BINARY_DIR}/filters/ ${WPD_INCLUDE_DIR} ${LIBWPG_INCLUDE_DIR}/)
 
-set(wpgimport_PART_SRCS 
-WPGImport.cpp 
-)
+set(wpgimport_PART_SRCS WPGImport.cpp)
 
 kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS})
 
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/FileOutputHandler.cxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/FileOutputHandler.cxx
--- 1:2.3.3-1/filters/karbon/wpg/import/FileOutputHandler.cxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/FileOutputHandler.cxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,95 +0,0 @@
-/* libwpg
- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpg.sourceforge.net
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#include "FileOutputHandler.hxx"
-
-FileOutputHandler::FileOutputHandler(std::ostringstream &contentStream) :
-	mbIsTagOpened(false),
-	mContentStream(contentStream)
-{
-}
-
-void FileOutputHandler::startDocument()
-{
-}
-
-void FileOutputHandler::startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList)
-{
-	if (mbIsTagOpened)
-	{
-		mContentStream << ">";
-		mbIsTagOpened = false;
-	}
-	mContentStream << "<" << psName;
-
-	for (std::vector<std::pair<std::string, std::string> >::const_iterator i = xPropList.begin(); i != xPropList.end(); i++)
-	{
-		mContentStream << " " <<  (*i).first.c_str() << "=\"" << (*i).second.c_str() << "\"";
-	}
-	mbIsTagOpened = true;
-	msOpenedTagName = psName;
-}
-
-void FileOutputHandler::endElement(const char *psName)
-{
-	if (mbIsTagOpened)
-	{
-		if( msOpenedTagName == psName )
-		{
-			mContentStream << "/>";
-			mbIsTagOpened = false;
-		}
-		else // should not happen, but handle it
-		{
-			mContentStream << ">";
-			mContentStream << "</" << psName << ">";
-			mbIsTagOpened = false;
-		}
-	}
-	else
-	{
-		mContentStream << "</" << psName << ">";
-		mbIsTagOpened = false;
-	}
-}
-
-void FileOutputHandler::characters(const std::string &sCharacters)
-{
-	if (mbIsTagOpened)
-	{
-		mContentStream << ">";
-		mbIsTagOpened = false;
-	}
-	mContentStream << sCharacters.c_str();
-}
-
-void FileOutputHandler::endDocument()
-{
-	if (mbIsTagOpened)
-	{
-		mContentStream << ">";
-		mbIsTagOpened = false;
-	}
-}
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/FileOutputHandler.hxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/FileOutputHandler.hxx
--- 1:2.3.3-1/filters/karbon/wpg/import/FileOutputHandler.hxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/FileOutputHandler.hxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,49 +0,0 @@
-/* libwpg
- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpg.sourceforge.net
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#ifndef FILEOUTPUTHANDLER_H
-#define FILEOUTPUTHANDLER_H
-
-#include <iostream>
-#include <sstream>
-#include <string>
-#include "GraphicsHandler.hxx"
-
-class FileOutputHandler : public GraphicsHandler
-{
-  public:
-        explicit FileOutputHandler(std::ostringstream &contentStream);
-        virtual void startDocument();
-        virtual void endDocument();
-        virtual void startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList);
-        virtual void endElement(const char *psName);
-        virtual void characters(const std::string &sCharacters);
-
-  private:
-	bool mbIsTagOpened;
-	std::string msOpenedTagName;
-	std::ostringstream &mContentStream;
-};
-#endif
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/GraphicsElement.cxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsElement.cxx
--- 1:2.3.3-1/filters/karbon/wpg/import/GraphicsElement.cxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsElement.cxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
-/* GraphicsElement: The items we are collecting to be put into the Writer
- * document: paragraph and spans of text, as well as section breaks.
- *
- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpg.sourceforge.net
- *
- */
-
-/* "This product is not manufactured, approved, or supported by 
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#include "GraphicsElement.hxx"
-#include "GraphicsHandler.hxx"
-#include <string.h>
-
-#define ASCII_SPACE 0x0020
-
-void TagGraphicsElement::print() const
-{
-}
-
-void OpenTagGraphicsElement::write(GraphicsHandler *pHandler) const
-{
-	pHandler->startElement(getTagName().c_str(), maAttrList);
-}
-
-void OpenTagGraphicsElement::print() const
-{ 
-	TagGraphicsElement::print(); 	
-}
-
-void OpenTagGraphicsElement::addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue)
-{
-	std::pair<std::string, std::string> tmpAttribute;
-	tmpAttribute.first = szAttributeName;
-	tmpAttribute.second = sAttributeValue;
-        maAttrList.push_back(tmpAttribute);
-}
-
-void CloseTagGraphicsElement::write(GraphicsHandler *pHandler) const
-{
-
-	pHandler->endElement(getTagName().c_str());
-}
-
-void CharDataGraphicsElement::write(GraphicsHandler *pHandler) const
-{
-	pHandler->characters(msData);
-}
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/GraphicsElement.hxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsElement.hxx
--- 1:2.3.3-1/filters/karbon/wpg/import/GraphicsElement.hxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsElement.hxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,84 +0,0 @@
-/* GraphicsElement: The items we are collecting to be put into the Writer
- * document: paragraph and spans of text, as well as section breaks.
- *
- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpd.sourceforge.net
- *
- */
-
-/* "This product is not manufactured, approved, or supported by 
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#ifndef _GRAPHICSELEMENT_H
-#define _GRAPHICSELEMENT_H
-#include <string>
-#include <map>
-#include <vector>
-
-#include "GraphicsHandler.hxx"
-
-class GraphicsElement
-{
-public:	
-	virtual ~GraphicsElement() {}
-	virtual void write(GraphicsHandler *pHandler) const = 0;
-	virtual void print() const {}
-};
-
-class TagGraphicsElement : public GraphicsElement
-{
-public:
-	explicit TagGraphicsElement(const char *szTagName) : msTagName(szTagName) {}
-	const std::string &getTagName() const { return msTagName; }
-	virtual void print() const;
-private:
-	const std::string msTagName;
-};
-
-class OpenTagGraphicsElement : public TagGraphicsElement
-{
-public:
-	explicit OpenTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
-	~OpenTagGraphicsElement() {}
-	void addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue);
-	virtual void write(GraphicsHandler *pHandler) const;
-	virtual void print () const;
-private:
-	std::vector<std::pair<std::string, std::string> > maAttrList;
-};
-
-class CloseTagGraphicsElement : public TagGraphicsElement
-{
-public:
-	explicit CloseTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
-	virtual void write(GraphicsHandler *pHandler) const;
-};
-
-class CharDataGraphicsElement : public GraphicsElement
-{
-public:
-	CharDataGraphicsElement(const char *sData) : GraphicsElement(), msData(sData) {}
-	virtual void write(GraphicsHandler *pHandler) const;
-private:
-	std::string msData;
-};
-
-
-#endif
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/GraphicsHandler.hxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsHandler.hxx
--- 1:2.3.3-1/filters/karbon/wpg/import/GraphicsHandler.hxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/GraphicsHandler.hxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2004 William Lachance (wlach@interlog.com)
- * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- *  Contributor(s): Martin Gallwey (gallwey@sun.com)
- *
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-#ifndef _GRAPHICSHANDLER_H
-#define _GRAPHICSHANDLER_H
-#include <string>
-#include <map>
-#include <vector>
-
-class GraphicsHandler
-{
-public:
-	virtual ~GraphicsHandler() {}
-        virtual void startDocument() = 0;
-        virtual void endDocument() = 0;
-        virtual void startElement(const char *psName, const std::vector< std::pair <std::string, std::string> > &xPropList) = 0;
-        virtual void endElement(const char *psName) = 0;
-        virtual void characters(const std::string &sCharacters) = 0;
-};
-#endif
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/OdgExporter.cxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/OdgExporter.cxx
--- 1:2.3.3-1/filters/karbon/wpg/import/OdgExporter.cxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/OdgExporter.cxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,662 +0,0 @@
-/* libwpg
- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpg.sourceforge.net
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#include "OdgExporter.hxx"
-#include "GraphicsElement.hxx"
-#include "GraphicsHandler.hxx"
-#include <locale.h>
-
-static std::string doubleToString(const double value)
-{
-  std::ostringstream tempStream;
-  tempStream << value;
-  std::string decimalPoint(localeconv()->decimal_point);
-  if ((decimalPoint.size() == 0) || (decimalPoint == "."))
-    return tempStream.str();
-  std::string stringValue(tempStream.str());
-  if (!stringValue.empty())
-  {
-    std::string::size_type pos;
-    while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
-          stringValue.replace(pos,decimalPoint.size(),".");
-  }
-  return stringValue;
-}
-
-
-OdgExporter::OdgExporter(GraphicsHandler *pHandler, const bool isFlatXML):
-        mpHandler(pHandler),
-        m_fillRule(AlternatingFill),
-        m_gradientIndex(1),
-        m_dashIndex(1),
-        m_styleIndex(1),
-        m_width(0.0f),
-        m_height(0.0f),
-        m_isFlatXML(isFlatXML)
-{
-}
-
-OdgExporter::~OdgExporter()
-{
-        for (std::vector <GraphicsElement *>::iterator iterStroke = mStrokeDashElements.begin();
-                iterStroke != mStrokeDashElements.end(); iterStroke++)
-                delete (*iterStroke);
-
-        for (std::vector <GraphicsElement *>::iterator iterGradient = mGradientElements.begin();
-                iterGradient != mGradientElements.end(); iterGradient++)
-                delete (*iterGradient);
-
-        for (std::vector <GraphicsElement *>::iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
-                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
-                delete (*iterAutomaticStyles);
-
-        for (std::vector<GraphicsElement *>::iterator bodyIter = mBodyElements.begin();
-                bodyIter != mBodyElements.end(); bodyIter++)
-                delete (*bodyIter);
-}
-
-void OdgExporter::startGraphics(double width, double height)
-{
-        m_gradientIndex = 1;
-        m_dashIndex = 1;
-        m_styleIndex = 1;
-        m_width = width;
-        m_height = height;
-
-
-        mpHandler->startDocument();
-        OpenTagGraphicsElement tmpOfficeDocumentContent("office:document");
-        tmpOfficeDocumentContent.addAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/");
-        tmpOfficeDocumentContent.addAttribute("xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:config", "urn:oasis:names:tc:opendocument:xmlns:config:1.0");
-        tmpOfficeDocumentContent.addAttribute("xmlns:ooo", "http://openoffice.org/2004/office");
-        tmpOfficeDocumentContent.addAttribute("office:version", "1.0");
-        if (m_isFlatXML)
-                        tmpOfficeDocumentContent.addAttribute("office:mimetype", "application/x-vnd.oasis.openoffice.drawing");
-        tmpOfficeDocumentContent.write(mpHandler);
-
-        OpenTagGraphicsElement("office:settings").write(mpHandler);
-
-        OpenTagGraphicsElement configItemSetOpenElement("config:config-item-set");
-        configItemSetOpenElement.addAttribute("config:name", "ooo:view-settings");
-        configItemSetOpenElement.write(mpHandler);
-
-        OpenTagGraphicsElement configItemOpenElement1("config:config-item");
-        configItemOpenElement1.addAttribute("config:name", "VisibleAreaTop");
-        configItemOpenElement1.addAttribute("config:type", "int");
-        configItemOpenElement1.write(mpHandler);
-        mpHandler->characters("0");
-        mpHandler->endElement("config:config-item");
-
-        OpenTagGraphicsElement configItemOpenElement2("config:config-item");
-        configItemOpenElement2.addAttribute("config:name", "VisibleAreaLeft");
-        configItemOpenElement2.addAttribute("config:type", "int");
-        configItemOpenElement2.write(mpHandler);
-        mpHandler->characters("0");
-        mpHandler->endElement("config:config-item");
-
-        OpenTagGraphicsElement configItemOpenElement3("config:config-item");
-        configItemOpenElement3.addAttribute("config:name", "VisibleAreaWidth");
-        configItemOpenElement3.addAttribute("config:type", "int");
-        configItemOpenElement3.write(mpHandler);
-        m_value.str("");
-        m_value << (unsigned)(2540 * width);
-        mpHandler->characters(m_value.str());
-        mpHandler->endElement("config:config-item");
-
-        OpenTagGraphicsElement configItemOpenElement4("config:config-item");
-        configItemOpenElement4.addAttribute("config:name", "VisibleAreaHeight");
-        configItemOpenElement4.addAttribute("config:type", "int");
-        configItemOpenElement4.write(mpHandler);
-        m_value.str("");
-        m_value << (unsigned)(2540 * height);
-        mpHandler->characters(m_value.str());
-        mpHandler->endElement("config:config-item");
-
-        mpHandler->endElement("config:config-item-set");
-
-        mpHandler->endElement("office:settings");
-
-}
-
-void OdgExporter::endGraphics()
-{
-        OpenTagGraphicsElement("office:styles").write(mpHandler);
-
-        for (std::vector <GraphicsElement *>::const_iterator iterStroke = mStrokeDashElements.begin();
-                iterStroke != mStrokeDashElements.end(); iterStroke++)
-                (*iterStroke)->write(mpHandler);
-
-        for (std::vector <GraphicsElement *>::const_iterator iterGradient = mGradientElements.begin();
-                iterGradient != mGradientElements.end(); iterGradient++)
-                (*iterGradient)->write(mpHandler);
-
-        mpHandler->endElement("office:styles");
-
-        OpenTagGraphicsElement("office:automatic-styles").write(mpHandler);
-
-        for (std::vector <GraphicsElement *>::const_iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
-                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
-                (*iterAutomaticStyles)->write(mpHandler);
-
-        OpenTagGraphicsElement tmpStylePageLayoutOpenElement("style:page-layout");
-        tmpStylePageLayoutOpenElement.addAttribute("style:name", "PM0");
-        tmpStylePageLayoutOpenElement.write(mpHandler);
-
-        OpenTagGraphicsElement tmpStylePageLayoutPropertiesOpenElement("style:page-layout-properties");
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-top", "0in");
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-bottom", "0in");
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-left", "0in");
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-right", "0in");
-        m_value.str("");
-        m_value <<  doubleToString(m_width) << "in";
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-width", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(m_height)  << "in";
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-height", m_value.str());
-        m_value.str("");
-        tmpStylePageLayoutPropertiesOpenElement.addAttribute("style:print-orientation", "portrait");
-        tmpStylePageLayoutPropertiesOpenElement.write(mpHandler);
-
-        mpHandler->endElement("style:page-layout-properties");
-
-        mpHandler->endElement("style:page-layout");
-
-        OpenTagGraphicsElement tmpStyleStyleOpenElement("style:style");
-        tmpStyleStyleOpenElement.addAttribute("style:name", "dp1");
-        tmpStyleStyleOpenElement.addAttribute("style:family", "drawing-page");
-        tmpStyleStyleOpenElement.write(mpHandler);
-
-        OpenTagGraphicsElement tmpStyleDrawingPagePropertiesOpenElement("style:drawing-page-properties");
-        // tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:background-size", "border");
-        tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:fill", "none");
-        tmpStyleDrawingPagePropertiesOpenElement.write(mpHandler);
-
-        mpHandler->endElement("style:drawing-page-properties");
-
-        mpHandler->endElement("style:style");
-
-        mpHandler->endElement("office:automatic-styles");
-
-        OpenTagGraphicsElement("office:master-styles").write(mpHandler);
-
-        OpenTagGraphicsElement tmpStyleMasterPageOpenElement("style:master-page");
-        tmpStyleMasterPageOpenElement.addAttribute("style:name", "Default");
-        tmpStyleMasterPageOpenElement.addAttribute("style:page-layout-name", "PM0");
-        tmpStyleMasterPageOpenElement.addAttribute("draw:style-name", "dp1");
-        tmpStyleMasterPageOpenElement.write(mpHandler);
-
-        mpHandler->endElement("style:master-page");
-
-        mpHandler->endElement("office:master-styles");
-
-        OpenTagGraphicsElement("office:body").write(mpHandler);
-
-        OpenTagGraphicsElement("office:drawing").write(mpHandler);
-
-        OpenTagGraphicsElement tmpDrawPageOpenElement("draw:page");
-        tmpDrawPageOpenElement.addAttribute("draw:name", "page1");
-        tmpDrawPageOpenElement.addAttribute("draw:style-name", "dp1");
-        tmpDrawPageOpenElement.addAttribute("draw:master-page-name", "Default");
-        tmpDrawPageOpenElement.write(mpHandler);
-
-        for (std::vector<GraphicsElement *>::const_iterator bodyIter = mBodyElements.begin();
-                bodyIter != mBodyElements.end(); bodyIter++)
-        {
-                (*bodyIter)->write(mpHandler);
-        }
-
-        mpHandler->endElement("draw:page");
-        mpHandler->endElement("office:drawing");
-        mpHandler->endElement("office:body");
-        mpHandler->endElement("office:document");
-
-        mpHandler->endDocument();
-}
-
-void OdgExporter::setPen(const libwpg::WPGPen& pen)
-{
-        m_pen = pen;
-}
-
-void OdgExporter::setBrush(const libwpg::WPGBrush& brush)
-{
-        m_brush = brush;
-}
-
-void OdgExporter::setFillRule(FillRule rule)
-{
-        m_fillRule = rule;
-}
-
-void OdgExporter::startLayer(unsigned int)
-{
-}
-
-void OdgExporter::endLayer(unsigned int)
-{
-}
-
-void OdgExporter::drawRectangle(const libwpg::WPGRect& rect, double rx, double )
-{
-        writeStyle();
-        OpenTagGraphicsElement *pDrawRectElement = new OpenTagGraphicsElement("draw:rect");
-        m_value.str("");
-        m_value << "gr" << m_styleIndex-1;
-        pDrawRectElement->addAttribute("draw:style-name", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(rect.x1) << "in";
-        pDrawRectElement->addAttribute("svg:x", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(rect.y1) << "in";
-        pDrawRectElement->addAttribute("svg:y", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(rect.x2-rect.x1) << "in";
-        pDrawRectElement->addAttribute("svg:width", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(rect.y2-rect.y1) << "in";
-        pDrawRectElement->addAttribute("svg:height", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(rx) << "in";
-        // FIXME: what to do when rx != ry ?
-        pDrawRectElement->addAttribute("draw:corner-radius", m_value.str());
-        m_value.str("");
-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawRectElement));
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:rect")));
-}
-
-void OdgExporter::drawEllipse(const libwpg::WPGPoint& center, double rx, double ry)
-{
-        writeStyle();
-        OpenTagGraphicsElement *pDrawEllipseElement = new OpenTagGraphicsElement("draw:ellipse");
-        m_value.str("");
-        m_value << "gr" << m_styleIndex-1;
-        pDrawEllipseElement->addAttribute("draw:style-name", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(center.x - rx) << "in";
-        pDrawEllipseElement->addAttribute("svg:x", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(center.y - ry) << "in";
-        pDrawEllipseElement->addAttribute("svg:y", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(2 * rx) << "in";
-        pDrawEllipseElement->addAttribute("svg:width", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(2 * ry) << "in";
-        pDrawEllipseElement->addAttribute("svg:height", m_value.str());
-        m_value.str("");
-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawEllipseElement));
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:ellipse")));
-}
-
-void OdgExporter::drawPolygon(const libwpg::WPGPointArray& vertices)
-{
-        if(vertices.count() < 2)
-                return;
-
-        if(vertices.count() == 2)
-        {
-                const libwpg::WPGPoint& p1 = vertices[0];
-                const libwpg::WPGPoint& p2 = vertices[1];
-
-                writeStyle();
-                OpenTagGraphicsElement *pDrawLineElement = new OpenTagGraphicsElement("draw:line");
-                m_value.str("");
-                m_value << "gr" << m_styleIndex-1;
-                pDrawLineElement->addAttribute("draw:style-name", m_value.str());
-                m_value.str("");
-                pDrawLineElement->addAttribute("draw:text-style-name", "P1");
-                pDrawLineElement->addAttribute("draw:layer", "layout");
-                m_value << doubleToString(p1.x)  << "in";
-                pDrawLineElement->addAttribute("svg:x1", m_value.str());
-                m_value.str("");
-                m_value << doubleToString(p1.y)  << "in";
-                pDrawLineElement->addAttribute("svg:y1", m_value.str());
-                m_value.str("");
-                m_value  << doubleToString(p2.x)  << "in";
-                pDrawLineElement->addAttribute("svg:x2", m_value.str());
-                m_value.str("");
-                m_value << doubleToString(p2.y)  << "in";
-                pDrawLineElement->addAttribute("svg:y2", m_value.str());
-                m_value.str("");
-                mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawLineElement));
-                mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:line")));
-        }
-        else
-        {
-                // draw as path
-                libwpg::WPGPath path;
-                path.moveTo(vertices[0]);
-                for(unsigned long ii = 1; ii < vertices.count(); ii++)
-                        path.lineTo(vertices[ii]);
-                path.closed = true;
-                drawPath(path);
-        }
-}
-
-void OdgExporter::drawPath(const libwpg::WPGPath& path)
-{
-        if(path.count() == 0)
-                return;
-
-        // try to find the bounding box
-        // this is simple convex hull technique, the bounding box might not be
-        // accurate but that should be enough for this purpose
-        libwpg::WPGPoint p = path.element(0).point;
-        libwpg::WPGPoint q = path.element(0).point;
-        for(unsigned k = 0; k < path.count(); k++)
-        {
-                libwpg::WPGPathElement element = path.element(k);
-                p.x = (p.x > element.point.x) ? element.point.x : p.x;
-                p.y = (p.y > element.point.y) ? element.point.y : p.y;
-                q.x = (q.x < element.point.x) ? element.point.x : q.x;
-                q.y = (q.y < element.point.y) ? element.point.y : q.y;
-                if(element.type == libwpg::WPGPathElement::CurveToElement)
-                {
-                        p.x = (p.x > element.extra1.x) ? element.extra1.x : p.x;
-                        p.y = (p.y > element.extra1.y) ? element.extra1.y : p.y;
-                        q.x = (q.x < element.extra1.x) ? element.extra1.x : q.x;
-                        q.y = (q.y < element.extra1.y) ? element.extra1.y : q.y;
-                        p.x = (p.x > element.extra2.x) ? element.extra2.x : p.x;
-                        p.y = (p.y > element.extra2.y) ? element.extra2.y : p.y;
-                        q.x = (q.x < element.extra2.x) ? element.extra2.x : q.x;
-                        q.y = (q.y < element.extra2.y) ? element.extra2.y : q.y;
-                }
-        }
-        double vw = q.x - p.x;
-        double vh = q.y - p.y;
-
-        writeStyle();
-
-        OpenTagGraphicsElement *pDrawPathElement = new OpenTagGraphicsElement("draw:path");
-        m_value.str("");
-        m_value << "gr" << m_styleIndex-1;
-        pDrawPathElement->addAttribute("draw:style-name", m_value.str());
-        m_value.str("");
-        pDrawPathElement->addAttribute("draw:text-style-name", "P1");
-        pDrawPathElement->addAttribute("draw:layer", "layout");
-        m_value << doubleToString(p.x)  << "in";
-        pDrawPathElement->addAttribute("svg:x", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(p.y)  << "in";
-        pDrawPathElement->addAttribute("svg:y", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(vw) << "in";
-        pDrawPathElement->addAttribute("svg:width", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(vh) << "in";
-        pDrawPathElement->addAttribute("svg:height", m_value.str());
-        m_value.str("");
-        m_value << "0 0 " << (int)(vw*2540) << " " << (int)(vh*2540);
-        pDrawPathElement->addAttribute("svg:viewBox", m_value.str());
-        m_value.str("");
-
-        for(unsigned i = 0; i < path.count(); i++)
-        {
-                libwpg::WPGPathElement element = path.element(i);
-                libwpg::WPGPoint point = element.point;
-                switch(element.type)
-                {
-                        // 2540 is 2.54*1000, 2.54 in = 1 in
-                        case libwpg::WPGPathElement::MoveToElement:
-                                m_value << "M" << (int)((point.x-p.x)*2540) << " ";
-                                m_value << (int)((point.y-p.y)*2540);
-                                break;
-
-                        case libwpg::WPGPathElement::LineToElement:
-                                m_value << "L" << (int)((point.x-p.x)*2540) << " ";
-                                m_value << (int)((point.y-p.y)*2540);
-                                break;
-
-                        case libwpg::WPGPathElement::CurveToElement:
-                                m_value << "C" << (int)((element.extra1.x-p.x)*2540) << " ";
-                                m_value << (int)((element.extra1.y-p.y)*2540) << " ";
-                                m_value << (int)((element.extra2.x-p.x)*2540) << " ";
-                                m_value << (int)((element.extra2.y-p.y)*2540) << " ";
-                                m_value << (int)((point.x-p.x)*2540) << " ";
-                                m_value << (int)((point.y-p.y)*2540);
-                                break;
-
-                        default:
-                                break;
-                }
-        }
-        if(path.closed)
-                m_value << " Z";
-        pDrawPathElement->addAttribute("svg:d", m_value.str());
-        m_value.str("");
-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawPathElement));
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:path")));
-}
-
-
-void OdgExporter::drawBitmap(const libwpg::WPGBitmap& bitmap)
-{
-        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
-        m_value.str("");
-        m_value << doubleToString(bitmap.rect.x1) << "in";
-        pDrawFrameElement->addAttribute("svg:x", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(bitmap.rect.y1) << "in";
-        pDrawFrameElement->addAttribute("svg:y", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(bitmap.rect.height()) << "in";
-        pDrawFrameElement->addAttribute("svg:height", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(bitmap.rect.width()) << "in";
-        pDrawFrameElement->addAttribute("svg:width", m_value.str());
-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
-
-        libwpg::WPGString base64Binary;
-        bitmap.generateBase64DIB(base64Binary);
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
-}
-
-void OdgExporter::drawImageObject(const libwpg::WPGBinaryData& binaryData)
-{
-        if (binaryData.mimeType.length() <= 0)
-                return;
-        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
-        m_value.str("");
-        m_value << doubleToString(binaryData.rect.x1) << "in";
-        pDrawFrameElement->addAttribute("svg:x", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(binaryData.rect.y1) << "in";
-        pDrawFrameElement->addAttribute("svg:y", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(binaryData.rect.height()) << "in";
-        pDrawFrameElement->addAttribute("svg:height", m_value.str());
-        m_value.str("");
-        m_value << doubleToString(binaryData.rect.width()) << "in";
-        pDrawFrameElement->addAttribute("svg:width", m_value.str());
-        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
-
-        libwpg::WPGString base64Binary = binaryData.getBase64Data();
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
-
-        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
-}
-
-
-static std::string colorToHex(const libwpg::WPGColor& color)
-{
-        char hexdigits[] = "0123456789abcdef";
-        char buffer[] = "123456";
-        buffer[0] = hexdigits[(color.red >> 4) & 15];
-        buffer[1] = hexdigits[color.red & 15];
-        buffer[2] = hexdigits[(color.green >> 4) & 15];
-        buffer[3] = hexdigits[color.green & 15];
-        buffer[4] = hexdigits[(color.blue >> 4) & 15];
-        buffer[5] = hexdigits[color.blue & 15];
-        return std::string(buffer);
-}
-
-void OdgExporter::writeStyle()
-{
-        m_value.str("");
-        m_name.str("");
-
-        if(!m_pen.solid && (m_pen.dashArray.count() >=2 ) )
-        {
-                // ODG only supports dashes with the same length of spaces inbetween
-                // here we take the first space and assume everything else the same
-                // note that dash length is written in percentage
-                double distance = m_pen.dashArray.at(1);
-                OpenTagGraphicsElement *tmpDrawStrokeDashElement = new OpenTagGraphicsElement("draw:stroke-dash");
-                tmpDrawStrokeDashElement->addAttribute("draw:style", "rect");
-                m_value << "Dash_" << m_dashIndex++;
-                tmpDrawStrokeDashElement->addAttribute("draw:name", m_value.str());
-                m_value.str("");
-                m_value << doubleToString(distance*100) << "%";
-                tmpDrawStrokeDashElement->addAttribute("draw:distance", m_value.str());
-                m_value.str("");
-                for(unsigned i = 0; i < m_pen.dashArray.count()/2; i++)
-                {
-                        m_name << "draw:dots" << i+1;
-                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), "1");
-                        m_name.str("");
-                        m_name << "draw:dots" << i+1 << "-length";
-                        m_value << doubleToString(100*m_pen.dashArray.at(i*2)) << "%";
-                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), m_value.str());
-                        m_name.str("");
-                        m_value.str("");
-                }
-                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(tmpDrawStrokeDashElement));
-                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:stroke-dash")));
-        }
-
-        if(m_brush.style == libwpg::WPGBrush::Gradient)
-        {
-                OpenTagGraphicsElement *tmpDrawGradientElement = new OpenTagGraphicsElement("draw:gradient");
-                tmpDrawGradientElement->addAttribute("draw:style", "linear");
-                m_value << "Gradient_" << m_gradientIndex++;
-                tmpDrawGradientElement->addAttribute("draw:name", m_value.str());
-                m_value.str("");
-
-                // ODG angle unit is 0.1 degree
-                double angle = -m_brush.gradient.angle();
-                while(angle < 0)
-                        angle += 360;
-                while(angle > 360)
-                        angle -= 360;
-
-                m_value << (unsigned)(angle*10);
-                tmpDrawGradientElement->addAttribute("draw:angle", m_value.str());
-                m_value.str("");
-
-                libwpg::WPGColor startColor = m_brush.gradient.stopColor(0);
-                libwpg::WPGColor stopColor = m_brush.gradient.stopColor(1);
-                m_value << "#" << colorToHex(startColor);
-                tmpDrawGradientElement->addAttribute("draw:start-color", m_value.str());
-                m_value.str("");
-                m_value << "#" << colorToHex(stopColor);
-                tmpDrawGradientElement->addAttribute("draw:end-color", m_value.str());
-                m_value.str("");
-                tmpDrawGradientElement->addAttribute("draw:start-intensity", "100%");
-                tmpDrawGradientElement->addAttribute("draw:end-intensity", "100%");
-                tmpDrawGradientElement->addAttribute("draw:border", "0%");
-                mGradientElements.push_back(static_cast<GraphicsElement *>(tmpDrawGradientElement));
-                mGradientElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:gradient")));
-        }
-
-        OpenTagGraphicsElement *tmpStyleStyleElement = new OpenTagGraphicsElement("style:style");
-        m_value << "gr" << m_styleIndex;
-        tmpStyleStyleElement->addAttribute("style:name", m_value.str());
-        m_value.str("");
-        tmpStyleStyleElement->addAttribute("style:family", "graphic");
-        tmpStyleStyleElement->addAttribute("style:parent-style-name", "standard");
-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleStyleElement));
-
-        OpenTagGraphicsElement *tmpStyleGraphicPropertiesElement = new OpenTagGraphicsElement("style:graphic-properties");
-
-        if(m_pen.width > 0.0)
-        {
-                m_value << doubleToString(m_pen.width) << "in";
-                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-width", m_value.str());
-                m_value.str("");
-                m_value << "#" << colorToHex(m_pen.foreColor);
-                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-color", m_value.str());
-                m_value.str("");
-
-                if(!m_pen.solid)
-                {
-                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "dash");
-                        m_value << "Dash_" << m_dashIndex-1;
-                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke-dash", m_value.str());
-                        m_value.str("");
-                }
-        }
-        else
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "none");
-
-        if(m_brush.style == libwpg::WPGBrush::NoBrush)
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "none");
-
-        if(m_brush.style == libwpg::WPGBrush::Solid)
-        {
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "solid");
-                m_value << "#" << colorToHex(m_brush.foreColor);
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-color", m_value.str());
-                m_value.str("");
-        }
-
-        if(m_brush.style == libwpg::WPGBrush::Gradient)
-        {
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "gradient");
-                m_value << "Gradient_" << m_gradientIndex-1;
-                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-gradient-name", m_value.str());
-                m_value.str("");
-        }
-
-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleGraphicPropertiesElement));
-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:graphic-properties")));
-
-        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:style")));
-        m_styleIndex++;
-}
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/OdgExporter.hxx 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/OdgExporter.hxx
--- 1:2.3.3-1/filters/karbon/wpg/import/OdgExporter.hxx	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/OdgExporter.hxx	1970-01-01 00:00:00.000000000 +0000
@@ -1,116 +0,0 @@
-/* libwpg
- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the 
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02111-1301 USA
- *
- * For further information visit http://libwpg.sourceforge.net
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#ifndef __ODGEXPORTER_H__
-#define __ODGEXPORTER_H__
-
-#include <iostream>
-#include <sstream>
-#include <string>
-
-#include <libwpg/libwpg.h>
-#include "GraphicsElement.hxx"
-
-class OdgExporter : public libwpg::WPGPaintInterface {
-public:
-	explicit OdgExporter(GraphicsHandler *pHandler,
-			     const bool isFlatXML = false);
-	~OdgExporter();
-
-#if LIBWPG_VERSION_MINOR<2
-	void startGraphics(double imageWidth, double imageHeight);
-	void endGraphics();
-	void startLayer(unsigned int id);
-	void endLayer(unsigned int id);
-
-	void setPen(const libwpg::WPGPen& pen);
-	void setBrush(const libwpg::WPGBrush& brush);
-	void setFillRule(FillRule rule);
-
-	void drawRectangle(const libwpg::WPGRect& rect, double rx, double ry);
-	void drawEllipse(const libwpg::WPGPoint& center, double rx, double ry);
-	void drawPolygon(const libwpg::WPGPointArray& vertices);
-	void drawPath(const libwpg::WPGPath& path);
-	void drawBitmap(const libwpg::WPGBitmap& bitmap);
-	void drawImageObject(const libwpg::WPGBinaryData& binaryData);
-
-private:
-	std::vector <GraphicsElement *> mBodyElements;
-	std::vector <GraphicsElement *> mAutomaticStylesElements;
-	std::vector <GraphicsElement *> mStrokeDashElements;
-	std::vector <GraphicsElement *> mGradientElements;
-	GraphicsHandler *mpHandler;
-
-	libwpg::WPGPen m_pen;
-	libwpg::WPGBrush m_brush;
-	FillRule m_fillRule;
-	int m_gradientIndex;
-	int m_dashIndex;
-	int m_styleIndex;
-	void writeStyle();
-	std::ostringstream m_value, m_name;
-	double m_width, m_height;
-	const bool m_isFlatXML;
-#else
-	virtual void startGraphics(const ::WPXPropertyList &propList);
-	virtual void endGraphics();
-	virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
-	virtual void startLayer(const ::WPXPropertyList &propList);
-	virtual void endLayer();
-	virtual void drawRectangle(const ::WPXPropertyList& propList);
-	virtual void drawEllipse(const ::WPXPropertyList& propList);
-	virtual void drawPolygon(const ::WPXPropertyListVector &vertices);
-	virtual void drawPath(const ::WPXPropertyListVector &path);
-	virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
-	virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList);
-	virtual void endEmbeddedGraphics();
-	virtual void drawPolyline(const ::WPXPropertyListVector &vertices);
-	virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
-	virtual void endTextObject();
-	virtual void startTextLine(const ::WPXPropertyList &propList);
-	virtual void endTextLine();
-	virtual void startTextSpan(const ::WPXPropertyList &propList);
-	virtual void endTextSpan();
-	virtual void insertText(const ::WPXString &str);
-
-
-private:
-	std::vector <GraphicsElement *> mBodyElements;
-	std::vector <GraphicsElement *> mAutomaticStylesElements;
-	std::vector <GraphicsElement *> mStrokeDashElements;
-	std::vector <GraphicsElement *> mGradientElements;
-	GraphicsHandler *mpHandler;
-
-	int m_gradientIndex;
-	int m_dashIndex;
-	int m_styleIndex;
-	void writeStyle();
-	std::ostringstream m_value, m_name;
-	double m_width, m_height;
-	const bool m_isFlatXML;
-#endif
-};
-
-#endif // __ODGEXPORTER_H__
diff -pruN 1:2.3.3-1/filters/karbon/wpg/import/WPGImport.cpp 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/WPGImport.cpp
--- 1:2.3.3-1/filters/karbon/wpg/import/WPGImport.cpp	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/filters/karbon/wpg/import/WPGImport.cpp	2011-12-06 13:37:09.000000000 +0000
@@ -20,18 +20,17 @@
 #include <WPGImport.h>
 #include <WPGImport.moc>
 
-#include <QBuffer>
-#include <QByteArray>
-#include <QString>
-#include <QFile>
-
-#include <kdebug.h>
 #include <KoFilterChain.h>
 #include <KoGlobal.h>
 #include <KoUnit.h>
+#include <KoXmlWriter.h>
+
 #include <kpluginfactory.h>
+#include <KDebug>
 
-#include <KoXmlWriter.h>
+
+#include <QtCore/QString>
+#include <QtCore/QFile>
 
 #include <libwpg/libwpg.h>
 #if LIBWPG_VERSION_MINOR<2
@@ -55,6 +54,7 @@ WPGImport::~WPGImport()
 {
 }
 
+
 KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to)
 {
     if (from != "application/x-wpg")
@@ -86,7 +86,7 @@ KoFilter::ConversionStatus WPGImport::co
 #endif
 
     if (!libwpg::WPGraphics::isSupported(input)) {
-        std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
+        kWarning() << "ERROR: Unsupported file format (unsupported version) or file is encrypted!";
         delete input;
         return KoFilter::NotImplemented;
     }
@@ -98,14 +98,15 @@ KoFilter::ConversionStatus WPGImport::co
     }
 
     delete input;
- 
+
     QFile outputFile(m_chain->outputFile());
     if(!outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
         kWarning() << "ERROR: Could not open output file" << m_chain->outputFile();
         return KoFilter::InternalError;
     }
+
     outputFile.write(output.cstr());
     outputFile.close();
- 
+
     return KoFilter::OK;
 }
diff -pruN 1:2.3.3-1/kplato/libs/ui/kptintervaledit.cpp 1:2.3.3-0ubuntu9/kplato/libs/ui/kptintervaledit.cpp
--- 1:2.3.3-1/kplato/libs/ui/kptintervaledit.cpp	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/kplato/libs/ui/kptintervaledit.cpp	2011-12-06 13:37:09.000000000 +0000
@@ -42,8 +42,8 @@ IntervalEdit::IntervalEdit( CalendarDay 
         setIntervals( intervals );
         if ( ! intervals.isEmpty() ) {
             startTime->setTime( intervals.last()->endTime() );
-            qreal l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
-            length->setValue( qMin( l, (qreal) 8.0 ) );
+            double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
+            length->setValue( qMin( (qreal) l, (qreal) 8.0 ) );
         }
     }
     enableButtons();
diff -pruN 1:2.3.3-1/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp 1:2.3.3-0ubuntu9/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
--- 1:2.3.3-1/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2011-12-06 13:37:09.000000000 +0000
@@ -161,12 +161,12 @@ inline int iconSize(qreal width, qreal h
     qreal xm = width/2.;
     qreal ym = height/2.;
     if(xm>=2*ym || ym>=2*xm)
-        return qBound(qreal(5.), radius, qreal(32.));
+      return qBound<qreal>(5., radius, 32.);
 
     qreal a=-2;
     qreal b=2.*(xm+ym);
     qreal c=radius*radius-xm*xm-ym*ym;
-    return qBound(qreal(5.), qreal((-b+sqrt(b*b-4*a*c))/(2*a)), qreal(32.));
+    return qBound<qreal>(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
 }
 
 void KisColorSelector::resizeEvent(QResizeEvent* e) {
diff -pruN 1:2.3.3-1/krita/plugins/formats/exr/exr_converter.cc 1:2.3.3-0ubuntu9/krita/plugins/formats/exr/exr_converter.cc
--- 1:2.3.3-1/krita/plugins/formats/exr/exr_converter.cc	2011-02-17 12:13:40.000000000 +0000
+++ 1:2.3.3-0ubuntu9/krita/plugins/formats/exr/exr_converter.cc	2011-12-06 13:37:09.000000000 +0000
@@ -81,6 +81,7 @@ ImageType imfTypeToKisType(Imf::PixelTyp
     case Imf::FLOAT:
         return IT_FLOAT32;
     }
+    return IT_UNSUPPORTED;
 }
 
 const KoColorSpace* kisTypeToColorSpace(QString model, ImageType imageType)
@@ -94,6 +95,7 @@ const KoColorSpace* kisTypeToColorSpace(
     case IT_UNSUPPORTED:
         return 0;
     }
+    return 0;
 }
 
 template<typename _T_>
diff -pruN 1:2.3.3-1/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp 1:2.3.3-0ubuntu9/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
--- 1:2.3.3-1/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2011-12-06 13:37:09.000000000 +0000
@@ -278,7 +278,7 @@ KoPointerEvent KisToolDyna::filterEvent(
 #endif
 
     m_pressure =  m_mouse.vel * 100;
-    m_pressure = qBound(qreal(0.0),m_pressure, qreal(1.0));
+    m_pressure = qBound<qreal>(0.0,m_pressure, 1.0);
     
     m_odelx = delx;
     m_odely = dely;
diff -pruN 1:2.3.3-1/krita/ui/CMakeLists.txt 1:2.3.3-0ubuntu9/krita/ui/CMakeLists.txt
--- 1:2.3.3-1/krita/ui/CMakeLists.txt	2011-02-17 12:14:27.000000000 +0000
+++ 1:2.3.3-0ubuntu9/krita/ui/CMakeLists.txt	2011-12-06 13:37:09.000000000 +0000
@@ -214,7 +214,7 @@ kde4_add_ui_files(kritaui_LIB_SRCS
 
 kde4_add_library(kritaui SHARED ${kritaui_LIB_SRCS} )
 
-target_link_libraries(kritaui ${KDE4_THREADWEAVER_LIBRARIES} kritaimage komain kowidgets ${PNG_LIBRARIES} ${EXIV2_LIBRARIES})
+target_link_libraries(kritaui ${KDE4_THREADWEAVER_LIBRARIES} kritaimage komain kowidgets ${PNG_LIBRARIES} ${EXIV2_LIBRARIES} -lX11)
 
 if(HAVE_OPENGL)
     target_link_libraries(kritaui ${OPENGL_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${OPENEXR_LIBRARIES})
diff -pruN 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/CMakeLists.txt 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/CMakeLists.txt
--- 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/CMakeLists.txt	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-
-
-include_directories(${CMAKE_BINARY_DIR}/filters/ ${WPD_INCLUDE_DIR} ${LIBWPG_INCLUDE_DIR}/)
-
-set(wpgimport_PART_SRCS 
-WPGImport.cpp 
-OdgExporter.cxx
-FileOutputHandler.cxx
-GraphicsElement.cxx)
-
-kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS})
-
-target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES})
-
-install(TARGETS wpgimport DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES karbon_wpg_import.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-
diff -pruN 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/karbon_wpg_import.desktop 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/karbon_wpg_import.desktop
--- 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/karbon_wpg_import.desktop	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/karbon_wpg_import.desktop	1970-01-01 00:00:00.000000000 +0000
@@ -1,49 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=Karbon WPG Import Filter
-Name[bg]=Филтър за импортиране от WPG в Karbon
-Name[ca]=Filtre d'importació WPG per al Karbon
-Name[ca@valencia]=Filtre d'importació WPG per al Karbon
-Name[cs]=Importní filtr formátu WPG pro Karbon
-Name[da]=WPG-importfilter til Karbon
-Name[de]=Karbon-WPG-Importfilter
-Name[el]=Φίλτρο εισαγωγής WPG του Karbon
-Name[en_GB]=Karbon WPG Import Filter
-Name[eo]=Karbon-WPG-importfiltrilo
-Name[es]=Filtro de Karbon de importación de WPG
-Name[et]=Karboni WPG impordifilter
-Name[fa]=پالایۀ واردات Karbon WPG
-Name[fi]=Karbon WPG-tuontisuodin
-Name[fr]=Filtre d'importation WPG de Karbon
-Name[fy]=WPG -Ymportfilter foar Karbon
-Name[ga]=Scagaire Iompórtála Karbon WPG
-Name[gl]=Filtro de Importación de Karbon WPG
-Name[he]=מסנן ייבוא מ־WPG ל־Karbon
-Name[hi]=कार्बन डबल्यूपीजी आयात फ़िल्टर
-Name[hne]=कार्बन डबल्यूपीजी आयात फिल्टर
-Name[it]=Filtro di importazione WPG per Karbon
-Name[ja]=Karbon WPG インポートフィルタ
-Name[kk]=WPG -> Karbon импорт сүзгісі
-Name[lv]=Karbon WPG importa filtrs
-Name[nb]=WPG-importfilter for Karbon 
-Name[nds]=WPG-Importfilter för Karbon
-Name[ne]=कार्बन डब्लुपीजी आयात फिल्टर
-Name[nl]=WPG-importfilter voor Karbon
-Name[pt]=Filtro de Importação de WPG para o Karbon
-Name[pt_BR]=Filtro de Importação WPG para o Karbon
-Name[ro]=Filtru importare Karbon pentru WPG
-Name[ru]=Фильтр импорта рисунков WPG в Karbon
-Name[sl]=Uvozni filter WPG za Karbon
-Name[sv]=Karbon WPG-importfilter
-Name[tg]=Филтри воридотии Karbon WPG
-Name[tr]=Karbon VPG Alma Filtresi
-Name[uk]=Фільтр імпорту WPG у Karbon
-Name[wa]=Passete d' abagaedje WPG di Karbon
-Name[x-test]=xxKarbon WPG Import Filterxx
-Name[zh_CN]=Karbon WPG 导入过滤器
-Name[zh_TW]=Karbon WPG 匯入過濾程式
-X-KDE-Export=application/vnd.oasis.opendocument.graphics
-X-KDE-Import=application/x-wpg
-X-KDE-Weight=1
-X-KDE-Library=wpgimport
-X-KDE-ServiceTypes=KOfficeFilter
diff -pruN 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/WPGImport.cpp 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/WPGImport.cpp
--- 1:2.3.3-1/.pc/15_new_libwpd/filters/karbon/wpg/import/WPGImport.cpp	2011-02-17 12:12:55.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/15_new_libwpd/filters/karbon/wpg/import/WPGImport.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,163 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2007 Ariya Hidayat <ariya@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
-*/
-
-#include <WPGImport.h>
-#include <WPGImport.moc>
-
-#include <QBuffer>
-#include <QByteArray>
-#include <QString>
-
-#include <kdebug.h>
-#include <KoFilterChain.h>
-#include <KoGlobal.h>
-#include <KoUnit.h>
-#include <kpluginfactory.h>
-
-#include <KoXmlWriter.h>
-
-#include <libwpg/libwpg.h>
-#if LIBWPG_VERSION_MINOR<2
-#include <libwpg/WPGStreamImplementation.h>
-#else
-#include <libwpd-stream/libwpd-stream.h>
-#endif
-
-#include "FileOutputHandler.hxx"
-#include "OdgExporter.hxx"
-
-#include <iostream>
-
-K_PLUGIN_FACTORY(WPGImportFactory, registerPlugin<WPGImport>();)
-K_EXPORT_PLUGIN(WPGImportFactory("kofficefilters"))
-
-WPGImport::WPGImport(QObject* parent, const QVariantList&)
-        : KoFilter(parent)
-{
-}
-
-WPGImport::~WPGImport()
-{
-}
-
-static QByteArray createManifest()
-{
-    KoXmlWriter* manifestWriter;
-    QByteArray manifestData;
-    QBuffer manifestBuffer(&manifestData);
-
-    manifestBuffer.open(QIODevice::WriteOnly);
-    manifestWriter = new KoXmlWriter(&manifestBuffer);
-
-    manifestWriter->startDocument("manifest:manifest");
-    manifestWriter->startElement("manifest:manifest");
-    manifestWriter->addAttribute("xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0");
-    manifestWriter->addManifestEntry("/", "application/vnd.oasis.opendocument.graphics");
-    //manifestWriter->addManifestEntry( "styles.xml", "text/xml" );
-    manifestWriter->addManifestEntry("content.xml", "text/xml");
-    manifestWriter->endElement();
-    manifestWriter->endDocument();
-    delete manifestWriter;
-
-    return manifestData;
-}
-
-
-KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to)
-{
-    if (from != "application/x-wpg")
-        return KoFilter::NotImplemented;
-
-    if (to != "application/vnd.oasis.opendocument.graphics")
-        return KoFilter::NotImplemented;
-
-#if LIBWPG_VERSION_MINOR<2
-    WPXInputStream* input = new libwpg::WPGFileStream(m_chain->inputFile().toLocal8Bit());
-    if (input->isOLEStream()) {
-        WPXInputStream* olestream = input->getDocumentOLEStream();
-        if (olestream) {
-            delete input;
-            input = olestream;
-        }
-    }
-#else
-    WPXInputStream* input = new WPXFileStream(m_chain->inputFile().toLocal8Bit());
-    if (input->isOLEStream()) {
-        WPXInputStream* olestream = input->getDocumentOLEStream("Anything");
-        if (olestream) {
-            delete input;
-            input = olestream;
-        }
-     }
-#endif
-
-    if (!libwpg::WPGraphics::isSupported(input)) {
-        std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
-        delete input;
-        return KoFilter::NotImplemented;
-    }
-
-    // do the conversion
-    std::ostringstream tmpStringStream;
-    FileOutputHandler tmpHandler(tmpStringStream);
-    OdgExporter exporter(&tmpHandler);
-    libwpg::WPGraphics::parse(input, &exporter);
-    delete input;
-
-
-    // create output store
-    KoStore* storeout;
-    storeout = KoStore::createStore(m_chain->outputFile(), KoStore::Write,
-                                    "application/vnd.oasis.opendocument.graphics", KoStore::Zip);
-
-    if (!storeout) {
-        kWarning() << "Couldn't open the requested file.";
-        return KoFilter::FileNotFound;
-    }
-
-#if 0
-    if (!storeout->open("styles.xml")) {
-        kWarning() << "Couldn't open the file 'styles.xml'.";
-        return KoFilter::CreationError;
-    }
-    //storeout->write( createStyles() );
-    storeout->close();
-#endif
-
-    if (!storeout->open("content.xml")) {
-        kWarning() << "Couldn't open the file 'content.xml'.";
-        return KoFilter::CreationError;
-    }
-    storeout->write(tmpStringStream.str().c_str());
-    storeout->close();
-
-    // store document manifest
-    storeout->enterDirectory("META-INF");
-    if (!storeout->open("manifest.xml")) {
-        kWarning() << "Couldn't open the file 'META-INF/manifest.xml'.";
-        return KoFilter::CreationError;
-    }
-    storeout->write(createManifest());
-    storeout->close();
-
-    // we are done!
-    delete storeout;
-
-    return KoFilter::OK;
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/kplato/libs/ui/kptintervaledit.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/kplato/libs/ui/kptintervaledit.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/kplato/libs/ui/kptintervaledit.cpp	2011-02-17 12:12:01.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/kplato/libs/ui/kptintervaledit.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,282 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2004 - 2010 Dag Andersen <danders@get2net.dk>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
-*/
-
-#include "kptintervaledit.h"
-#include "intervalitem.h"
-#include "kptcommand.h"
-#include "kptproject.h"
-
-#include <QPushButton>
-#include <QTreeWidget>
-#include <QList>
-
-#include <kdialog.h>
-#include <klocale.h>
-#include <kdebug.h>
-
-namespace KPlato
-{
-
-IntervalEdit::IntervalEdit( CalendarDay *day, QWidget *parent)
-    : IntervalEditImpl(parent)
-{
-    //kDebug();
-    if ( day ) {
-        const QList<TimeInterval*> &intervals = day->timeIntervals();
-        setIntervals( intervals );
-        if ( ! intervals.isEmpty() ) {
-            startTime->setTime( intervals.last()->endTime() );
-            double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
-            length->setValue( qMin( l, (qreal) 8.0 ) );
-        }
-    }
-    enableButtons();
-    startTime->setFocus();
-}
-
-
-//--------------------------------------------
-IntervalEditImpl::IntervalEditImpl(QWidget *parent)
-    : IntervalEditBase(parent) 
-{
-    intervalList->setColumnCount( 2 );
-    QStringList lst;
-    lst << i18nc( "Interval start time", "Start" )
-        << i18nc( "Interval length", "Length" );
-    intervalList->setHeaderLabels( lst );
-
-    intervalList->setRootIsDecorated( false );
-    intervalList->setSortingEnabled( true );
-    intervalList->sortByColumn( 0, Qt::Ascending );
-    
-    bAddInterval->setIcon( KIcon( "list-add" ) );
-    bRemoveInterval->setIcon( KIcon( "list-remove" ) );
-    bClear->setIcon( KIcon( "edit-clear-list" ) );
-    
-    connect(bClear, SIGNAL(clicked()), SLOT(slotClearClicked()));
-    connect(bAddInterval, SIGNAL(clicked()), SLOT(slotAddIntervalClicked()));
-    connect(bRemoveInterval, SIGNAL(clicked()), SLOT(slotRemoveIntervalClicked()));
-    connect(intervalList, SIGNAL(itemSelectionChanged()), SLOT(slotIntervalSelectionChanged()));
-    
-    connect( startTime, SIGNAL( timeChanged( const QTime& ) ), SLOT( enableButtons() ) );
-    connect( length, SIGNAL( valueChanged( double ) ), SLOT( enableButtons() ) );
-    
-}
-
-void IntervalEditImpl::slotClearClicked() {
-    bool c = intervalList->topLevelItemCount() > 0;
-    intervalList->clear();
-    enableButtons();
-    if (c)
-        emit changed();
-}
-
-void IntervalEditImpl::slotAddIntervalClicked() {
-    new IntervalItem(intervalList, startTime->time(), (int)(length->value() * 1000. * 60. *60.) );
-    enableButtons();
-    emit changed();
-}
-
-void IntervalEditImpl::slotRemoveIntervalClicked() {
-    IntervalItem *item = static_cast<IntervalItem*>( intervalList->currentItem() );
-    if ( item == 0) {
-        return;
-    }
-    intervalList->takeTopLevelItem( intervalList->indexOfTopLevelItem( item ) );
-    delete item;
-    enableButtons();
-    emit changed();
-}
-
-
-void IntervalEditImpl::slotIntervalSelectionChanged() {
-    QList<QTreeWidgetItem*> lst = intervalList->selectedItems();
-    if (lst.count() == 0)
-        return;
-    
-    IntervalItem *ii = static_cast<IntervalItem *>(lst[0]);
-    startTime->setTime(ii->interval().first);
-    length->setValue((double)(ii->interval().second) / (1000.*60.*60.));
-    
-    enableButtons();
-}
-
-QList<TimeInterval*> IntervalEditImpl::intervals() const {
-    QList<TimeInterval*> l;
-    int cnt = intervalList->topLevelItemCount();
-    for (int i=0; i < cnt; ++i) {
-        IntervalItem *item = static_cast<IntervalItem*>(intervalList->topLevelItem(i));
-        l.append(new TimeInterval(item->interval().first, item->interval().second));
-    }
-    return l;
-}
-
-void IntervalEditImpl::setIntervals(const QList<TimeInterval*> &intervals) {
-    intervalList->clear();
-    foreach (TimeInterval *i, intervals) {
-        new IntervalItem(intervalList, i->first, i->second);
-    }
-    enableButtons();
-}
-
-void IntervalEditImpl::enableButtons() {
-    bClear->setEnabled( ! intervals().isEmpty() );
-    
-    bRemoveInterval->setEnabled( intervalList->currentItem() );
-    
-    if ( length->value() == 0.0 ) {
-        bAddInterval->setEnabled( false );
-        return;
-    }
-    if ( QTime( 0, 0, 0 ).secsTo( startTime->time() ) + (int)(length->value() * 60. * 60.) > 24 * 60 * 60 ) {
-        bAddInterval->setEnabled( false );
-        return;
-    }
-    TimeInterval ti( startTime->time(),  (int)(length->value() * 1000. * 60. *60.) );
-    foreach (TimeInterval *i, intervals()) {
-        if ( i->intersects( ti ) ) {
-            bAddInterval->setEnabled( false );
-            return;
-        }
-    }
-    bAddInterval->setEnabled( true );
-}
-
-//-------------------------------------------------------------
-IntervalEditDialog::IntervalEditDialog( Calendar *calendar, const QList<CalendarDay*> &days, QWidget *parent)
-    : KDialog( parent ),
-    m_calendar( calendar ),
-    m_days( days )
-{
-    //kDebug();
-    setCaption( i18n("Edit Work Intervals") );
-    setButtons( Ok|Cancel );
-    setDefaultButton( Ok );
-    showButtonSeparator( true );
-    //kDebug()<<&p;
-    m_panel = new IntervalEdit( days.value( 0 ), this );
-    setMainWidget( m_panel );
-    enableButtonOk( false );
-
-    connect( m_panel, SIGNAL( changed() ), SLOT( slotChanged() ) );
-    connect( calendar->project(), SIGNAL( calendarRemoved( const Calendar* ) ), SLOT( slotCalendarRemoved( const Calendar* ) ) );
-}
-
-IntervalEditDialog::IntervalEditDialog( Calendar *calendar, const QList<QDate> &dates, QWidget *parent)
-    : KDialog( parent ),
-    m_calendar( calendar ),
-    m_dates( dates )
-{
-    //kDebug();
-    setCaption( i18n("Edit Work Intervals") );
-    setButtons( Ok|Cancel );
-    setDefaultButton( Ok );
-    showButtonSeparator( true );
-    //kDebug()<<&p;
-    foreach ( const QDate &d, dates ) {
-        CalendarDay *day = calendar->findDay( d );
-        if ( day ) {
-            m_days << day;
-        }
-    }
-    m_panel = new IntervalEdit( m_days.value( 0 ), this );
-    setMainWidget( m_panel );
-    enableButtonOk( false );
-
-    connect( m_panel, SIGNAL( changed() ), SLOT( slotChanged() ) );
-    connect( calendar->project(), SIGNAL( calendarRemoved( const Calendar* ) ), SLOT( slotCalendarRemoved( const Calendar* ) ) );
-}
-
-void IntervalEditDialog::slotCalendarRemoved( const Calendar *cal )
-{
-    if ( m_calendar == cal ) {
-        reject();
-    }
-}
-
-void IntervalEditDialog::slotChanged()
-{
-    enableButtonOk( true );
-}
-
-MacroCommand *IntervalEditDialog::buildCommand()
-{
-    MacroCommand *cmd = new MacroCommand( i18n( "Modify Work Interval" ) );
-    foreach ( const QDate &d, m_dates ) {
-        // these are dates, weekdays don't have date
-        CalendarDay *day = m_calendar->findDay( d );
-        if ( day == 0 ) {
-            // create a new day
-            day = new CalendarDay( d );
-            cmd->addCommand( new CalendarAddDayCmd( m_calendar, day ) );
-        }
-        MacroCommand *c = buildCommand( m_calendar, day );
-        if ( c ) {
-            cmd->addCommand( c );
-        }
-    }
-    if ( m_dates.isEmpty() ) {
-        // weekdays
-        foreach ( CalendarDay *day, m_days ) {
-            MacroCommand *c = buildCommand( m_calendar, day );
-            if ( c ) {
-                cmd->addCommand( c );
-            }
-        }
-    }
-    if ( cmd->isEmpty() ) {
-        delete cmd;
-        return 0;
-    }
-    return cmd;
-}
-
-MacroCommand *IntervalEditDialog::buildCommand( Calendar *calendar, CalendarDay *day )
-{
-    //kDebug();
-    const QList<TimeInterval*> lst = m_panel->intervals();
-    if ( lst == day->timeIntervals() ) {
-        return 0;
-    }
-    MacroCommand *cmd = 0;
-    // Set to Undefined. This will also clear any intervals
-    CalendarModifyStateCmd *c = new CalendarModifyStateCmd( calendar, day, CalendarDay::Undefined );
-    if (cmd == 0) cmd = new MacroCommand("");
-    cmd->addCommand(c);
-    //kDebug()<<"Set Undefined";
-
-    foreach ( TimeInterval *i, lst ) {
-        CalendarAddTimeIntervalCmd *c = new CalendarAddTimeIntervalCmd( calendar, day, i );
-        if (cmd == 0) cmd = new MacroCommand("");
-        cmd->addCommand(c);
-    }
-    if ( ! lst.isEmpty() ) {
-        CalendarModifyStateCmd *c = new CalendarModifyStateCmd( calendar, day, CalendarDay::Working );
-        if (cmd == 0) cmd = new MacroCommand("");
-        cmd->addCommand(c);
-    }
-    if (cmd) {
-        cmd->setText( i18n( "Modify Work Interval" ) );
-    }
-    return cmd;
-}
-
-}  //KPlato namespace
-
-#include "kptintervaledit.moc"
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.cc 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.cc
--- 1:2.3.3-1/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.cc	2011-02-17 12:14:02.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.cc	1970-01-01 00:00:00.000000000 +0000
@@ -1,237 +0,0 @@
-/*
- *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
- *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
- *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
- *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
- *  Copyright (c) 2004,2007,2010 Cyrille Berger <cberger@cberger.net>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_paintop.h"
-
-#include <math.h>
-
-#include <KoColor.h>
-#include <KoColorSpace.h>
-#include <KoPointerEvent.h>
-
-#include "kis_painter.h"
-#include "kis_layer.h"
-#include "kis_types.h"
-
-#include "kis_image.h"
-#include "kis_paint_device.h"
-#include "kis_global.h"
-#include "kis_iterators_pixel.h"
-#include "kis_datamanager.h"
-#include "kis_paintop_settings.h"
-#include "kis_paintop_preset.h"
-#include "kis_paint_information.h"
-#include "kis_vec.h"
-#include "kis_perspective_math.h"
-#include "kis_fixed_paint_device.h"
-
-#define BEZIER_FLATNESS_THRESHOLD 0.5
-#define MAXIMUM_SCALE 2
-#include <kis_distance_information.h>
-
-struct KisPaintOp::Private {
-    Private()
-            : dab(0),currentScale(1.0),currentRotation(0) {
-    }
-
-    KisFixedPaintDeviceSP dab;
-    KoColor color;
-    KoColor previousPaintColor;
-    KisPainter* painter;
-    qreal currentScale;
-    qreal currentRotation;
-};
-
-
-KisPaintOp::KisPaintOp(KisPainter * painter) : d(new Private)
-{
-    d->painter = painter;
-}
-
-KisPaintOp::~KisPaintOp()
-{
-    d->dab.clear();
-    delete d;
-}
-
-KisFixedPaintDeviceSP KisPaintOp::cachedDab()
-{
-    return cachedDab(d->painter->device()->colorSpace());
-}
-
-KisFixedPaintDeviceSP KisPaintOp::cachedDab(const KoColorSpace *cs)
-{
-    if (!d->dab || !(*d->dab->colorSpace() == *cs)) {
-        d->dab = new KisFixedPaintDevice(cs);
-    }
-    return d->dab;
-}
-
-void KisPaintOp::splitCoordinate(double coordinate, qint32 *whole, double *fraction)
-{
-    qint32 i = static_cast<qint32>(coordinate);
-
-    if (coordinate < 0) {
-        // We always want the fractional part to be positive.
-        // E.g. -1.25 becomes -2 and +0.75
-        i--;
-    }
-
-    qreal f = coordinate - i;
-
-    *whole = i;
-    *fraction = f;
-}
-
-static KisDistanceInformation paintBezierCurve(KisPaintOp *paintOp,
-                               const KisPaintInformation &pi1,
-                               const KisVector2D &control1,
-                               const KisVector2D &control2,
-                               const KisPaintInformation &pi2,
-                               const KisDistanceInformation& savedDist)
-{
-    KisDistanceInformation newDistance;
-    LineEquation line = LineEquation::Through(toKisVector2D(pi1.pos()), toKisVector2D(pi2.pos()));
-    qreal d1 = line.absDistance(control1);
-    qreal d2 = line.absDistance(control2);
-
-    if ((d1 < BEZIER_FLATNESS_THRESHOLD && d2 < BEZIER_FLATNESS_THRESHOLD)
-#ifdef Q_CC_MSVC
-            || isnan(d1) || isnan(d2)) {
-#else
-            || std::isnan(d1) || std::isnan(d2)) {
-#endif
-        newDistance = paintOp->paintLine(pi1, pi2, savedDist);
-    } else {
-        // Midpoint subdivision. See Foley & Van Dam Computer Graphics P.508
-        KisVector2D l2 = (toKisVector2D(pi1.pos()) + control1) / 2;
-        KisVector2D h = (control1 + control2) / 2;
-        KisVector2D l3 = (l2 + h) / 2;
-        KisVector2D r3 = (control2 + toKisVector2D(pi2.pos())) / 2;
-        KisVector2D r2 = (h + r3) / 2;
-        KisVector2D l4 = (l3 + r2) / 2;
-
-        KisVector2D midMovement = (pi1.movement() + pi2.movement()) * 0.5;
-        
-        KisPaintInformation middlePI = KisPaintInformation::mix(toQPointF(l4), 0.5, pi1, pi2, midMovement);
-        
-        newDistance = paintBezierCurve(paintOp, pi1, l2, l3, middlePI, savedDist);
-        newDistance = paintBezierCurve(paintOp, middlePI, r2, r3, pi2, newDistance);
-    }
-
-    return newDistance;
-}
-
-KisDistanceInformation KisPaintOp::paintBezierCurve(const KisPaintInformation &pi1,
-                                    const QPointF &control1,
-                                    const QPointF &control2,
-                                    const KisPaintInformation &pi2,
-                                    const KisDistanceInformation& savedDist)
-{
-    return ::paintBezierCurve(this, pi1, toKisVector2D(control1), toKisVector2D(control2), pi2, savedDist);
-}
-
-
-KisDistanceInformation KisPaintOp::paintLine(const KisPaintInformation &pi1,
-                             const KisPaintInformation &pi2,
-                             const KisDistanceInformation& savedDist)
-{
-    KisVector2D end = toKisVector2D(pi2.pos());
-    KisVector2D start = toKisVector2D(pi1.pos());
-
-    KisVector2D dragVec = end - start;
-
-    Q_ASSERT(savedDist.distance >= 0);
-
-    qreal endDist = dragVec.norm();
-    qreal currentDist = savedDist.distance;
-
-    dragVec.normalize();
-    KisVector2D step(0, 0);
-
-    qreal sp = savedDist.spacing;
-    while (currentDist < endDist) {
-
-        QPointF p = toQPointF(start +  currentDist * dragVec);
-
-        qreal t = currentDist / endDist;
-
-        KisVector2D movement;
-        if(sp > 0.01) {
-          movement = sp * dragVec;
-        } else {
-          movement = 0.01 * dragVec;
-        }
-        sp = paintAt(KisPaintInformation::mix(p, t, pi1, pi2, movement));
-        currentDist += sp;
-    }
-
-    QRect r(pi1.pos().toPoint(), pi2.pos().toPoint());
-    d->painter->addDirtyRect(r.normalized());
-
-    return KisDistanceInformation(currentDist - endDist, sp);
-}
-
-KisPainter* KisPaintOp::painter() const
-{
-    return d->painter;
-}
-
-KisPaintDeviceSP KisPaintOp::source() const
-{
-    return d->painter->device();
-}
-
-qreal KisPaintOp::scaleForPressure(qreal pressure)
-{
-    qreal scale = pressure / PRESSURE_DEFAULT;
-
-    if (scale < 0) {
-        scale = 0;
-    }
-
-    if (scale > MAXIMUM_SCALE) {
-        scale = MAXIMUM_SCALE;
-    }
-
-    return scale;
-}
-
-qreal KisPaintOp::currentRotation() const
-{
-    return d->currentRotation;
-}
-
-qreal KisPaintOp::currentScale() const
-{
-    return d->currentScale;
-}
-
-void KisPaintOp::setCurrentRotation(qreal rotation)
-{
-    d->currentRotation = rotation;
-}
-
-void KisPaintOp::setCurrentScale(qreal scale)
-{
-    d->currentScale = scale;
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.h 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.h
--- 1:2.3.3-1/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.h	2011-02-17 12:14:02.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/image/brushengine/kis_paintop.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,149 +0,0 @@
-/*
- *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
- *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
- *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
- *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
- *  Copyright (c) 2004,2010 Cyrille Berger <cberger@cberger.net>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIS_PAINTOP_H_
-#define KIS_PAINTOP_H_
-
-#include "kis_distance_information.h"
-#include "kis_shared.h"
-#include "kis_types.h"
-#include "kis_paintop_settings.h"
-
-#include <krita_export.h>
-
-class QPointF;
-class KoColorSpace;
-class KoInputDevice;
-class KoPointerEvent;
-
-class KisPainter;
-class KisPaintInformation;
-
-/**
- * KisPaintOp are use by tools to draw on a paint device. A paintop takes settings
- * and input information, like pressure, tilt or motion and uses that to draw pixels
- */
-class KRITAIMAGE_EXPORT KisPaintOp : public KisShared
-{
-    struct Private;
-public:
-
-    KisPaintOp(KisPainter * painter);
-    virtual ~KisPaintOp();
-
-    /**
-     * Paint at the subpixel point pos using the specified paint
-     * information..
-     *
-     * The distance between two calls of the paintAt is always specified by spacing;
-     * xSpacing and ySpacing is 1.0 by default, negative values causes infinite loops (it is checked by Q_ASSERT)
-     */
-    virtual qreal paintAt(const KisPaintInformation& info) = 0;
-
-    /**
-     * A painterly paintop must have a PainterlyInformation structure,
-     * handle the painterly overlays by its own and implement bidirectionality,
-     * that is, it will pick up colors from the canvas and change its own color
-     * while drawing.
-     * @return true if the current paintop is painterly.
-     */
-    virtual bool painterly() const {
-        return false;
-    }
-
-    /**
-     * Draw a line between pos1 and pos2 using the currently set brush and color.
-     * If savedDist is less than zero, the brush is painted at pos1 before being
-     * painted along the line using the spacing setting.
-     *
-     * @return the drag distance, that is the remains of the distance
-     * between p1 and p2 not covered because the currenlty set brush
-     * has a spacing greater than that distance.
-     */
-    virtual KisDistanceInformation paintLine(const KisPaintInformation &pi1,
-                             const KisPaintInformation &pi2,
-                             const KisDistanceInformation& savedDist = KisDistanceInformation());
-
-    /**
-     * Draw a Bezier curve between pos1 and pos2 using control points 1 and 2.
-     * If savedDist is less than zero, the brush is painted at pos1 before being
-     * painted along the curve using the spacing setting.
-     * @return the drag distance, that is the remains of the distance between p1 and p2 not covered
-     * because the currenlty set brush has a spacing greater than that distance.
-     */
-    virtual KisDistanceInformation paintBezierCurve(const KisPaintInformation &pi1,
-                                    const QPointF &control1,
-                                    const QPointF &control2,
-                                    const KisPaintInformation &pi2,
-                                    const KisDistanceInformation& savedDist = KisDistanceInformation());
-
-    
-     /**
-     * Whether this paintop can paint. Can be false in case that some setting isn't read correctly.
-     * @return if paintop is ready for painting, default is true
-     */
-    virtual bool canPaint() const {
-        return true;
-    }
-
-    /**
-     * Split the coordinate into whole + fraction, where fraction is always >= 0.
-     */
-    static void splitCoordinate(double coordinate, qint32 *whole, double *fraction);
-
-    /**
-     * returns the scale and rotation dynamically computed for the single dab
-     * rotation is in radians
-     * This is used e.g. for dynamic brush outline
-     */
-    qreal currentScale() const;
-    qreal currentRotation() const;
-    
-protected:
-
-    void setCurrentScale(qreal scale);
-    /**
-    * Set rotation in radians
-    */
-    void setCurrentRotation(qreal rotation);
-    
-    static qreal scaleForPressure(qreal pressure);
-
-    KisFixedPaintDeviceSP cachedDab();
-    KisFixedPaintDeviceSP cachedDab(const KoColorSpace *cs);
-
-    /**
-     * Return the painter this paintop is owned by
-     */
-    KisPainter* painter() const;
-
-    /**
-     * Return the paintdevice the painter this paintop is owned by
-     */
-    KisPaintDeviceSP source() const;
-
-private:
-    Private* const d;
-};
-
-
-#endif // KIS_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2011-02-17 12:12:57.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,314 +0,0 @@
-/*
- *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_color_selector.h"
-
-#include <cmath>
-
-#include <QHBoxLayout>
-#include <QColor>
-#include <QPainter>
-#include <QMouseEvent>
-#include <QTimer>
-#include <QPushButton>
-
-#include <KConfig>
-#include <KConfigGroup>
-#include <KComponentData>
-#include <KGlobal>
-#include <KIcon>
-
-#include "kis_color_selector_ring.h"
-#include "kis_color_selector_triangle.h"
-#include "kis_color_selector_simple.h"
-#include "kis_color_selector_wheel.h"
-#include "kis_color_selector_container.h"
-
-#include <KDebug>
-
-KisColorSelector::KisColorSelector(Configuration conf, QWidget* parent)
-                                       : KisColorSelectorBase(parent),
-                                       m_ring(0),
-                                       m_triangle(0),
-                                       m_slider(0),
-                                       m_square(0),
-                                       m_wheel(0),
-                                       m_mainComponent(0),
-                                       m_subComponent(0),
-                                       m_grabbingComponent(0),
-                                       m_blipDisplay(true)
-{
-    init();
-    setConfiguration(conf);
-}
-
-KisColorSelector::KisColorSelector(QWidget* parent)
-                                       : KisColorSelectorBase(parent),
-                                       m_ring(0),
-                                       m_triangle(0),
-                                       m_slider(0),
-                                       m_square(0),
-                                       m_wheel(0),
-                                       m_button(0),
-                                       m_mainComponent(0),
-                                       m_subComponent(0),
-                                       m_grabbingComponent(0),
-                                       m_blipDisplay(true)
-{
-    init();
-    updateSettings();
-}
-
-KisColorSelectorBase* KisColorSelector::createPopup() const
-{
-    KisColorSelectorBase* popup = new KisColorSelector(0);
-    popup->setColor(m_lastColor);
-    return popup;
-}
-
-void KisColorSelector::setConfiguration(Configuration conf)
-{
-    m_configuration = conf;
-
-    if(m_mainComponent!=0) {
-        Q_ASSERT(m_subComponent!=0);
-        m_mainComponent->setGeometry(0, 0, 0, 0);
-        m_subComponent->setGeometry(0, 0, 0, 0);
-
-        m_mainComponent->disconnect();
-        m_subComponent->disconnect();
-    }
-
-    switch (m_configuration.mainType) {
-    case Square:
-        m_mainComponent=m_square;
-        break;
-    case Wheel:
-        m_mainComponent=m_wheel;
-        break;
-    case Triangle:
-        m_mainComponent=m_triangle;
-        break;
-    default:
-        Q_ASSERT(false);
-    }
-
-    switch (m_configuration.subType) {
-    case Ring:
-        m_subComponent=m_ring;
-        break;
-    case Slider:
-        m_subComponent=m_slider;
-        break;
-    default:
-        Q_ASSERT(false);
-    }
-
-    connect(m_mainComponent, SIGNAL(paramChanged(qreal,qreal,qreal,qreal,qreal)),
-            m_subComponent,  SLOT(setParam(qreal,qreal,qreal,qreal,qreal)), Qt::UniqueConnection);
-    connect(m_subComponent,  SIGNAL(paramChanged(qreal,qreal,qreal,qreal,qreal)),
-            m_mainComponent, SLOT(setParam(qreal,qreal,qreal,qreal, qreal)), Qt::UniqueConnection);
-
-    connect(m_mainComponent, SIGNAL(update()), m_updateTimer,   SLOT(start()), Qt::UniqueConnection);
-    connect(m_subComponent,  SIGNAL(update()), m_updateTimer,   SLOT(start()), Qt::UniqueConnection);
-    
-    m_mainComponent->setConfiguration(m_configuration.mainTypeParameter, m_configuration.mainType);
-    m_subComponent->setConfiguration(m_configuration.subTypeParameter, m_configuration.subType);
-
-    QResizeEvent event(QSize(width(), height()), QSize());
-    resizeEvent(&event);
-}
-
-KisColorSelector::Configuration KisColorSelector::configuration() const
-{
-    return m_configuration;
-}
-
-void KisColorSelector::updateSettings()
-{
-    KisColorSelectorBase::updateSettings();
-    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
-    setConfiguration(Configuration::fromString(cfg.readEntry("colorSelectorConfiguration", KisColorSelector::Configuration().toString())));
-}
-
-void KisColorSelector::paintEvent(QPaintEvent* e)
-{
-    Q_UNUSED(e);
-    QPainter p(this);
-    p.fillRect(0,0,width(),height(),QColor(128,128,128));
-    p.setRenderHint(QPainter::Antialiasing);
-
-    m_mainComponent->paintEvent(&p);
-    m_subComponent->paintEvent(&p);
-}
-
-inline int iconSize(qreal width, qreal height) {
-    qreal radius = qMin(width, height)/2.;
-    qreal xm = width/2.;
-    qreal ym = height/2.;
-    if(xm>=2*ym || ym>=2*xm)
-        return qBound(5., radius, 32.);
-
-    qreal a=-2;
-    qreal b=2.*(xm+ym);
-    qreal c=radius*radius-xm*xm-ym*ym;
-    return qBound(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
-}
-
-void KisColorSelector::resizeEvent(QResizeEvent* e) {
-    if(m_configuration.subType==Ring) {
-        m_ring->setGeometry(0,0,width(), height());
-        if(displaySettingsButton()) {
-            int size = iconSize(width(), height());
-            m_button->setGeometry(0, 0, size, size);
-        }
-        if(m_configuration.mainType==Triangle) {
-            m_triangle->setGeometry(width()/2-m_ring->innerRadius(),
-                                    height()/2-m_ring->innerRadius(),
-                                    m_ring->innerRadius()*2,
-                                    m_ring->innerRadius()*2);
-        }
-        else {
-            int size = m_ring->innerRadius()*2/sqrt(2.);
-            m_square->setGeometry(width()/2-size/2,
-                                  height()/2-size/2,
-                                  size,
-                                  size);
-        }
-    }
-    else {
-        // type wheel and square
-        if(m_configuration.mainType==Wheel) {
-            if(displaySettingsButton()) {
-                int size = iconSize(width(), height()*0.9);
-                m_button->setGeometry(0, height()*0.1, size, size);
-            }
-            m_mainComponent->setGeometry(0, height()*0.1, width(), height()*0.9);
-            m_subComponent->setGeometry( 0, 0,            width(), height()*0.1);
-        }
-        else {
-            int buttonSize = 0;
-            if(displaySettingsButton()) {
-                buttonSize = qBound(20, int(0.1*height()), 32);
-                m_button->setGeometry(0, 0, buttonSize, buttonSize);
-            }
-
-            if(height()>width()) {
-                int selectorHeight=height()-buttonSize;
-                m_mainComponent->setGeometry(0, buttonSize+selectorHeight*0.1, width(), selectorHeight*0.9);
-                m_subComponent->setGeometry( 0, buttonSize,                    width(), selectorHeight*0.1);
-            }
-            else {
-                int selectorWidth=width()-buttonSize;
-                m_mainComponent->setGeometry(buttonSize, height()*0.1, selectorWidth, height()*0.9);
-                m_subComponent->setGeometry( buttonSize, 0,            selectorWidth, height()*0.1);
-            }
-        }
-    }
-
-    KisColorSelectorBase::resizeEvent(e);
-}
-
-void KisColorSelector::mousePressEvent(QMouseEvent* e)
-{
-    e->setAccepted(false);
-    KisColorSelectorBase::mousePressEvent(e);
-
-    if(!e->isAccepted()) {
-        if(m_mainComponent->wantsGrab(e->x(), e->y()))
-            m_grabbingComponent=m_mainComponent;
-        else if(m_subComponent->wantsGrab(e->x(), e->y()))
-            m_grabbingComponent=m_subComponent;
-
-        mouseEvent(e);
-    }
-}
-
-void KisColorSelector::mouseMoveEvent(QMouseEvent* e)
-{
-    KisColorSelectorBase::mouseMoveEvent(e);
-    
-    mouseEvent(e);
-}
-
-void KisColorSelector::mouseReleaseEvent(QMouseEvent* e)
-{
-    if(m_lastColor!=m_currentColor && m_currentColor.isValid()) {
-        m_lastColor=m_currentColor;
-        ColorRole role;
-        if(e->button() == Qt::LeftButton)
-            role=Foreground;
-        else
-            role=Background;
-        commitColor(KoColor(m_currentColor, colorSpace()), role);
-    }
-    e->accept();
-    m_grabbingComponent=0;
-}
-
-bool KisColorSelector::displaySettingsButton()
-{
-    if(dynamic_cast<KisColorSelectorContainer*>(parent())!=0)
-        return true;
-    else
-        return false;
-}
-
-void KisColorSelector::setColor(const QColor &color)
-{
-    m_mainComponent->setColor(color);
-    m_subComponent->setColor(color);
-    m_lastColor=color;
-    update();
-}
-
-void KisColorSelector::mouseEvent(QMouseEvent *e)
-{
-    if(m_grabbingComponent && (e->buttons()&Qt::LeftButton || e->buttons()&Qt::RightButton)) {
-        m_grabbingComponent->mouseEvent(e->x(), e->y());
-
-        m_currentColor=m_mainComponent->currentColor();
-    }
-}
-
-void KisColorSelector::init()
-{
-    setAcceptDrops(true);
-
-    m_ring = new KisColorSelectorRing(this);
-    m_triangle = new KisColorSelectorTriangle(this);
-    m_slider = new KisColorSelectorSimple(this);
-    m_square = new KisColorSelectorSimple(this);
-    m_wheel = new KisColorSelectorWheel(this);
-
-    if(displaySettingsButton()) {
-        m_button = new QPushButton(this);
-        m_button->setIcon(KIcon("configure"));
-        connect(m_button, SIGNAL(clicked()), SIGNAL(settingsButtonClicked()));
-    }
-
-    // a tablet can send many more signals, than a mouse
-    // this causes many repaints, if updating after every signal.
-    // a workaround with a timer can fix that.
-    m_updateTimer = new QTimer(this);
-    m_updateTimer->setInterval(1);
-    m_updateTimer->setSingleShot(true);
-
-    connect(m_updateTimer,      SIGNAL(timeout()), this,  SLOT(update()));
-
-    setMinimumSize(40, 40);
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	2011-02-17 12:12:57.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,261 +0,0 @@
-/*
- *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- */
-
-#include "kis_color_selector_simple.h"
-
-#include <QImage>
-#include <QPainter>
-#include <QColor>
-#include <cmath>
-
-#include <KDebug>
-
-KisColorSelectorSimple::KisColorSelectorSimple(KisColorSelector *parent) :
-    KisColorSelectorComponent(parent),
-    m_lastClickPos(-1,-1)
-{
-}
-
-void KisColorSelectorSimple::setColor(const QColor &c)
-{
-    switch (m_parameter) {
-    case KisColorSelector::SL:
-        m_lastClickPos.setX(c.hslSaturationF());
-        m_lastClickPos.setY(1.-c.lightnessF());
-        emit paramChanged(-1, -1, -1, c.hslSaturationF(), c.lightnessF());
-        break;
-    case KisColorSelector::LH:
-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-        m_lastClickPos.setY(1.-c.lightnessF());
-        emit paramChanged(c.hueF(), -1, -1, -1, c.lightnessF());
-        break;
-    case KisColorSelector::SV:
-        m_lastClickPos.setX(c.saturationF());
-        m_lastClickPos.setY(1-c.valueF());
-        emit paramChanged(-1, c.saturationF(), c.valueF(), -1, -1);
-        break;
-    case KisColorSelector::VH:
-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-        m_lastClickPos.setY(c.valueF());
-        emit paramChanged(c.hueF(), -1, c.valueF(), -1, -1);
-        break;
-    case KisColorSelector::hsvSH:
-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-        m_lastClickPos.setY(1-c.saturationF());
-        emit paramChanged(c.hueF(), c.saturationF(), -1, -1, -1);
-        break;
-    case KisColorSelector::hslSH:
-        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
-        m_lastClickPos.setY(1-c.hslSaturationF());
-        emit paramChanged(c.hueF(), -1, -1, c.hslSaturationF(), -1);
-        break;
-    case KisColorSelector::L:
-        m_lastClickPos.setX(1-c.lightnessF());
-        emit paramChanged(-1, -1, -1, -1, c.lightnessF());
-        break;
-    case KisColorSelector::V:
-        m_lastClickPos.setX(c.valueF());
-        emit paramChanged(-1, -1, c.valueF(), -1, -1);
-        break;
-    case KisColorSelector::hsvS:
-        m_lastClickPos.setX(c.saturationF());
-        emit paramChanged(-1, c.saturationF(), -1, -1, -1);
-        break;
-    case KisColorSelector::hslS:
-        m_lastClickPos.setX(c.hslSaturationF());
-        emit paramChanged(-1, -1, -1, c.hslSaturationF(), -1);
-        break;
-    case KisColorSelector::H:
-        m_lastClickPos.setX(1-qBound(0., c.hueF(), 1.));
-        emit paramChanged(c.hueF(), -1, -1, -1, -1);
-        break;
-    default:
-        Q_ASSERT(false);
-        break;
-    }
-    emit update();
-}
-
-QColor KisColorSelectorSimple::selectColor(int x, int y)
-{
-    m_kocolor.convertTo(colorSpace());
-
-    m_lastClickPos.setX(x/qreal(width()));
-    m_lastClickPos.setY(y/qreal(height()));
-
-    qreal xRel = x/qreal(width());
-    qreal yRel = 1.-y/qreal(height());
-    qreal relPos;
-    if(height()>width())
-        relPos = 1.-y/qreal(height());
-    else
-        relPos = 1.-x/qreal(width());
-
-    switch (m_parameter) {
-    case KisColorSelector::H:
-        emit paramChanged(relPos, -1, -1, -1, -1);
-        break;
-    case KisColorSelector::hsvS:
-        emit paramChanged(-1, relPos, -1, -1, -1);
-        break;
-    case KisColorSelector::hslS:
-        emit paramChanged(-1, -1, -1, relPos, -1);
-        break;
-    case KisColorSelector::V:
-        emit paramChanged(-1, -1, relPos, -1, -1);
-        break;
-    case KisColorSelector::L:
-        emit paramChanged(-1, -1, -1, -1, relPos);
-        break;
-    case KisColorSelector::SL:
-        emit paramChanged(-1, -1, -1, xRel, yRel);
-        break;
-    case KisColorSelector::SV:
-        emit paramChanged(-1, xRel, yRel, -1, -1);
-        break;
-    case KisColorSelector::hsvSH:
-        emit paramChanged(xRel, yRel, -1, -1, -1);
-        break;
-    case KisColorSelector::hslSH:
-        emit paramChanged(xRel, -1, -1, yRel, -1);
-        break;
-    case KisColorSelector::VH:
-        emit paramChanged(xRel, -1, yRel, -1, -1);
-        break;
-    case KisColorSelector::LH:
-        emit paramChanged(xRel, -1, -1, -1, yRel);
-        break;
-    }
-
-    emit update();
-
-//    kDebug()<<"selectColor(x/y) y rel="<<yRel<<"  value="<<QColor::fromRgb(colorAt(x, y)).valueF();
-    return colorAt(x, y);
-}
-
-void KisColorSelectorSimple::paint(QPainter* painter)
-{
-    if(isDirty()) {
-        m_kocolor.convertTo(colorSpace());
-
-        m_pixelCache=QImage(width(), height(), QImage::Format_ARGB32_Premultiplied);
-
-        for(int x=0; x<width(); x++) {
-            for(int y=0; y<height(); y++) {
-                m_kocolor.fromQColor(colorAt(x, y));
-                m_kocolor.toQColor(&m_qcolor);
-                m_pixelCache.setPixel(x, y, m_qcolor.rgb());
-            }
-        }
-    }
-
-    painter->drawImage(0,0, m_pixelCache);
-
-    // draw blip
-    if(m_lastClickPos!=QPointF(-1,-1) && m_parent->displayBlip()) {
-        switch (m_parameter) {
-        case KisColorSelector::H:
-        case KisColorSelector::hsvS:
-        case KisColorSelector::hslS:
-        case KisColorSelector::V:
-        case KisColorSelector::L:
-            if(width()>height()) {
-                painter->setPen(QColor(0,0,0));
-                painter->drawLine(m_lastClickPos.x()*width()-1, 0, m_lastClickPos.x()*width()-1, height());
-                painter->setPen(QColor(255,255,255));
-                painter->drawLine(m_lastClickPos.x()*width()+1, 0, m_lastClickPos.x()*width()+1, height());
-            }
-            else {
-                painter->setPen(QColor(0,0,0));
-                painter->drawLine(0, m_lastClickPos.x()*height()-1, width(), m_lastClickPos.x()*height()-1);
-                painter->setPen(QColor(255,255,255));
-                painter->drawLine(0, m_lastClickPos.x()*height()+1, width(), m_lastClickPos.x()*height()+1);
-            }
-            break;
-        case KisColorSelector::SL:
-        case KisColorSelector::SV:
-        case KisColorSelector::hslSH:
-        case KisColorSelector::hsvSH:
-        case KisColorSelector::VH:
-        case KisColorSelector::LH:
-            painter->setPen(QColor(0,0,0));
-            painter->drawEllipse(m_lastClickPos.x()*width()-5, m_lastClickPos.y()*height()-5, 10, 10);
-            painter->setPen(QColor(255,255,255));
-            painter->drawEllipse(m_lastClickPos.x()*width()-4, m_lastClickPos.y()*height()-4, 8, 8);
-            break;
-        }
-
-    }
-}
-
-const QColor& KisColorSelectorSimple::colorAt(int x, int y)
-{
-    if (x < 0) x = 0;
-    if (x > width()) x = width();
-    if (y < 0) y = 0;
-    if (y > width()) y = height();
-
-    qreal xRel = x/qreal(width());
-    qreal yRel = 1.-y/qreal(height());
-    qreal relPos;
-    if(height()>width())
-        relPos = 1.-y/qreal(height());
-    else
-        relPos = 1.-x/qreal(width());
-
-    switch(m_parameter) {
-    case KisColorSelector::SL:
-        m_qcolor.setHslF(m_hue, xRel, yRel);
-        break;
-    case KisColorSelector::SV:
-        m_qcolor.setHsvF(m_hue, xRel, yRel);
-        break;
-    case KisColorSelector::hsvSH:
-        m_qcolor.setHsvF(xRel, yRel, m_value);
-        break;
-    case KisColorSelector::hslSH:
-        m_qcolor.setHslF(xRel, yRel, m_lightness);
-        break;
-    case KisColorSelector::VH:
-        m_qcolor.setHsvF(xRel, m_hsvSaturation, yRel);
-        break;
-    case KisColorSelector::LH:
-        m_qcolor.setHslF(xRel, m_hslSaturation, yRel);
-        break;
-    case KisColorSelector::H:
-        m_qcolor.setHsvF(relPos, 1, 1);
-        break;
-    case KisColorSelector::hsvS:
-        m_qcolor.setHsvF(m_hue, relPos, m_value);
-        break;
-    case KisColorSelector::hslS:
-        m_qcolor.setHslF(m_hue, relPos, m_lightness);
-        break;
-    case KisColorSelector::V:
-        m_qcolor.setHsvF(m_hue, m_hsvSaturation, relPos);
-        break;
-    case KisColorSelector::L:
-        m_qcolor.setHslF(m_hue, m_hslSaturation, relPos);
-        break;
-    default:
-        Q_ASSERT(false);
-        m_qcolor = QColor();
-        return m_qcolor;
-    }
-
-    return m_qcolor;
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	2011-02-17 12:12:57.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,195 +0,0 @@
-/*
- *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_shade_selector_line.h"
-
-#include <QPainter>
-#include <QColor>
-#include <QMouseEvent>
-
-#include <KConfig>
-#include <KConfigGroup>
-#include <KComponentData>
-#include <KGlobal>
-#include <KLocale>
-
-#include "KoResourceManager.h"
-#include "KoColorSpaceRegistry.h"
-
-#include "kis_canvas2.h"
-
-#include "kis_color_selector_base.h"
-#include "kis_minimal_shade_selector.h"
-
-#include <KDebug>
-
-KisShadeSelectorLine::KisShadeSelectorLine(QWidget *parent) :
-    KisShadeSelectorLineBase(parent), m_displayHelpText(false)
-{
-    setParam(0, 0, 0, 0, 0, 0);
-    updateSettings();
-}
-
-KisShadeSelectorLine::KisShadeSelectorLine(qreal hueDelta, qreal satDelta, qreal valDelta, QWidget *parent, qreal hueShift, qreal satShift, qreal valShift) :
-    KisShadeSelectorLineBase(parent), m_displayHelpText(false)
-{
-    setParam(hueDelta, satDelta, valDelta, hueShift, satShift, valShift);
-    updateSettings();
-}
-
-void KisShadeSelectorLine::setParam(qreal hueDelta, qreal satDelta, qreal valDelta, qreal hueShift, qreal satShift, qreal valShift)
-{
-    m_hueDelta = hueDelta;
-    m_saturationDelta = satDelta;
-    m_valueDelta = valDelta;
-
-    m_hueShift = hueShift;
-    m_saturationShift = satShift;
-    m_valueShift = valShift;
-}
-
-void KisShadeSelectorLine::setColor(const QColor &color)
-{
-    m_color=color;
-    update();
-}
-
-void KisShadeSelectorLine::updateSettings()
-{
-    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
-
-    m_gradient = cfg.readEntry("minimalShadeSelectorAsGradient", false);
-    m_patchCount = cfg.readEntry("minimalShadeSelectorPatchCount", 10);
-    m_lineHeight = cfg.readEntry("minimalShadeSelectorLineHeight", 20);
-    m_backgroundColor = QColor(128, 128, 128);
-
-    setMaximumHeight(m_lineHeight);
-    setMinimumHeight(m_lineHeight);
-}
-
-QString KisShadeSelectorLine::toString() const
-{
-    return QString("%1|%2|%3|%4|%5|%6|%7").arg(m_lineNumber).arg(m_hueDelta).arg(m_saturationDelta).arg(m_valueDelta).arg(m_hueShift).arg(m_saturationShift).arg(m_valueShift);
-}
-
-void KisShadeSelectorLine::fromString(const QString& string)
-{
-    QStringList strili = string.split('|');
-    m_lineNumber = strili.at(0).toInt();
-    m_hueDelta = strili.at(1).toDouble();
-    m_saturationDelta = strili.at(2).toDouble();
-    m_valueDelta = strili.at(3).toDouble();
-    if(strili.size()==4) return;            // don't crash, if reading old config files.
-    m_hueShift = strili.at(4).toDouble();
-    m_saturationShift = strili.at(5).toDouble();
-    m_valueShift = strili.at(6).toDouble();
-}
-
-void KisShadeSelectorLine::paintEvent(QPaintEvent *)
-{
-    m_pixelCache = QImage(width(), height(), QImage::Format_ARGB32_Premultiplied);
-    QPainter painter(&m_pixelCache);
-    painter.fillRect(0,0, width(), height(), m_backgroundColor);
-
-    KisMinimalShadeSelector* parent = dynamic_cast<KisMinimalShadeSelector*>(parentWidget());
-
-    const KoColorSpace* colorspace;
-    if(parent)
-        colorspace = parent->colorSpace();
-    else
-        colorspace = KoColorSpaceRegistry::instance()->rgb8();
-    KoColor koColor(colorspace);
-
-    int patchCount;
-    int patchSpacing;
-
-    if(m_gradient) {
-        patchCount = width();
-        patchSpacing = 0;
-    }
-    else {
-        patchCount = m_patchCount;
-        patchSpacing = 3;
-    }
-    qreal patchWidth = (width()-patchSpacing*patchCount)/qreal(patchCount);
-
-    qreal hueStep=m_hueDelta/qreal(patchCount);
-    qreal saturationStep=m_saturationDelta/qreal(patchCount);
-    qreal valueStep=m_valueDelta/qreal(patchCount);
-
-    int z=0;
-    for(int i=-patchCount/2; i<=patchCount/2; i++) {
-        if(i==0 && patchCount%2==0) continue;
-
-        qreal hue=m_color.hueF()+(i*hueStep)+m_hueShift;
-        while(hue<0) hue+=1.;
-        while(hue>1) hue-=1.;
-
-        qreal saturation = qBound(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
-
-        qreal value = qBound(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
-
-
-        koColor.fromQColor(QColor::fromHsvF(hue, saturation, value));
-        painter.fillRect(z*(patchWidth+patchSpacing)/*+1*/, 0, patchWidth, m_lineHeight, koColor.toQColor());
-        z++;
-    }
-
-    QPainter wpainter(this);
-    wpainter.drawImage(0,0, m_pixelCache);
-    if(m_displayHelpText) {
-        QString helpText(i18n("delta h=%1 s=%2 v=%3 shift h=%4 s=%5 v=%6",
-                         m_hueDelta,
-                         m_saturationDelta,
-                         m_valueDelta,
-                         m_hueShift,
-                         m_saturationShift,
-                         m_valueShift));
-        wpainter.setPen(QColor(255,255,255));
-        wpainter.drawText(rect(), helpText);
-    }
-}
-
-void KisShadeSelectorLine::mousePressEvent(QMouseEvent* e)
-{
-    if(e->button()!=Qt::LeftButton && e->button()!=Qt::RightButton) {
-        e->setAccepted(false);
-        return;
-    }
-
-    QColor color(m_pixelCache.pixel(e->pos()));
-    if(color==m_backgroundColor)
-        return;
-
-    KisColorSelectorBase* parent = dynamic_cast<KisColorSelectorBase*>(parentWidget());
-
-    KisColorSelectorBase::ColorRole role = KisColorSelectorBase::Foreground;
-    if(e->button()==Qt::RightButton)
-        role = KisColorSelectorBase::Background;
-
-    parent->commitColor(KoColor(color, KoColorSpaceRegistry::instance()->rgb8()), role);
-
-    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
-
-    bool onRightClick = cfg.readEntry("shadeSelectorUpdateOnRightClick", false);
-    bool onLeftClick = cfg.readEntry("shadeSelectorUpdateOnLeftClick", false);
-
-    if((e->button()==Qt::LeftButton && onLeftClick) || (e->button()==Qt::RightButton && onRightClick))
-        parent->setColor(parent->findGeneratingColor(KoColor(color, KoColorSpaceRegistry::instance()->rgb8())));
-
-    e->accept();
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	2011-02-17 12:13:45.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,73 +0,0 @@
-/*
- *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
- *  Copyright (c) 2004-2008 Boudewijn Rempt <boud@valdyas.org>
- *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
- *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
- *  Copyright (c) 2004 Cyrille Berger <cberger@cberger.net>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIS_BRUSHOP_H_
-#define KIS_BRUSHOP_H_
-
-#include "kis_brush_based_paintop.h"
-#include <kis_pressure_darken_option.h>
-#include <kis_pressure_opacity_option.h>
-#include <kis_pressure_size_option.h>
-#include <kis_pressure_rotation_option.h>
-#include <kis_pressure_mix_option.h>
-#include <kis_pressure_hsv_option.h>
-#include <kis_pressure_mirror_option.h>
-#include <kis_pressure_scatter_option.h>
-#include <kis_pressure_softness_option.h>
-#include <kis_pressure_sharpness_option.h>
-
-class KisBrushBasedPaintOpSettings;
-
-class QWidget;
-class QPointF;
-class KisPainter;
-class KisColorSource;
-
-
-class KisBrushOp : public KisBrushBasedPaintOp
-{
-
-public:
-
-    KisBrushOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-    virtual ~KisBrushOp();
-
-    double paintAt(const KisPaintInformation& info);
-    virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
-
-private:
-    KisColorSource* m_colorSource;
-    KisPressureSizeOption m_sizeOption;
-    KisPressureMirrorOption m_mirrorOption;
-    KisPressureOpacityOption m_opacityOption;
-    KisPressureSoftnessOption m_softnessOption;
-    KisPressureSharpnessOption m_sharpnessOption;
-    KisPressureDarkenOption m_darkenOption;
-    KisPressureRotationOption m_rotationOption;
-    KisPressureMixOption m_mixOption;
-    KisPressureScatterOption m_scatterOption;
-    QList<KisPressureHSVOption*> m_hsvOptions;
-    KoColorTransformation* m_hsvTransfo;
-    KisPaintDeviceSP m_dab;
-};
-
-#endif // KIS_BRUSHOP_H_
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	2011-02-17 12:13:45.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,181 +0,0 @@
-/*
- *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
- *  Copyright (c) 2004-2008 Boudewijn Rempt <boud@valdyas.org>
- *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
- *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
- *  Copyright (c) 2004,2010 Cyrille Berger <cberger@cberger.net>
- *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
- *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_smudgeop.h"
-
-#include <QRect>
-
-#include <kis_debug.h>
-
-#include <KoColorSpaceRegistry.h>
-#include <KoColorTransformation.h>
-#include <KoColor.h>
-#include <KoCompositeOp.h>
-
-#include <kis_brush.h>
-#include <kis_global.h>
-#include <kis_paint_device.h>
-#include <kis_painter.h>
-#include <kis_selection.h>
-#include <kis_brush_based_paintop_settings.h>
-
-
-// Both limits defined to be 15 units away from the min (0) or max (255) to allow actual mixing of colors
-const quint8 MIXABLE_UPPER_LIMIT = 240;
-const quint8 MIXABLE_LOWER_LIMIT = 15;
-
-// All pieces of color extracted from the canvas will be centered around ANCHOR_POINT
-const QPoint ANCHOR_POINT = QPoint(0, 0);
-
-
-KisSmudgeOp::KisSmudgeOp(const KisBrushBasedPaintOpSettings *settings, KisPainter *painter, KisImageWSP image)
-        : KisBrushBasedPaintOp(settings, painter)
-        , m_firstRun(true)
-        , m_tempDev(0)
-{
-    Q_UNUSED(image);
-    Q_ASSERT(settings);
-    Q_ASSERT(painter);
-    m_sizeOption.readOptionSetting(settings);
-    m_opacityOption.readOptionSetting(settings);
-    m_rateOption.readOptionSetting(settings);
-    m_sizeOption.sensor()->reset();
-    m_opacityOption.sensor()->reset();
-    m_rateOption.sensor()->reset();
-
-    m_tempDev = new KisPaintDevice(painter->device()->colorSpace());
-    
-    // Initializing to a valid value to avoid weird errors during modifications
-    m_wholeTempData = QRect(0, 0, 0, 0);
-    
-    m_color = painter->paintColor();
-}
-
-KisSmudgeOp::~KisSmudgeOp()
-{
-}
-
-/* To smudge, one does the following:
-
- 1.- First step: initialize a temporary paint device (m_tempDev) with a copy of the colors below the mouse pointer.
- All other times:
- 2.- Vanishing step: Reduce the transparency of the temporary paint device so as to let it mix gradually.
- 3.- Combine: Combine the temporary device with the piece the brush currently is 'painting', according to a ratio:
- in this case, opacity. (This is what in the first step does the copying of the data).
- 4.- Blit to screen: This combination is then composited upon the actual image.
- 5.- Special case: If the size of the dab (brush mask) changes during the stroke (for example, when
- using a stylus sensitive to pressure), align the colors extracted to the center of the previously absorbed colors,
- and in the vanishing step, ensure that all the colors have their opacity slowly reduced, not just the ones below
- the current brush mask.
- 
- For the sake of speed optimization, the extent of the largest area of color contained in the
- temporary device is cached such that only the colored areas are considered.
- TODO: Make this cached value dump colors that have faded nearly completely and lie outside of the rectangle (dab)
- of the current iteration.
-*/
-    
-double KisSmudgeOp::paintAt(const KisPaintInformation& info)
-{
-    KisBrushSP brush = m_brush;
-    
-    // Simple error catching
-    if (!painter()->device()) return 1.0;
-    if (!brush) return 1.0;
-    if (!brush->canPaintFor(info)) return 1.0;
-
-    // Grow the brush (this includes the mask) according to pressure or other parameters
-    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
-    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
-    setCurrentScale(scale);
-    
-    /* Align a point that represents the top-left corner of the brush-stroke-rendering
-    with the mouse pointer and take into account the brush mask size */
-    QPointF hotSpot = brush->hotSpot(scale, scale);
-    QPointF pt = info.pos() - hotSpot;
-
-    /* Split the coordinates into integer plus fractional parts. The integer
-    is where the dab will be positioned and the fractional part determines
-    the sub-pixel positioning. */
-    qint32 x, y;
-    double xFraction, yFraction;
-
-    splitCoordinate(pt.x(), &x, &xFraction);
-    splitCoordinate(pt.y(), &y, &yFraction);
-
-    KisFixedPaintDeviceSP maskDab = 0;
-
-    // Extract the brush mask (maskDab) from brush, and turn it into a transparency mask (alpha8).
-    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
-        // This is for bitmap brushes
-        maskDab = brush->paintDevice(painter()->device()->colorSpace(), scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-    } else {
-        // This is for parametric brushes, those created in the Autobrush popup config dialogue
-        maskDab = cachedDab();
-        brush->mask(maskDab, m_color, scale, scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-    }
-
-    // Convenient renaming for the limits of the maskDab
-    qint32 sw = maskDab->bounds().width();
-    qint32 sh = maskDab->bounds().height();
-    
-    /* Prepare the top left corner of the temporary paint device where the extracted color will be drawn */
-    QPoint extractionTopLeft = QPoint(ANCHOR_POINT.x() - sw / 2,
-                                      ANCHOR_POINT.y() - sh / 2);
-                                      
-    /* In the block below, the opacity of the colors stored in m_tempDev
-    is reduced in opacity. Nothing of the color present inside it is left out */
-    quint8 opacity = OPACITY_OPAQUE_U8;
-    if (!m_firstRun) {
-        opacity = m_rateOption.apply(opacity, info);
-        /* Without those limits, the smudge brush doesn't smudge anymore, it either makes a single
-        dropplet of color, or drags a frame indefinitely over the canvas. */
-        opacity = qBound(MIXABLE_LOWER_LIMIT, opacity, MIXABLE_UPPER_LIMIT);
-                
-        // Invert the opacity value for color absorption in the next lines (copyPainter)
-        opacity = OPACITY_OPAQUE_U8 - opacity;
-        m_wholeTempData |= QRect(extractionTopLeft, maskDab->bounds().size());
-    }
-    else {
-        m_firstRun = false;
-        m_wholeTempData = QRect(extractionTopLeft, maskDab->bounds().size());
-    }
-    /* copyPainter will extract the piece of color (image) to be duplicated to generate the smudge effect,
-    it extracts a simple unmasked rectangle and adds it to what was extracted before in this same block of code,
-    this sometimes shows artifacts when the brush is used with stylus and high spacing */
-    KisPainter copyPainter(m_tempDev);
-    copyPainter.setCompositeOp(COMPOSITE_COPY);
-    copyPainter.setOpacity(opacity);
-    copyPainter.bitBlt(m_wholeTempData.x(), m_wholeTempData.y(), painter()->device(),
-                       x - m_wholeTempData.x() + extractionTopLeft.x(),
-                       y - m_wholeTempData.y() + extractionTopLeft.y(),
-                       m_wholeTempData.width(), m_wholeTempData.height());
-    copyPainter.end();
-    
-    // This is the line that renders the extracted colors to the screen, with maskDab giving it the brush shape
-    painter()->bitBltWithFixedSelection(x, y, m_tempDev, maskDab, 0, 0, extractionTopLeft.x(), extractionTopLeft.y(), sw, sh);
-    
-    return spacing(scale);
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/deform/kis_deform_paintop.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/deform/kis_deform_paintop.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/deform/kis_deform_paintop.cpp	2011-02-17 12:13:46.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/deform/kis_deform_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,160 +0,0 @@
-/*
- *  Copyright (c) 2008-2010 Lukáš Tvrdý <lukast.dev@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_deform_paintop.h"
-#include "kis_deform_paintop_settings.h"
-
-#include <cmath>
-
-#include <QRect>
-
-#include <kis_image.h>
-#include <kis_debug.h>
-
-#include "kis_global.h"
-#include "kis_paint_device.h"
-#include "kis_painter.h"
-#include "kis_types.h"
-#include "kis_paintop.h"
-#include "kis_selection.h"
-#include "kis_random_accessor.h"
-
-#include <kis_fixed_paint_device.h>
-
-#include "kis_deform_option.h"
-#include "kis_brush_size_option.h"
-#include <KoColorSpaceRegistry.h>
-#include <KoCompositeOp.h>
-
-KisDeformPaintOp::KisDeformPaintOp(const KisDeformPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
-        : KisPaintOp(painter)
-{
-    Q_UNUSED(image);
-    Q_ASSERT(settings);
-
-    m_sizeProperties.readOptionSetting(settings);
-
-    // sensors
-    m_sizeOption.readOptionSetting(settings);
-    m_opacityOption.readOptionSetting(settings);
-    m_rotationOption.readOptionSetting(settings);
-    m_sizeOption.sensor()->reset();
-    m_opacityOption.sensor()->reset();
-    m_rotationOption.sensor()->reset();
-
-    m_properties.action = settings->getInt(DEFORM_ACTION);
-    m_properties.deformAmount = settings->getDouble(DEFORM_AMOUNT);
-    m_properties.useBilinear = settings->getBool(DEFORM_USE_BILINEAR);
-    m_properties.useCounter = settings->getBool(DEFORM_USE_COUNTER);
-    m_properties.useOldData = settings->getBool(DEFORM_USE_OLD_DATA);
-
-    m_deformBrush.setProperties( &m_properties );
-    m_deformBrush.setSizeProperties( &m_sizeProperties );
-
-    m_deformBrush.initDeformAction();
-
-    m_dev = source();
-    
-    if ((m_sizeProperties.diameter * 0.5) > 1) {
-        m_ySpacing = m_xSpacing = m_sizeProperties.diameter * 0.5 * m_sizeProperties.spacing;
-    } else {
-        m_ySpacing = m_xSpacing = 1.0;
-    }
-    m_spacing = m_xSpacing;
-    
-    
-    
-}
-
-KisDeformPaintOp::~KisDeformPaintOp()
-{
-}
-
-qreal KisDeformPaintOp::paintAt(const KisPaintInformation& info)
-{
-    if (!painter()) return m_spacing;
-    if (!m_dev) return m_spacing;
-
-#if 1
-        KisFixedPaintDeviceSP dab = cachedDab(painter()->device()->colorSpace());
-
-        qint32 x;
-        double subPixelX;
-        qint32 y;
-        double subPixelY;
-
-        QPointF pt = info.pos();
-        if (m_sizeProperties.jitterEnabled){
-                pt.setX(pt.x() + (  ( m_sizeProperties.diameter * drand48() ) - m_sizeProperties.diameter * 0.5) * m_sizeProperties.jitterMovementAmount);
-                pt.setY(pt.y() + (  ( m_sizeProperties.diameter * drand48() ) - m_sizeProperties.diameter * 0.5) * m_sizeProperties.jitterMovementAmount);
-        }
-
-        qreal rotation = m_rotationOption.apply(info);
-        qreal scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
-        
-        setCurrentRotation(rotation);
-        setCurrentScale(scale);
-        
-        rotation += m_sizeProperties.rotation;
-        scale *= m_sizeProperties.scale;
-
-        QPointF pos = pt - m_deformBrush.hotSpot(scale,rotation);
-
-        splitCoordinate(pos.x(), &x, &subPixelX);
-        splitCoordinate(pos.y(), &y, &subPixelY);
-
-        KisFixedPaintDeviceSP mask = m_deformBrush.paintMask(dab, m_dev, 
-                                                             scale,rotation,
-                                                             info.pos(), 
-                                                             subPixelX,subPixelY,
-                                                             x,y
-                                                             );
-
-        // this happens for the first dab of the move mode, we need more information for being able to move 
-        if (!mask){
-            return m_spacing;
-        }
-
-        quint8 origOpacity = m_opacityOption.apply(painter(), info);
-        painter()->bltFixedWithFixedSelection(x,y, dab, mask, mask->bounds().width() ,mask->bounds().height() );
-        painter()->setOpacity(origOpacity);
-        
-        return m_spacing;
-#else
-        if (!m_dab) {
-            m_dab = new KisPaintDevice(painter()->device()->colorSpace());
-        } else {
-            m_dab->clear();
-        }
-
-        m_deformBrush.oldDeform(m_dab,m_dev,info.pos());
-        QRect rc = m_dab->extent();
-        painter()->bitBlt(rc.x(), rc.y(), m_dab, rc.x(), rc.y(), rc.width(), rc.height());
-        return m_spacing;
-#endif
-
-}
-
-
-double KisDeformPaintOp::spacing(double /*pressure*/) const
-{
-    return m_spacing;
-}
-
-
-
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	2011-02-17 12:13:41.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,221 +0,0 @@
-/*
- *  Copyright (c) 2008,2009 Lukáš Tvrdý <lukast.dev@gmail.com>
- *  Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_hatching_paintop.h"
-#include "kis_hatching_paintop_settings.h"
-
-#include <cmath>
-#include <QRect>
-
-#include <KoColor.h>
-#include <KoColorSpace.h>
-
-#include <kis_image.h>
-#include <kis_debug.h>
-
-#include <kis_global.h>
-#include <kis_paint_device.h>
-#include <kis_painter.h>
-#include <kis_types.h>
-#include <kis_paintop.h>
-#include <kis_brush_based_paintop.h>
-#include <kis_paint_information.h>
-
-#include <kis_pressure_opacity_option.h>
-
-#include <KoColorSpaceRegistry.h>
-
-KisHatchingPaintOp::KisHatchingPaintOp(const KisHatchingPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
-                   : KisBrushBasedPaintOp(settings, painter)
-                   , m_image(image)
-{
-    m_settings = new KisHatchingPaintOpSettings();
-    settings->initializeTwin(m_settings);
-
-    m_hatchingBrush = new HatchingBrush(m_settings);
-
-    m_crosshatchingOption.readOptionSetting(settings);
-    m_separationOption.readOptionSetting(settings);
-    m_thicknessOption.readOptionSetting(settings);
-    m_opacityOption.readOptionSetting(settings);
-    m_sizeOption.readOptionSetting(settings);
-    m_crosshatchingOption.sensor()->reset();
-    m_separationOption.sensor()->reset();
-    m_thicknessOption.sensor()->reset();
-    m_opacityOption.sensor()->reset();
-    m_sizeOption.sensor()->reset();
-}
-
-KisHatchingPaintOp::~KisHatchingPaintOp()
-{
-    delete m_hatchingBrush;
-}
-
-double KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
-{
-    //------START SIMPLE ERROR CATCHING-------
-    if (!painter()->device()) return 1;
-    if (!m_hatchedDab)
-        m_hatchedDab = new KisPaintDevice(painter()->device()->colorSpace());
-    else
-        m_hatchedDab->clear();
-
-    //Simple convenience renaming, I'm thinking of removing these inherited quirks
-    KisBrushSP brush = m_brush;
-    KisPaintDeviceSP device = painter()->device();
-
-    //Macro to catch errors
-    Q_ASSERT(brush);
-
-    //----------SIMPLE error catching code, maybe it's not even needed------
-    if (!brush) return 1;
-    if (!brush->canPaintFor(info)) return 1;
-
-    //SENSOR-depending settings
-    m_settings->crosshatchingsensorvalue = m_crosshatchingOption.apply(info);
-    m_settings->separationsensorvalue = m_separationOption.apply(info);
-    m_settings->thicknesssensorvalue = KisPaintOp::scaleForPressure(m_thicknessOption.apply(info));
-
-    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
-    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
-
-    setCurrentScale(scale);
-
-    quint8 origOpacity = m_opacityOption.apply(painter(), info);
-
-    //-----------POSITIONING code----------
-    QPointF hotSpot = brush->hotSpot(scale, scale);
-    QPointF pt = info.pos() - hotSpot;
-
-    qint32 x, y;
-    double xFraction, yFraction;
-
-    splitCoordinate(pt.x(), &x, &xFraction);
-    splitCoordinate(pt.y(), &y, &yFraction);
-
-    if (!m_settings->subpixelprecision) {
-        xFraction = 0;
-        yFraction = 0;
-    }
-    //--------END POSITIONING CODE-----------
-
-    //DECLARING EMPTY pixel-only paint device, note that it is a smart pointer
-    KisFixedPaintDeviceSP maskDab = 0;
-    
-    /*--------copypasted from SmudgeOp-------
-    ---This IF-ELSE block is used to turn the mask created in the BrushTip dialogue
-    into a beautiful SELECTION MASK (it's an opacity multiplier), intended to give
-    the brush a "brush feel" (soft borders, round shape) despite it comes from a
-    simple, ugly, hatched rectangle.*/
-    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
-        maskDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-    } else {
-        maskDab = cachedDab();
-        KoColor color = painter()->paintColor();
-        color.convertTo(maskDab->colorSpace());
-        brush->mask(maskDab, color, scale, scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-    }
-
-    /*-----Convenient renaming for the limits of the maskDab, this will be used
-    to hatch a dab of just the right size------*/
-    qint32 sw = maskDab->bounds().width();
-    qint32 sh = maskDab->bounds().height();
-
-    //------This If_block pre-fills the future m_hatchedDab with a pretty backgroundColor
-    if (m_settings->opaquebackground) {
-        KoColor aersh = painter()->backgroundColor();
-        m_hatchedDab->fill(0, 0, (sw-1), (sh-1), aersh.data()); //this plus yellow background = french fry brush
-    }
-
-    // Trick for moire pattern to look better
-    bool donotbasehatch = false;
-
-    /* If block describing how to stack hatching passes to generate
-    crosshatching according to user specifications */
-    if (m_settings->enabledcurvecrosshatching) {
-        if (m_settings->perpendicular) {
-            if (m_settings->crosshatchingsensorvalue > 0.5)
-                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(90), painter()->paintColor());
-        }
-        else if (m_settings->minusthenplus) {
-            if (m_settings->crosshatchingsensorvalue > 0.33)
-                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
-            if (m_settings->crosshatchingsensorvalue > 0.67)
-                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
-        }
-        else if (m_settings->plusthenminus) {
-            if (m_settings->crosshatchingsensorvalue > 0.33)
-                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
-            if (m_settings->crosshatchingsensorvalue > 0.67)
-                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
-        }
-        else if (m_settings->moirepattern) {
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle((m_settings->crosshatchingsensorvalue)*180), painter()->paintColor());
-            donotbasehatch = true;
-        }
-    }
-    else {
-        if (m_settings->perpendicular) {
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(90), painter()->paintColor());
-        }
-        else if (m_settings->minusthenplus) {
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
-        }
-        else if (m_settings->plusthenminus) {
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
-        }
-        else if (m_settings->moirepattern) {
-            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-10), painter()->paintColor());
-        }
-    }
-
-    if (!donotbasehatch)
-        m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, m_settings->angle, painter()->paintColor());
-
-    // The most important line, the one that paints to the screen.
-    painter()->bitBltWithFixedSelection(x, y, m_hatchedDab, maskDab, sw, sh);
-    painter()->setOpacity(origOpacity);
-    
-    /*-----It took me very long to realize the importance of this line, this is
-    the line that makes all brushes be slow, even if they're small, yay!-------*/
-    return spacing(scale);
-}
-
-double KisHatchingPaintOp::spinAngle(double spin)
-{
-    double tempangle = m_settings->angle + spin;
-    qint8 factor = 1;
-
-    if (tempangle < 0)
-        factor = -1;
-
-    tempangle = fabs(fmod(tempangle, 180));
-
-    if ((tempangle >= 0) && (tempangle <= 90))
-        return factor * tempangle;
-    else if ((tempangle > 90) && (tempangle <= 180))
-        return factor * -(180 - tempangle);
-
-    return 0;   // this should never be executed except if NAN
-}
-;
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.h 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.h
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.h	2011-02-17 12:13:41.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/hatching/kis_hatching_paintop.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,104 +0,0 @@
-/*
- *  Copyright (c) 2008 Boudewijn Rempt <boud@valdyas.org>
- *  Copyright (c) 2008, 2009 Lukáš Tvrdý <lukast.dev@gmail.com>
- *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIS_HATCHING_PAINTOP_H_
-#define KIS_HATCHING_PAINTOP_H_
-
-#include <kis_paintop.h>
-#include <kis_brush_based_paintop.h>
-#include <kis_types.h>
-
-#include "hatching_brush.h"
-#include "kis_hatching_paintop_settings.h"
-
-#include <kis_hatching_pressure_crosshatching_option.h>
-#include <kis_hatching_pressure_separation_option.h>
-#include <kis_hatching_pressure_thickness_option.h>
-
-#include <kis_pressure_opacity_option.h>
-#include <kis_pressure_size_option.h>
-
-
-class KisPainter;
-
-class KisHatchingPaintOp : public KisBrushBasedPaintOp
-{
-
-public:
-
-    KisHatchingPaintOp(const KisHatchingPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-    virtual ~KisHatchingPaintOp();
-
-    /**
-     *  Paint a hatched dab around the mouse cursor according to
-     *  sensor settings and user preferences.
-     */
-    double paintAt(const KisPaintInformation& info);
-    
-    /**
-     *  Returns a number between -90 and 90, and corresponds to the
-     *  angle that results from adding angle 'spin' to 'm_settings->angle',
-     *  corrected to coincide with the way the GUI operates.
-     */
-    double spinAngle(double spin);
-
-private:
-    KisHatchingPaintOpSettings* m_settings;
-    KisImageWSP m_image;
-    HatchingBrush * m_hatchingBrush;
-    
-    /**
-     *  PaintDevice that will be filled with a single pass of
-     *  hatching by HatchingBrush::hatch
-     */
-    KisPaintDeviceSP m_hatchedDab;
-    
-    /**
-     *  Curve to control the intensity of crosshatching 
-     *  according to user preferences set in the GUI
-     */
-    KisHatchingPressureCrosshatchingOption m_crosshatchingOption;
-    
-    /**
-     *  Curve to control the dynamics of separation with
-     *  device input
-     */
-    KisHatchingPressureSeparationOption m_separationOption;
-    
-    /**
-     *  Curve to control the thickness of the hatching lines
-     *  with device input
-     */
-    KisHatchingPressureThicknessOption m_thicknessOption;
-    
-    /**
-     *  Curve to control the opacity of the entire dab
-     *  with device input
-     */
-    KisPressureOpacityOption m_opacityOption;
-    
-    /**
-     *  Curve to control the size of the entire dab
-     *  with device input
-     */
-    KisPressureSizeOption m_sizeOption;
-};
-
-#endif // KIS_HATCHING_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	2011-02-17 12:13:40.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,271 +0,0 @@
-/*
- *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
- *  Copyright (c) 2010 Ricardo Cabello <hello@mrdoob.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_sketch_paintop.h"
-#include "kis_sketch_paintop_settings.h"
-
-#include <cmath>
-#include <QRect>
-
-#include <KoColor.h>
-#include <KoColorSpace.h>
-
-#include <kis_image.h>
-#include <kis_debug.h>
-
-#include <kis_global.h>
-#include <kis_paint_device.h>
-#include <kis_painter.h>
-#include <kis_types.h>
-#include <kis_paintop.h>
-#include <kis_paint_information.h>
-
-#include <kis_pressure_opacity_option.h>
-
-/*
-* Based on Harmony project http://github.com/mrdoob/harmony/
-*/
-// chrome : diff 0.2, sketchy : 0.3, fur: 0.5
-// fur : distance / thresholdDistance
-
-// shaded: opacity per line :/
-// ((1 - (d / 1000)) * 0.1 * BRUSH_PRESSURE), offset == 0
-// chrome: color per line :/
-//this.context.strokeStyle = "rgba(" + Math.floor(Math.random() * COLOR[0]) + ", " + Math.floor(Math.random() * COLOR[1]) + ", " + Math.floor(Math.random() * COLOR[2]) + ", " + 0.1 * BRUSH_PRESSURE + " )";
-
-// long fur
-// from: count + offset * -random
-// to: i point - (offset * -random)  + random * 2
-// probability distance / thresholdDistnace
-
-// shaded: probabity : paint always - 0.0 density
-
-KisSketchPaintOp::KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
-        : KisPaintOp(painter)
-{
-    Q_UNUSED(image);
-    m_opacityOption.readOptionSetting(settings);
-    m_sizeOption.readOptionSetting(settings);
-    m_rotationOption.readOptionSetting(settings);
-    m_sketchProperties.readOptionSetting(settings);
-    m_brushOption.readOptionSetting(settings);
-
-    m_brush = m_brushOption.brush();
-    
-    m_opacityOption.sensor()->reset();
-    m_sizeOption.sensor()->reset();
-    m_rotationOption.sensor()->reset();
-
-    m_painter = 0;
-    m_count = 0;
-}
-
-KisSketchPaintOp::~KisSketchPaintOp()
-{
-    delete m_painter;
-}
-
-void KisSketchPaintOp::drawConnection(const QPointF& start, const QPointF& end)
-{
-    if (m_sketchProperties.lineWidth == 1){
-        m_painter->drawThickLine(start, end, m_sketchProperties.lineWidth,m_sketchProperties.lineWidth);
-    }else{
-        m_painter->drawLine(start, end, m_sketchProperties.lineWidth, true);
-    }
-   
-}
-
-void KisSketchPaintOp::updateBrushMask(const KisPaintInformation& info, qreal scale, qreal rotation){
-    m_maskDab = cachedDab(m_dab->colorSpace());
-    
-    if (m_brush->brushType() == IMAGE || m_brush->brushType() == PIPE_IMAGE) {
-        m_maskDab = m_brush->paintDevice(m_dab->colorSpace(), scale, rotation, info, 0.0, 0.0);
-    } else {
-        KoColor color = painter()->paintColor();
-        color.convertTo(m_maskDab->colorSpace());
-        m_brush->mask(m_maskDab, color, scale, scale, rotation, info, 0.0, 0.0);
-    }
-
-    // update bounding box
-    m_brushBoundingBox = m_maskDab->bounds();
-    m_hotSpot = m_brush->hotSpot(scale,scale,rotation);
-    m_brushBoundingBox.translate(info.pos() - m_hotSpot);
-}
-
-KisDistanceInformation KisSketchPaintOp::paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist)
-{
-    Q_UNUSED(savedDist);
-    if (!painter()) return KisDistanceInformation();
-
-    if (!m_dab) {
-        m_dab = new KisPaintDevice(painter()->device()->colorSpace());
-        m_painter = new KisPainter(m_dab);
-    } else {
-        m_dab->clear();
-    }
-
-    QPointF prevMouse = pi1.pos();
-    QPointF mousePosition = pi2.pos();
-    m_points.append(mousePosition);
-
-
-    // shaded: does not draw this line, chrome does, fur does
-    if (m_sketchProperties.makeConnection){
-        drawConnection(prevMouse,mousePosition);
-    }
-
-    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(pi2));
-    double rotation = m_rotationOption.apply(pi2);
-    
-    setCurrentScale(scale);
-    setCurrentRotation(rotation);
-    
-    qreal thresholdDistance;
-    
-    // update the mask for simple mode only once
-    // determine the radius
-    if (m_count == 0 && m_sketchProperties.simpleMode){
-        updateBrushMask(pi2,1.0,0.0);
-        //m_radius = qMax(m_maskDab->bounds().width(),m_maskDab->bounds().height()) * 0.5;
-        m_radius = 0.5 * qMax(m_brush->width(), m_brush->height());
-    }
-    
-    if (!m_sketchProperties.simpleMode){
-        updateBrushMask(pi2,scale,rotation);
-        m_radius = qMax(m_maskDab->bounds().width(),m_maskDab->bounds().height()) * 0.5;
-        thresholdDistance = pow(m_radius,2);
-    }
-
-    if (m_sketchProperties.simpleMode){
-        // update the radius according scale in simple mode
-        thresholdDistance = pow(m_radius * scale,2);
-    }    
-
-    // determine density
-    qreal density = thresholdDistance * m_sketchProperties.probability;
-    
-    // probability behaviour
-    // TODO: make this option
-    qreal probability = 1.0 - m_sketchProperties.probability;
-
-    QColor painterColor = painter()->paintColor().toQColor();
-    QColor randomColor;
-    KoColor color(m_dab->colorSpace());
-    
-    int w = m_maskDab->bounds().width();
-    quint8 opacityU8 = 0;
-    quint8 * pixel;
-    qreal distance;
-    QPoint  positionInMask;
-    QPointF diff;
-
-    m_painter->setPaintColor( painter()->paintColor() );
-    int size = m_points.size();
-    // MAIN LOOP
-    for (int i = 0; i < size; i++) {
-        diff = m_points.at(i) - mousePosition;
-        distance = diff.x() * diff.x() + diff.y() * diff.y();
-        
-        // circle test
-        bool makeConnection = false;
-        if (m_sketchProperties.simpleMode){
-            if (distance < thresholdDistance){
-                makeConnection = true;
-            }
-        // mask test
-        }else{
-            
-            if ( m_brushBoundingBox.contains( m_points.at(i) ) ){
-                positionInMask = (diff + m_hotSpot).toPoint();
-                pixel = m_maskDab->data() + ((positionInMask.y() * w + positionInMask.x()) * m_maskDab->pixelSize());
-                opacityU8 = m_maskDab->colorSpace()->opacityU8( pixel );
-                if (opacityU8 != 0){
-                    makeConnection = true;
-                }
-            }
-            
-        }
-        
-        if (!makeConnection){
-            // check next point
-            continue;
-        }
-
-        if (m_sketchProperties.distanceDensity){
-            probability =  distance / density;
-        }
-
-        // density check
-        if (drand48() >= probability) {
-            QPointF offsetPt = diff * m_sketchProperties.offset;
-            
-            if (m_sketchProperties.randomRGB){
-                // some color transformation per line goes here
-                randomColor.setRgbF(drand48() * painterColor.redF(),
-                                    drand48() * painterColor.greenF(),
-                                    drand48() * painterColor.blueF()
-                                    );
-                color.fromQColor(randomColor);
-                m_painter->setPaintColor(color);
-            }
-            
-            // distance based opacity
-            quint8 opacity = OPACITY_OPAQUE_U8;
-            if (m_sketchProperties.distanceOpacity){ 
-                opacity *= qRound((1.0 - (distance / thresholdDistance)));
-            }
-            
-            if (m_sketchProperties.randomOpacity){
-                opacity *= drand48();
-            }
-            
-            m_painter->setOpacity(opacity);
-            
-            if (m_sketchProperties.magnetify) {
-                drawConnection(mousePosition + offsetPt, m_points.at(i) - offsetPt);
-            }else{
-                drawConnection(mousePosition + offsetPt, mousePosition - offsetPt);
-            }
-
-            
-            
-        }
-    }// end of MAIN LOOP
-
-    m_count++;
-
-    QRect rc = m_dab->extent();
-    quint8 origOpacity = m_opacityOption.apply(painter(), pi2);
-
-    painter()->bitBlt(rc.x(), rc.y(), m_dab, rc.x(), rc.y(), rc.width(), rc.height());
-    painter()->setOpacity(origOpacity);
-
-    KisVector2D end = toKisVector2D(pi2.pos());
-    KisVector2D start = toKisVector2D(pi1.pos());
-    KisVector2D dragVec = end - start;
-
-    return KisDistanceInformation(0, dragVec.norm());
-}
-
-
-
-double KisSketchPaintOp::paintAt(const KisPaintInformation& info)
-{
-    return paintLine(info, info).spacing;
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.h 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.h
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.h	2011-02-17 12:13:40.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/sketch/kis_sketch_paintop.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,73 +0,0 @@
-/*
- *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIS_SKETCH_PAINTOP_H_
-#define KIS_SKETCH_PAINTOP_H_
-
-#include <kis_paintop.h>
-#include <kis_types.h>
-
-#include "kis_sketchop_option.h"
-#include "kis_sketch_paintop_settings.h"
-
-#include "kis_painter.h"
-#include <kis_pressure_size_option.h>
-#include <kis_brush_option.h>
-#include <kis_pressure_rotation_option.h>
-
-class KisSketchPaintOp : public KisPaintOp
-{
-
-public:
-
-    KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-    virtual ~KisSketchPaintOp();
-    virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
-    double paintAt(const KisPaintInformation& info);
-
-private:
-    // pixel buffer
-    KisPaintDeviceSP m_dab;
-    
-    // mask detection area
-    KisFixedPaintDeviceSP m_maskDab;
-    QRectF m_brushBoundingBox;
-    QPointF m_hotSpot;
-
-    // simple mode
-    qreal m_radius;
-    
-    KisPressureOpacityOption m_opacityOption;
-    KisPressureSizeOption m_sizeOption;
-    KisPressureRotationOption m_rotationOption;
-    
-    KisBrushOption m_brushOption;
-    SketchProperties m_sketchProperties;
-    
-    QVector<QPointF> m_points;
-    int m_count;
-    KisPainter * m_painter;
-    KisBrushSP m_brush;
-
-private:
-    void drawConnection(const QPointF &start, const QPointF &end);
-    void updateBrushMask(const KisPaintInformation& info, qreal scale, qreal rotation);
-
-};
-
-#endif // KIS_SKETCH_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/spray/spray_brush.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/spray/spray_brush.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/spray/spray_brush.cpp	2011-02-17 12:13:42.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/spray/spray_brush.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,554 +0,0 @@
-/*
- *  Copyright (c) 2008-2010 Lukáš Tvrdý <lukast.dev@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "spray_brush.h"
-
-#include <KoColor.h>
-#include <KoColorSpace.h>
-#include <KoColorTransformation.h>
-#include <KoColorSpaceRegistry.h>
-#include <KoCompositeOp.h>
-
-#include "kis_paintop.h"
-
-#include <QVariant>
-#include <QHash>
-#include <QTransform>
-#include <QImage>
-#include <QTransform>
-
-#include <kis_random_accessor.h>
-#include <kis_random_sub_accessor.h>
-
-#include <kis_paint_device.h>
-
-#include <kis_painter.h>
-#include <kis_paint_information.h>
-
-#include "kis_spray_paintop_settings.h"
-
-#include <cmath>
-#include <ctime>
-
-#include "random_gauss.h"
-
-SprayBrush::SprayBrush()
-{
-    srand48(time(0));
-    m_painter = 0;
-    m_transfo = 0;
-    m_rand = new RandomGauss(time(0));
-}
-
-SprayBrush::~SprayBrush()
-{
-    delete m_painter;
-    delete m_transfo;
-    delete m_rand;
-}
-
-
-qreal SprayBrush::rotationAngle()
-{
-    qreal rotation = 0.0;
-
-    if ( m_shapeDynamicsProperties->fixedRotation ){
-        rotation = deg2rad( m_shapeDynamicsProperties->fixedAngle );
-    }
-
-    if ( m_shapeDynamicsProperties->randomRotation ){
-
-        if ( m_properties->gaussian ) {
-                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
-        } else {
-                rotation = linearInterpolation(rotation, M_PI * 2.0 * drand48(), m_shapeDynamicsProperties->randomRotationWeight );
-        }
-    }
-
-    return rotation;
-}
-
-
-
-void SprayBrush::paint(KisPaintDeviceSP dab, KisPaintDeviceSP source,
-                       const KisPaintInformation& info,qreal rotation, qreal scale,
-                       const KoColor &color, const KoColor &bgColor)
-{
-    // initializing painter
-
-    if (!m_painter) {
-        m_painter = new KisPainter(dab);
-        m_painter->setFillStyle(KisPainter::FillStyleForegroundColor);
-        m_painter->setMaskImageSize(m_shapeProperties->width, m_shapeProperties->height );
-        m_pixelSize = dab->colorSpace()->pixelSize();
-        if (m_colorProperties->useRandomHSV){
-            m_transfo = dab->colorSpace()->createColorTransformation("hsv_adjustment", QHash<QString, QVariant>());
-        }
-        
-        m_brushQImage = m_shapeProperties->image;
-        if (!m_brushQImage.isNull()){
-            m_brushQImage = m_brushQImage.scaled(m_shapeProperties->width, m_shapeProperties->height);
-        }
-        m_imageDevice = new KisPaintDevice( dab->colorSpace() );
-    }
-
-
-    qreal x = info.pos().x();
-    qreal y = info.pos().y();
-    KisRandomAccessor accessor = dab->createRandomAccessor(qRound(x), qRound(y));
-    KisRandomSubAccessorPixel subAcc = source->createRandomSubAccessor();
-
-    m_inkColor = color;
-
-    // apply size sensor
-    m_radius = m_properties->radius * scale;
-
-    // jitter movement
-    if ( m_properties->jitterMovement ) {
-        x = x + ((2 * m_radius * drand48()) - m_radius) * m_properties->amount;
-        y = y + ((2 * m_radius * drand48()) - m_radius) * m_properties->amount;
-    }
-
-    // this is wrong for every shape except pixel and anti-aliased pixel
-
-
-    if (m_properties->useDensity) {
-        m_particlesCount = (m_properties->coverage * (M_PI * m_radius * m_radius));
-    }else{
-        m_particlesCount = m_properties->particleCount;
-    }
-
-    QHash<QString, QVariant> params;
-    qreal nx, ny;
-    int ix, iy;
-
-    qreal angle;
-    qreal length;
-    qreal rotationZ = 0.0;
-    qreal particleScale = 1.0;
-
-    int steps = 118;
-    bool shouldColor = true;
-    if (m_colorProperties->fillBackground){
-        m_painter->setPaintColor(bgColor);
-        paintCircle(m_painter,x,y,m_radius,steps);
-    }
-
-    QTransform m;
-    m.reset();
-    m.rotateRadians(-rotation + deg2rad(m_properties->brushRotation) );
-    m.scale( m_properties->scale, m_properties->scale);
-    
-    for (quint32 i = 0; i < m_particlesCount; i++){
-        // generate random angle
-        angle = drand48() * M_PI * 2;
-
-        // generate random length
-        if ( m_properties->gaussian ) {
-            length = qBound<qreal>(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0);
-        } else {
-            length = drand48();
-        }
-
-        if (m_shapeDynamicsProperties->enabled){
-            // rotation
-            rotationZ = rotationAngle();
-
-            if (m_shapeDynamicsProperties->followCursor){
-                
-                rotationZ = linearInterpolation( rotationZ,angle,m_shapeDynamicsProperties->followCursorWeigth );
-            }
-
-            
-            if (m_shapeDynamicsProperties->followDrawingAngle){
-                
-                rotationZ = linearInterpolation( rotationZ,info.angle(),m_shapeDynamicsProperties->followDrawingAngleWeight );
-            }
-
-            // random size - scale
-            if (m_shapeDynamicsProperties->randomSize){
-                particleScale = drand48();
-            }
-        }
-        // generate polar coordinate
-        nx = (m_radius * cos(angle)  * length);
-        ny = (m_radius * sin(angle)  * length);
-
-        // compute the height of the ellipse
-        ny *= m_properties->aspect;
-
-        // transform
-        m.map(nx,ny, &nx,&ny);
-
-        // color transformation
-        
-        if (shouldColor){
-            if (m_colorProperties->sampleInputColor){
-                subAcc.moveTo(nx+x, ny+y);
-                subAcc.sampledRawData( m_inkColor.data() );
-            }else{
-                 //revert the color
-                 memcpy(m_inkColor.data(),color.data(), m_pixelSize);
-            }
-
-            // mix the color with background color
-            if (m_colorProperties->mixBgColor)
-            {
-                KoMixColorsOp * mixOp = source->colorSpace()->mixColorsOp();
-
-                const quint8 *colors[2];
-                colors[0] = m_inkColor.data();
-                colors[1] = bgColor.data();
-
-                qint16 colorWeights[2];
-                int MAX_16BIT = 255;
-                qreal blend = info.pressure();
-
-                colorWeights[0] = static_cast<quint16>( blend * MAX_16BIT);
-                colorWeights[1] = static_cast<quint16>( (1.0 - blend) * MAX_16BIT);
-                mixOp->mixColors(colors, colorWeights, 2, m_inkColor.data() );
-            }
-
-            if (m_colorProperties->useRandomHSV && m_transfo){
-                params["h"] = (m_colorProperties->hue / 180.0) * drand48();
-                params["s"] = (m_colorProperties->saturation / 100.0) * drand48();
-                params["v"] = (m_colorProperties->value / 100.0) * drand48();
-                m_transfo->setParameters(params);
-                m_transfo->transform(m_inkColor.data(), m_inkColor.data() , 1);
-            }
-
-            if (m_colorProperties->useRandomOpacity){
-                quint8 alpha = qRound(drand48() * OPACITY_OPAQUE_U8);
-                m_inkColor.setOpacity( alpha );
-                m_painter->setOpacity( alpha );
-            }
-
-            if ( !m_colorProperties->colorPerParticle ){
-                shouldColor = false;
-            }
-            m_painter->setPaintColor(m_inkColor);
-        }
-
-        qreal jitteredWidth = qMax(qreal(1.0),m_shapeProperties->width * particleScale);
-        qreal jitteredHeight = qMax(qreal(1.0),m_shapeProperties->height * particleScale);
-
-        if (m_shapeProperties->enabled){
-        switch (m_shapeProperties->shape){
-            // ellipse
-            case 0:
-            {
-                if (m_shapeProperties->width == m_shapeProperties->height){
-                    paintCircle(m_painter, nx + x, ny + y, qRound(jitteredWidth * 0.5) , steps);
-                }else
-                {
-                    paintEllipse(m_painter, nx + x, ny + y, qRound(jitteredWidth * 0.5) , qRound(jitteredHeight * 0.5), rotationZ , steps);
-                }
-                break;
-            }
-            // rectangle
-            case 1:
-            {
-                paintRectangle(m_painter, nx + x, ny + y, qRound(jitteredWidth) , qRound(jitteredHeight), rotationZ , steps);
-                break;
-            }
-            // wu-particle
-            case 2:
-            {
-                paintParticle(accessor, m_inkColor, nx + x, ny + y);
-                break;
-            }
-            // pixel
-            case 3:
-            {
-                ix = qRound(nx + x);
-                iy = qRound(ny + y);
-                accessor.moveTo(ix, iy);
-                memcpy(accessor.rawData(), m_inkColor.data(), m_pixelSize);
-                break;
-            }
-            case 4:
-            {
-                if ( !m_brushQImage.isNull() )
-                {
-
-                    QTransform m;
-                    m.rotate(rad2deg(rotationZ));
-
-                    if (m_shapeDynamicsProperties->randomSize){
-                        m.scale(particleScale,particleScale);
-                    }
-                    m_transformed = m_brushQImage.transformed(m, Qt::SmoothTransformation);
-                    m_imageDevice->convertFromQImage(m_transformed, "");
-                    KisRandomAccessor ac = m_imageDevice->createRandomAccessor(0,0);
-                    QRect rc = m_transformed.rect();
-
-                    if (m_colorProperties->useRandomHSV && m_transfo){
-
-                        for (int y = rc.y(); y< rc.y()+rc.height(); y++){
-                            for (int x = rc.x(); x < rc.x()+rc.width();x++){
-                                ac.moveTo(x,y);
-                                m_transfo->transform(ac.rawData(), ac.rawData() , 1);
-                            }
-                        }
-                    }
-
-                    ix = qRound(nx + x - rc.width() * 0.5);
-                    iy = qRound(ny + y - rc.height() * 0.5);
-                    m_painter->bitBlt(QPoint(ix,iy), m_imageDevice, rc);
-                    m_imageDevice->clear();
-                    break;
-                }
-            }
-        }
-        // Auto-brush
-        }else{
-            QPointF hotSpot = m_brush->hotSpot(particleScale, particleScale, -rotationZ);
-            QPointF pos(nx + x, ny + y);
-            QPointF pt = pos - hotSpot;
-
-            qint32 ix;
-            double xFraction;
-            qint32 iy;
-            double yFraction;
-
-            KisPaintOp::splitCoordinate(pt.x(), &ix, &xFraction);
-            KisPaintOp::splitCoordinate(pt.y(), &iy, &yFraction);
-
-            //KisFixedPaintDeviceSP dab;
-            if (m_brush->brushType() == IMAGE || 
-                m_brush->brushType() == PIPE_IMAGE) 
-            {
-                m_fixedDab = m_brush->paintDevice(m_fixedDab->colorSpace(), particleScale, -rotationZ, info, xFraction, yFraction);
-
-                if (m_colorProperties->useRandomHSV && m_transfo){
-                    quint8 * dabPointer = m_fixedDab->data();
-                    int pixelCount = m_fixedDab->bounds().width() * m_fixedDab->bounds().height();
-                    m_transfo->transform(dabPointer, dabPointer, pixelCount);
-                }
-                
-            } else {
-                m_brush->mask(m_fixedDab, m_inkColor, particleScale, particleScale, -rotationZ, info, xFraction, yFraction);
-            }
-            m_painter->bltFixed(QPoint(ix, iy), m_fixedDab, m_fixedDab->bounds());
-        }
-    }
-    // hidden code for outline detection
-    //m_inkColor.setOpacity(128);
-    //paintOutline(dev,m_inkColor,x, y, m_radius * 2);
-
-    // recover from jittering of color,
-    // m_inkColor.opacity is recovered with every paint
-}
-
-
-
-void SprayBrush::paintParticle(KisRandomAccessor &writeAccessor, const KoColor &color, qreal rx, qreal ry)
-{
-    // opacity top left, right, bottom left, right
-    KoColor pcolor(color);
-    //int opacity = pcolor.opacityU8();
-
-    int ipx = int (rx);
-    int ipy = int (ry);
-    qreal fx = rx - ipx;
-    qreal fy = ry - ipy;
-
-    qreal btl = (1 - fx) * (1 - fy);
-    qreal btr = (fx)  * (1 - fy);
-    qreal bbl = (1 - fx) * (fy);
-    qreal bbr = (fx)  * (fy);
-
-    // this version overwrite pixels, e.g. when it sprays two particle next
-    // to each other, the pixel with lower opacity can override other pixel.
-    // Maybe some kind of compositing using here would be cool
-
-    pcolor.setOpacity(btl);
-    writeAccessor.moveTo(ipx  , ipy);
-    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
-
-    pcolor.setOpacity(btr);
-    writeAccessor.moveTo(ipx + 1, ipy);
-    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
-
-    pcolor.setOpacity(bbl);
-    writeAccessor.moveTo(ipx, ipy + 1);
-    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
-
-    pcolor.setOpacity(bbr);
-    writeAccessor.moveTo(ipx + 1, ipy + 1);
-    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
-}
-
-void SprayBrush::paintCircle(KisPainter * painter, qreal x, qreal y, int radius, int steps)
-{
-    QPainterPath path;
-    // circle x, circle y
-    qreal cx, cy;
-
-    qreal length = 2.0 * M_PI;
-    qreal step = 1.0 / steps;
-    path.moveTo(radius + x, y);
-    for (int i = 1; i < steps; i++) {
-        cx = cos(i * step * length);
-        cy = sin(i * step * length);
-
-        cx *= radius;
-        cy *= radius;
-
-        cx += x;
-        cy += y;
-
-        path.lineTo(cx, cy);
-    }
-    path.closeSubpath();
-    painter->fillPainterPath(path);
-}
-
-
-
-void SprayBrush::paintEllipse(KisPainter* painter, qreal x, qreal y, int a, int b, qreal angle, int steps)
-{
-    QPainterPath path;
-    qreal beta = angle;
-    qreal sinbeta = sin(beta);
-    qreal cosbeta = cos(beta);
-
-    path.moveTo(x + a * cosbeta, y + a * sinbeta);
-    qreal step = 360.0 / steps;
-    for (int i = step; i < 360; i += step) {
-        qreal alpha = i * (M_PI / 180) ;
-        qreal sinalpha = sin(alpha);
-        qreal cosalpha = cos(alpha);
-
-        qreal X = x + (a * cosalpha * cosbeta - b * sinalpha * sinbeta);
-        qreal Y = y + (a * cosalpha * sinbeta + b * sinalpha * cosbeta);
-
-        path.lineTo(X, Y);
-    }
-    path.closeSubpath();
-    painter->fillPainterPath(path);
-}
-
-void SprayBrush::paintRectangle(KisPainter* painter, qreal x, qreal y, int width, int height, qreal angle, int steps)
-{
-    Q_UNUSED(steps);
-    QPainterPath path;
-    QTransform transform;
-
-    qreal halfWidth = width * 0.5;
-    qreal halfHeight = height * 0.5;
-    qreal tx, ty;
-
-
-    transform.reset();
-    transform.rotateRadians(angle);
-    // top left
-    transform.map(- halfWidth,  - halfHeight, &tx, &ty);
-    path.moveTo(QPointF(tx + x, ty + y));
-    // top right
-    transform.map(+ halfWidth,  - halfHeight, &tx, &ty);
-    path.lineTo(QPointF(tx + x, ty + y));
-    // bottom right
-    transform.map(+ halfWidth,  + halfHeight, &tx, &ty);
-    path.lineTo(QPointF(tx + x, ty + y));
-    // botom left
-    transform.map(- halfWidth,  + halfHeight, &tx, &ty);
-    path.lineTo(QPointF(tx + x, ty + y));
-    path.closeSubpath();
-    painter->fillPainterPath(path);
-}
-
-
-void SprayBrush::paintOutline(KisPaintDeviceSP dev , const KoColor &outlineColor, qreal posX, qreal posY, qreal radius)
-{
-    QList<QPointF> antiPixels;
-    KisRandomAccessor accessor = dev->createRandomAccessor(qRound(posX), qRound(posY));
-
-    for (int y = -radius + posY; y <= radius + posY; y++) {
-        for (int x = -radius + posX; x <= radius + posX; x++) {
-            accessor.moveTo(x, y);
-            qreal alpha = dev->colorSpace()->opacityU8(accessor.rawData());
-
-            if (alpha != 0) {
-                // top left
-                accessor.moveTo(x - 1, y - 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x - 1, y - 1));
-                    //continue;
-                }
-
-                // top
-                accessor.moveTo(x, y - 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x, y - 1));
-                    //continue;
-                }
-
-                // top right
-                accessor.moveTo(x + 1, y - 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x + 1, y - 1));
-                    //continue;
-                }
-
-                //left
-                accessor.moveTo(x - 1, y);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x - 1, y));
-                    //continue;
-                }
-
-                //right
-                accessor.moveTo(x + 1, y);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x + 1, y));
-                    //continue;
-                }
-
-                // bottom left
-                accessor.moveTo(x - 1, y + 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x - 1, y + 1));
-                    //continue;
-                }
-
-                // bottom
-                accessor.moveTo(x, y + 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x, y + 1));
-                    //continue;
-                }
-
-                // bottom right
-                accessor.moveTo(x + 1, y + 1);
-                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
-                    antiPixels.append(QPointF(x + 1, y + 1));
-                    //continue;
-                }
-            }
-
-        }
-    }
-
-    // anti-alias it
-    int size = antiPixels.size();
-    for (int i = 0; i < size; i++) {
-        accessor.moveTo(antiPixels[i].x(), antiPixels[i].y());
-        memcpy(accessor.rawData(), outlineColor.data(), dev->colorSpace()->pixelSize());
-    }
-}
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	2011-02-17 12:13:42.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,190 +0,0 @@
-/*
- *  Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_waterymix_paintop.h"
-#include "kis_waterymix_paintop_settings.h"
-
-#include <cmath>
-#include <QRect>
-
-#include <KoColor.h>
-#include <KoColorSpace.h>
-
-#include <kis_image.h>
-#include <kis_debug.h>
-
-#include <kis_global.h>
-#include <kis_paint_device.h>
-#include <kis_painter.h>
-#include <kis_types.h>
-#include <kis_paintop.h>
-#include <kis_brush_based_paintop.h>
-#include <kis_paint_information.h>
-
-#include <kis_pressure_opacity_option.h>
-
-#include <KoColorSpaceRegistry.h>
-#include <kis_selection.h>
-
-#include <kis_paintop_registry.h>
-
-#include <../../extensions/impasto/kis_rgbu8_height_color_space.h>
-#include <../../extensions/impasto/kis_rgbu8_height_color_space.cpp>
-#include <kis_group_layer.h>
-
-KisWateryMixPaintOp::KisWateryMixPaintOp(const KisWateryMixPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
-                   : KisBrushBasedPaintOp(settings, painter)
-                   , m_image(image)
-{
-    m_settings = new KisWateryMixPaintOpSettings();
-    //settings->initializeTwin(m_settings);
-
-    m_opacityOption.sensor()->reset();
-    m_sizeOption.sensor()->reset();
-    
-    hardcodedSettings.absortionrate = 0.2;
-    hardcodedSettings.humidity = 0;
-}
-
-KisWateryMixPaintOp::~KisWateryMixPaintOp()
-{
-}
-
-double KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
-{
-    //------START SIMPLE ERROR CATCHING-------
-    if (!painter()->device()) return 1;
-    
-    //Simple convenience renaming, I'm thinking of removing these inherited quirks
-    KisBrushSP brush = m_brush;
-    KisPaintDeviceSP device = painter()->device();
-
-    //Macro to catch errors
-    Q_ASSERT(brush);
-
-    //----------SIMPLE error catching code, maybe it's not even needed------
-    if (!brush) return 1;
-    if (!brush->canPaintFor(info)) return 1;
-
-    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
-    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
-
-    quint8 origOpacity = m_opacityOption.apply(painter(), info);
-
-    //-----------POSITIONING code----------
-    QPointF hotSpot = brush->hotSpot(scale, scale);
-    QPointF pt = info.pos() - hotSpot;
-
-    qint32 x, y;
-    double xFraction, yFraction;
-
-    splitCoordinate(pt.x(), &x, &xFraction);
-    splitCoordinate(pt.y(), &y, &yFraction);
-
-    //--------END POSITIONING CODE-----------
-
-    //DECLARING EMPTY pixel-only paint device, note that it is a smart pointer
-    KisFixedPaintDeviceSP maskDab = 0;
-    KisFixedPaintDeviceSP paintDab = 0;
-    
-    /*--------copypasted from SmudgeOp-------
-    ---This IF-ELSE block is used to turn the mask created in the BrushTip dialogue
-    into a beautiful SELECTION MASK (it's an opacity multiplier), intended to give
-    the brush a "brush feel" (soft borders, round shape).*/
-    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
-        maskDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-        
-        paintDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
-    } else {
-        maskDab = cachedDab();
-        KoColor color = painter()->paintColor();
-        color.convertTo(maskDab->colorSpace());
-        brush->mask(maskDab, color, scale, scale, 0.0, info, xFraction, yFraction);
-        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
-        
-        paintDab = cachedDab();
-        brush->mask(paintDab, color, scale, scale, 0.0, info, xFraction, yFraction);
-    }
-
-    /*-----Convenient renaming for the limits of the maskDab, this will be used
-    to fill a dab of just the right size------*/
-    qint32 sw = maskDab->bounds().width();
-    qint32 sh = maskDab->bounds().height();
-    
-    /* ------- algorithm  ------ */
-    
-    /*
-    What this paintop ought to do (and currently doesn't):
-    --In the first pass, the brush is empty, devoid of color.
-    Its contents will be called dilutedDab.
-    --For each pass (including the first), do:
-    ----Take a sample of the image beneath the brush respecting
-    the transparency of the brush mask (this simulates paint
-    transfer from the canvas to the brush, the brush mask is
-    considered equivalent to the brush hairs in real life).
-    Call this sample the absorbedDab.
-    ----Blit dilutedDab on the canvas.
-    ----Mix (blit) absorbedDab into dilutedDab.
-    ----Dilute diluteDab by using an operation equivalent to a
-    blur filter whose blurring is either a fixed distance or a 
-    fraction of the dab size.
-    TODO: implement this algorithm in fast, non-crashy code.
-    Use HardcodedSettings on the meanwhile.
-    */
-    
-    // Absorb
-    /*
-    // This theorethically clones the subyacent area
-    KisPaintDeviceSP clone = new KisPaintDevice(painter()->device()->colorSpace());
-    KisPainter copyPainter(clone);
-    quint8 opacity = OPACITY_OPAQUE_U8;
-    //opacity *= hardcodedSettings.absortionrate;
-    copyPainter.setOpacity(opacity);
-    copyPainter.bitBlt(0, 0, device, pt.x(), pt.y(), sw, sh);
-    qDebug() << clone->exactBounds();
-    
-    // This theorethically mixes the stuff
-    KisPaintDeviceSP blotch = new KisPaintDevice(painter()->device()->colorSpace());
-    KisPainter maskPainter(blotch);
-    maskPainter.bltFixed(0, 0, paintDab, 0, 0, sw, sh);
-    maskPainter.bitBlt(0, 0, clone, 0, 0, sw, sh);
-    //maskPainter.bitBltFixedSelection(0, 0, clone, maskDab, 0, 0, sw, sh);
-    qDebug() << blotch->exactBounds();
-    */
-    // Dilute
-  
-    // Blit the results to the screen.blotch
-    painter()->bltFixed(x, y, paintDab, 0, 0, sw, sh);
-    //painter()->setOpacity(origOpacity);
-
-    /*-----It took me very long to realize the importance of this line, this is
-    the line that makes all brushes be slow, even if they're small, yay!-------*/
-    return spacing(scale);
-}
-
-/*
-void KisWateryMixPaintOp::absorb ()
-{
-}
-
-
-void KisWateryMixPaintOp::dilute ()
-{
-}
-*/
\ No newline at end of file
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	2011-02-17 12:13:42.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,86 +0,0 @@
-/*
- *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIS_WATERYMIX_PAINTOP_H_
-#define KIS_WATERYMIX_PAINTOP_H_
-
-#include <kis_paintop.h>
-#include <kis_brush_based_paintop.h>
-#include <kis_types.h>
-
-#include "kis_waterymix_paintop_settings.h"
-
-#include <kis_pressure_opacity_option.h>
-#include <kis_pressure_size_option.h>
-
-
-class KisPainter;
-
-struct HardcodedSettings
-{
-    qreal humidity;
-    
-    /** Fraction of the canvas color absorbed per pass
-    * The color retained from the old cached dab is equal to
-    * (1 - absorption).
-    */
-    qreal absortionrate;
-};
-
-class KisWateryMixPaintOp : public KisBrushBasedPaintOp
-{
-
-public:
-
-    KisWateryMixPaintOp(const KisWateryMixPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
-    virtual ~KisWateryMixPaintOp();
-
-    /**
-     *  Document me
-     */
-    double paintAt(const KisPaintInformation& info);
-
-    /*
-    /// Absorb the color beneath the brush
-    void absorb();
-    
-    /// Spread the absorbed color over the brush surface
-    void dilute();
-    */
-    
-private:
-    KisWateryMixPaintOpSettings* m_settings;
-    KisImageWSP m_image;
-    KisPaintDeviceSP m_dab;
-
-    /**
-     *  Curve to control the opacity of the entire dab
-     *  with device input
-     */
-    KisPressureOpacityOption m_opacityOption;
-    
-    /**
-     *  Curve to control the size of the entire dab
-     *  with device input
-     */
-    KisPressureSizeOption m_sizeOption;
-    
-    HardcodedSettings hardcodedSettings;
-};
-
-#endif // KIS_WATERYMIX_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
--- 1:2.3.3-1/.pc/20_arm_fix/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2011-02-17 12:13:01.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/20_arm_fix/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,392 +0,0 @@
-/*
- *  kis_tool_dyna.cpp - part of Krita
- *
- *  Copyright (c) 2009 Lukáš Tvrdý <LukasT.dev@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_tool_dyna.h"
-#include <QEvent>
-#include <QLabel>
-#include <QLayout>
-#include <QWidget>
-#include <QTimer>
-#include <QPushButton>
-#include <QPainter>
-#include <QRect>
-#include <QCheckBox>
-#include <QGridLayout>
-#include <QSlider>
-#include <QComboBox>
-
-#include <kis_debug.h>
-#include <klocale.h>
-
-#include "KoPointerEvent.h"
-#include "KoCanvasBase.h"
-
-#include "kis_config.h"
-#include "kis_paintop_preset.h"
-#include "kis_paintop_registry.h"
-#include "kis_paint_information.h"
-
-#include "kis_cursor.h"
-#include "kis_painter.h"
-
-#include "kis_paint_device.h"
-#include "kis_layer.h"
-#include <QDoubleSpinBox>
-
-#define MAXIMUM_SMOOTHNESS 1000
-#define MAXIMUM_MAGNETISM 1000
-
-KisToolDyna::KisToolDyna(KoCanvasBase * canvas)
-        : KisToolFreehand(canvas, KisCursor::load("tool_freehand_cursor.png", 5, 5), i18n("Dyna"))
-{
-    setObjectName("tool_dyna");
-
-    m_rate = 200; // Conveniently hardcoded for now
-    m_timer = new QTimer(this);
-    Q_CHECK_PTR(m_timer);
-    connect(m_timer, SIGNAL(timeout()), this, SLOT(timeoutPaint()));
-    
-    initDyna();
-}
-
-
-void KisToolDyna::initDyna()
-{
-    /* dynadraw init */
-    m_curmass = 0.5;
-    m_curdrag = 0.15;
-    m_mouse.fixedangle = true;
-    m_width = 1.5;
-    m_xangle = 0.60;
-    m_yangle = 0.20;
-    m_widthRange = 0.05;
-
-    m_previousPressure = 0.5;
-}
-
-
-KisToolDyna::~KisToolDyna()
-{
-    delete m_timer;
-    m_timer = 0;
-}
-
-void KisToolDyna::timeoutPaint()
-{
-    Q_ASSERT(currentPaintOpPreset()->settings()->isAirbrushing());
-
-    if (currentImage() && m_painter) {
-        paintAt(m_previousPaintInformation);
-        QRegion r = m_painter->takeDirtyRegion();
-        dbgPlugins << "Timeout paint dirty region:" << r;
-        currentNode()->setDirty(r);
-    }
-
-}
-
-
-void KisToolDyna::initPaint(KoPointerEvent *e)
-{
-    m_rate = currentPaintOpPreset()->settings()->rate();
-    
-    QRectF imageSize = QRectF(QPointF(0.0,0.0),currentImage()->size());
-    QRectF documentSize = currentImage()->pixelToDocument(imageSize);
-    m_surfaceWidth = documentSize.width();
-    m_surfaceHeight = documentSize.height();
-    setMousePosition(e->point);
-    m_mouse.init(m_mousePos.x(), m_mousePos.y());
-    
-    KisToolFreehand::initPaint(e);
-
-    if (!m_painter) {
-        warnKrita << "Didn't create a painter! Something is wrong!";
-        return;
-    }
-
-    if (currentPaintOpPreset()->settings()->isAirbrushing()) {
-        m_timer->start(m_rate);
-    }
-}
-
-
-void KisToolDyna::endPaint()
-{
-    m_timer->stop();
-    KisToolFreehand::endPaint();
-}
-
-void KisToolDyna::mousePressEvent(KoPointerEvent *e)
-{
-    setMousePosition(e->point);
-    m_mouse.init(m_mousePos.x(), m_mousePos.y());
-    m_odelx = m_mousePos.x();
-    m_odely = m_mousePos.y();
-    
-    KisToolFreehand::mousePressEvent(e);
-}
-
-
-void KisToolDyna::mouseMoveEvent(KoPointerEvent *e)
-{
-    if(!MOVE_CONDITION(event, KisTool::PAINT_MODE)) {
-        KisToolFreehand::mouseMoveEvent(e);
-        return;
-    }
-
-    setMousePosition(e->point);
-
-    if (applyFilter(m_mousePos.x(), m_mousePos.y())) {
-        KoPointerEvent newEvent = filterEvent(e);
-        KisToolFreehand::mouseMoveEvent(&newEvent);
-    }
-
-    if (m_painter && m_painter->paintOp() && currentPaintOpPreset()->settings()->isAirbrushing()) {
-        m_timer->start(m_rate);
-    }
-}
-
-// dyna algorithm
-int KisToolDyna::applyFilter(qreal mx, qreal my)
-{
-    /* calculate mass and drag */
-    qreal mass = flerp(1.0, 160.0, m_curmass);
-    qreal drag = flerp(0.00, 0.5, m_curdrag * m_curdrag);
-
-    /* calculate force and acceleration */
-    qreal fx = mx - m_mouse.curx;
-    qreal fy = my - m_mouse.cury;
-
-    m_mouse.acc = sqrt(fx * fx + fy * fy);
-
-    if (m_mouse.acc < 0.000001) {
-        return 0;
-    }
-
-    m_mouse.accx = fx / mass;
-    m_mouse.accy = fy / mass;
-
-    /* calculate new velocity */
-    m_mouse.velx += m_mouse.accx;
-    m_mouse.vely += m_mouse.accy;
-    m_mouse.vel = sqrt(m_mouse.velx * m_mouse.velx + m_mouse.vely * m_mouse.vely);
-    m_mouse.angx = -m_mouse.vely;
-    m_mouse.angy = m_mouse.velx;
-    if (m_mouse.vel < 0.000001) {
-        return 0;
-    }
-
-    /* calculate angle of drawing tool */
-    m_mouse.angx /= m_mouse.vel;
-    m_mouse.angy /= m_mouse.vel;
-    if (m_mouse.fixedangle) {
-        m_mouse.angx = m_xangle;
-        m_mouse.angy = m_yangle;
-    }
-
-    m_mouse.velx = m_mouse.velx * (1.0 - drag);
-    m_mouse.vely = m_mouse.vely * (1.0 - drag);
-
-    m_mouse.lastx = m_mouse.curx;
-    m_mouse.lasty = m_mouse.cury;
-    m_mouse.curx = m_mouse.curx + m_mouse.velx;
-    m_mouse.cury = m_mouse.cury + m_mouse.vely;
-
-    return 1;
-}
-
-
-KoPointerEvent KisToolDyna::filterEvent(KoPointerEvent* event)
-{
-    qreal wid = m_widthRange - m_mouse.vel;
-
-    wid = wid * m_width;
-
-    if (wid < 0.00001) {
-        wid = 0.00001;
-    }
-
-    qreal delx = m_mouse.angx * wid;
-    qreal dely = m_mouse.angy * wid;
-
-    qreal px = m_mouse.lastx;
-    qreal py = m_mouse.lasty;
-    qreal nx = m_mouse.curx;
-    qreal ny = m_mouse.cury;
-
-    QPointF prev(px , py);         // previous position
-    QPointF now(nx , ny);           // new position
-
-    QPointF prevr(px + m_odelx , py + m_odely);
-    QPointF prevl(px - m_odelx , py - m_odely);
-
-    QPointF nowl(nx - delx , ny - dely);
-    QPointF nowr(nx + delx , ny + dely);
-
-    // transform coords from float points into image points
-    prev.rx() *= m_surfaceWidth;
-    prevr.rx() *= m_surfaceWidth;
-    prevl.rx() *= m_surfaceWidth;
-    now.rx()  *= m_surfaceWidth;
-    nowl.rx() *= m_surfaceWidth;
-    nowr.rx() *= m_surfaceWidth;
-
-    prev.ry() *= m_surfaceHeight;
-    prevr.ry() *= m_surfaceHeight;
-    prevl.ry() *= m_surfaceHeight;
-    now.ry()  *= m_surfaceHeight;
-    nowl.ry() *= m_surfaceHeight;
-    nowr.ry() *= m_surfaceHeight;
-
-    qreal m_pressure;
-#if 0
-
-    qreal xTilt, yTilt;
-    qreal m_rotation;
-    qreal m_tangentialPressure;
-
-    // some funny debugging
-    dbgPlugins << "m_mouse.vel: " << m_mouse.vel;
-    dbgPlugins << "m_mouse.velx: " << m_mouse.velx;
-    dbgPlugins << "m_mouse.vely: " << m_mouse.vely;
-    dbgPlugins << "m_mouse.accx: " << m_mouse.accx;
-    dbgPlugins << "m_mouse.accy: " << m_mouse.accy;
-
-
-    dbgPlugins << "fixed: " << m_mouse.fixedangle;
-    dbgPlugins << "drag: " << m_curdrag;
-    dbgPlugins << "mass: " << m_curmass;
-    dbgPlugins << "xAngle: " << m_xangle;
-    dbgPlugins << "yAngle: " << m_yangle;
-
-#endif
-
-    m_pressure =  m_mouse.vel * 100;
-    m_pressure = qBound(0.0,m_pressure, 1.0);
-    
-    m_odelx = delx;
-    m_odely = dely;
-    
-    // how to change pressure in the KoPointerEvent???
-    return KoPointerEvent(event,now);
-}
-
-
-void KisToolDyna::slotSetDrag(double drag)
-{
-    m_dragDist = drag;
-}
-
-
-void KisToolDyna::slotSetMass(double mass)
-{
-    m_curmass = mass;
-}
-
-
-void KisToolDyna::slotSetDynaWidth(double width)
-{
-    m_width = width;
-}
-
-
-void KisToolDyna::slotSetWidthRange(double widthRange)
-{
-    m_widthRange = widthRange;
-}
-
-
-void KisToolDyna::slotSetXangle(double angle)
-{
-    m_xangle = angle;
-}
-
-
-void KisToolDyna::slotSetYangle(double angle)
-{
-    m_yangle = angle;
-}
-
-
-void KisToolDyna::slotSetFixedAngle(bool fixedAngle)
-{
-    m_mouse.fixedangle = fixedAngle;
-}
-
-QWidget * KisToolDyna::createOptionWidget()
-{
-
-    QWidget * optionWidget = KisToolFreehand::createOptionWidget();
-    optionWidget->setObjectName(toolId() + "option widget");
-
-    QLabel* initWidthLbl = new QLabel(i18n("Initial width:"), optionWidget);
-    QLabel* massLbl = new QLabel(i18n("Mass:"), optionWidget);
-    QLabel* dragLbl = new QLabel(i18n("Drag:"), optionWidget);
-    QLabel* xAngleLbl = new QLabel(i18n("X angle:"), optionWidget);
-    QLabel* yAngleLbl = new QLabel(i18n("Y angle:"), optionWidget);
-    QLabel* widthRangeLbl = new QLabel(i18n("Width range:"), optionWidget);
-
-    m_chkFixedAngle = new QCheckBox(i18n("Fixed angle:"), optionWidget);
-    m_chkFixedAngle->setChecked(false);
-    connect(m_chkFixedAngle, SIGNAL(toggled(bool)), this, SLOT(slotSetFixedAngle(bool)));
-
-    m_initWidthSPBox = new QDoubleSpinBox(optionWidget);
-    m_initWidthSPBox->setValue(1.5);
-    connect(m_initWidthSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetDynaWidth(double)));
-    m_massSPBox = new QDoubleSpinBox(optionWidget);
-    m_massSPBox->setValue(0.5);
-    connect(m_massSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetMass(double)));
-    m_dragSPBox = new QDoubleSpinBox(optionWidget);
-    m_dragSPBox->setValue(0.15);
-    connect(m_dragSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetDrag(double)));
-    m_xAngleSPBox = new QDoubleSpinBox(optionWidget);
-    m_xAngleSPBox->setValue(0.6);
-    connect(m_xAngleSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetXangle(double)));
-    m_yAngleSPBox = new QDoubleSpinBox(optionWidget);
-    m_yAngleSPBox->setValue(0.2);
-    connect(m_yAngleSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetYangle(double)));
-    m_widthRangeSPBox = new QDoubleSpinBox(optionWidget);
-    m_widthRangeSPBox->setValue(0.05);
-    connect(m_widthRangeSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetWidthRange(double)));
-
-    m_optionLayout = new QGridLayout(optionWidget);
-    Q_CHECK_PTR(m_optionLayout);
-
-    m_optionLayout->setMargin(0);
-    m_optionLayout->setSpacing(2);
-
-    KisToolFreehand::addOptionWidgetLayout(m_optionLayout);
-    m_optionLayout->addWidget(initWidthLbl, 5, 0);
-    m_optionLayout->addWidget(m_initWidthSPBox, 5, 1, 1, 2);
-    m_optionLayout->addWidget(massLbl, 6, 0);
-    m_optionLayout->addWidget(m_massSPBox, 6, 1, 1, 2);
-    m_optionLayout->addWidget(dragLbl, 7, 0);
-    m_optionLayout->addWidget(m_dragSPBox, 7, 1, 1, 2);
-    m_optionLayout->addWidget(m_chkFixedAngle, 8, 0);
-    m_optionLayout->addWidget(xAngleLbl, 9, 0);
-    m_optionLayout->addWidget(m_xAngleSPBox, 9, 1, 1, 2);
-    m_optionLayout->addWidget(yAngleLbl, 10, 0);
-    m_optionLayout->addWidget(m_yAngleSPBox, 10, 1, 1, 2);
-    m_optionLayout->addWidget(widthRangeLbl, 11, 0);
-    m_optionLayout->addWidget(m_widthRangeSPBox, 11, 1, 1, 2);
-
-    return optionWidget;
-}
-
-#include "kis_tool_dyna.moc"
diff -pruN 1:2.3.3-1/.pc/applied-patches 1:2.3.3-0ubuntu9/.pc/applied-patches
--- 1:2.3.3-1/.pc/applied-patches	2011-12-06 13:38:13.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/applied-patches	2011-12-06 13:37:09.000000000 +0000
@@ -1,3 +1,7 @@
 10_nokcharpart
-15_new_libwpd
-20_arm_fix
+kubuntu_01_arm_compile.diff
+kubuntu_03_libwpg_02.diff
+kubuntu_04_findlibgsf.diff
+kubuntu_05_libc_multiarch.diff
+kubuntu_06_krita_link_x.diff
+kubuntu_07_krita_plugins_errors.diff
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/kplato/libs/ui/kptintervaledit.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/kplato/libs/ui/kptintervaledit.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/kplato/libs/ui/kptintervaledit.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/kplato/libs/ui/kptintervaledit.cpp	2011-02-17 12:12:01.000000000 +0000
@@ -0,0 +1,282 @@
+/* This file is part of the KDE project
+   Copyright (C) 2004 - 2010 Dag Andersen <danders@get2net.dk>
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public License
+   along with this library; see the file COPYING.LIB.  If not, write to
+   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "kptintervaledit.h"
+#include "intervalitem.h"
+#include "kptcommand.h"
+#include "kptproject.h"
+
+#include <QPushButton>
+#include <QTreeWidget>
+#include <QList>
+
+#include <kdialog.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+namespace KPlato
+{
+
+IntervalEdit::IntervalEdit( CalendarDay *day, QWidget *parent)
+    : IntervalEditImpl(parent)
+{
+    //kDebug();
+    if ( day ) {
+        const QList<TimeInterval*> &intervals = day->timeIntervals();
+        setIntervals( intervals );
+        if ( ! intervals.isEmpty() ) {
+            startTime->setTime( intervals.last()->endTime() );
+            double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 )  / (1000.0*60.0*60.0);
+            length->setValue( qMin( l, (qreal) 8.0 ) );
+        }
+    }
+    enableButtons();
+    startTime->setFocus();
+}
+
+
+//--------------------------------------------
+IntervalEditImpl::IntervalEditImpl(QWidget *parent)
+    : IntervalEditBase(parent) 
+{
+    intervalList->setColumnCount( 2 );
+    QStringList lst;
+    lst << i18nc( "Interval start time", "Start" )
+        << i18nc( "Interval length", "Length" );
+    intervalList->setHeaderLabels( lst );
+
+    intervalList->setRootIsDecorated( false );
+    intervalList->setSortingEnabled( true );
+    intervalList->sortByColumn( 0, Qt::Ascending );
+    
+    bAddInterval->setIcon( KIcon( "list-add" ) );
+    bRemoveInterval->setIcon( KIcon( "list-remove" ) );
+    bClear->setIcon( KIcon( "edit-clear-list" ) );
+    
+    connect(bClear, SIGNAL(clicked()), SLOT(slotClearClicked()));
+    connect(bAddInterval, SIGNAL(clicked()), SLOT(slotAddIntervalClicked()));
+    connect(bRemoveInterval, SIGNAL(clicked()), SLOT(slotRemoveIntervalClicked()));
+    connect(intervalList, SIGNAL(itemSelectionChanged()), SLOT(slotIntervalSelectionChanged()));
+    
+    connect( startTime, SIGNAL( timeChanged( const QTime& ) ), SLOT( enableButtons() ) );
+    connect( length, SIGNAL( valueChanged( double ) ), SLOT( enableButtons() ) );
+    
+}
+
+void IntervalEditImpl::slotClearClicked() {
+    bool c = intervalList->topLevelItemCount() > 0;
+    intervalList->clear();
+    enableButtons();
+    if (c)
+        emit changed();
+}
+
+void IntervalEditImpl::slotAddIntervalClicked() {
+    new IntervalItem(intervalList, startTime->time(), (int)(length->value() * 1000. * 60. *60.) );
+    enableButtons();
+    emit changed();
+}
+
+void IntervalEditImpl::slotRemoveIntervalClicked() {
+    IntervalItem *item = static_cast<IntervalItem*>( intervalList->currentItem() );
+    if ( item == 0) {
+        return;
+    }
+    intervalList->takeTopLevelItem( intervalList->indexOfTopLevelItem( item ) );
+    delete item;
+    enableButtons();
+    emit changed();
+}
+
+
+void IntervalEditImpl::slotIntervalSelectionChanged() {
+    QList<QTreeWidgetItem*> lst = intervalList->selectedItems();
+    if (lst.count() == 0)
+        return;
+    
+    IntervalItem *ii = static_cast<IntervalItem *>(lst[0]);
+    startTime->setTime(ii->interval().first);
+    length->setValue((double)(ii->interval().second) / (1000.*60.*60.));
+    
+    enableButtons();
+}
+
+QList<TimeInterval*> IntervalEditImpl::intervals() const {
+    QList<TimeInterval*> l;
+    int cnt = intervalList->topLevelItemCount();
+    for (int i=0; i < cnt; ++i) {
+        IntervalItem *item = static_cast<IntervalItem*>(intervalList->topLevelItem(i));
+        l.append(new TimeInterval(item->interval().first, item->interval().second));
+    }
+    return l;
+}
+
+void IntervalEditImpl::setIntervals(const QList<TimeInterval*> &intervals) {
+    intervalList->clear();
+    foreach (TimeInterval *i, intervals) {
+        new IntervalItem(intervalList, i->first, i->second);
+    }
+    enableButtons();
+}
+
+void IntervalEditImpl::enableButtons() {
+    bClear->setEnabled( ! intervals().isEmpty() );
+    
+    bRemoveInterval->setEnabled( intervalList->currentItem() );
+    
+    if ( length->value() == 0.0 ) {
+        bAddInterval->setEnabled( false );
+        return;
+    }
+    if ( QTime( 0, 0, 0 ).secsTo( startTime->time() ) + (int)(length->value() * 60. * 60.) > 24 * 60 * 60 ) {
+        bAddInterval->setEnabled( false );
+        return;
+    }
+    TimeInterval ti( startTime->time(),  (int)(length->value() * 1000. * 60. *60.) );
+    foreach (TimeInterval *i, intervals()) {
+        if ( i->intersects( ti ) ) {
+            bAddInterval->setEnabled( false );
+            return;
+        }
+    }
+    bAddInterval->setEnabled( true );
+}
+
+//-------------------------------------------------------------
+IntervalEditDialog::IntervalEditDialog( Calendar *calendar, const QList<CalendarDay*> &days, QWidget *parent)
+    : KDialog( parent ),
+    m_calendar( calendar ),
+    m_days( days )
+{
+    //kDebug();
+    setCaption( i18n("Edit Work Intervals") );
+    setButtons( Ok|Cancel );
+    setDefaultButton( Ok );
+    showButtonSeparator( true );
+    //kDebug()<<&p;
+    m_panel = new IntervalEdit( days.value( 0 ), this );
+    setMainWidget( m_panel );
+    enableButtonOk( false );
+
+    connect( m_panel, SIGNAL( changed() ), SLOT( slotChanged() ) );
+    connect( calendar->project(), SIGNAL( calendarRemoved( const Calendar* ) ), SLOT( slotCalendarRemoved( const Calendar* ) ) );
+}
+
+IntervalEditDialog::IntervalEditDialog( Calendar *calendar, const QList<QDate> &dates, QWidget *parent)
+    : KDialog( parent ),
+    m_calendar( calendar ),
+    m_dates( dates )
+{
+    //kDebug();
+    setCaption( i18n("Edit Work Intervals") );
+    setButtons( Ok|Cancel );
+    setDefaultButton( Ok );
+    showButtonSeparator( true );
+    //kDebug()<<&p;
+    foreach ( const QDate &d, dates ) {
+        CalendarDay *day = calendar->findDay( d );
+        if ( day ) {
+            m_days << day;
+        }
+    }
+    m_panel = new IntervalEdit( m_days.value( 0 ), this );
+    setMainWidget( m_panel );
+    enableButtonOk( false );
+
+    connect( m_panel, SIGNAL( changed() ), SLOT( slotChanged() ) );
+    connect( calendar->project(), SIGNAL( calendarRemoved( const Calendar* ) ), SLOT( slotCalendarRemoved( const Calendar* ) ) );
+}
+
+void IntervalEditDialog::slotCalendarRemoved( const Calendar *cal )
+{
+    if ( m_calendar == cal ) {
+        reject();
+    }
+}
+
+void IntervalEditDialog::slotChanged()
+{
+    enableButtonOk( true );
+}
+
+MacroCommand *IntervalEditDialog::buildCommand()
+{
+    MacroCommand *cmd = new MacroCommand( i18n( "Modify Work Interval" ) );
+    foreach ( const QDate &d, m_dates ) {
+        // these are dates, weekdays don't have date
+        CalendarDay *day = m_calendar->findDay( d );
+        if ( day == 0 ) {
+            // create a new day
+            day = new CalendarDay( d );
+            cmd->addCommand( new CalendarAddDayCmd( m_calendar, day ) );
+        }
+        MacroCommand *c = buildCommand( m_calendar, day );
+        if ( c ) {
+            cmd->addCommand( c );
+        }
+    }
+    if ( m_dates.isEmpty() ) {
+        // weekdays
+        foreach ( CalendarDay *day, m_days ) {
+            MacroCommand *c = buildCommand( m_calendar, day );
+            if ( c ) {
+                cmd->addCommand( c );
+            }
+        }
+    }
+    if ( cmd->isEmpty() ) {
+        delete cmd;
+        return 0;
+    }
+    return cmd;
+}
+
+MacroCommand *IntervalEditDialog::buildCommand( Calendar *calendar, CalendarDay *day )
+{
+    //kDebug();
+    const QList<TimeInterval*> lst = m_panel->intervals();
+    if ( lst == day->timeIntervals() ) {
+        return 0;
+    }
+    MacroCommand *cmd = 0;
+    // Set to Undefined. This will also clear any intervals
+    CalendarModifyStateCmd *c = new CalendarModifyStateCmd( calendar, day, CalendarDay::Undefined );
+    if (cmd == 0) cmd = new MacroCommand("");
+    cmd->addCommand(c);
+    //kDebug()<<"Set Undefined";
+
+    foreach ( TimeInterval *i, lst ) {
+        CalendarAddTimeIntervalCmd *c = new CalendarAddTimeIntervalCmd( calendar, day, i );
+        if (cmd == 0) cmd = new MacroCommand("");
+        cmd->addCommand(c);
+    }
+    if ( ! lst.isEmpty() ) {
+        CalendarModifyStateCmd *c = new CalendarModifyStateCmd( calendar, day, CalendarDay::Working );
+        if (cmd == 0) cmd = new MacroCommand("");
+        cmd->addCommand(c);
+    }
+    if (cmd) {
+        cmd->setText( i18n( "Modify Work Interval" ) );
+    }
+    return cmd;
+}
+
+}  //KPlato namespace
+
+#include "kptintervaledit.moc"
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.cc 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.cc
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.cc	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.cc	2011-02-17 12:14:02.000000000 +0000
@@ -0,0 +1,237 @@
+/*
+ *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
+ *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
+ *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
+ *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ *  Copyright (c) 2004,2007,2010 Cyrille Berger <cberger@cberger.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_paintop.h"
+
+#include <math.h>
+
+#include <KoColor.h>
+#include <KoColorSpace.h>
+#include <KoPointerEvent.h>
+
+#include "kis_painter.h"
+#include "kis_layer.h"
+#include "kis_types.h"
+
+#include "kis_image.h"
+#include "kis_paint_device.h"
+#include "kis_global.h"
+#include "kis_iterators_pixel.h"
+#include "kis_datamanager.h"
+#include "kis_paintop_settings.h"
+#include "kis_paintop_preset.h"
+#include "kis_paint_information.h"
+#include "kis_vec.h"
+#include "kis_perspective_math.h"
+#include "kis_fixed_paint_device.h"
+
+#define BEZIER_FLATNESS_THRESHOLD 0.5
+#define MAXIMUM_SCALE 2
+#include <kis_distance_information.h>
+
+struct KisPaintOp::Private {
+    Private()
+            : dab(0),currentScale(1.0),currentRotation(0) {
+    }
+
+    KisFixedPaintDeviceSP dab;
+    KoColor color;
+    KoColor previousPaintColor;
+    KisPainter* painter;
+    qreal currentScale;
+    qreal currentRotation;
+};
+
+
+KisPaintOp::KisPaintOp(KisPainter * painter) : d(new Private)
+{
+    d->painter = painter;
+}
+
+KisPaintOp::~KisPaintOp()
+{
+    d->dab.clear();
+    delete d;
+}
+
+KisFixedPaintDeviceSP KisPaintOp::cachedDab()
+{
+    return cachedDab(d->painter->device()->colorSpace());
+}
+
+KisFixedPaintDeviceSP KisPaintOp::cachedDab(const KoColorSpace *cs)
+{
+    if (!d->dab || !(*d->dab->colorSpace() == *cs)) {
+        d->dab = new KisFixedPaintDevice(cs);
+    }
+    return d->dab;
+}
+
+void KisPaintOp::splitCoordinate(double coordinate, qint32 *whole, double *fraction)
+{
+    qint32 i = static_cast<qint32>(coordinate);
+
+    if (coordinate < 0) {
+        // We always want the fractional part to be positive.
+        // E.g. -1.25 becomes -2 and +0.75
+        i--;
+    }
+
+    qreal f = coordinate - i;
+
+    *whole = i;
+    *fraction = f;
+}
+
+static KisDistanceInformation paintBezierCurve(KisPaintOp *paintOp,
+                               const KisPaintInformation &pi1,
+                               const KisVector2D &control1,
+                               const KisVector2D &control2,
+                               const KisPaintInformation &pi2,
+                               const KisDistanceInformation& savedDist)
+{
+    KisDistanceInformation newDistance;
+    LineEquation line = LineEquation::Through(toKisVector2D(pi1.pos()), toKisVector2D(pi2.pos()));
+    qreal d1 = line.absDistance(control1);
+    qreal d2 = line.absDistance(control2);
+
+    if ((d1 < BEZIER_FLATNESS_THRESHOLD && d2 < BEZIER_FLATNESS_THRESHOLD)
+#ifdef Q_CC_MSVC
+            || isnan(d1) || isnan(d2)) {
+#else
+            || std::isnan(d1) || std::isnan(d2)) {
+#endif
+        newDistance = paintOp->paintLine(pi1, pi2, savedDist);
+    } else {
+        // Midpoint subdivision. See Foley & Van Dam Computer Graphics P.508
+        KisVector2D l2 = (toKisVector2D(pi1.pos()) + control1) / 2;
+        KisVector2D h = (control1 + control2) / 2;
+        KisVector2D l3 = (l2 + h) / 2;
+        KisVector2D r3 = (control2 + toKisVector2D(pi2.pos())) / 2;
+        KisVector2D r2 = (h + r3) / 2;
+        KisVector2D l4 = (l3 + r2) / 2;
+
+        KisVector2D midMovement = (pi1.movement() + pi2.movement()) * 0.5;
+        
+        KisPaintInformation middlePI = KisPaintInformation::mix(toQPointF(l4), 0.5, pi1, pi2, midMovement);
+        
+        newDistance = paintBezierCurve(paintOp, pi1, l2, l3, middlePI, savedDist);
+        newDistance = paintBezierCurve(paintOp, middlePI, r2, r3, pi2, newDistance);
+    }
+
+    return newDistance;
+}
+
+KisDistanceInformation KisPaintOp::paintBezierCurve(const KisPaintInformation &pi1,
+                                    const QPointF &control1,
+                                    const QPointF &control2,
+                                    const KisPaintInformation &pi2,
+                                    const KisDistanceInformation& savedDist)
+{
+    return ::paintBezierCurve(this, pi1, toKisVector2D(control1), toKisVector2D(control2), pi2, savedDist);
+}
+
+
+KisDistanceInformation KisPaintOp::paintLine(const KisPaintInformation &pi1,
+                             const KisPaintInformation &pi2,
+                             const KisDistanceInformation& savedDist)
+{
+    KisVector2D end = toKisVector2D(pi2.pos());
+    KisVector2D start = toKisVector2D(pi1.pos());
+
+    KisVector2D dragVec = end - start;
+
+    Q_ASSERT(savedDist.distance >= 0);
+
+    qreal endDist = dragVec.norm();
+    qreal currentDist = savedDist.distance;
+
+    dragVec.normalize();
+    KisVector2D step(0, 0);
+
+    qreal sp = savedDist.spacing;
+    while (currentDist < endDist) {
+
+        QPointF p = toQPointF(start +  currentDist * dragVec);
+
+        qreal t = currentDist / endDist;
+
+        KisVector2D movement;
+        if(sp > 0.01) {
+          movement = sp * dragVec;
+        } else {
+          movement = 0.01 * dragVec;
+        }
+        sp = paintAt(KisPaintInformation::mix(p, t, pi1, pi2, movement));
+        currentDist += sp;
+    }
+
+    QRect r(pi1.pos().toPoint(), pi2.pos().toPoint());
+    d->painter->addDirtyRect(r.normalized());
+
+    return KisDistanceInformation(currentDist - endDist, sp);
+}
+
+KisPainter* KisPaintOp::painter() const
+{
+    return d->painter;
+}
+
+KisPaintDeviceSP KisPaintOp::source() const
+{
+    return d->painter->device();
+}
+
+qreal KisPaintOp::scaleForPressure(qreal pressure)
+{
+    qreal scale = pressure / PRESSURE_DEFAULT;
+
+    if (scale < 0) {
+        scale = 0;
+    }
+
+    if (scale > MAXIMUM_SCALE) {
+        scale = MAXIMUM_SCALE;
+    }
+
+    return scale;
+}
+
+qreal KisPaintOp::currentRotation() const
+{
+    return d->currentRotation;
+}
+
+qreal KisPaintOp::currentScale() const
+{
+    return d->currentScale;
+}
+
+void KisPaintOp::setCurrentRotation(qreal rotation)
+{
+    d->currentRotation = rotation;
+}
+
+void KisPaintOp::setCurrentScale(qreal scale)
+{
+    d->currentScale = scale;
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.h 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.h
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.h	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/image/brushengine/kis_paintop.h	2011-02-17 12:14:02.000000000 +0000
@@ -0,0 +1,149 @@
+/*
+ *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
+ *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
+ *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
+ *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ *  Copyright (c) 2004,2010 Cyrille Berger <cberger@cberger.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_PAINTOP_H_
+#define KIS_PAINTOP_H_
+
+#include "kis_distance_information.h"
+#include "kis_shared.h"
+#include "kis_types.h"
+#include "kis_paintop_settings.h"
+
+#include <krita_export.h>
+
+class QPointF;
+class KoColorSpace;
+class KoInputDevice;
+class KoPointerEvent;
+
+class KisPainter;
+class KisPaintInformation;
+
+/**
+ * KisPaintOp are use by tools to draw on a paint device. A paintop takes settings
+ * and input information, like pressure, tilt or motion and uses that to draw pixels
+ */
+class KRITAIMAGE_EXPORT KisPaintOp : public KisShared
+{
+    struct Private;
+public:
+
+    KisPaintOp(KisPainter * painter);
+    virtual ~KisPaintOp();
+
+    /**
+     * Paint at the subpixel point pos using the specified paint
+     * information..
+     *
+     * The distance between two calls of the paintAt is always specified by spacing;
+     * xSpacing and ySpacing is 1.0 by default, negative values causes infinite loops (it is checked by Q_ASSERT)
+     */
+    virtual qreal paintAt(const KisPaintInformation& info) = 0;
+
+    /**
+     * A painterly paintop must have a PainterlyInformation structure,
+     * handle the painterly overlays by its own and implement bidirectionality,
+     * that is, it will pick up colors from the canvas and change its own color
+     * while drawing.
+     * @return true if the current paintop is painterly.
+     */
+    virtual bool painterly() const {
+        return false;
+    }
+
+    /**
+     * Draw a line between pos1 and pos2 using the currently set brush and color.
+     * If savedDist is less than zero, the brush is painted at pos1 before being
+     * painted along the line using the spacing setting.
+     *
+     * @return the drag distance, that is the remains of the distance
+     * between p1 and p2 not covered because the currenlty set brush
+     * has a spacing greater than that distance.
+     */
+    virtual KisDistanceInformation paintLine(const KisPaintInformation &pi1,
+                             const KisPaintInformation &pi2,
+                             const KisDistanceInformation& savedDist = KisDistanceInformation());
+
+    /**
+     * Draw a Bezier curve between pos1 and pos2 using control points 1 and 2.
+     * If savedDist is less than zero, the brush is painted at pos1 before being
+     * painted along the curve using the spacing setting.
+     * @return the drag distance, that is the remains of the distance between p1 and p2 not covered
+     * because the currenlty set brush has a spacing greater than that distance.
+     */
+    virtual KisDistanceInformation paintBezierCurve(const KisPaintInformation &pi1,
+                                    const QPointF &control1,
+                                    const QPointF &control2,
+                                    const KisPaintInformation &pi2,
+                                    const KisDistanceInformation& savedDist = KisDistanceInformation());
+
+    
+     /**
+     * Whether this paintop can paint. Can be false in case that some setting isn't read correctly.
+     * @return if paintop is ready for painting, default is true
+     */
+    virtual bool canPaint() const {
+        return true;
+    }
+
+    /**
+     * Split the coordinate into whole + fraction, where fraction is always >= 0.
+     */
+    static void splitCoordinate(double coordinate, qint32 *whole, double *fraction);
+
+    /**
+     * returns the scale and rotation dynamically computed for the single dab
+     * rotation is in radians
+     * This is used e.g. for dynamic brush outline
+     */
+    qreal currentScale() const;
+    qreal currentRotation() const;
+    
+protected:
+
+    void setCurrentScale(qreal scale);
+    /**
+    * Set rotation in radians
+    */
+    void setCurrentRotation(qreal rotation);
+    
+    static qreal scaleForPressure(qreal pressure);
+
+    KisFixedPaintDeviceSP cachedDab();
+    KisFixedPaintDeviceSP cachedDab(const KoColorSpace *cs);
+
+    /**
+     * Return the painter this paintop is owned by
+     */
+    KisPainter* painter() const;
+
+    /**
+     * Return the paintdevice the painter this paintop is owned by
+     */
+    KisPaintDeviceSP source() const;
+
+private:
+    Private* const d;
+};
+
+
+#endif // KIS_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp	2011-02-17 12:12:57.000000000 +0000
@@ -0,0 +1,314 @@
+/*
+ *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published by
+ *  the Free Software Foundation; version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_color_selector.h"
+
+#include <cmath>
+
+#include <QHBoxLayout>
+#include <QColor>
+#include <QPainter>
+#include <QMouseEvent>
+#include <QTimer>
+#include <QPushButton>
+
+#include <KConfig>
+#include <KConfigGroup>
+#include <KComponentData>
+#include <KGlobal>
+#include <KIcon>
+
+#include "kis_color_selector_ring.h"
+#include "kis_color_selector_triangle.h"
+#include "kis_color_selector_simple.h"
+#include "kis_color_selector_wheel.h"
+#include "kis_color_selector_container.h"
+
+#include <KDebug>
+
+KisColorSelector::KisColorSelector(Configuration conf, QWidget* parent)
+                                       : KisColorSelectorBase(parent),
+                                       m_ring(0),
+                                       m_triangle(0),
+                                       m_slider(0),
+                                       m_square(0),
+                                       m_wheel(0),
+                                       m_mainComponent(0),
+                                       m_subComponent(0),
+                                       m_grabbingComponent(0),
+                                       m_blipDisplay(true)
+{
+    init();
+    setConfiguration(conf);
+}
+
+KisColorSelector::KisColorSelector(QWidget* parent)
+                                       : KisColorSelectorBase(parent),
+                                       m_ring(0),
+                                       m_triangle(0),
+                                       m_slider(0),
+                                       m_square(0),
+                                       m_wheel(0),
+                                       m_button(0),
+                                       m_mainComponent(0),
+                                       m_subComponent(0),
+                                       m_grabbingComponent(0),
+                                       m_blipDisplay(true)
+{
+    init();
+    updateSettings();
+}
+
+KisColorSelectorBase* KisColorSelector::createPopup() const
+{
+    KisColorSelectorBase* popup = new KisColorSelector(0);
+    popup->setColor(m_lastColor);
+    return popup;
+}
+
+void KisColorSelector::setConfiguration(Configuration conf)
+{
+    m_configuration = conf;
+
+    if(m_mainComponent!=0) {
+        Q_ASSERT(m_subComponent!=0);
+        m_mainComponent->setGeometry(0, 0, 0, 0);
+        m_subComponent->setGeometry(0, 0, 0, 0);
+
+        m_mainComponent->disconnect();
+        m_subComponent->disconnect();
+    }
+
+    switch (m_configuration.mainType) {
+    case Square:
+        m_mainComponent=m_square;
+        break;
+    case Wheel:
+        m_mainComponent=m_wheel;
+        break;
+    case Triangle:
+        m_mainComponent=m_triangle;
+        break;
+    default:
+        Q_ASSERT(false);
+    }
+
+    switch (m_configuration.subType) {
+    case Ring:
+        m_subComponent=m_ring;
+        break;
+    case Slider:
+        m_subComponent=m_slider;
+        break;
+    default:
+        Q_ASSERT(false);
+    }
+
+    connect(m_mainComponent, SIGNAL(paramChanged(qreal,qreal,qreal,qreal,qreal)),
+            m_subComponent,  SLOT(setParam(qreal,qreal,qreal,qreal,qreal)), Qt::UniqueConnection);
+    connect(m_subComponent,  SIGNAL(paramChanged(qreal,qreal,qreal,qreal,qreal)),
+            m_mainComponent, SLOT(setParam(qreal,qreal,qreal,qreal, qreal)), Qt::UniqueConnection);
+
+    connect(m_mainComponent, SIGNAL(update()), m_updateTimer,   SLOT(start()), Qt::UniqueConnection);
+    connect(m_subComponent,  SIGNAL(update()), m_updateTimer,   SLOT(start()), Qt::UniqueConnection);
+    
+    m_mainComponent->setConfiguration(m_configuration.mainTypeParameter, m_configuration.mainType);
+    m_subComponent->setConfiguration(m_configuration.subTypeParameter, m_configuration.subType);
+
+    QResizeEvent event(QSize(width(), height()), QSize());
+    resizeEvent(&event);
+}
+
+KisColorSelector::Configuration KisColorSelector::configuration() const
+{
+    return m_configuration;
+}
+
+void KisColorSelector::updateSettings()
+{
+    KisColorSelectorBase::updateSettings();
+    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
+    setConfiguration(Configuration::fromString(cfg.readEntry("colorSelectorConfiguration", KisColorSelector::Configuration().toString())));
+}
+
+void KisColorSelector::paintEvent(QPaintEvent* e)
+{
+    Q_UNUSED(e);
+    QPainter p(this);
+    p.fillRect(0,0,width(),height(),QColor(128,128,128));
+    p.setRenderHint(QPainter::Antialiasing);
+
+    m_mainComponent->paintEvent(&p);
+    m_subComponent->paintEvent(&p);
+}
+
+inline int iconSize(qreal width, qreal height) {
+    qreal radius = qMin(width, height)/2.;
+    qreal xm = width/2.;
+    qreal ym = height/2.;
+    if(xm>=2*ym || ym>=2*xm)
+        return qBound(5., radius, 32.);
+
+    qreal a=-2;
+    qreal b=2.*(xm+ym);
+    qreal c=radius*radius-xm*xm-ym*ym;
+    return qBound(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
+}
+
+void KisColorSelector::resizeEvent(QResizeEvent* e) {
+    if(m_configuration.subType==Ring) {
+        m_ring->setGeometry(0,0,width(), height());
+        if(displaySettingsButton()) {
+            int size = iconSize(width(), height());
+            m_button->setGeometry(0, 0, size, size);
+        }
+        if(m_configuration.mainType==Triangle) {
+            m_triangle->setGeometry(width()/2-m_ring->innerRadius(),
+                                    height()/2-m_ring->innerRadius(),
+                                    m_ring->innerRadius()*2,
+                                    m_ring->innerRadius()*2);
+        }
+        else {
+            int size = m_ring->innerRadius()*2/sqrt(2.);
+            m_square->setGeometry(width()/2-size/2,
+                                  height()/2-size/2,
+                                  size,
+                                  size);
+        }
+    }
+    else {
+        // type wheel and square
+        if(m_configuration.mainType==Wheel) {
+            if(displaySettingsButton()) {
+                int size = iconSize(width(), height()*0.9);
+                m_button->setGeometry(0, height()*0.1, size, size);
+            }
+            m_mainComponent->setGeometry(0, height()*0.1, width(), height()*0.9);
+            m_subComponent->setGeometry( 0, 0,            width(), height()*0.1);
+        }
+        else {
+            int buttonSize = 0;
+            if(displaySettingsButton()) {
+                buttonSize = qBound(20, int(0.1*height()), 32);
+                m_button->setGeometry(0, 0, buttonSize, buttonSize);
+            }
+
+            if(height()>width()) {
+                int selectorHeight=height()-buttonSize;
+                m_mainComponent->setGeometry(0, buttonSize+selectorHeight*0.1, width(), selectorHeight*0.9);
+                m_subComponent->setGeometry( 0, buttonSize,                    width(), selectorHeight*0.1);
+            }
+            else {
+                int selectorWidth=width()-buttonSize;
+                m_mainComponent->setGeometry(buttonSize, height()*0.1, selectorWidth, height()*0.9);
+                m_subComponent->setGeometry( buttonSize, 0,            selectorWidth, height()*0.1);
+            }
+        }
+    }
+
+    KisColorSelectorBase::resizeEvent(e);
+}
+
+void KisColorSelector::mousePressEvent(QMouseEvent* e)
+{
+    e->setAccepted(false);
+    KisColorSelectorBase::mousePressEvent(e);
+
+    if(!e->isAccepted()) {
+        if(m_mainComponent->wantsGrab(e->x(), e->y()))
+            m_grabbingComponent=m_mainComponent;
+        else if(m_subComponent->wantsGrab(e->x(), e->y()))
+            m_grabbingComponent=m_subComponent;
+
+        mouseEvent(e);
+    }
+}
+
+void KisColorSelector::mouseMoveEvent(QMouseEvent* e)
+{
+    KisColorSelectorBase::mouseMoveEvent(e);
+    
+    mouseEvent(e);
+}
+
+void KisColorSelector::mouseReleaseEvent(QMouseEvent* e)
+{
+    if(m_lastColor!=m_currentColor && m_currentColor.isValid()) {
+        m_lastColor=m_currentColor;
+        ColorRole role;
+        if(e->button() == Qt::LeftButton)
+            role=Foreground;
+        else
+            role=Background;
+        commitColor(KoColor(m_currentColor, colorSpace()), role);
+    }
+    e->accept();
+    m_grabbingComponent=0;
+}
+
+bool KisColorSelector::displaySettingsButton()
+{
+    if(dynamic_cast<KisColorSelectorContainer*>(parent())!=0)
+        return true;
+    else
+        return false;
+}
+
+void KisColorSelector::setColor(const QColor &color)
+{
+    m_mainComponent->setColor(color);
+    m_subComponent->setColor(color);
+    m_lastColor=color;
+    update();
+}
+
+void KisColorSelector::mouseEvent(QMouseEvent *e)
+{
+    if(m_grabbingComponent && (e->buttons()&Qt::LeftButton || e->buttons()&Qt::RightButton)) {
+        m_grabbingComponent->mouseEvent(e->x(), e->y());
+
+        m_currentColor=m_mainComponent->currentColor();
+    }
+}
+
+void KisColorSelector::init()
+{
+    setAcceptDrops(true);
+
+    m_ring = new KisColorSelectorRing(this);
+    m_triangle = new KisColorSelectorTriangle(this);
+    m_slider = new KisColorSelectorSimple(this);
+    m_square = new KisColorSelectorSimple(this);
+    m_wheel = new KisColorSelectorWheel(this);
+
+    if(displaySettingsButton()) {
+        m_button = new QPushButton(this);
+        m_button->setIcon(KIcon("configure"));
+        connect(m_button, SIGNAL(clicked()), SIGNAL(settingsButtonClicked()));
+    }
+
+    // a tablet can send many more signals, than a mouse
+    // this causes many repaints, if updating after every signal.
+    // a workaround with a timer can fix that.
+    m_updateTimer = new QTimer(this);
+    m_updateTimer->setInterval(1);
+    m_updateTimer->setSingleShot(true);
+
+    connect(m_updateTimer,      SIGNAL(timeout()), this,  SLOT(update()));
+
+    setMinimumSize(40, 40);
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp	2011-02-17 12:12:57.000000000 +0000
@@ -0,0 +1,261 @@
+/*
+ *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ */
+
+#include "kis_color_selector_simple.h"
+
+#include <QImage>
+#include <QPainter>
+#include <QColor>
+#include <cmath>
+
+#include <KDebug>
+
+KisColorSelectorSimple::KisColorSelectorSimple(KisColorSelector *parent) :
+    KisColorSelectorComponent(parent),
+    m_lastClickPos(-1,-1)
+{
+}
+
+void KisColorSelectorSimple::setColor(const QColor &c)
+{
+    switch (m_parameter) {
+    case KisColorSelector::SL:
+        m_lastClickPos.setX(c.hslSaturationF());
+        m_lastClickPos.setY(1.-c.lightnessF());
+        emit paramChanged(-1, -1, -1, c.hslSaturationF(), c.lightnessF());
+        break;
+    case KisColorSelector::LH:
+        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
+        m_lastClickPos.setY(1.-c.lightnessF());
+        emit paramChanged(c.hueF(), -1, -1, -1, c.lightnessF());
+        break;
+    case KisColorSelector::SV:
+        m_lastClickPos.setX(c.saturationF());
+        m_lastClickPos.setY(1-c.valueF());
+        emit paramChanged(-1, c.saturationF(), c.valueF(), -1, -1);
+        break;
+    case KisColorSelector::VH:
+        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
+        m_lastClickPos.setY(c.valueF());
+        emit paramChanged(c.hueF(), -1, c.valueF(), -1, -1);
+        break;
+    case KisColorSelector::hsvSH:
+        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
+        m_lastClickPos.setY(1-c.saturationF());
+        emit paramChanged(c.hueF(), c.saturationF(), -1, -1, -1);
+        break;
+    case KisColorSelector::hslSH:
+        m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
+        m_lastClickPos.setY(1-c.hslSaturationF());
+        emit paramChanged(c.hueF(), -1, -1, c.hslSaturationF(), -1);
+        break;
+    case KisColorSelector::L:
+        m_lastClickPos.setX(1-c.lightnessF());
+        emit paramChanged(-1, -1, -1, -1, c.lightnessF());
+        break;
+    case KisColorSelector::V:
+        m_lastClickPos.setX(c.valueF());
+        emit paramChanged(-1, -1, c.valueF(), -1, -1);
+        break;
+    case KisColorSelector::hsvS:
+        m_lastClickPos.setX(c.saturationF());
+        emit paramChanged(-1, c.saturationF(), -1, -1, -1);
+        break;
+    case KisColorSelector::hslS:
+        m_lastClickPos.setX(c.hslSaturationF());
+        emit paramChanged(-1, -1, -1, c.hslSaturationF(), -1);
+        break;
+    case KisColorSelector::H:
+        m_lastClickPos.setX(1-qBound(0., c.hueF(), 1.));
+        emit paramChanged(c.hueF(), -1, -1, -1, -1);
+        break;
+    default:
+        Q_ASSERT(false);
+        break;
+    }
+    emit update();
+}
+
+QColor KisColorSelectorSimple::selectColor(int x, int y)
+{
+    m_kocolor.convertTo(colorSpace());
+
+    m_lastClickPos.setX(x/qreal(width()));
+    m_lastClickPos.setY(y/qreal(height()));
+
+    qreal xRel = x/qreal(width());
+    qreal yRel = 1.-y/qreal(height());
+    qreal relPos;
+    if(height()>width())
+        relPos = 1.-y/qreal(height());
+    else
+        relPos = 1.-x/qreal(width());
+
+    switch (m_parameter) {
+    case KisColorSelector::H:
+        emit paramChanged(relPos, -1, -1, -1, -1);
+        break;
+    case KisColorSelector::hsvS:
+        emit paramChanged(-1, relPos, -1, -1, -1);
+        break;
+    case KisColorSelector::hslS:
+        emit paramChanged(-1, -1, -1, relPos, -1);
+        break;
+    case KisColorSelector::V:
+        emit paramChanged(-1, -1, relPos, -1, -1);
+        break;
+    case KisColorSelector::L:
+        emit paramChanged(-1, -1, -1, -1, relPos);
+        break;
+    case KisColorSelector::SL:
+        emit paramChanged(-1, -1, -1, xRel, yRel);
+        break;
+    case KisColorSelector::SV:
+        emit paramChanged(-1, xRel, yRel, -1, -1);
+        break;
+    case KisColorSelector::hsvSH:
+        emit paramChanged(xRel, yRel, -1, -1, -1);
+        break;
+    case KisColorSelector::hslSH:
+        emit paramChanged(xRel, -1, -1, yRel, -1);
+        break;
+    case KisColorSelector::VH:
+        emit paramChanged(xRel, -1, yRel, -1, -1);
+        break;
+    case KisColorSelector::LH:
+        emit paramChanged(xRel, -1, -1, -1, yRel);
+        break;
+    }
+
+    emit update();
+
+//    kDebug()<<"selectColor(x/y) y rel="<<yRel<<"  value="<<QColor::fromRgb(colorAt(x, y)).valueF();
+    return colorAt(x, y);
+}
+
+void KisColorSelectorSimple::paint(QPainter* painter)
+{
+    if(isDirty()) {
+        m_kocolor.convertTo(colorSpace());
+
+        m_pixelCache=QImage(width(), height(), QImage::Format_ARGB32_Premultiplied);
+
+        for(int x=0; x<width(); x++) {
+            for(int y=0; y<height(); y++) {
+                m_kocolor.fromQColor(colorAt(x, y));
+                m_kocolor.toQColor(&m_qcolor);
+                m_pixelCache.setPixel(x, y, m_qcolor.rgb());
+            }
+        }
+    }
+
+    painter->drawImage(0,0, m_pixelCache);
+
+    // draw blip
+    if(m_lastClickPos!=QPointF(-1,-1) && m_parent->displayBlip()) {
+        switch (m_parameter) {
+        case KisColorSelector::H:
+        case KisColorSelector::hsvS:
+        case KisColorSelector::hslS:
+        case KisColorSelector::V:
+        case KisColorSelector::L:
+            if(width()>height()) {
+                painter->setPen(QColor(0,0,0));
+                painter->drawLine(m_lastClickPos.x()*width()-1, 0, m_lastClickPos.x()*width()-1, height());
+                painter->setPen(QColor(255,255,255));
+                painter->drawLine(m_lastClickPos.x()*width()+1, 0, m_lastClickPos.x()*width()+1, height());
+            }
+            else {
+                painter->setPen(QColor(0,0,0));
+                painter->drawLine(0, m_lastClickPos.x()*height()-1, width(), m_lastClickPos.x()*height()-1);
+                painter->setPen(QColor(255,255,255));
+                painter->drawLine(0, m_lastClickPos.x()*height()+1, width(), m_lastClickPos.x()*height()+1);
+            }
+            break;
+        case KisColorSelector::SL:
+        case KisColorSelector::SV:
+        case KisColorSelector::hslSH:
+        case KisColorSelector::hsvSH:
+        case KisColorSelector::VH:
+        case KisColorSelector::LH:
+            painter->setPen(QColor(0,0,0));
+            painter->drawEllipse(m_lastClickPos.x()*width()-5, m_lastClickPos.y()*height()-5, 10, 10);
+            painter->setPen(QColor(255,255,255));
+            painter->drawEllipse(m_lastClickPos.x()*width()-4, m_lastClickPos.y()*height()-4, 8, 8);
+            break;
+        }
+
+    }
+}
+
+const QColor& KisColorSelectorSimple::colorAt(int x, int y)
+{
+    if (x < 0) x = 0;
+    if (x > width()) x = width();
+    if (y < 0) y = 0;
+    if (y > width()) y = height();
+
+    qreal xRel = x/qreal(width());
+    qreal yRel = 1.-y/qreal(height());
+    qreal relPos;
+    if(height()>width())
+        relPos = 1.-y/qreal(height());
+    else
+        relPos = 1.-x/qreal(width());
+
+    switch(m_parameter) {
+    case KisColorSelector::SL:
+        m_qcolor.setHslF(m_hue, xRel, yRel);
+        break;
+    case KisColorSelector::SV:
+        m_qcolor.setHsvF(m_hue, xRel, yRel);
+        break;
+    case KisColorSelector::hsvSH:
+        m_qcolor.setHsvF(xRel, yRel, m_value);
+        break;
+    case KisColorSelector::hslSH:
+        m_qcolor.setHslF(xRel, yRel, m_lightness);
+        break;
+    case KisColorSelector::VH:
+        m_qcolor.setHsvF(xRel, m_hsvSaturation, yRel);
+        break;
+    case KisColorSelector::LH:
+        m_qcolor.setHslF(xRel, m_hslSaturation, yRel);
+        break;
+    case KisColorSelector::H:
+        m_qcolor.setHsvF(relPos, 1, 1);
+        break;
+    case KisColorSelector::hsvS:
+        m_qcolor.setHsvF(m_hue, relPos, m_value);
+        break;
+    case KisColorSelector::hslS:
+        m_qcolor.setHslF(m_hue, relPos, m_lightness);
+        break;
+    case KisColorSelector::V:
+        m_qcolor.setHsvF(m_hue, m_hsvSaturation, relPos);
+        break;
+    case KisColorSelector::L:
+        m_qcolor.setHslF(m_hue, m_hslSaturation, relPos);
+        break;
+    default:
+        Q_ASSERT(false);
+        m_qcolor = QColor();
+        return m_qcolor;
+    }
+
+    return m_qcolor;
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp	2011-02-17 12:12:57.000000000 +0000
@@ -0,0 +1,195 @@
+/*
+ *  Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published by
+ *  the Free Software Foundation; version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_shade_selector_line.h"
+
+#include <QPainter>
+#include <QColor>
+#include <QMouseEvent>
+
+#include <KConfig>
+#include <KConfigGroup>
+#include <KComponentData>
+#include <KGlobal>
+#include <KLocale>
+
+#include "KoResourceManager.h"
+#include "KoColorSpaceRegistry.h"
+
+#include "kis_canvas2.h"
+
+#include "kis_color_selector_base.h"
+#include "kis_minimal_shade_selector.h"
+
+#include <KDebug>
+
+KisShadeSelectorLine::KisShadeSelectorLine(QWidget *parent) :
+    KisShadeSelectorLineBase(parent), m_displayHelpText(false)
+{
+    setParam(0, 0, 0, 0, 0, 0);
+    updateSettings();
+}
+
+KisShadeSelectorLine::KisShadeSelectorLine(qreal hueDelta, qreal satDelta, qreal valDelta, QWidget *parent, qreal hueShift, qreal satShift, qreal valShift) :
+    KisShadeSelectorLineBase(parent), m_displayHelpText(false)
+{
+    setParam(hueDelta, satDelta, valDelta, hueShift, satShift, valShift);
+    updateSettings();
+}
+
+void KisShadeSelectorLine::setParam(qreal hueDelta, qreal satDelta, qreal valDelta, qreal hueShift, qreal satShift, qreal valShift)
+{
+    m_hueDelta = hueDelta;
+    m_saturationDelta = satDelta;
+    m_valueDelta = valDelta;
+
+    m_hueShift = hueShift;
+    m_saturationShift = satShift;
+    m_valueShift = valShift;
+}
+
+void KisShadeSelectorLine::setColor(const QColor &color)
+{
+    m_color=color;
+    update();
+}
+
+void KisShadeSelectorLine::updateSettings()
+{
+    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
+
+    m_gradient = cfg.readEntry("minimalShadeSelectorAsGradient", false);
+    m_patchCount = cfg.readEntry("minimalShadeSelectorPatchCount", 10);
+    m_lineHeight = cfg.readEntry("minimalShadeSelectorLineHeight", 20);
+    m_backgroundColor = QColor(128, 128, 128);
+
+    setMaximumHeight(m_lineHeight);
+    setMinimumHeight(m_lineHeight);
+}
+
+QString KisShadeSelectorLine::toString() const
+{
+    return QString("%1|%2|%3|%4|%5|%6|%7").arg(m_lineNumber).arg(m_hueDelta).arg(m_saturationDelta).arg(m_valueDelta).arg(m_hueShift).arg(m_saturationShift).arg(m_valueShift);
+}
+
+void KisShadeSelectorLine::fromString(const QString& string)
+{
+    QStringList strili = string.split('|');
+    m_lineNumber = strili.at(0).toInt();
+    m_hueDelta = strili.at(1).toDouble();
+    m_saturationDelta = strili.at(2).toDouble();
+    m_valueDelta = strili.at(3).toDouble();
+    if(strili.size()==4) return;            // don't crash, if reading old config files.
+    m_hueShift = strili.at(4).toDouble();
+    m_saturationShift = strili.at(5).toDouble();
+    m_valueShift = strili.at(6).toDouble();
+}
+
+void KisShadeSelectorLine::paintEvent(QPaintEvent *)
+{
+    m_pixelCache = QImage(width(), height(), QImage::Format_ARGB32_Premultiplied);
+    QPainter painter(&m_pixelCache);
+    painter.fillRect(0,0, width(), height(), m_backgroundColor);
+
+    KisMinimalShadeSelector* parent = dynamic_cast<KisMinimalShadeSelector*>(parentWidget());
+
+    const KoColorSpace* colorspace;
+    if(parent)
+        colorspace = parent->colorSpace();
+    else
+        colorspace = KoColorSpaceRegistry::instance()->rgb8();
+    KoColor koColor(colorspace);
+
+    int patchCount;
+    int patchSpacing;
+
+    if(m_gradient) {
+        patchCount = width();
+        patchSpacing = 0;
+    }
+    else {
+        patchCount = m_patchCount;
+        patchSpacing = 3;
+    }
+    qreal patchWidth = (width()-patchSpacing*patchCount)/qreal(patchCount);
+
+    qreal hueStep=m_hueDelta/qreal(patchCount);
+    qreal saturationStep=m_saturationDelta/qreal(patchCount);
+    qreal valueStep=m_valueDelta/qreal(patchCount);
+
+    int z=0;
+    for(int i=-patchCount/2; i<=patchCount/2; i++) {
+        if(i==0 && patchCount%2==0) continue;
+
+        qreal hue=m_color.hueF()+(i*hueStep)+m_hueShift;
+        while(hue<0) hue+=1.;
+        while(hue>1) hue-=1.;
+
+        qreal saturation = qBound(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
+
+        qreal value = qBound(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
+
+
+        koColor.fromQColor(QColor::fromHsvF(hue, saturation, value));
+        painter.fillRect(z*(patchWidth+patchSpacing)/*+1*/, 0, patchWidth, m_lineHeight, koColor.toQColor());
+        z++;
+    }
+
+    QPainter wpainter(this);
+    wpainter.drawImage(0,0, m_pixelCache);
+    if(m_displayHelpText) {
+        QString helpText(i18n("delta h=%1 s=%2 v=%3 shift h=%4 s=%5 v=%6",
+                         m_hueDelta,
+                         m_saturationDelta,
+                         m_valueDelta,
+                         m_hueShift,
+                         m_saturationShift,
+                         m_valueShift));
+        wpainter.setPen(QColor(255,255,255));
+        wpainter.drawText(rect(), helpText);
+    }
+}
+
+void KisShadeSelectorLine::mousePressEvent(QMouseEvent* e)
+{
+    if(e->button()!=Qt::LeftButton && e->button()!=Qt::RightButton) {
+        e->setAccepted(false);
+        return;
+    }
+
+    QColor color(m_pixelCache.pixel(e->pos()));
+    if(color==m_backgroundColor)
+        return;
+
+    KisColorSelectorBase* parent = dynamic_cast<KisColorSelectorBase*>(parentWidget());
+
+    KisColorSelectorBase::ColorRole role = KisColorSelectorBase::Foreground;
+    if(e->button()==Qt::RightButton)
+        role = KisColorSelectorBase::Background;
+
+    parent->commitColor(KoColor(color, KoColorSpaceRegistry::instance()->rgb8()), role);
+
+    KConfigGroup cfg = KGlobal::config()->group("advancedColorSelector");
+
+    bool onRightClick = cfg.readEntry("shadeSelectorUpdateOnRightClick", false);
+    bool onLeftClick = cfg.readEntry("shadeSelectorUpdateOnLeftClick", false);
+
+    if((e->button()==Qt::LeftButton && onLeftClick) || (e->button()==Qt::RightButton && onRightClick))
+        parent->setColor(parent->findGeneratingColor(KoColor(color, KoColorSpaceRegistry::instance()->rgb8())));
+
+    e->accept();
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h	2011-02-17 12:13:45.000000000 +0000
@@ -0,0 +1,73 @@
+/*
+ *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
+ *  Copyright (c) 2004-2008 Boudewijn Rempt <boud@valdyas.org>
+ *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
+ *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ *  Copyright (c) 2004 Cyrille Berger <cberger@cberger.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_BRUSHOP_H_
+#define KIS_BRUSHOP_H_
+
+#include "kis_brush_based_paintop.h"
+#include <kis_pressure_darken_option.h>
+#include <kis_pressure_opacity_option.h>
+#include <kis_pressure_size_option.h>
+#include <kis_pressure_rotation_option.h>
+#include <kis_pressure_mix_option.h>
+#include <kis_pressure_hsv_option.h>
+#include <kis_pressure_mirror_option.h>
+#include <kis_pressure_scatter_option.h>
+#include <kis_pressure_softness_option.h>
+#include <kis_pressure_sharpness_option.h>
+
+class KisBrushBasedPaintOpSettings;
+
+class QWidget;
+class QPointF;
+class KisPainter;
+class KisColorSource;
+
+
+class KisBrushOp : public KisBrushBasedPaintOp
+{
+
+public:
+
+    KisBrushOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+    virtual ~KisBrushOp();
+
+    double paintAt(const KisPaintInformation& info);
+    virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
+
+private:
+    KisColorSource* m_colorSource;
+    KisPressureSizeOption m_sizeOption;
+    KisPressureMirrorOption m_mirrorOption;
+    KisPressureOpacityOption m_opacityOption;
+    KisPressureSoftnessOption m_softnessOption;
+    KisPressureSharpnessOption m_sharpnessOption;
+    KisPressureDarkenOption m_darkenOption;
+    KisPressureRotationOption m_rotationOption;
+    KisPressureMixOption m_mixOption;
+    KisPressureScatterOption m_scatterOption;
+    QList<KisPressureHSVOption*> m_hsvOptions;
+    KoColorTransformation* m_hsvTransfo;
+    KisPaintDeviceSP m_dab;
+};
+
+#endif // KIS_BRUSHOP_H_
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp	2011-02-17 12:13:45.000000000 +0000
@@ -0,0 +1,181 @@
+/*
+ *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
+ *  Copyright (c) 2004-2008 Boudewijn Rempt <boud@valdyas.org>
+ *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
+ *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ *  Copyright (c) 2004,2010 Cyrille Berger <cberger@cberger.net>
+ *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_smudgeop.h"
+
+#include <QRect>
+
+#include <kis_debug.h>
+
+#include <KoColorSpaceRegistry.h>
+#include <KoColorTransformation.h>
+#include <KoColor.h>
+#include <KoCompositeOp.h>
+
+#include <kis_brush.h>
+#include <kis_global.h>
+#include <kis_paint_device.h>
+#include <kis_painter.h>
+#include <kis_selection.h>
+#include <kis_brush_based_paintop_settings.h>
+
+
+// Both limits defined to be 15 units away from the min (0) or max (255) to allow actual mixing of colors
+const quint8 MIXABLE_UPPER_LIMIT = 240;
+const quint8 MIXABLE_LOWER_LIMIT = 15;
+
+// All pieces of color extracted from the canvas will be centered around ANCHOR_POINT
+const QPoint ANCHOR_POINT = QPoint(0, 0);
+
+
+KisSmudgeOp::KisSmudgeOp(const KisBrushBasedPaintOpSettings *settings, KisPainter *painter, KisImageWSP image)
+        : KisBrushBasedPaintOp(settings, painter)
+        , m_firstRun(true)
+        , m_tempDev(0)
+{
+    Q_UNUSED(image);
+    Q_ASSERT(settings);
+    Q_ASSERT(painter);
+    m_sizeOption.readOptionSetting(settings);
+    m_opacityOption.readOptionSetting(settings);
+    m_rateOption.readOptionSetting(settings);
+    m_sizeOption.sensor()->reset();
+    m_opacityOption.sensor()->reset();
+    m_rateOption.sensor()->reset();
+
+    m_tempDev = new KisPaintDevice(painter->device()->colorSpace());
+    
+    // Initializing to a valid value to avoid weird errors during modifications
+    m_wholeTempData = QRect(0, 0, 0, 0);
+    
+    m_color = painter->paintColor();
+}
+
+KisSmudgeOp::~KisSmudgeOp()
+{
+}
+
+/* To smudge, one does the following:
+
+ 1.- First step: initialize a temporary paint device (m_tempDev) with a copy of the colors below the mouse pointer.
+ All other times:
+ 2.- Vanishing step: Reduce the transparency of the temporary paint device so as to let it mix gradually.
+ 3.- Combine: Combine the temporary device with the piece the brush currently is 'painting', according to a ratio:
+ in this case, opacity. (This is what in the first step does the copying of the data).
+ 4.- Blit to screen: This combination is then composited upon the actual image.
+ 5.- Special case: If the size of the dab (brush mask) changes during the stroke (for example, when
+ using a stylus sensitive to pressure), align the colors extracted to the center of the previously absorbed colors,
+ and in the vanishing step, ensure that all the colors have their opacity slowly reduced, not just the ones below
+ the current brush mask.
+ 
+ For the sake of speed optimization, the extent of the largest area of color contained in the
+ temporary device is cached such that only the colored areas are considered.
+ TODO: Make this cached value dump colors that have faded nearly completely and lie outside of the rectangle (dab)
+ of the current iteration.
+*/
+    
+double KisSmudgeOp::paintAt(const KisPaintInformation& info)
+{
+    KisBrushSP brush = m_brush;
+    
+    // Simple error catching
+    if (!painter()->device()) return 1.0;
+    if (!brush) return 1.0;
+    if (!brush->canPaintFor(info)) return 1.0;
+
+    // Grow the brush (this includes the mask) according to pressure or other parameters
+    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
+    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
+    setCurrentScale(scale);
+    
+    /* Align a point that represents the top-left corner of the brush-stroke-rendering
+    with the mouse pointer and take into account the brush mask size */
+    QPointF hotSpot = brush->hotSpot(scale, scale);
+    QPointF pt = info.pos() - hotSpot;
+
+    /* Split the coordinates into integer plus fractional parts. The integer
+    is where the dab will be positioned and the fractional part determines
+    the sub-pixel positioning. */
+    qint32 x, y;
+    double xFraction, yFraction;
+
+    splitCoordinate(pt.x(), &x, &xFraction);
+    splitCoordinate(pt.y(), &y, &yFraction);
+
+    KisFixedPaintDeviceSP maskDab = 0;
+
+    // Extract the brush mask (maskDab) from brush, and turn it into a transparency mask (alpha8).
+    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
+        // This is for bitmap brushes
+        maskDab = brush->paintDevice(painter()->device()->colorSpace(), scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+    } else {
+        // This is for parametric brushes, those created in the Autobrush popup config dialogue
+        maskDab = cachedDab();
+        brush->mask(maskDab, m_color, scale, scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+    }
+
+    // Convenient renaming for the limits of the maskDab
+    qint32 sw = maskDab->bounds().width();
+    qint32 sh = maskDab->bounds().height();
+    
+    /* Prepare the top left corner of the temporary paint device where the extracted color will be drawn */
+    QPoint extractionTopLeft = QPoint(ANCHOR_POINT.x() - sw / 2,
+                                      ANCHOR_POINT.y() - sh / 2);
+                                      
+    /* In the block below, the opacity of the colors stored in m_tempDev
+    is reduced in opacity. Nothing of the color present inside it is left out */
+    quint8 opacity = OPACITY_OPAQUE_U8;
+    if (!m_firstRun) {
+        opacity = m_rateOption.apply(opacity, info);
+        /* Without those limits, the smudge brush doesn't smudge anymore, it either makes a single
+        dropplet of color, or drags a frame indefinitely over the canvas. */
+        opacity = qBound(MIXABLE_LOWER_LIMIT, opacity, MIXABLE_UPPER_LIMIT);
+                
+        // Invert the opacity value for color absorption in the next lines (copyPainter)
+        opacity = OPACITY_OPAQUE_U8 - opacity;
+        m_wholeTempData |= QRect(extractionTopLeft, maskDab->bounds().size());
+    }
+    else {
+        m_firstRun = false;
+        m_wholeTempData = QRect(extractionTopLeft, maskDab->bounds().size());
+    }
+    /* copyPainter will extract the piece of color (image) to be duplicated to generate the smudge effect,
+    it extracts a simple unmasked rectangle and adds it to what was extracted before in this same block of code,
+    this sometimes shows artifacts when the brush is used with stylus and high spacing */
+    KisPainter copyPainter(m_tempDev);
+    copyPainter.setCompositeOp(COMPOSITE_COPY);
+    copyPainter.setOpacity(opacity);
+    copyPainter.bitBlt(m_wholeTempData.x(), m_wholeTempData.y(), painter()->device(),
+                       x - m_wholeTempData.x() + extractionTopLeft.x(),
+                       y - m_wholeTempData.y() + extractionTopLeft.y(),
+                       m_wholeTempData.width(), m_wholeTempData.height());
+    copyPainter.end();
+    
+    // This is the line that renders the extracted colors to the screen, with maskDab giving it the brush shape
+    painter()->bitBltWithFixedSelection(x, y, m_tempDev, maskDab, 0, 0, extractionTopLeft.x(), extractionTopLeft.y(), sw, sh);
+    
+    return spacing(scale);
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/deform/kis_deform_paintop.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/deform/kis_deform_paintop.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/deform/kis_deform_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/deform/kis_deform_paintop.cpp	2011-02-17 12:13:46.000000000 +0000
@@ -0,0 +1,160 @@
+/*
+ *  Copyright (c) 2008-2010 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_deform_paintop.h"
+#include "kis_deform_paintop_settings.h"
+
+#include <cmath>
+
+#include <QRect>
+
+#include <kis_image.h>
+#include <kis_debug.h>
+
+#include "kis_global.h"
+#include "kis_paint_device.h"
+#include "kis_painter.h"
+#include "kis_types.h"
+#include "kis_paintop.h"
+#include "kis_selection.h"
+#include "kis_random_accessor.h"
+
+#include <kis_fixed_paint_device.h>
+
+#include "kis_deform_option.h"
+#include "kis_brush_size_option.h"
+#include <KoColorSpaceRegistry.h>
+#include <KoCompositeOp.h>
+
+KisDeformPaintOp::KisDeformPaintOp(const KisDeformPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
+        : KisPaintOp(painter)
+{
+    Q_UNUSED(image);
+    Q_ASSERT(settings);
+
+    m_sizeProperties.readOptionSetting(settings);
+
+    // sensors
+    m_sizeOption.readOptionSetting(settings);
+    m_opacityOption.readOptionSetting(settings);
+    m_rotationOption.readOptionSetting(settings);
+    m_sizeOption.sensor()->reset();
+    m_opacityOption.sensor()->reset();
+    m_rotationOption.sensor()->reset();
+
+    m_properties.action = settings->getInt(DEFORM_ACTION);
+    m_properties.deformAmount = settings->getDouble(DEFORM_AMOUNT);
+    m_properties.useBilinear = settings->getBool(DEFORM_USE_BILINEAR);
+    m_properties.useCounter = settings->getBool(DEFORM_USE_COUNTER);
+    m_properties.useOldData = settings->getBool(DEFORM_USE_OLD_DATA);
+
+    m_deformBrush.setProperties( &m_properties );
+    m_deformBrush.setSizeProperties( &m_sizeProperties );
+
+    m_deformBrush.initDeformAction();
+
+    m_dev = source();
+    
+    if ((m_sizeProperties.diameter * 0.5) > 1) {
+        m_ySpacing = m_xSpacing = m_sizeProperties.diameter * 0.5 * m_sizeProperties.spacing;
+    } else {
+        m_ySpacing = m_xSpacing = 1.0;
+    }
+    m_spacing = m_xSpacing;
+    
+    
+    
+}
+
+KisDeformPaintOp::~KisDeformPaintOp()
+{
+}
+
+qreal KisDeformPaintOp::paintAt(const KisPaintInformation& info)
+{
+    if (!painter()) return m_spacing;
+    if (!m_dev) return m_spacing;
+
+#if 1
+        KisFixedPaintDeviceSP dab = cachedDab(painter()->device()->colorSpace());
+
+        qint32 x;
+        double subPixelX;
+        qint32 y;
+        double subPixelY;
+
+        QPointF pt = info.pos();
+        if (m_sizeProperties.jitterEnabled){
+                pt.setX(pt.x() + (  ( m_sizeProperties.diameter * drand48() ) - m_sizeProperties.diameter * 0.5) * m_sizeProperties.jitterMovementAmount);
+                pt.setY(pt.y() + (  ( m_sizeProperties.diameter * drand48() ) - m_sizeProperties.diameter * 0.5) * m_sizeProperties.jitterMovementAmount);
+        }
+
+        qreal rotation = m_rotationOption.apply(info);
+        qreal scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
+        
+        setCurrentRotation(rotation);
+        setCurrentScale(scale);
+        
+        rotation += m_sizeProperties.rotation;
+        scale *= m_sizeProperties.scale;
+
+        QPointF pos = pt - m_deformBrush.hotSpot(scale,rotation);
+
+        splitCoordinate(pos.x(), &x, &subPixelX);
+        splitCoordinate(pos.y(), &y, &subPixelY);
+
+        KisFixedPaintDeviceSP mask = m_deformBrush.paintMask(dab, m_dev, 
+                                                             scale,rotation,
+                                                             info.pos(), 
+                                                             subPixelX,subPixelY,
+                                                             x,y
+                                                             );
+
+        // this happens for the first dab of the move mode, we need more information for being able to move 
+        if (!mask){
+            return m_spacing;
+        }
+
+        quint8 origOpacity = m_opacityOption.apply(painter(), info);
+        painter()->bltFixedWithFixedSelection(x,y, dab, mask, mask->bounds().width() ,mask->bounds().height() );
+        painter()->setOpacity(origOpacity);
+        
+        return m_spacing;
+#else
+        if (!m_dab) {
+            m_dab = new KisPaintDevice(painter()->device()->colorSpace());
+        } else {
+            m_dab->clear();
+        }
+
+        m_deformBrush.oldDeform(m_dab,m_dev,info.pos());
+        QRect rc = m_dab->extent();
+        painter()->bitBlt(rc.x(), rc.y(), m_dab, rc.x(), rc.y(), rc.width(), rc.height());
+        return m_spacing;
+#endif
+
+}
+
+
+double KisDeformPaintOp::spacing(double /*pressure*/) const
+{
+    return m_spacing;
+}
+
+
+
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp	2011-02-17 12:13:41.000000000 +0000
@@ -0,0 +1,221 @@
+/*
+ *  Copyright (c) 2008,2009 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *  Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_hatching_paintop.h"
+#include "kis_hatching_paintop_settings.h"
+
+#include <cmath>
+#include <QRect>
+
+#include <KoColor.h>
+#include <KoColorSpace.h>
+
+#include <kis_image.h>
+#include <kis_debug.h>
+
+#include <kis_global.h>
+#include <kis_paint_device.h>
+#include <kis_painter.h>
+#include <kis_types.h>
+#include <kis_paintop.h>
+#include <kis_brush_based_paintop.h>
+#include <kis_paint_information.h>
+
+#include <kis_pressure_opacity_option.h>
+
+#include <KoColorSpaceRegistry.h>
+
+KisHatchingPaintOp::KisHatchingPaintOp(const KisHatchingPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
+                   : KisBrushBasedPaintOp(settings, painter)
+                   , m_image(image)
+{
+    m_settings = new KisHatchingPaintOpSettings();
+    settings->initializeTwin(m_settings);
+
+    m_hatchingBrush = new HatchingBrush(m_settings);
+
+    m_crosshatchingOption.readOptionSetting(settings);
+    m_separationOption.readOptionSetting(settings);
+    m_thicknessOption.readOptionSetting(settings);
+    m_opacityOption.readOptionSetting(settings);
+    m_sizeOption.readOptionSetting(settings);
+    m_crosshatchingOption.sensor()->reset();
+    m_separationOption.sensor()->reset();
+    m_thicknessOption.sensor()->reset();
+    m_opacityOption.sensor()->reset();
+    m_sizeOption.sensor()->reset();
+}
+
+KisHatchingPaintOp::~KisHatchingPaintOp()
+{
+    delete m_hatchingBrush;
+}
+
+double KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
+{
+    //------START SIMPLE ERROR CATCHING-------
+    if (!painter()->device()) return 1;
+    if (!m_hatchedDab)
+        m_hatchedDab = new KisPaintDevice(painter()->device()->colorSpace());
+    else
+        m_hatchedDab->clear();
+
+    //Simple convenience renaming, I'm thinking of removing these inherited quirks
+    KisBrushSP brush = m_brush;
+    KisPaintDeviceSP device = painter()->device();
+
+    //Macro to catch errors
+    Q_ASSERT(brush);
+
+    //----------SIMPLE error catching code, maybe it's not even needed------
+    if (!brush) return 1;
+    if (!brush->canPaintFor(info)) return 1;
+
+    //SENSOR-depending settings
+    m_settings->crosshatchingsensorvalue = m_crosshatchingOption.apply(info);
+    m_settings->separationsensorvalue = m_separationOption.apply(info);
+    m_settings->thicknesssensorvalue = KisPaintOp::scaleForPressure(m_thicknessOption.apply(info));
+
+    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
+    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
+
+    setCurrentScale(scale);
+
+    quint8 origOpacity = m_opacityOption.apply(painter(), info);
+
+    //-----------POSITIONING code----------
+    QPointF hotSpot = brush->hotSpot(scale, scale);
+    QPointF pt = info.pos() - hotSpot;
+
+    qint32 x, y;
+    double xFraction, yFraction;
+
+    splitCoordinate(pt.x(), &x, &xFraction);
+    splitCoordinate(pt.y(), &y, &yFraction);
+
+    if (!m_settings->subpixelprecision) {
+        xFraction = 0;
+        yFraction = 0;
+    }
+    //--------END POSITIONING CODE-----------
+
+    //DECLARING EMPTY pixel-only paint device, note that it is a smart pointer
+    KisFixedPaintDeviceSP maskDab = 0;
+    
+    /*--------copypasted from SmudgeOp-------
+    ---This IF-ELSE block is used to turn the mask created in the BrushTip dialogue
+    into a beautiful SELECTION MASK (it's an opacity multiplier), intended to give
+    the brush a "brush feel" (soft borders, round shape) despite it comes from a
+    simple, ugly, hatched rectangle.*/
+    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
+        maskDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+    } else {
+        maskDab = cachedDab();
+        KoColor color = painter()->paintColor();
+        color.convertTo(maskDab->colorSpace());
+        brush->mask(maskDab, color, scale, scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+    }
+
+    /*-----Convenient renaming for the limits of the maskDab, this will be used
+    to hatch a dab of just the right size------*/
+    qint32 sw = maskDab->bounds().width();
+    qint32 sh = maskDab->bounds().height();
+
+    //------This If_block pre-fills the future m_hatchedDab with a pretty backgroundColor
+    if (m_settings->opaquebackground) {
+        KoColor aersh = painter()->backgroundColor();
+        m_hatchedDab->fill(0, 0, (sw-1), (sh-1), aersh.data()); //this plus yellow background = french fry brush
+    }
+
+    // Trick for moire pattern to look better
+    bool donotbasehatch = false;
+
+    /* If block describing how to stack hatching passes to generate
+    crosshatching according to user specifications */
+    if (m_settings->enabledcurvecrosshatching) {
+        if (m_settings->perpendicular) {
+            if (m_settings->crosshatchingsensorvalue > 0.5)
+                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(90), painter()->paintColor());
+        }
+        else if (m_settings->minusthenplus) {
+            if (m_settings->crosshatchingsensorvalue > 0.33)
+                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
+            if (m_settings->crosshatchingsensorvalue > 0.67)
+                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
+        }
+        else if (m_settings->plusthenminus) {
+            if (m_settings->crosshatchingsensorvalue > 0.33)
+                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
+            if (m_settings->crosshatchingsensorvalue > 0.67)
+                m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
+        }
+        else if (m_settings->moirepattern) {
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle((m_settings->crosshatchingsensorvalue)*180), painter()->paintColor());
+            donotbasehatch = true;
+        }
+    }
+    else {
+        if (m_settings->perpendicular) {
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(90), painter()->paintColor());
+        }
+        else if (m_settings->minusthenplus) {
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
+        }
+        else if (m_settings->plusthenminus) {
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(45), painter()->paintColor());
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-45), painter()->paintColor());
+        }
+        else if (m_settings->moirepattern) {
+            m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, spinAngle(-10), painter()->paintColor());
+        }
+    }
+
+    if (!donotbasehatch)
+        m_hatchingBrush->hatch(m_hatchedDab, x, y, sw, sh, m_settings->angle, painter()->paintColor());
+
+    // The most important line, the one that paints to the screen.
+    painter()->bitBltWithFixedSelection(x, y, m_hatchedDab, maskDab, sw, sh);
+    painter()->setOpacity(origOpacity);
+    
+    /*-----It took me very long to realize the importance of this line, this is
+    the line that makes all brushes be slow, even if they're small, yay!-------*/
+    return spacing(scale);
+}
+
+double KisHatchingPaintOp::spinAngle(double spin)
+{
+    double tempangle = m_settings->angle + spin;
+    qint8 factor = 1;
+
+    if (tempangle < 0)
+        factor = -1;
+
+    tempangle = fabs(fmod(tempangle, 180));
+
+    if ((tempangle >= 0) && (tempangle <= 90))
+        return factor * tempangle;
+    else if ((tempangle > 90) && (tempangle <= 180))
+        return factor * -(180 - tempangle);
+
+    return 0;   // this should never be executed except if NAN
+}
+;
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.h 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.h
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.h	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/hatching/kis_hatching_paintop.h	2011-02-17 12:13:41.000000000 +0000
@@ -0,0 +1,104 @@
+/*
+ *  Copyright (c) 2008 Boudewijn Rempt <boud@valdyas.org>
+ *  Copyright (c) 2008, 2009 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_HATCHING_PAINTOP_H_
+#define KIS_HATCHING_PAINTOP_H_
+
+#include <kis_paintop.h>
+#include <kis_brush_based_paintop.h>
+#include <kis_types.h>
+
+#include "hatching_brush.h"
+#include "kis_hatching_paintop_settings.h"
+
+#include <kis_hatching_pressure_crosshatching_option.h>
+#include <kis_hatching_pressure_separation_option.h>
+#include <kis_hatching_pressure_thickness_option.h>
+
+#include <kis_pressure_opacity_option.h>
+#include <kis_pressure_size_option.h>
+
+
+class KisPainter;
+
+class KisHatchingPaintOp : public KisBrushBasedPaintOp
+{
+
+public:
+
+    KisHatchingPaintOp(const KisHatchingPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+    virtual ~KisHatchingPaintOp();
+
+    /**
+     *  Paint a hatched dab around the mouse cursor according to
+     *  sensor settings and user preferences.
+     */
+    double paintAt(const KisPaintInformation& info);
+    
+    /**
+     *  Returns a number between -90 and 90, and corresponds to the
+     *  angle that results from adding angle 'spin' to 'm_settings->angle',
+     *  corrected to coincide with the way the GUI operates.
+     */
+    double spinAngle(double spin);
+
+private:
+    KisHatchingPaintOpSettings* m_settings;
+    KisImageWSP m_image;
+    HatchingBrush * m_hatchingBrush;
+    
+    /**
+     *  PaintDevice that will be filled with a single pass of
+     *  hatching by HatchingBrush::hatch
+     */
+    KisPaintDeviceSP m_hatchedDab;
+    
+    /**
+     *  Curve to control the intensity of crosshatching 
+     *  according to user preferences set in the GUI
+     */
+    KisHatchingPressureCrosshatchingOption m_crosshatchingOption;
+    
+    /**
+     *  Curve to control the dynamics of separation with
+     *  device input
+     */
+    KisHatchingPressureSeparationOption m_separationOption;
+    
+    /**
+     *  Curve to control the thickness of the hatching lines
+     *  with device input
+     */
+    KisHatchingPressureThicknessOption m_thicknessOption;
+    
+    /**
+     *  Curve to control the opacity of the entire dab
+     *  with device input
+     */
+    KisPressureOpacityOption m_opacityOption;
+    
+    /**
+     *  Curve to control the size of the entire dab
+     *  with device input
+     */
+    KisPressureSizeOption m_sizeOption;
+};
+
+#endif // KIS_HATCHING_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp	2011-02-17 12:13:40.000000000 +0000
@@ -0,0 +1,271 @@
+/*
+ *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *  Copyright (c) 2010 Ricardo Cabello <hello@mrdoob.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_sketch_paintop.h"
+#include "kis_sketch_paintop_settings.h"
+
+#include <cmath>
+#include <QRect>
+
+#include <KoColor.h>
+#include <KoColorSpace.h>
+
+#include <kis_image.h>
+#include <kis_debug.h>
+
+#include <kis_global.h>
+#include <kis_paint_device.h>
+#include <kis_painter.h>
+#include <kis_types.h>
+#include <kis_paintop.h>
+#include <kis_paint_information.h>
+
+#include <kis_pressure_opacity_option.h>
+
+/*
+* Based on Harmony project http://github.com/mrdoob/harmony/
+*/
+// chrome : diff 0.2, sketchy : 0.3, fur: 0.5
+// fur : distance / thresholdDistance
+
+// shaded: opacity per line :/
+// ((1 - (d / 1000)) * 0.1 * BRUSH_PRESSURE), offset == 0
+// chrome: color per line :/
+//this.context.strokeStyle = "rgba(" + Math.floor(Math.random() * COLOR[0]) + ", " + Math.floor(Math.random() * COLOR[1]) + ", " + Math.floor(Math.random() * COLOR[2]) + ", " + 0.1 * BRUSH_PRESSURE + " )";
+
+// long fur
+// from: count + offset * -random
+// to: i point - (offset * -random)  + random * 2
+// probability distance / thresholdDistnace
+
+// shaded: probabity : paint always - 0.0 density
+
+KisSketchPaintOp::KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
+        : KisPaintOp(painter)
+{
+    Q_UNUSED(image);
+    m_opacityOption.readOptionSetting(settings);
+    m_sizeOption.readOptionSetting(settings);
+    m_rotationOption.readOptionSetting(settings);
+    m_sketchProperties.readOptionSetting(settings);
+    m_brushOption.readOptionSetting(settings);
+
+    m_brush = m_brushOption.brush();
+    
+    m_opacityOption.sensor()->reset();
+    m_sizeOption.sensor()->reset();
+    m_rotationOption.sensor()->reset();
+
+    m_painter = 0;
+    m_count = 0;
+}
+
+KisSketchPaintOp::~KisSketchPaintOp()
+{
+    delete m_painter;
+}
+
+void KisSketchPaintOp::drawConnection(const QPointF& start, const QPointF& end)
+{
+    if (m_sketchProperties.lineWidth == 1){
+        m_painter->drawThickLine(start, end, m_sketchProperties.lineWidth,m_sketchProperties.lineWidth);
+    }else{
+        m_painter->drawLine(start, end, m_sketchProperties.lineWidth, true);
+    }
+   
+}
+
+void KisSketchPaintOp::updateBrushMask(const KisPaintInformation& info, qreal scale, qreal rotation){
+    m_maskDab = cachedDab(m_dab->colorSpace());
+    
+    if (m_brush->brushType() == IMAGE || m_brush->brushType() == PIPE_IMAGE) {
+        m_maskDab = m_brush->paintDevice(m_dab->colorSpace(), scale, rotation, info, 0.0, 0.0);
+    } else {
+        KoColor color = painter()->paintColor();
+        color.convertTo(m_maskDab->colorSpace());
+        m_brush->mask(m_maskDab, color, scale, scale, rotation, info, 0.0, 0.0);
+    }
+
+    // update bounding box
+    m_brushBoundingBox = m_maskDab->bounds();
+    m_hotSpot = m_brush->hotSpot(scale,scale,rotation);
+    m_brushBoundingBox.translate(info.pos() - m_hotSpot);
+}
+
+KisDistanceInformation KisSketchPaintOp::paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist)
+{
+    Q_UNUSED(savedDist);
+    if (!painter()) return KisDistanceInformation();
+
+    if (!m_dab) {
+        m_dab = new KisPaintDevice(painter()->device()->colorSpace());
+        m_painter = new KisPainter(m_dab);
+    } else {
+        m_dab->clear();
+    }
+
+    QPointF prevMouse = pi1.pos();
+    QPointF mousePosition = pi2.pos();
+    m_points.append(mousePosition);
+
+
+    // shaded: does not draw this line, chrome does, fur does
+    if (m_sketchProperties.makeConnection){
+        drawConnection(prevMouse,mousePosition);
+    }
+
+    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(pi2));
+    double rotation = m_rotationOption.apply(pi2);
+    
+    setCurrentScale(scale);
+    setCurrentRotation(rotation);
+    
+    qreal thresholdDistance;
+    
+    // update the mask for simple mode only once
+    // determine the radius
+    if (m_count == 0 && m_sketchProperties.simpleMode){
+        updateBrushMask(pi2,1.0,0.0);
+        //m_radius = qMax(m_maskDab->bounds().width(),m_maskDab->bounds().height()) * 0.5;
+        m_radius = 0.5 * qMax(m_brush->width(), m_brush->height());
+    }
+    
+    if (!m_sketchProperties.simpleMode){
+        updateBrushMask(pi2,scale,rotation);
+        m_radius = qMax(m_maskDab->bounds().width(),m_maskDab->bounds().height()) * 0.5;
+        thresholdDistance = pow(m_radius,2);
+    }
+
+    if (m_sketchProperties.simpleMode){
+        // update the radius according scale in simple mode
+        thresholdDistance = pow(m_radius * scale,2);
+    }    
+
+    // determine density
+    qreal density = thresholdDistance * m_sketchProperties.probability;
+    
+    // probability behaviour
+    // TODO: make this option
+    qreal probability = 1.0 - m_sketchProperties.probability;
+
+    QColor painterColor = painter()->paintColor().toQColor();
+    QColor randomColor;
+    KoColor color(m_dab->colorSpace());
+    
+    int w = m_maskDab->bounds().width();
+    quint8 opacityU8 = 0;
+    quint8 * pixel;
+    qreal distance;
+    QPoint  positionInMask;
+    QPointF diff;
+
+    m_painter->setPaintColor( painter()->paintColor() );
+    int size = m_points.size();
+    // MAIN LOOP
+    for (int i = 0; i < size; i++) {
+        diff = m_points.at(i) - mousePosition;
+        distance = diff.x() * diff.x() + diff.y() * diff.y();
+        
+        // circle test
+        bool makeConnection = false;
+        if (m_sketchProperties.simpleMode){
+            if (distance < thresholdDistance){
+                makeConnection = true;
+            }
+        // mask test
+        }else{
+            
+            if ( m_brushBoundingBox.contains( m_points.at(i) ) ){
+                positionInMask = (diff + m_hotSpot).toPoint();
+                pixel = m_maskDab->data() + ((positionInMask.y() * w + positionInMask.x()) * m_maskDab->pixelSize());
+                opacityU8 = m_maskDab->colorSpace()->opacityU8( pixel );
+                if (opacityU8 != 0){
+                    makeConnection = true;
+                }
+            }
+            
+        }
+        
+        if (!makeConnection){
+            // check next point
+            continue;
+        }
+
+        if (m_sketchProperties.distanceDensity){
+            probability =  distance / density;
+        }
+
+        // density check
+        if (drand48() >= probability) {
+            QPointF offsetPt = diff * m_sketchProperties.offset;
+            
+            if (m_sketchProperties.randomRGB){
+                // some color transformation per line goes here
+                randomColor.setRgbF(drand48() * painterColor.redF(),
+                                    drand48() * painterColor.greenF(),
+                                    drand48() * painterColor.blueF()
+                                    );
+                color.fromQColor(randomColor);
+                m_painter->setPaintColor(color);
+            }
+            
+            // distance based opacity
+            quint8 opacity = OPACITY_OPAQUE_U8;
+            if (m_sketchProperties.distanceOpacity){ 
+                opacity *= qRound((1.0 - (distance / thresholdDistance)));
+            }
+            
+            if (m_sketchProperties.randomOpacity){
+                opacity *= drand48();
+            }
+            
+            m_painter->setOpacity(opacity);
+            
+            if (m_sketchProperties.magnetify) {
+                drawConnection(mousePosition + offsetPt, m_points.at(i) - offsetPt);
+            }else{
+                drawConnection(mousePosition + offsetPt, mousePosition - offsetPt);
+            }
+
+            
+            
+        }
+    }// end of MAIN LOOP
+
+    m_count++;
+
+    QRect rc = m_dab->extent();
+    quint8 origOpacity = m_opacityOption.apply(painter(), pi2);
+
+    painter()->bitBlt(rc.x(), rc.y(), m_dab, rc.x(), rc.y(), rc.width(), rc.height());
+    painter()->setOpacity(origOpacity);
+
+    KisVector2D end = toKisVector2D(pi2.pos());
+    KisVector2D start = toKisVector2D(pi1.pos());
+    KisVector2D dragVec = end - start;
+
+    return KisDistanceInformation(0, dragVec.norm());
+}
+
+
+
+double KisSketchPaintOp::paintAt(const KisPaintInformation& info)
+{
+    return paintLine(info, info).spacing;
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.h 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.h
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.h	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/sketch/kis_sketch_paintop.h	2011-02-17 12:13:40.000000000 +0000
@@ -0,0 +1,73 @@
+/*
+ *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_SKETCH_PAINTOP_H_
+#define KIS_SKETCH_PAINTOP_H_
+
+#include <kis_paintop.h>
+#include <kis_types.h>
+
+#include "kis_sketchop_option.h"
+#include "kis_sketch_paintop_settings.h"
+
+#include "kis_painter.h"
+#include <kis_pressure_size_option.h>
+#include <kis_brush_option.h>
+#include <kis_pressure_rotation_option.h>
+
+class KisSketchPaintOp : public KisPaintOp
+{
+
+public:
+
+    KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+    virtual ~KisSketchPaintOp();
+    virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
+    double paintAt(const KisPaintInformation& info);
+
+private:
+    // pixel buffer
+    KisPaintDeviceSP m_dab;
+    
+    // mask detection area
+    KisFixedPaintDeviceSP m_maskDab;
+    QRectF m_brushBoundingBox;
+    QPointF m_hotSpot;
+
+    // simple mode
+    qreal m_radius;
+    
+    KisPressureOpacityOption m_opacityOption;
+    KisPressureSizeOption m_sizeOption;
+    KisPressureRotationOption m_rotationOption;
+    
+    KisBrushOption m_brushOption;
+    SketchProperties m_sketchProperties;
+    
+    QVector<QPointF> m_points;
+    int m_count;
+    KisPainter * m_painter;
+    KisBrushSP m_brush;
+
+private:
+    void drawConnection(const QPointF &start, const QPointF &end);
+    void updateBrushMask(const KisPaintInformation& info, qreal scale, qreal rotation);
+
+};
+
+#endif // KIS_SKETCH_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/spray/spray_brush.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/spray/spray_brush.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/spray/spray_brush.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/spray/spray_brush.cpp	2011-02-17 12:13:42.000000000 +0000
@@ -0,0 +1,554 @@
+/*
+ *  Copyright (c) 2008-2010 Lukáš Tvrdý <lukast.dev@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "spray_brush.h"
+
+#include <KoColor.h>
+#include <KoColorSpace.h>
+#include <KoColorTransformation.h>
+#include <KoColorSpaceRegistry.h>
+#include <KoCompositeOp.h>
+
+#include "kis_paintop.h"
+
+#include <QVariant>
+#include <QHash>
+#include <QTransform>
+#include <QImage>
+#include <QTransform>
+
+#include <kis_random_accessor.h>
+#include <kis_random_sub_accessor.h>
+
+#include <kis_paint_device.h>
+
+#include <kis_painter.h>
+#include <kis_paint_information.h>
+
+#include "kis_spray_paintop_settings.h"
+
+#include <cmath>
+#include <ctime>
+
+#include "random_gauss.h"
+
+SprayBrush::SprayBrush()
+{
+    srand48(time(0));
+    m_painter = 0;
+    m_transfo = 0;
+    m_rand = new RandomGauss(time(0));
+}
+
+SprayBrush::~SprayBrush()
+{
+    delete m_painter;
+    delete m_transfo;
+    delete m_rand;
+}
+
+
+qreal SprayBrush::rotationAngle()
+{
+    qreal rotation = 0.0;
+
+    if ( m_shapeDynamicsProperties->fixedRotation ){
+        rotation = deg2rad( m_shapeDynamicsProperties->fixedAngle );
+    }
+
+    if ( m_shapeDynamicsProperties->randomRotation ){
+
+        if ( m_properties->gaussian ) {
+                rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
+        } else {
+                rotation = linearInterpolation(rotation, M_PI * 2.0 * drand48(), m_shapeDynamicsProperties->randomRotationWeight );
+        }
+    }
+
+    return rotation;
+}
+
+
+
+void SprayBrush::paint(KisPaintDeviceSP dab, KisPaintDeviceSP source,
+                       const KisPaintInformation& info,qreal rotation, qreal scale,
+                       const KoColor &color, const KoColor &bgColor)
+{
+    // initializing painter
+
+    if (!m_painter) {
+        m_painter = new KisPainter(dab);
+        m_painter->setFillStyle(KisPainter::FillStyleForegroundColor);
+        m_painter->setMaskImageSize(m_shapeProperties->width, m_shapeProperties->height );
+        m_pixelSize = dab->colorSpace()->pixelSize();
+        if (m_colorProperties->useRandomHSV){
+            m_transfo = dab->colorSpace()->createColorTransformation("hsv_adjustment", QHash<QString, QVariant>());
+        }
+        
+        m_brushQImage = m_shapeProperties->image;
+        if (!m_brushQImage.isNull()){
+            m_brushQImage = m_brushQImage.scaled(m_shapeProperties->width, m_shapeProperties->height);
+        }
+        m_imageDevice = new KisPaintDevice( dab->colorSpace() );
+    }
+
+
+    qreal x = info.pos().x();
+    qreal y = info.pos().y();
+    KisRandomAccessor accessor = dab->createRandomAccessor(qRound(x), qRound(y));
+    KisRandomSubAccessorPixel subAcc = source->createRandomSubAccessor();
+
+    m_inkColor = color;
+
+    // apply size sensor
+    m_radius = m_properties->radius * scale;
+
+    // jitter movement
+    if ( m_properties->jitterMovement ) {
+        x = x + ((2 * m_radius * drand48()) - m_radius) * m_properties->amount;
+        y = y + ((2 * m_radius * drand48()) - m_radius) * m_properties->amount;
+    }
+
+    // this is wrong for every shape except pixel and anti-aliased pixel
+
+
+    if (m_properties->useDensity) {
+        m_particlesCount = (m_properties->coverage * (M_PI * m_radius * m_radius));
+    }else{
+        m_particlesCount = m_properties->particleCount;
+    }
+
+    QHash<QString, QVariant> params;
+    qreal nx, ny;
+    int ix, iy;
+
+    qreal angle;
+    qreal length;
+    qreal rotationZ = 0.0;
+    qreal particleScale = 1.0;
+
+    int steps = 118;
+    bool shouldColor = true;
+    if (m_colorProperties->fillBackground){
+        m_painter->setPaintColor(bgColor);
+        paintCircle(m_painter,x,y,m_radius,steps);
+    }
+
+    QTransform m;
+    m.reset();
+    m.rotateRadians(-rotation + deg2rad(m_properties->brushRotation) );
+    m.scale( m_properties->scale, m_properties->scale);
+    
+    for (quint32 i = 0; i < m_particlesCount; i++){
+        // generate random angle
+        angle = drand48() * M_PI * 2;
+
+        // generate random length
+        if ( m_properties->gaussian ) {
+            length = qBound<qreal>(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0);
+        } else {
+            length = drand48();
+        }
+
+        if (m_shapeDynamicsProperties->enabled){
+            // rotation
+            rotationZ = rotationAngle();
+
+            if (m_shapeDynamicsProperties->followCursor){
+                
+                rotationZ = linearInterpolation( rotationZ,angle,m_shapeDynamicsProperties->followCursorWeigth );
+            }
+
+            
+            if (m_shapeDynamicsProperties->followDrawingAngle){
+                
+                rotationZ = linearInterpolation( rotationZ,info.angle(),m_shapeDynamicsProperties->followDrawingAngleWeight );
+            }
+
+            // random size - scale
+            if (m_shapeDynamicsProperties->randomSize){
+                particleScale = drand48();
+            }
+        }
+        // generate polar coordinate
+        nx = (m_radius * cos(angle)  * length);
+        ny = (m_radius * sin(angle)  * length);
+
+        // compute the height of the ellipse
+        ny *= m_properties->aspect;
+
+        // transform
+        m.map(nx,ny, &nx,&ny);
+
+        // color transformation
+        
+        if (shouldColor){
+            if (m_colorProperties->sampleInputColor){
+                subAcc.moveTo(nx+x, ny+y);
+                subAcc.sampledRawData( m_inkColor.data() );
+            }else{
+                 //revert the color
+                 memcpy(m_inkColor.data(),color.data(), m_pixelSize);
+            }
+
+            // mix the color with background color
+            if (m_colorProperties->mixBgColor)
+            {
+                KoMixColorsOp * mixOp = source->colorSpace()->mixColorsOp();
+
+                const quint8 *colors[2];
+                colors[0] = m_inkColor.data();
+                colors[1] = bgColor.data();
+
+                qint16 colorWeights[2];
+                int MAX_16BIT = 255;
+                qreal blend = info.pressure();
+
+                colorWeights[0] = static_cast<quint16>( blend * MAX_16BIT);
+                colorWeights[1] = static_cast<quint16>( (1.0 - blend) * MAX_16BIT);
+                mixOp->mixColors(colors, colorWeights, 2, m_inkColor.data() );
+            }
+
+            if (m_colorProperties->useRandomHSV && m_transfo){
+                params["h"] = (m_colorProperties->hue / 180.0) * drand48();
+                params["s"] = (m_colorProperties->saturation / 100.0) * drand48();
+                params["v"] = (m_colorProperties->value / 100.0) * drand48();
+                m_transfo->setParameters(params);
+                m_transfo->transform(m_inkColor.data(), m_inkColor.data() , 1);
+            }
+
+            if (m_colorProperties->useRandomOpacity){
+                quint8 alpha = qRound(drand48() * OPACITY_OPAQUE_U8);
+                m_inkColor.setOpacity( alpha );
+                m_painter->setOpacity( alpha );
+            }
+
+            if ( !m_colorProperties->colorPerParticle ){
+                shouldColor = false;
+            }
+            m_painter->setPaintColor(m_inkColor);
+        }
+
+        qreal jitteredWidth = qMax(qreal(1.0),m_shapeProperties->width * particleScale);
+        qreal jitteredHeight = qMax(qreal(1.0),m_shapeProperties->height * particleScale);
+
+        if (m_shapeProperties->enabled){
+        switch (m_shapeProperties->shape){
+            // ellipse
+            case 0:
+            {
+                if (m_shapeProperties->width == m_shapeProperties->height){
+                    paintCircle(m_painter, nx + x, ny + y, qRound(jitteredWidth * 0.5) , steps);
+                }else
+                {
+                    paintEllipse(m_painter, nx + x, ny + y, qRound(jitteredWidth * 0.5) , qRound(jitteredHeight * 0.5), rotationZ , steps);
+                }
+                break;
+            }
+            // rectangle
+            case 1:
+            {
+                paintRectangle(m_painter, nx + x, ny + y, qRound(jitteredWidth) , qRound(jitteredHeight), rotationZ , steps);
+                break;
+            }
+            // wu-particle
+            case 2:
+            {
+                paintParticle(accessor, m_inkColor, nx + x, ny + y);
+                break;
+            }
+            // pixel
+            case 3:
+            {
+                ix = qRound(nx + x);
+                iy = qRound(ny + y);
+                accessor.moveTo(ix, iy);
+                memcpy(accessor.rawData(), m_inkColor.data(), m_pixelSize);
+                break;
+            }
+            case 4:
+            {
+                if ( !m_brushQImage.isNull() )
+                {
+
+                    QTransform m;
+                    m.rotate(rad2deg(rotationZ));
+
+                    if (m_shapeDynamicsProperties->randomSize){
+                        m.scale(particleScale,particleScale);
+                    }
+                    m_transformed = m_brushQImage.transformed(m, Qt::SmoothTransformation);
+                    m_imageDevice->convertFromQImage(m_transformed, "");
+                    KisRandomAccessor ac = m_imageDevice->createRandomAccessor(0,0);
+                    QRect rc = m_transformed.rect();
+
+                    if (m_colorProperties->useRandomHSV && m_transfo){
+
+                        for (int y = rc.y(); y< rc.y()+rc.height(); y++){
+                            for (int x = rc.x(); x < rc.x()+rc.width();x++){
+                                ac.moveTo(x,y);
+                                m_transfo->transform(ac.rawData(), ac.rawData() , 1);
+                            }
+                        }
+                    }
+
+                    ix = qRound(nx + x - rc.width() * 0.5);
+                    iy = qRound(ny + y - rc.height() * 0.5);
+                    m_painter->bitBlt(QPoint(ix,iy), m_imageDevice, rc);
+                    m_imageDevice->clear();
+                    break;
+                }
+            }
+        }
+        // Auto-brush
+        }else{
+            QPointF hotSpot = m_brush->hotSpot(particleScale, particleScale, -rotationZ);
+            QPointF pos(nx + x, ny + y);
+            QPointF pt = pos - hotSpot;
+
+            qint32 ix;
+            double xFraction;
+            qint32 iy;
+            double yFraction;
+
+            KisPaintOp::splitCoordinate(pt.x(), &ix, &xFraction);
+            KisPaintOp::splitCoordinate(pt.y(), &iy, &yFraction);
+
+            //KisFixedPaintDeviceSP dab;
+            if (m_brush->brushType() == IMAGE || 
+                m_brush->brushType() == PIPE_IMAGE) 
+            {
+                m_fixedDab = m_brush->paintDevice(m_fixedDab->colorSpace(), particleScale, -rotationZ, info, xFraction, yFraction);
+
+                if (m_colorProperties->useRandomHSV && m_transfo){
+                    quint8 * dabPointer = m_fixedDab->data();
+                    int pixelCount = m_fixedDab->bounds().width() * m_fixedDab->bounds().height();
+                    m_transfo->transform(dabPointer, dabPointer, pixelCount);
+                }
+                
+            } else {
+                m_brush->mask(m_fixedDab, m_inkColor, particleScale, particleScale, -rotationZ, info, xFraction, yFraction);
+            }
+            m_painter->bltFixed(QPoint(ix, iy), m_fixedDab, m_fixedDab->bounds());
+        }
+    }
+    // hidden code for outline detection
+    //m_inkColor.setOpacity(128);
+    //paintOutline(dev,m_inkColor,x, y, m_radius * 2);
+
+    // recover from jittering of color,
+    // m_inkColor.opacity is recovered with every paint
+}
+
+
+
+void SprayBrush::paintParticle(KisRandomAccessor &writeAccessor, const KoColor &color, qreal rx, qreal ry)
+{
+    // opacity top left, right, bottom left, right
+    KoColor pcolor(color);
+    //int opacity = pcolor.opacityU8();
+
+    int ipx = int (rx);
+    int ipy = int (ry);
+    qreal fx = rx - ipx;
+    qreal fy = ry - ipy;
+
+    qreal btl = (1 - fx) * (1 - fy);
+    qreal btr = (fx)  * (1 - fy);
+    qreal bbl = (1 - fx) * (fy);
+    qreal bbr = (fx)  * (fy);
+
+    // this version overwrite pixels, e.g. when it sprays two particle next
+    // to each other, the pixel with lower opacity can override other pixel.
+    // Maybe some kind of compositing using here would be cool
+
+    pcolor.setOpacity(btl);
+    writeAccessor.moveTo(ipx  , ipy);
+    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
+
+    pcolor.setOpacity(btr);
+    writeAccessor.moveTo(ipx + 1, ipy);
+    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
+
+    pcolor.setOpacity(bbl);
+    writeAccessor.moveTo(ipx, ipy + 1);
+    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
+
+    pcolor.setOpacity(bbr);
+    writeAccessor.moveTo(ipx + 1, ipy + 1);
+    memcpy(writeAccessor.rawData(), pcolor.data(), m_pixelSize);
+}
+
+void SprayBrush::paintCircle(KisPainter * painter, qreal x, qreal y, int radius, int steps)
+{
+    QPainterPath path;
+    // circle x, circle y
+    qreal cx, cy;
+
+    qreal length = 2.0 * M_PI;
+    qreal step = 1.0 / steps;
+    path.moveTo(radius + x, y);
+    for (int i = 1; i < steps; i++) {
+        cx = cos(i * step * length);
+        cy = sin(i * step * length);
+
+        cx *= radius;
+        cy *= radius;
+
+        cx += x;
+        cy += y;
+
+        path.lineTo(cx, cy);
+    }
+    path.closeSubpath();
+    painter->fillPainterPath(path);
+}
+
+
+
+void SprayBrush::paintEllipse(KisPainter* painter, qreal x, qreal y, int a, int b, qreal angle, int steps)
+{
+    QPainterPath path;
+    qreal beta = angle;
+    qreal sinbeta = sin(beta);
+    qreal cosbeta = cos(beta);
+
+    path.moveTo(x + a * cosbeta, y + a * sinbeta);
+    qreal step = 360.0 / steps;
+    for (int i = step; i < 360; i += step) {
+        qreal alpha = i * (M_PI / 180) ;
+        qreal sinalpha = sin(alpha);
+        qreal cosalpha = cos(alpha);
+
+        qreal X = x + (a * cosalpha * cosbeta - b * sinalpha * sinbeta);
+        qreal Y = y + (a * cosalpha * sinbeta + b * sinalpha * cosbeta);
+
+        path.lineTo(X, Y);
+    }
+    path.closeSubpath();
+    painter->fillPainterPath(path);
+}
+
+void SprayBrush::paintRectangle(KisPainter* painter, qreal x, qreal y, int width, int height, qreal angle, int steps)
+{
+    Q_UNUSED(steps);
+    QPainterPath path;
+    QTransform transform;
+
+    qreal halfWidth = width * 0.5;
+    qreal halfHeight = height * 0.5;
+    qreal tx, ty;
+
+
+    transform.reset();
+    transform.rotateRadians(angle);
+    // top left
+    transform.map(- halfWidth,  - halfHeight, &tx, &ty);
+    path.moveTo(QPointF(tx + x, ty + y));
+    // top right
+    transform.map(+ halfWidth,  - halfHeight, &tx, &ty);
+    path.lineTo(QPointF(tx + x, ty + y));
+    // bottom right
+    transform.map(+ halfWidth,  + halfHeight, &tx, &ty);
+    path.lineTo(QPointF(tx + x, ty + y));
+    // botom left
+    transform.map(- halfWidth,  + halfHeight, &tx, &ty);
+    path.lineTo(QPointF(tx + x, ty + y));
+    path.closeSubpath();
+    painter->fillPainterPath(path);
+}
+
+
+void SprayBrush::paintOutline(KisPaintDeviceSP dev , const KoColor &outlineColor, qreal posX, qreal posY, qreal radius)
+{
+    QList<QPointF> antiPixels;
+    KisRandomAccessor accessor = dev->createRandomAccessor(qRound(posX), qRound(posY));
+
+    for (int y = -radius + posY; y <= radius + posY; y++) {
+        for (int x = -radius + posX; x <= radius + posX; x++) {
+            accessor.moveTo(x, y);
+            qreal alpha = dev->colorSpace()->opacityU8(accessor.rawData());
+
+            if (alpha != 0) {
+                // top left
+                accessor.moveTo(x - 1, y - 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x - 1, y - 1));
+                    //continue;
+                }
+
+                // top
+                accessor.moveTo(x, y - 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x, y - 1));
+                    //continue;
+                }
+
+                // top right
+                accessor.moveTo(x + 1, y - 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x + 1, y - 1));
+                    //continue;
+                }
+
+                //left
+                accessor.moveTo(x - 1, y);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x - 1, y));
+                    //continue;
+                }
+
+                //right
+                accessor.moveTo(x + 1, y);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x + 1, y));
+                    //continue;
+                }
+
+                // bottom left
+                accessor.moveTo(x - 1, y + 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x - 1, y + 1));
+                    //continue;
+                }
+
+                // bottom
+                accessor.moveTo(x, y + 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x, y + 1));
+                    //continue;
+                }
+
+                // bottom right
+                accessor.moveTo(x + 1, y + 1);
+                if (dev->colorSpace()->opacityU8(accessor.rawData()) == 0) {
+                    antiPixels.append(QPointF(x + 1, y + 1));
+                    //continue;
+                }
+            }
+
+        }
+    }
+
+    // anti-alias it
+    int size = antiPixels.size();
+    for (int i = 0; i < size; i++) {
+        accessor.moveTo(antiPixels[i].x(), antiPixels[i].y());
+        memcpy(accessor.rawData(), outlineColor.data(), dev->colorSpace()->pixelSize());
+    }
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp	2011-02-17 12:13:42.000000000 +0000
@@ -0,0 +1,190 @@
+/*
+ *  Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_waterymix_paintop.h"
+#include "kis_waterymix_paintop_settings.h"
+
+#include <cmath>
+#include <QRect>
+
+#include <KoColor.h>
+#include <KoColorSpace.h>
+
+#include <kis_image.h>
+#include <kis_debug.h>
+
+#include <kis_global.h>
+#include <kis_paint_device.h>
+#include <kis_painter.h>
+#include <kis_types.h>
+#include <kis_paintop.h>
+#include <kis_brush_based_paintop.h>
+#include <kis_paint_information.h>
+
+#include <kis_pressure_opacity_option.h>
+
+#include <KoColorSpaceRegistry.h>
+#include <kis_selection.h>
+
+#include <kis_paintop_registry.h>
+
+#include <../../extensions/impasto/kis_rgbu8_height_color_space.h>
+#include <../../extensions/impasto/kis_rgbu8_height_color_space.cpp>
+#include <kis_group_layer.h>
+
+KisWateryMixPaintOp::KisWateryMixPaintOp(const KisWateryMixPaintOpSettings *settings, KisPainter * painter, KisImageWSP image)
+                   : KisBrushBasedPaintOp(settings, painter)
+                   , m_image(image)
+{
+    m_settings = new KisWateryMixPaintOpSettings();
+    //settings->initializeTwin(m_settings);
+
+    m_opacityOption.sensor()->reset();
+    m_sizeOption.sensor()->reset();
+    
+    hardcodedSettings.absortionrate = 0.2;
+    hardcodedSettings.humidity = 0;
+}
+
+KisWateryMixPaintOp::~KisWateryMixPaintOp()
+{
+}
+
+double KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
+{
+    //------START SIMPLE ERROR CATCHING-------
+    if (!painter()->device()) return 1;
+    
+    //Simple convenience renaming, I'm thinking of removing these inherited quirks
+    KisBrushSP brush = m_brush;
+    KisPaintDeviceSP device = painter()->device();
+
+    //Macro to catch errors
+    Q_ASSERT(brush);
+
+    //----------SIMPLE error catching code, maybe it's not even needed------
+    if (!brush) return 1;
+    if (!brush->canPaintFor(info)) return 1;
+
+    double scale = KisPaintOp::scaleForPressure(m_sizeOption.apply(info));
+    if ((scale * brush->width()) <= 0.01 || (scale * brush->height()) <= 0.01) return 1.0;
+
+    quint8 origOpacity = m_opacityOption.apply(painter(), info);
+
+    //-----------POSITIONING code----------
+    QPointF hotSpot = brush->hotSpot(scale, scale);
+    QPointF pt = info.pos() - hotSpot;
+
+    qint32 x, y;
+    double xFraction, yFraction;
+
+    splitCoordinate(pt.x(), &x, &xFraction);
+    splitCoordinate(pt.y(), &y, &yFraction);
+
+    //--------END POSITIONING CODE-----------
+
+    //DECLARING EMPTY pixel-only paint device, note that it is a smart pointer
+    KisFixedPaintDeviceSP maskDab = 0;
+    KisFixedPaintDeviceSP paintDab = 0;
+    
+    /*--------copypasted from SmudgeOp-------
+    ---This IF-ELSE block is used to turn the mask created in the BrushTip dialogue
+    into a beautiful SELECTION MASK (it's an opacity multiplier), intended to give
+    the brush a "brush feel" (soft borders, round shape).*/
+    if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
+        maskDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+        
+        paintDab = brush->paintDevice(device->colorSpace(), scale, 0.0, info, xFraction, yFraction);
+    } else {
+        maskDab = cachedDab();
+        KoColor color = painter()->paintColor();
+        color.convertTo(maskDab->colorSpace());
+        brush->mask(maskDab, color, scale, scale, 0.0, info, xFraction, yFraction);
+        maskDab->convertTo(KoColorSpaceRegistry::instance()->alpha8());
+        
+        paintDab = cachedDab();
+        brush->mask(paintDab, color, scale, scale, 0.0, info, xFraction, yFraction);
+    }
+
+    /*-----Convenient renaming for the limits of the maskDab, this will be used
+    to fill a dab of just the right size------*/
+    qint32 sw = maskDab->bounds().width();
+    qint32 sh = maskDab->bounds().height();
+    
+    /* ------- algorithm  ------ */
+    
+    /*
+    What this paintop ought to do (and currently doesn't):
+    --In the first pass, the brush is empty, devoid of color.
+    Its contents will be called dilutedDab.
+    --For each pass (including the first), do:
+    ----Take a sample of the image beneath the brush respecting
+    the transparency of the brush mask (this simulates paint
+    transfer from the canvas to the brush, the brush mask is
+    considered equivalent to the brush hairs in real life).
+    Call this sample the absorbedDab.
+    ----Blit dilutedDab on the canvas.
+    ----Mix (blit) absorbedDab into dilutedDab.
+    ----Dilute diluteDab by using an operation equivalent to a
+    blur filter whose blurring is either a fixed distance or a 
+    fraction of the dab size.
+    TODO: implement this algorithm in fast, non-crashy code.
+    Use HardcodedSettings on the meanwhile.
+    */
+    
+    // Absorb
+    /*
+    // This theorethically clones the subyacent area
+    KisPaintDeviceSP clone = new KisPaintDevice(painter()->device()->colorSpace());
+    KisPainter copyPainter(clone);
+    quint8 opacity = OPACITY_OPAQUE_U8;
+    //opacity *= hardcodedSettings.absortionrate;
+    copyPainter.setOpacity(opacity);
+    copyPainter.bitBlt(0, 0, device, pt.x(), pt.y(), sw, sh);
+    qDebug() << clone->exactBounds();
+    
+    // This theorethically mixes the stuff
+    KisPaintDeviceSP blotch = new KisPaintDevice(painter()->device()->colorSpace());
+    KisPainter maskPainter(blotch);
+    maskPainter.bltFixed(0, 0, paintDab, 0, 0, sw, sh);
+    maskPainter.bitBlt(0, 0, clone, 0, 0, sw, sh);
+    //maskPainter.bitBltFixedSelection(0, 0, clone, maskDab, 0, 0, sw, sh);
+    qDebug() << blotch->exactBounds();
+    */
+    // Dilute
+  
+    // Blit the results to the screen.blotch
+    painter()->bltFixed(x, y, paintDab, 0, 0, sw, sh);
+    //painter()->setOpacity(origOpacity);
+
+    /*-----It took me very long to realize the importance of this line, this is
+    the line that makes all brushes be slow, even if they're small, yay!-------*/
+    return spacing(scale);
+}
+
+/*
+void KisWateryMixPaintOp::absorb ()
+{
+}
+
+
+void KisWateryMixPaintOp::dilute ()
+{
+}
+*/
\ No newline at end of file
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h	2011-02-17 12:13:42.000000000 +0000
@@ -0,0 +1,86 @@
+/*
+ *  Copyright (c) 2010 José Luis Vergara Toloza <pentalis@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_WATERYMIX_PAINTOP_H_
+#define KIS_WATERYMIX_PAINTOP_H_
+
+#include <kis_paintop.h>
+#include <kis_brush_based_paintop.h>
+#include <kis_types.h>
+
+#include "kis_waterymix_paintop_settings.h"
+
+#include <kis_pressure_opacity_option.h>
+#include <kis_pressure_size_option.h>
+
+
+class KisPainter;
+
+struct HardcodedSettings
+{
+    qreal humidity;
+    
+    /** Fraction of the canvas color absorbed per pass
+    * The color retained from the old cached dab is equal to
+    * (1 - absorption).
+    */
+    qreal absortionrate;
+};
+
+class KisWateryMixPaintOp : public KisBrushBasedPaintOp
+{
+
+public:
+
+    KisWateryMixPaintOp(const KisWateryMixPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
+    virtual ~KisWateryMixPaintOp();
+
+    /**
+     *  Document me
+     */
+    double paintAt(const KisPaintInformation& info);
+
+    /*
+    /// Absorb the color beneath the brush
+    void absorb();
+    
+    /// Spread the absorbed color over the brush surface
+    void dilute();
+    */
+    
+private:
+    KisWateryMixPaintOpSettings* m_settings;
+    KisImageWSP m_image;
+    KisPaintDeviceSP m_dab;
+
+    /**
+     *  Curve to control the opacity of the entire dab
+     *  with device input
+     */
+    KisPressureOpacityOption m_opacityOption;
+    
+    /**
+     *  Curve to control the size of the entire dab
+     *  with device input
+     */
+    KisPressureSizeOption m_sizeOption;
+    
+    HardcodedSettings hardcodedSettings;
+};
+
+#endif // KIS_WATERYMIX_PAINTOP_H_
diff -pruN 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
--- 1:2.3.3-1/.pc/kubuntu_01_arm_compile.diff/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_01_arm_compile.diff/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp	2011-02-17 12:13:01.000000000 +0000
@@ -0,0 +1,392 @@
+/*
+ *  kis_tool_dyna.cpp - part of Krita
+ *
+ *  Copyright (c) 2009 Lukáš Tvrdý <LukasT.dev@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_tool_dyna.h"
+#include <QEvent>
+#include <QLabel>
+#include <QLayout>
+#include <QWidget>
+#include <QTimer>
+#include <QPushButton>
+#include <QPainter>
+#include <QRect>
+#include <QCheckBox>
+#include <QGridLayout>
+#include <QSlider>
+#include <QComboBox>
+
+#include <kis_debug.h>
+#include <klocale.h>
+
+#include "KoPointerEvent.h"
+#include "KoCanvasBase.h"
+
+#include "kis_config.h"
+#include "kis_paintop_preset.h"
+#include "kis_paintop_registry.h"
+#include "kis_paint_information.h"
+
+#include "kis_cursor.h"
+#include "kis_painter.h"
+
+#include "kis_paint_device.h"
+#include "kis_layer.h"
+#include <QDoubleSpinBox>
+
+#define MAXIMUM_SMOOTHNESS 1000
+#define MAXIMUM_MAGNETISM 1000
+
+KisToolDyna::KisToolDyna(KoCanvasBase * canvas)
+        : KisToolFreehand(canvas, KisCursor::load("tool_freehand_cursor.png", 5, 5), i18n("Dyna"))
+{
+    setObjectName("tool_dyna");
+
+    m_rate = 200; // Conveniently hardcoded for now
+    m_timer = new QTimer(this);
+    Q_CHECK_PTR(m_timer);
+    connect(m_timer, SIGNAL(timeout()), this, SLOT(timeoutPaint()));
+    
+    initDyna();
+}
+
+
+void KisToolDyna::initDyna()
+{
+    /* dynadraw init */
+    m_curmass = 0.5;
+    m_curdrag = 0.15;
+    m_mouse.fixedangle = true;
+    m_width = 1.5;
+    m_xangle = 0.60;
+    m_yangle = 0.20;
+    m_widthRange = 0.05;
+
+    m_previousPressure = 0.5;
+}
+
+
+KisToolDyna::~KisToolDyna()
+{
+    delete m_timer;
+    m_timer = 0;
+}
+
+void KisToolDyna::timeoutPaint()
+{
+    Q_ASSERT(currentPaintOpPreset()->settings()->isAirbrushing());
+
+    if (currentImage() && m_painter) {
+        paintAt(m_previousPaintInformation);
+        QRegion r = m_painter->takeDirtyRegion();
+        dbgPlugins << "Timeout paint dirty region:" << r;
+        currentNode()->setDirty(r);
+    }
+
+}
+
+
+void KisToolDyna::initPaint(KoPointerEvent *e)
+{
+    m_rate = currentPaintOpPreset()->settings()->rate();
+    
+    QRectF imageSize = QRectF(QPointF(0.0,0.0),currentImage()->size());
+    QRectF documentSize = currentImage()->pixelToDocument(imageSize);
+    m_surfaceWidth = documentSize.width();
+    m_surfaceHeight = documentSize.height();
+    setMousePosition(e->point);
+    m_mouse.init(m_mousePos.x(), m_mousePos.y());
+    
+    KisToolFreehand::initPaint(e);
+
+    if (!m_painter) {
+        warnKrita << "Didn't create a painter! Something is wrong!";
+        return;
+    }
+
+    if (currentPaintOpPreset()->settings()->isAirbrushing()) {
+        m_timer->start(m_rate);
+    }
+}
+
+
+void KisToolDyna::endPaint()
+{
+    m_timer->stop();
+    KisToolFreehand::endPaint();
+}
+
+void KisToolDyna::mousePressEvent(KoPointerEvent *e)
+{
+    setMousePosition(e->point);
+    m_mouse.init(m_mousePos.x(), m_mousePos.y());
+    m_odelx = m_mousePos.x();
+    m_odely = m_mousePos.y();
+    
+    KisToolFreehand::mousePressEvent(e);
+}
+
+
+void KisToolDyna::mouseMoveEvent(KoPointerEvent *e)
+{
+    if(!MOVE_CONDITION(event, KisTool::PAINT_MODE)) {
+        KisToolFreehand::mouseMoveEvent(e);
+        return;
+    }
+
+    setMousePosition(e->point);
+
+    if (applyFilter(m_mousePos.x(), m_mousePos.y())) {
+        KoPointerEvent newEvent = filterEvent(e);
+        KisToolFreehand::mouseMoveEvent(&newEvent);
+    }
+
+    if (m_painter && m_painter->paintOp() && currentPaintOpPreset()->settings()->isAirbrushing()) {
+        m_timer->start(m_rate);
+    }
+}
+
+// dyna algorithm
+int KisToolDyna::applyFilter(qreal mx, qreal my)
+{
+    /* calculate mass and drag */
+    qreal mass = flerp(1.0, 160.0, m_curmass);
+    qreal drag = flerp(0.00, 0.5, m_curdrag * m_curdrag);
+
+    /* calculate force and acceleration */
+    qreal fx = mx - m_mouse.curx;
+    qreal fy = my - m_mouse.cury;
+
+    m_mouse.acc = sqrt(fx * fx + fy * fy);
+
+    if (m_mouse.acc < 0.000001) {
+        return 0;
+    }
+
+    m_mouse.accx = fx / mass;
+    m_mouse.accy = fy / mass;
+
+    /* calculate new velocity */
+    m_mouse.velx += m_mouse.accx;
+    m_mouse.vely += m_mouse.accy;
+    m_mouse.vel = sqrt(m_mouse.velx * m_mouse.velx + m_mouse.vely * m_mouse.vely);
+    m_mouse.angx = -m_mouse.vely;
+    m_mouse.angy = m_mouse.velx;
+    if (m_mouse.vel < 0.000001) {
+        return 0;
+    }
+
+    /* calculate angle of drawing tool */
+    m_mouse.angx /= m_mouse.vel;
+    m_mouse.angy /= m_mouse.vel;
+    if (m_mouse.fixedangle) {
+        m_mouse.angx = m_xangle;
+        m_mouse.angy = m_yangle;
+    }
+
+    m_mouse.velx = m_mouse.velx * (1.0 - drag);
+    m_mouse.vely = m_mouse.vely * (1.0 - drag);
+
+    m_mouse.lastx = m_mouse.curx;
+    m_mouse.lasty = m_mouse.cury;
+    m_mouse.curx = m_mouse.curx + m_mouse.velx;
+    m_mouse.cury = m_mouse.cury + m_mouse.vely;
+
+    return 1;
+}
+
+
+KoPointerEvent KisToolDyna::filterEvent(KoPointerEvent* event)
+{
+    qreal wid = m_widthRange - m_mouse.vel;
+
+    wid = wid * m_width;
+
+    if (wid < 0.00001) {
+        wid = 0.00001;
+    }
+
+    qreal delx = m_mouse.angx * wid;
+    qreal dely = m_mouse.angy * wid;
+
+    qreal px = m_mouse.lastx;
+    qreal py = m_mouse.lasty;
+    qreal nx = m_mouse.curx;
+    qreal ny = m_mouse.cury;
+
+    QPointF prev(px , py);         // previous position
+    QPointF now(nx , ny);           // new position
+
+    QPointF prevr(px + m_odelx , py + m_odely);
+    QPointF prevl(px - m_odelx , py - m_odely);
+
+    QPointF nowl(nx - delx , ny - dely);
+    QPointF nowr(nx + delx , ny + dely);
+
+    // transform coords from float points into image points
+    prev.rx() *= m_surfaceWidth;
+    prevr.rx() *= m_surfaceWidth;
+    prevl.rx() *= m_surfaceWidth;
+    now.rx()  *= m_surfaceWidth;
+    nowl.rx() *= m_surfaceWidth;
+    nowr.rx() *= m_surfaceWidth;
+
+    prev.ry() *= m_surfaceHeight;
+    prevr.ry() *= m_surfaceHeight;
+    prevl.ry() *= m_surfaceHeight;
+    now.ry()  *= m_surfaceHeight;
+    nowl.ry() *= m_surfaceHeight;
+    nowr.ry() *= m_surfaceHeight;
+
+    qreal m_pressure;
+#if 0
+
+    qreal xTilt, yTilt;
+    qreal m_rotation;
+    qreal m_tangentialPressure;
+
+    // some funny debugging
+    dbgPlugins << "m_mouse.vel: " << m_mouse.vel;
+    dbgPlugins << "m_mouse.velx: " << m_mouse.velx;
+    dbgPlugins << "m_mouse.vely: " << m_mouse.vely;
+    dbgPlugins << "m_mouse.accx: " << m_mouse.accx;
+    dbgPlugins << "m_mouse.accy: " << m_mouse.accy;
+
+
+    dbgPlugins << "fixed: " << m_mouse.fixedangle;
+    dbgPlugins << "drag: " << m_curdrag;
+    dbgPlugins << "mass: " << m_curmass;
+    dbgPlugins << "xAngle: " << m_xangle;
+    dbgPlugins << "yAngle: " << m_yangle;
+
+#endif
+
+    m_pressure =  m_mouse.vel * 100;
+    m_pressure = qBound(0.0,m_pressure, 1.0);
+    
+    m_odelx = delx;
+    m_odely = dely;
+    
+    // how to change pressure in the KoPointerEvent???
+    return KoPointerEvent(event,now);
+}
+
+
+void KisToolDyna::slotSetDrag(double drag)
+{
+    m_dragDist = drag;
+}
+
+
+void KisToolDyna::slotSetMass(double mass)
+{
+    m_curmass = mass;
+}
+
+
+void KisToolDyna::slotSetDynaWidth(double width)
+{
+    m_width = width;
+}
+
+
+void KisToolDyna::slotSetWidthRange(double widthRange)
+{
+    m_widthRange = widthRange;
+}
+
+
+void KisToolDyna::slotSetXangle(double angle)
+{
+    m_xangle = angle;
+}
+
+
+void KisToolDyna::slotSetYangle(double angle)
+{
+    m_yangle = angle;
+}
+
+
+void KisToolDyna::slotSetFixedAngle(bool fixedAngle)
+{
+    m_mouse.fixedangle = fixedAngle;
+}
+
+QWidget * KisToolDyna::createOptionWidget()
+{
+
+    QWidget * optionWidget = KisToolFreehand::createOptionWidget();
+    optionWidget->setObjectName(toolId() + "option widget");
+
+    QLabel* initWidthLbl = new QLabel(i18n("Initial width:"), optionWidget);
+    QLabel* massLbl = new QLabel(i18n("Mass:"), optionWidget);
+    QLabel* dragLbl = new QLabel(i18n("Drag:"), optionWidget);
+    QLabel* xAngleLbl = new QLabel(i18n("X angle:"), optionWidget);
+    QLabel* yAngleLbl = new QLabel(i18n("Y angle:"), optionWidget);
+    QLabel* widthRangeLbl = new QLabel(i18n("Width range:"), optionWidget);
+
+    m_chkFixedAngle = new QCheckBox(i18n("Fixed angle:"), optionWidget);
+    m_chkFixedAngle->setChecked(false);
+    connect(m_chkFixedAngle, SIGNAL(toggled(bool)), this, SLOT(slotSetFixedAngle(bool)));
+
+    m_initWidthSPBox = new QDoubleSpinBox(optionWidget);
+    m_initWidthSPBox->setValue(1.5);
+    connect(m_initWidthSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetDynaWidth(double)));
+    m_massSPBox = new QDoubleSpinBox(optionWidget);
+    m_massSPBox->setValue(0.5);
+    connect(m_massSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetMass(double)));
+    m_dragSPBox = new QDoubleSpinBox(optionWidget);
+    m_dragSPBox->setValue(0.15);
+    connect(m_dragSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetDrag(double)));
+    m_xAngleSPBox = new QDoubleSpinBox(optionWidget);
+    m_xAngleSPBox->setValue(0.6);
+    connect(m_xAngleSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetXangle(double)));
+    m_yAngleSPBox = new QDoubleSpinBox(optionWidget);
+    m_yAngleSPBox->setValue(0.2);
+    connect(m_yAngleSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetYangle(double)));
+    m_widthRangeSPBox = new QDoubleSpinBox(optionWidget);
+    m_widthRangeSPBox->setValue(0.05);
+    connect(m_widthRangeSPBox, SIGNAL(valueChanged(double)), this, SLOT(slotSetWidthRange(double)));
+
+    m_optionLayout = new QGridLayout(optionWidget);
+    Q_CHECK_PTR(m_optionLayout);
+
+    m_optionLayout->setMargin(0);
+    m_optionLayout->setSpacing(2);
+
+    KisToolFreehand::addOptionWidgetLayout(m_optionLayout);
+    m_optionLayout->addWidget(initWidthLbl, 5, 0);
+    m_optionLayout->addWidget(m_initWidthSPBox, 5, 1, 1, 2);
+    m_optionLayout->addWidget(massLbl, 6, 0);
+    m_optionLayout->addWidget(m_massSPBox, 6, 1, 1, 2);
+    m_optionLayout->addWidget(dragLbl, 7, 0);
+    m_optionLayout->addWidget(m_dragSPBox, 7, 1, 1, 2);
+    m_optionLayout->addWidget(m_chkFixedAngle, 8, 0);
+    m_optionLayout->addWidget(xAngleLbl, 9, 0);
+    m_optionLayout->addWidget(m_xAngleSPBox, 9, 1, 1, 2);
+    m_optionLayout->addWidget(yAngleLbl, 10, 0);
+    m_optionLayout->addWidget(m_yAngleSPBox, 10, 1, 1, 2);
+    m_optionLayout->addWidget(widthRangeLbl, 11, 0);
+    m_optionLayout->addWidget(m_widthRangeSPBox, 11, 1, 1, 2);
+
+    return optionWidget;
+}
+
+#include "kis_tool_dyna.moc"
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/CMakeLists.txt 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/CMakeLists.txt
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/CMakeLists.txt	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,17 @@
+
+
+include_directories(${CMAKE_BINARY_DIR}/filters/ ${WPD_INCLUDE_DIR} ${LIBWPG_INCLUDE_DIR}/)
+
+set(wpgimport_PART_SRCS 
+WPGImport.cpp 
+OdgExporter.cxx
+FileOutputHandler.cxx
+GraphicsElement.cxx)
+
+kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS})
+
+target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES})
+
+install(TARGETS wpgimport DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES karbon_wpg_import.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.cxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.cxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.cxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.cxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,95 @@
+/* libwpg
+ * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpg.sourceforge.net
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#include "FileOutputHandler.hxx"
+
+FileOutputHandler::FileOutputHandler(std::ostringstream &contentStream) :
+	mbIsTagOpened(false),
+	mContentStream(contentStream)
+{
+}
+
+void FileOutputHandler::startDocument()
+{
+}
+
+void FileOutputHandler::startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList)
+{
+	if (mbIsTagOpened)
+	{
+		mContentStream << ">";
+		mbIsTagOpened = false;
+	}
+	mContentStream << "<" << psName;
+
+	for (std::vector<std::pair<std::string, std::string> >::const_iterator i = xPropList.begin(); i != xPropList.end(); i++)
+	{
+		mContentStream << " " <<  (*i).first.c_str() << "=\"" << (*i).second.c_str() << "\"";
+	}
+	mbIsTagOpened = true;
+	msOpenedTagName = psName;
+}
+
+void FileOutputHandler::endElement(const char *psName)
+{
+	if (mbIsTagOpened)
+	{
+		if( msOpenedTagName == psName )
+		{
+			mContentStream << "/>";
+			mbIsTagOpened = false;
+		}
+		else // should not happen, but handle it
+		{
+			mContentStream << ">";
+			mContentStream << "</" << psName << ">";
+			mbIsTagOpened = false;
+		}
+	}
+	else
+	{
+		mContentStream << "</" << psName << ">";
+		mbIsTagOpened = false;
+	}
+}
+
+void FileOutputHandler::characters(const std::string &sCharacters)
+{
+	if (mbIsTagOpened)
+	{
+		mContentStream << ">";
+		mbIsTagOpened = false;
+	}
+	mContentStream << sCharacters.c_str();
+}
+
+void FileOutputHandler::endDocument()
+{
+	if (mbIsTagOpened)
+	{
+		mContentStream << ">";
+		mbIsTagOpened = false;
+	}
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.hxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.hxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.hxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/FileOutputHandler.hxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,49 @@
+/* libwpg
+ * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpg.sourceforge.net
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#ifndef FILEOUTPUTHANDLER_H
+#define FILEOUTPUTHANDLER_H
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include "GraphicsHandler.hxx"
+
+class FileOutputHandler : public GraphicsHandler
+{
+  public:
+        explicit FileOutputHandler(std::ostringstream &contentStream);
+        virtual void startDocument();
+        virtual void endDocument();
+        virtual void startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList);
+        virtual void endElement(const char *psName);
+        virtual void characters(const std::string &sCharacters);
+
+  private:
+	bool mbIsTagOpened;
+	std::string msOpenedTagName;
+	std::ostringstream &mContentStream;
+};
+#endif
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.cxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.cxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.cxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.cxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,66 @@
+/* GraphicsElement: The items we are collecting to be put into the Writer
+ * document: paragraph and spans of text, as well as section breaks.
+ *
+ * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpg.sourceforge.net
+ *
+ */
+
+/* "This product is not manufactured, approved, or supported by 
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#include "GraphicsElement.hxx"
+#include "GraphicsHandler.hxx"
+#include <string.h>
+
+#define ASCII_SPACE 0x0020
+
+void TagGraphicsElement::print() const
+{
+}
+
+void OpenTagGraphicsElement::write(GraphicsHandler *pHandler) const
+{
+	pHandler->startElement(getTagName().c_str(), maAttrList);
+}
+
+void OpenTagGraphicsElement::print() const
+{ 
+	TagGraphicsElement::print(); 	
+}
+
+void OpenTagGraphicsElement::addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue)
+{
+	std::pair<std::string, std::string> tmpAttribute;
+	tmpAttribute.first = szAttributeName;
+	tmpAttribute.second = sAttributeValue;
+        maAttrList.push_back(tmpAttribute);
+}
+
+void CloseTagGraphicsElement::write(GraphicsHandler *pHandler) const
+{
+
+	pHandler->endElement(getTagName().c_str());
+}
+
+void CharDataGraphicsElement::write(GraphicsHandler *pHandler) const
+{
+	pHandler->characters(msData);
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.hxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.hxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.hxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsElement.hxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,84 @@
+/* GraphicsElement: The items we are collecting to be put into the Writer
+ * document: paragraph and spans of text, as well as section breaks.
+ *
+ * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpd.sourceforge.net
+ *
+ */
+
+/* "This product is not manufactured, approved, or supported by 
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#ifndef _GRAPHICSELEMENT_H
+#define _GRAPHICSELEMENT_H
+#include <string>
+#include <map>
+#include <vector>
+
+#include "GraphicsHandler.hxx"
+
+class GraphicsElement
+{
+public:	
+	virtual ~GraphicsElement() {}
+	virtual void write(GraphicsHandler *pHandler) const = 0;
+	virtual void print() const {}
+};
+
+class TagGraphicsElement : public GraphicsElement
+{
+public:
+	explicit TagGraphicsElement(const char *szTagName) : msTagName(szTagName) {}
+	const std::string &getTagName() const { return msTagName; }
+	virtual void print() const;
+private:
+	const std::string msTagName;
+};
+
+class OpenTagGraphicsElement : public TagGraphicsElement
+{
+public:
+	explicit OpenTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
+	~OpenTagGraphicsElement() {}
+	void addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue);
+	virtual void write(GraphicsHandler *pHandler) const;
+	virtual void print () const;
+private:
+	std::vector<std::pair<std::string, std::string> > maAttrList;
+};
+
+class CloseTagGraphicsElement : public TagGraphicsElement
+{
+public:
+	explicit CloseTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
+	virtual void write(GraphicsHandler *pHandler) const;
+};
+
+class CharDataGraphicsElement : public GraphicsElement
+{
+public:
+	CharDataGraphicsElement(const char *sData) : GraphicsElement(), msData(sData) {}
+	virtual void write(GraphicsHandler *pHandler) const;
+private:
+	std::string msData;
+};
+
+
+#endif
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsHandler.hxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsHandler.hxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsHandler.hxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/GraphicsHandler.hxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2004 William Lachance (wlach@interlog.com)
+ * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ *  Contributor(s): Martin Gallwey (gallwey@sun.com)
+ *
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+#ifndef _GRAPHICSHANDLER_H
+#define _GRAPHICSHANDLER_H
+#include <string>
+#include <map>
+#include <vector>
+
+class GraphicsHandler
+{
+public:
+	virtual ~GraphicsHandler() {}
+        virtual void startDocument() = 0;
+        virtual void endDocument() = 0;
+        virtual void startElement(const char *psName, const std::vector< std::pair <std::string, std::string> > &xPropList) = 0;
+        virtual void endElement(const char *psName) = 0;
+        virtual void characters(const std::string &sCharacters) = 0;
+};
+#endif
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/karbon_wpg_import.desktop 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/karbon_wpg_import.desktop
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/karbon_wpg_import.desktop	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/karbon_wpg_import.desktop	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,49 @@
+[Desktop Entry]
+Type=Service
+Name=Karbon WPG Import Filter
+Name[bg]=Филтър за импортиране от WPG в Karbon
+Name[ca]=Filtre d'importació WPG per al Karbon
+Name[ca@valencia]=Filtre d'importació WPG per al Karbon
+Name[cs]=Importní filtr formátu WPG pro Karbon
+Name[da]=WPG-importfilter til Karbon
+Name[de]=Karbon-WPG-Importfilter
+Name[el]=Φίλτρο εισαγωγής WPG του Karbon
+Name[en_GB]=Karbon WPG Import Filter
+Name[eo]=Karbon-WPG-importfiltrilo
+Name[es]=Filtro de Karbon de importación de WPG
+Name[et]=Karboni WPG impordifilter
+Name[fa]=پالایۀ واردات Karbon WPG
+Name[fi]=Karbon WPG-tuontisuodin
+Name[fr]=Filtre d'importation WPG de Karbon
+Name[fy]=WPG -Ymportfilter foar Karbon
+Name[ga]=Scagaire Iompórtála Karbon WPG
+Name[gl]=Filtro de Importación de Karbon WPG
+Name[he]=מסנן ייבוא מ־WPG ל־Karbon
+Name[hi]=कार्बन डबल्यूपीजी आयात फ़िल्टर
+Name[hne]=कार्बन डबल्यूपीजी आयात फिल्टर
+Name[it]=Filtro di importazione WPG per Karbon
+Name[ja]=Karbon WPG インポートフィルタ
+Name[kk]=WPG -> Karbon импорт сүзгісі
+Name[lv]=Karbon WPG importa filtrs
+Name[nb]=WPG-importfilter for Karbon 
+Name[nds]=WPG-Importfilter för Karbon
+Name[ne]=कार्बन डब्लुपीजी आयात फिल्टर
+Name[nl]=WPG-importfilter voor Karbon
+Name[pt]=Filtro de Importação de WPG para o Karbon
+Name[pt_BR]=Filtro de Importação WPG para o Karbon
+Name[ro]=Filtru importare Karbon pentru WPG
+Name[ru]=Фильтр импорта рисунков WPG в Karbon
+Name[sl]=Uvozni filter WPG za Karbon
+Name[sv]=Karbon WPG-importfilter
+Name[tg]=Филтри воридотии Karbon WPG
+Name[tr]=Karbon VPG Alma Filtresi
+Name[uk]=Фільтр імпорту WPG у Karbon
+Name[wa]=Passete d' abagaedje WPG di Karbon
+Name[x-test]=xxKarbon WPG Import Filterxx
+Name[zh_CN]=Karbon WPG 导入过滤器
+Name[zh_TW]=Karbon WPG 匯入過濾程式
+X-KDE-Export=application/vnd.oasis.opendocument.graphics
+X-KDE-Import=application/x-wpg
+X-KDE-Weight=1
+X-KDE-Library=wpgimport
+X-KDE-ServiceTypes=KOfficeFilter
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.cxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.cxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.cxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.cxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,662 @@
+/* libwpg
+ * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
+ * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpg.sourceforge.net
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#include "OdgExporter.hxx"
+#include "GraphicsElement.hxx"
+#include "GraphicsHandler.hxx"
+#include <locale.h>
+
+static std::string doubleToString(const double value)
+{
+  std::ostringstream tempStream;
+  tempStream << value;
+  std::string decimalPoint(localeconv()->decimal_point);
+  if ((decimalPoint.size() == 0) || (decimalPoint == "."))
+    return tempStream.str();
+  std::string stringValue(tempStream.str());
+  if (!stringValue.empty())
+  {
+    std::string::size_type pos;
+    while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
+          stringValue.replace(pos,decimalPoint.size(),".");
+  }
+  return stringValue;
+}
+
+
+OdgExporter::OdgExporter(GraphicsHandler *pHandler, const bool isFlatXML):
+        mpHandler(pHandler),
+        m_fillRule(AlternatingFill),
+        m_gradientIndex(1),
+        m_dashIndex(1),
+        m_styleIndex(1),
+        m_width(0.0f),
+        m_height(0.0f),
+        m_isFlatXML(isFlatXML)
+{
+}
+
+OdgExporter::~OdgExporter()
+{
+        for (std::vector <GraphicsElement *>::iterator iterStroke = mStrokeDashElements.begin();
+                iterStroke != mStrokeDashElements.end(); iterStroke++)
+                delete (*iterStroke);
+
+        for (std::vector <GraphicsElement *>::iterator iterGradient = mGradientElements.begin();
+                iterGradient != mGradientElements.end(); iterGradient++)
+                delete (*iterGradient);
+
+        for (std::vector <GraphicsElement *>::iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
+                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
+                delete (*iterAutomaticStyles);
+
+        for (std::vector<GraphicsElement *>::iterator bodyIter = mBodyElements.begin();
+                bodyIter != mBodyElements.end(); bodyIter++)
+                delete (*bodyIter);
+}
+
+void OdgExporter::startGraphics(double width, double height)
+{
+        m_gradientIndex = 1;
+        m_dashIndex = 1;
+        m_styleIndex = 1;
+        m_width = width;
+        m_height = height;
+
+
+        mpHandler->startDocument();
+        OpenTagGraphicsElement tmpOfficeDocumentContent("office:document");
+        tmpOfficeDocumentContent.addAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/");
+        tmpOfficeDocumentContent.addAttribute("xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:config", "urn:oasis:names:tc:opendocument:xmlns:config:1.0");
+        tmpOfficeDocumentContent.addAttribute("xmlns:ooo", "http://openoffice.org/2004/office");
+        tmpOfficeDocumentContent.addAttribute("office:version", "1.0");
+        if (m_isFlatXML)
+                        tmpOfficeDocumentContent.addAttribute("office:mimetype", "application/x-vnd.oasis.openoffice.drawing");
+        tmpOfficeDocumentContent.write(mpHandler);
+
+        OpenTagGraphicsElement("office:settings").write(mpHandler);
+
+        OpenTagGraphicsElement configItemSetOpenElement("config:config-item-set");
+        configItemSetOpenElement.addAttribute("config:name", "ooo:view-settings");
+        configItemSetOpenElement.write(mpHandler);
+
+        OpenTagGraphicsElement configItemOpenElement1("config:config-item");
+        configItemOpenElement1.addAttribute("config:name", "VisibleAreaTop");
+        configItemOpenElement1.addAttribute("config:type", "int");
+        configItemOpenElement1.write(mpHandler);
+        mpHandler->characters("0");
+        mpHandler->endElement("config:config-item");
+
+        OpenTagGraphicsElement configItemOpenElement2("config:config-item");
+        configItemOpenElement2.addAttribute("config:name", "VisibleAreaLeft");
+        configItemOpenElement2.addAttribute("config:type", "int");
+        configItemOpenElement2.write(mpHandler);
+        mpHandler->characters("0");
+        mpHandler->endElement("config:config-item");
+
+        OpenTagGraphicsElement configItemOpenElement3("config:config-item");
+        configItemOpenElement3.addAttribute("config:name", "VisibleAreaWidth");
+        configItemOpenElement3.addAttribute("config:type", "int");
+        configItemOpenElement3.write(mpHandler);
+        m_value.str("");
+        m_value << (unsigned)(2540 * width);
+        mpHandler->characters(m_value.str());
+        mpHandler->endElement("config:config-item");
+
+        OpenTagGraphicsElement configItemOpenElement4("config:config-item");
+        configItemOpenElement4.addAttribute("config:name", "VisibleAreaHeight");
+        configItemOpenElement4.addAttribute("config:type", "int");
+        configItemOpenElement4.write(mpHandler);
+        m_value.str("");
+        m_value << (unsigned)(2540 * height);
+        mpHandler->characters(m_value.str());
+        mpHandler->endElement("config:config-item");
+
+        mpHandler->endElement("config:config-item-set");
+
+        mpHandler->endElement("office:settings");
+
+}
+
+void OdgExporter::endGraphics()
+{
+        OpenTagGraphicsElement("office:styles").write(mpHandler);
+
+        for (std::vector <GraphicsElement *>::const_iterator iterStroke = mStrokeDashElements.begin();
+                iterStroke != mStrokeDashElements.end(); iterStroke++)
+                (*iterStroke)->write(mpHandler);
+
+        for (std::vector <GraphicsElement *>::const_iterator iterGradient = mGradientElements.begin();
+                iterGradient != mGradientElements.end(); iterGradient++)
+                (*iterGradient)->write(mpHandler);
+
+        mpHandler->endElement("office:styles");
+
+        OpenTagGraphicsElement("office:automatic-styles").write(mpHandler);
+
+        for (std::vector <GraphicsElement *>::const_iterator iterAutomaticStyles = mAutomaticStylesElements.begin();
+                iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++)
+                (*iterAutomaticStyles)->write(mpHandler);
+
+        OpenTagGraphicsElement tmpStylePageLayoutOpenElement("style:page-layout");
+        tmpStylePageLayoutOpenElement.addAttribute("style:name", "PM0");
+        tmpStylePageLayoutOpenElement.write(mpHandler);
+
+        OpenTagGraphicsElement tmpStylePageLayoutPropertiesOpenElement("style:page-layout-properties");
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-top", "0in");
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-bottom", "0in");
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-left", "0in");
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-right", "0in");
+        m_value.str("");
+        m_value <<  doubleToString(m_width) << "in";
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-width", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(m_height)  << "in";
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-height", m_value.str());
+        m_value.str("");
+        tmpStylePageLayoutPropertiesOpenElement.addAttribute("style:print-orientation", "portrait");
+        tmpStylePageLayoutPropertiesOpenElement.write(mpHandler);
+
+        mpHandler->endElement("style:page-layout-properties");
+
+        mpHandler->endElement("style:page-layout");
+
+        OpenTagGraphicsElement tmpStyleStyleOpenElement("style:style");
+        tmpStyleStyleOpenElement.addAttribute("style:name", "dp1");
+        tmpStyleStyleOpenElement.addAttribute("style:family", "drawing-page");
+        tmpStyleStyleOpenElement.write(mpHandler);
+
+        OpenTagGraphicsElement tmpStyleDrawingPagePropertiesOpenElement("style:drawing-page-properties");
+        // tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:background-size", "border");
+        tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:fill", "none");
+        tmpStyleDrawingPagePropertiesOpenElement.write(mpHandler);
+
+        mpHandler->endElement("style:drawing-page-properties");
+
+        mpHandler->endElement("style:style");
+
+        mpHandler->endElement("office:automatic-styles");
+
+        OpenTagGraphicsElement("office:master-styles").write(mpHandler);
+
+        OpenTagGraphicsElement tmpStyleMasterPageOpenElement("style:master-page");
+        tmpStyleMasterPageOpenElement.addAttribute("style:name", "Default");
+        tmpStyleMasterPageOpenElement.addAttribute("style:page-layout-name", "PM0");
+        tmpStyleMasterPageOpenElement.addAttribute("draw:style-name", "dp1");
+        tmpStyleMasterPageOpenElement.write(mpHandler);
+
+        mpHandler->endElement("style:master-page");
+
+        mpHandler->endElement("office:master-styles");
+
+        OpenTagGraphicsElement("office:body").write(mpHandler);
+
+        OpenTagGraphicsElement("office:drawing").write(mpHandler);
+
+        OpenTagGraphicsElement tmpDrawPageOpenElement("draw:page");
+        tmpDrawPageOpenElement.addAttribute("draw:name", "page1");
+        tmpDrawPageOpenElement.addAttribute("draw:style-name", "dp1");
+        tmpDrawPageOpenElement.addAttribute("draw:master-page-name", "Default");
+        tmpDrawPageOpenElement.write(mpHandler);
+
+        for (std::vector<GraphicsElement *>::const_iterator bodyIter = mBodyElements.begin();
+                bodyIter != mBodyElements.end(); bodyIter++)
+        {
+                (*bodyIter)->write(mpHandler);
+        }
+
+        mpHandler->endElement("draw:page");
+        mpHandler->endElement("office:drawing");
+        mpHandler->endElement("office:body");
+        mpHandler->endElement("office:document");
+
+        mpHandler->endDocument();
+}
+
+void OdgExporter::setPen(const libwpg::WPGPen& pen)
+{
+        m_pen = pen;
+}
+
+void OdgExporter::setBrush(const libwpg::WPGBrush& brush)
+{
+        m_brush = brush;
+}
+
+void OdgExporter::setFillRule(FillRule rule)
+{
+        m_fillRule = rule;
+}
+
+void OdgExporter::startLayer(unsigned int)
+{
+}
+
+void OdgExporter::endLayer(unsigned int)
+{
+}
+
+void OdgExporter::drawRectangle(const libwpg::WPGRect& rect, double rx, double )
+{
+        writeStyle();
+        OpenTagGraphicsElement *pDrawRectElement = new OpenTagGraphicsElement("draw:rect");
+        m_value.str("");
+        m_value << "gr" << m_styleIndex-1;
+        pDrawRectElement->addAttribute("draw:style-name", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(rect.x1) << "in";
+        pDrawRectElement->addAttribute("svg:x", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(rect.y1) << "in";
+        pDrawRectElement->addAttribute("svg:y", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(rect.x2-rect.x1) << "in";
+        pDrawRectElement->addAttribute("svg:width", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(rect.y2-rect.y1) << "in";
+        pDrawRectElement->addAttribute("svg:height", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(rx) << "in";
+        // FIXME: what to do when rx != ry ?
+        pDrawRectElement->addAttribute("draw:corner-radius", m_value.str());
+        m_value.str("");
+        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawRectElement));
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:rect")));
+}
+
+void OdgExporter::drawEllipse(const libwpg::WPGPoint& center, double rx, double ry)
+{
+        writeStyle();
+        OpenTagGraphicsElement *pDrawEllipseElement = new OpenTagGraphicsElement("draw:ellipse");
+        m_value.str("");
+        m_value << "gr" << m_styleIndex-1;
+        pDrawEllipseElement->addAttribute("draw:style-name", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(center.x - rx) << "in";
+        pDrawEllipseElement->addAttribute("svg:x", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(center.y - ry) << "in";
+        pDrawEllipseElement->addAttribute("svg:y", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(2 * rx) << "in";
+        pDrawEllipseElement->addAttribute("svg:width", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(2 * ry) << "in";
+        pDrawEllipseElement->addAttribute("svg:height", m_value.str());
+        m_value.str("");
+        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawEllipseElement));
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:ellipse")));
+}
+
+void OdgExporter::drawPolygon(const libwpg::WPGPointArray& vertices)
+{
+        if(vertices.count() < 2)
+                return;
+
+        if(vertices.count() == 2)
+        {
+                const libwpg::WPGPoint& p1 = vertices[0];
+                const libwpg::WPGPoint& p2 = vertices[1];
+
+                writeStyle();
+                OpenTagGraphicsElement *pDrawLineElement = new OpenTagGraphicsElement("draw:line");
+                m_value.str("");
+                m_value << "gr" << m_styleIndex-1;
+                pDrawLineElement->addAttribute("draw:style-name", m_value.str());
+                m_value.str("");
+                pDrawLineElement->addAttribute("draw:text-style-name", "P1");
+                pDrawLineElement->addAttribute("draw:layer", "layout");
+                m_value << doubleToString(p1.x)  << "in";
+                pDrawLineElement->addAttribute("svg:x1", m_value.str());
+                m_value.str("");
+                m_value << doubleToString(p1.y)  << "in";
+                pDrawLineElement->addAttribute("svg:y1", m_value.str());
+                m_value.str("");
+                m_value  << doubleToString(p2.x)  << "in";
+                pDrawLineElement->addAttribute("svg:x2", m_value.str());
+                m_value.str("");
+                m_value << doubleToString(p2.y)  << "in";
+                pDrawLineElement->addAttribute("svg:y2", m_value.str());
+                m_value.str("");
+                mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawLineElement));
+                mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:line")));
+        }
+        else
+        {
+                // draw as path
+                libwpg::WPGPath path;
+                path.moveTo(vertices[0]);
+                for(unsigned long ii = 1; ii < vertices.count(); ii++)
+                        path.lineTo(vertices[ii]);
+                path.closed = true;
+                drawPath(path);
+        }
+}
+
+void OdgExporter::drawPath(const libwpg::WPGPath& path)
+{
+        if(path.count() == 0)
+                return;
+
+        // try to find the bounding box
+        // this is simple convex hull technique, the bounding box might not be
+        // accurate but that should be enough for this purpose
+        libwpg::WPGPoint p = path.element(0).point;
+        libwpg::WPGPoint q = path.element(0).point;
+        for(unsigned k = 0; k < path.count(); k++)
+        {
+                libwpg::WPGPathElement element = path.element(k);
+                p.x = (p.x > element.point.x) ? element.point.x : p.x;
+                p.y = (p.y > element.point.y) ? element.point.y : p.y;
+                q.x = (q.x < element.point.x) ? element.point.x : q.x;
+                q.y = (q.y < element.point.y) ? element.point.y : q.y;
+                if(element.type == libwpg::WPGPathElement::CurveToElement)
+                {
+                        p.x = (p.x > element.extra1.x) ? element.extra1.x : p.x;
+                        p.y = (p.y > element.extra1.y) ? element.extra1.y : p.y;
+                        q.x = (q.x < element.extra1.x) ? element.extra1.x : q.x;
+                        q.y = (q.y < element.extra1.y) ? element.extra1.y : q.y;
+                        p.x = (p.x > element.extra2.x) ? element.extra2.x : p.x;
+                        p.y = (p.y > element.extra2.y) ? element.extra2.y : p.y;
+                        q.x = (q.x < element.extra2.x) ? element.extra2.x : q.x;
+                        q.y = (q.y < element.extra2.y) ? element.extra2.y : q.y;
+                }
+        }
+        double vw = q.x - p.x;
+        double vh = q.y - p.y;
+
+        writeStyle();
+
+        OpenTagGraphicsElement *pDrawPathElement = new OpenTagGraphicsElement("draw:path");
+        m_value.str("");
+        m_value << "gr" << m_styleIndex-1;
+        pDrawPathElement->addAttribute("draw:style-name", m_value.str());
+        m_value.str("");
+        pDrawPathElement->addAttribute("draw:text-style-name", "P1");
+        pDrawPathElement->addAttribute("draw:layer", "layout");
+        m_value << doubleToString(p.x)  << "in";
+        pDrawPathElement->addAttribute("svg:x", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(p.y)  << "in";
+        pDrawPathElement->addAttribute("svg:y", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(vw) << "in";
+        pDrawPathElement->addAttribute("svg:width", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(vh) << "in";
+        pDrawPathElement->addAttribute("svg:height", m_value.str());
+        m_value.str("");
+        m_value << "0 0 " << (int)(vw*2540) << " " << (int)(vh*2540);
+        pDrawPathElement->addAttribute("svg:viewBox", m_value.str());
+        m_value.str("");
+
+        for(unsigned i = 0; i < path.count(); i++)
+        {
+                libwpg::WPGPathElement element = path.element(i);
+                libwpg::WPGPoint point = element.point;
+                switch(element.type)
+                {
+                        // 2540 is 2.54*1000, 2.54 in = 1 in
+                        case libwpg::WPGPathElement::MoveToElement:
+                                m_value << "M" << (int)((point.x-p.x)*2540) << " ";
+                                m_value << (int)((point.y-p.y)*2540);
+                                break;
+
+                        case libwpg::WPGPathElement::LineToElement:
+                                m_value << "L" << (int)((point.x-p.x)*2540) << " ";
+                                m_value << (int)((point.y-p.y)*2540);
+                                break;
+
+                        case libwpg::WPGPathElement::CurveToElement:
+                                m_value << "C" << (int)((element.extra1.x-p.x)*2540) << " ";
+                                m_value << (int)((element.extra1.y-p.y)*2540) << " ";
+                                m_value << (int)((element.extra2.x-p.x)*2540) << " ";
+                                m_value << (int)((element.extra2.y-p.y)*2540) << " ";
+                                m_value << (int)((point.x-p.x)*2540) << " ";
+                                m_value << (int)((point.y-p.y)*2540);
+                                break;
+
+                        default:
+                                break;
+                }
+        }
+        if(path.closed)
+                m_value << " Z";
+        pDrawPathElement->addAttribute("svg:d", m_value.str());
+        m_value.str("");
+        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawPathElement));
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:path")));
+}
+
+
+void OdgExporter::drawBitmap(const libwpg::WPGBitmap& bitmap)
+{
+        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
+        m_value.str("");
+        m_value << doubleToString(bitmap.rect.x1) << "in";
+        pDrawFrameElement->addAttribute("svg:x", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(bitmap.rect.y1) << "in";
+        pDrawFrameElement->addAttribute("svg:y", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(bitmap.rect.height()) << "in";
+        pDrawFrameElement->addAttribute("svg:height", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(bitmap.rect.width()) << "in";
+        pDrawFrameElement->addAttribute("svg:width", m_value.str());
+        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
+
+        libwpg::WPGString base64Binary;
+        bitmap.generateBase64DIB(base64Binary);
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
+}
+
+void OdgExporter::drawImageObject(const libwpg::WPGBinaryData& binaryData)
+{
+        if (binaryData.mimeType.length() <= 0)
+                return;
+        OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame");
+        m_value.str("");
+        m_value << doubleToString(binaryData.rect.x1) << "in";
+        pDrawFrameElement->addAttribute("svg:x", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(binaryData.rect.y1) << "in";
+        pDrawFrameElement->addAttribute("svg:y", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(binaryData.rect.height()) << "in";
+        pDrawFrameElement->addAttribute("svg:height", m_value.str());
+        m_value.str("");
+        m_value << doubleToString(binaryData.rect.width()) << "in";
+        pDrawFrameElement->addAttribute("svg:width", m_value.str());
+        mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data")));
+
+        libwpg::WPGString base64Binary = binaryData.getBase64Data();
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr())));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image")));
+
+        mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame")));
+}
+
+
+static std::string colorToHex(const libwpg::WPGColor& color)
+{
+        char hexdigits[] = "0123456789abcdef";
+        char buffer[] = "123456";
+        buffer[0] = hexdigits[(color.red >> 4) & 15];
+        buffer[1] = hexdigits[color.red & 15];
+        buffer[2] = hexdigits[(color.green >> 4) & 15];
+        buffer[3] = hexdigits[color.green & 15];
+        buffer[4] = hexdigits[(color.blue >> 4) & 15];
+        buffer[5] = hexdigits[color.blue & 15];
+        return std::string(buffer);
+}
+
+void OdgExporter::writeStyle()
+{
+        m_value.str("");
+        m_name.str("");
+
+        if(!m_pen.solid && (m_pen.dashArray.count() >=2 ) )
+        {
+                // ODG only supports dashes with the same length of spaces inbetween
+                // here we take the first space and assume everything else the same
+                // note that dash length is written in percentage
+                double distance = m_pen.dashArray.at(1);
+                OpenTagGraphicsElement *tmpDrawStrokeDashElement = new OpenTagGraphicsElement("draw:stroke-dash");
+                tmpDrawStrokeDashElement->addAttribute("draw:style", "rect");
+                m_value << "Dash_" << m_dashIndex++;
+                tmpDrawStrokeDashElement->addAttribute("draw:name", m_value.str());
+                m_value.str("");
+                m_value << doubleToString(distance*100) << "%";
+                tmpDrawStrokeDashElement->addAttribute("draw:distance", m_value.str());
+                m_value.str("");
+                for(unsigned i = 0; i < m_pen.dashArray.count()/2; i++)
+                {
+                        m_name << "draw:dots" << i+1;
+                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), "1");
+                        m_name.str("");
+                        m_name << "draw:dots" << i+1 << "-length";
+                        m_value << doubleToString(100*m_pen.dashArray.at(i*2)) << "%";
+                        tmpDrawStrokeDashElement->addAttribute(m_name.str(), m_value.str());
+                        m_name.str("");
+                        m_value.str("");
+                }
+                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(tmpDrawStrokeDashElement));
+                mStrokeDashElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:stroke-dash")));
+        }
+
+        if(m_brush.style == libwpg::WPGBrush::Gradient)
+        {
+                OpenTagGraphicsElement *tmpDrawGradientElement = new OpenTagGraphicsElement("draw:gradient");
+                tmpDrawGradientElement->addAttribute("draw:style", "linear");
+                m_value << "Gradient_" << m_gradientIndex++;
+                tmpDrawGradientElement->addAttribute("draw:name", m_value.str());
+                m_value.str("");
+
+                // ODG angle unit is 0.1 degree
+                double angle = -m_brush.gradient.angle();
+                while(angle < 0)
+                        angle += 360;
+                while(angle > 360)
+                        angle -= 360;
+
+                m_value << (unsigned)(angle*10);
+                tmpDrawGradientElement->addAttribute("draw:angle", m_value.str());
+                m_value.str("");
+
+                libwpg::WPGColor startColor = m_brush.gradient.stopColor(0);
+                libwpg::WPGColor stopColor = m_brush.gradient.stopColor(1);
+                m_value << "#" << colorToHex(startColor);
+                tmpDrawGradientElement->addAttribute("draw:start-color", m_value.str());
+                m_value.str("");
+                m_value << "#" << colorToHex(stopColor);
+                tmpDrawGradientElement->addAttribute("draw:end-color", m_value.str());
+                m_value.str("");
+                tmpDrawGradientElement->addAttribute("draw:start-intensity", "100%");
+                tmpDrawGradientElement->addAttribute("draw:end-intensity", "100%");
+                tmpDrawGradientElement->addAttribute("draw:border", "0%");
+                mGradientElements.push_back(static_cast<GraphicsElement *>(tmpDrawGradientElement));
+                mGradientElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:gradient")));
+        }
+
+        OpenTagGraphicsElement *tmpStyleStyleElement = new OpenTagGraphicsElement("style:style");
+        m_value << "gr" << m_styleIndex;
+        tmpStyleStyleElement->addAttribute("style:name", m_value.str());
+        m_value.str("");
+        tmpStyleStyleElement->addAttribute("style:family", "graphic");
+        tmpStyleStyleElement->addAttribute("style:parent-style-name", "standard");
+        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleStyleElement));
+
+        OpenTagGraphicsElement *tmpStyleGraphicPropertiesElement = new OpenTagGraphicsElement("style:graphic-properties");
+
+        if(m_pen.width > 0.0)
+        {
+                m_value << doubleToString(m_pen.width) << "in";
+                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-width", m_value.str());
+                m_value.str("");
+                m_value << "#" << colorToHex(m_pen.foreColor);
+                tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-color", m_value.str());
+                m_value.str("");
+
+                if(!m_pen.solid)
+                {
+                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "dash");
+                        m_value << "Dash_" << m_dashIndex-1;
+                        tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke-dash", m_value.str());
+                        m_value.str("");
+                }
+        }
+        else
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "none");
+
+        if(m_brush.style == libwpg::WPGBrush::NoBrush)
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "none");
+
+        if(m_brush.style == libwpg::WPGBrush::Solid)
+        {
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "solid");
+                m_value << "#" << colorToHex(m_brush.foreColor);
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-color", m_value.str());
+                m_value.str("");
+        }
+
+        if(m_brush.style == libwpg::WPGBrush::Gradient)
+        {
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "gradient");
+                m_value << "Gradient_" << m_gradientIndex-1;
+                tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-gradient-name", m_value.str());
+                m_value.str("");
+        }
+
+        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleGraphicPropertiesElement));
+        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:graphic-properties")));
+
+        mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:style")));
+        m_styleIndex++;
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.hxx 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.hxx
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.hxx	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/OdgExporter.hxx	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,116 @@
+/* libwpg
+ * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the 
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02111-1301 USA
+ *
+ * For further information visit http://libwpg.sourceforge.net
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#ifndef __ODGEXPORTER_H__
+#define __ODGEXPORTER_H__
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <libwpg/libwpg.h>
+#include "GraphicsElement.hxx"
+
+class OdgExporter : public libwpg::WPGPaintInterface {
+public:
+	explicit OdgExporter(GraphicsHandler *pHandler,
+			     const bool isFlatXML = false);
+	~OdgExporter();
+
+#if LIBWPG_VERSION_MINOR<2
+	void startGraphics(double imageWidth, double imageHeight);
+	void endGraphics();
+	void startLayer(unsigned int id);
+	void endLayer(unsigned int id);
+
+	void setPen(const libwpg::WPGPen& pen);
+	void setBrush(const libwpg::WPGBrush& brush);
+	void setFillRule(FillRule rule);
+
+	void drawRectangle(const libwpg::WPGRect& rect, double rx, double ry);
+	void drawEllipse(const libwpg::WPGPoint& center, double rx, double ry);
+	void drawPolygon(const libwpg::WPGPointArray& vertices);
+	void drawPath(const libwpg::WPGPath& path);
+	void drawBitmap(const libwpg::WPGBitmap& bitmap);
+	void drawImageObject(const libwpg::WPGBinaryData& binaryData);
+
+private:
+	std::vector <GraphicsElement *> mBodyElements;
+	std::vector <GraphicsElement *> mAutomaticStylesElements;
+	std::vector <GraphicsElement *> mStrokeDashElements;
+	std::vector <GraphicsElement *> mGradientElements;
+	GraphicsHandler *mpHandler;
+
+	libwpg::WPGPen m_pen;
+	libwpg::WPGBrush m_brush;
+	FillRule m_fillRule;
+	int m_gradientIndex;
+	int m_dashIndex;
+	int m_styleIndex;
+	void writeStyle();
+	std::ostringstream m_value, m_name;
+	double m_width, m_height;
+	const bool m_isFlatXML;
+#else
+	virtual void startGraphics(const ::WPXPropertyList &propList);
+	virtual void endGraphics();
+	virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
+	virtual void startLayer(const ::WPXPropertyList &propList);
+	virtual void endLayer();
+	virtual void drawRectangle(const ::WPXPropertyList& propList);
+	virtual void drawEllipse(const ::WPXPropertyList& propList);
+	virtual void drawPolygon(const ::WPXPropertyListVector &vertices);
+	virtual void drawPath(const ::WPXPropertyListVector &path);
+	virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
+	virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList);
+	virtual void endEmbeddedGraphics();
+	virtual void drawPolyline(const ::WPXPropertyListVector &vertices);
+	virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
+	virtual void endTextObject();
+	virtual void startTextLine(const ::WPXPropertyList &propList);
+	virtual void endTextLine();
+	virtual void startTextSpan(const ::WPXPropertyList &propList);
+	virtual void endTextSpan();
+	virtual void insertText(const ::WPXString &str);
+
+
+private:
+	std::vector <GraphicsElement *> mBodyElements;
+	std::vector <GraphicsElement *> mAutomaticStylesElements;
+	std::vector <GraphicsElement *> mStrokeDashElements;
+	std::vector <GraphicsElement *> mGradientElements;
+	GraphicsHandler *mpHandler;
+
+	int m_gradientIndex;
+	int m_dashIndex;
+	int m_styleIndex;
+	void writeStyle();
+	std::ostringstream m_value, m_name;
+	double m_width, m_height;
+	const bool m_isFlatXML;
+#endif
+};
+
+#endif // __ODGEXPORTER_H__
diff -pruN 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/WPGImport.cpp 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/WPGImport.cpp
--- 1:2.3.3-1/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/WPGImport.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_03_libwpg_02.diff/filters/karbon/wpg/import/WPGImport.cpp	2011-02-17 12:12:55.000000000 +0000
@@ -0,0 +1,163 @@
+/* This file is part of the KDE project
+   Copyright (C) 2007 Ariya Hidayat <ariya@kde.org>
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public License
+   along with this library; see the file COPYING.LIB.  If not, write to
+   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include <WPGImport.h>
+#include <WPGImport.moc>
+
+#include <QBuffer>
+#include <QByteArray>
+#include <QString>
+
+#include <kdebug.h>
+#include <KoFilterChain.h>
+#include <KoGlobal.h>
+#include <KoUnit.h>
+#include <kpluginfactory.h>
+
+#include <KoXmlWriter.h>
+
+#include <libwpg/libwpg.h>
+#if LIBWPG_VERSION_MINOR<2
+#include <libwpg/WPGStreamImplementation.h>
+#else
+#include <libwpd-stream/libwpd-stream.h>
+#endif
+
+#include "FileOutputHandler.hxx"
+#include "OdgExporter.hxx"
+
+#include <iostream>
+
+K_PLUGIN_FACTORY(WPGImportFactory, registerPlugin<WPGImport>();)
+K_EXPORT_PLUGIN(WPGImportFactory("kofficefilters"))
+
+WPGImport::WPGImport(QObject* parent, const QVariantList&)
+        : KoFilter(parent)
+{
+}
+
+WPGImport::~WPGImport()
+{
+}
+
+static QByteArray createManifest()
+{
+    KoXmlWriter* manifestWriter;
+    QByteArray manifestData;
+    QBuffer manifestBuffer(&manifestData);
+
+    manifestBuffer.open(QIODevice::WriteOnly);
+    manifestWriter = new KoXmlWriter(&manifestBuffer);
+
+    manifestWriter->startDocument("manifest:manifest");
+    manifestWriter->startElement("manifest:manifest");
+    manifestWriter->addAttribute("xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0");
+    manifestWriter->addManifestEntry("/", "application/vnd.oasis.opendocument.graphics");
+    //manifestWriter->addManifestEntry( "styles.xml", "text/xml" );
+    manifestWriter->addManifestEntry("content.xml", "text/xml");
+    manifestWriter->endElement();
+    manifestWriter->endDocument();
+    delete manifestWriter;
+
+    return manifestData;
+}
+
+
+KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to)
+{
+    if (from != "application/x-wpg")
+        return KoFilter::NotImplemented;
+
+    if (to != "application/vnd.oasis.opendocument.graphics")
+        return KoFilter::NotImplemented;
+
+#if LIBWPG_VERSION_MINOR<2
+    WPXInputStream* input = new libwpg::WPGFileStream(m_chain->inputFile().toLocal8Bit());
+    if (input->isOLEStream()) {
+        WPXInputStream* olestream = input->getDocumentOLEStream();
+        if (olestream) {
+            delete input;
+            input = olestream;
+        }
+    }
+#else
+    WPXInputStream* input = new WPXFileStream(m_chain->inputFile().toLocal8Bit());
+    if (input->isOLEStream()) {
+        WPXInputStream* olestream = input->getDocumentOLEStream("Anything");
+        if (olestream) {
+            delete input;
+            input = olestream;
+        }
+     }
+#endif
+
+    if (!libwpg::WPGraphics::isSupported(input)) {
+        std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
+        delete input;
+        return KoFilter::NotImplemented;
+    }
+
+    // do the conversion
+    std::ostringstream tmpStringStream;
+    FileOutputHandler tmpHandler(tmpStringStream);
+    OdgExporter exporter(&tmpHandler);
+    libwpg::WPGraphics::parse(input, &exporter);
+    delete input;
+
+
+    // create output store
+    KoStore* storeout;
+    storeout = KoStore::createStore(m_chain->outputFile(), KoStore::Write,
+                                    "application/vnd.oasis.opendocument.graphics", KoStore::Zip);
+
+    if (!storeout) {
+        kWarning() << "Couldn't open the requested file.";
+        return KoFilter::FileNotFound;
+    }
+
+#if 0
+    if (!storeout->open("styles.xml")) {
+        kWarning() << "Couldn't open the file 'styles.xml'.";
+        return KoFilter::CreationError;
+    }
+    //storeout->write( createStyles() );
+    storeout->close();
+#endif
+
+    if (!storeout->open("content.xml")) {
+        kWarning() << "Couldn't open the file 'content.xml'.";
+        return KoFilter::CreationError;
+    }
+    storeout->write(tmpStringStream.str().c_str());
+    storeout->close();
+
+    // store document manifest
+    storeout->enterDirectory("META-INF");
+    if (!storeout->open("manifest.xml")) {
+        kWarning() << "Couldn't open the file 'META-INF/manifest.xml'.";
+        return KoFilter::CreationError;
+    }
+    storeout->write(createManifest());
+    storeout->close();
+
+    // we are done!
+    delete storeout;
+
+    return KoFilter::OK;
+}
diff -pruN 1:2.3.3-1/.pc/kubuntu_04_findlibgsf.diff/cmake/modules/FindLIBGSF.cmake 1:2.3.3-0ubuntu9/.pc/kubuntu_04_findlibgsf.diff/cmake/modules/FindLIBGSF.cmake
--- 1:2.3.3-1/.pc/kubuntu_04_findlibgsf.diff/cmake/modules/FindLIBGSF.cmake	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_04_findlibgsf.diff/cmake/modules/FindLIBGSF.cmake	2011-02-17 12:10:35.000000000 +0000
@@ -0,0 +1,57 @@
+# - Try to find libGSF
+#
+# Once done this will define
+#
+#  LIBGSF_FOUND - System has LibGSF
+#  LIBGSF_INCLUDE_DIR - The LibGSF include directory
+#  LIBGSF_LIBRARIES - The libraries needed to use LibGSF
+#  LIBGSF_DEFINITIONS - Compiler switches required for using LibGSF
+#  LIBGSF_GSF_EXECUTABLE - The archive utility
+#  LIBGSF_GSFOFFICETHUMBNAILER_EXECUTABLE - The office files thumbnailer for the GNOME desktop
+#  LIBGSF_GSFVBADUMP_EXECUTABLE - The utility to extract Visual Basic for Applications macros
+
+# Copyright (c) 2009, Pau Garcia i Quiles <pgquiles@elpauer.org>
+# Based off FindLibXml2.cmake from CMake 2.6.4 by Alexander Neundorf <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+IF (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)
+   # in cache already
+   SET(LIBGSF_FIND_QUIETLY TRUE)
+ENDIF (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)
+
+IF (NOT WIN32)
+   # use pkg-config to get the directories and then use these values
+   # in the FIND_PATH() and FIND_LIBRARY() calls
+   FIND_PACKAGE(PkgConfig)
+   PKG_CHECK_MODULES(PC_LIBGSF libgsf-1)
+   SET(LIBGSF_DEFINITIONS ${PC_LIBGSF_CFLAGS_OTHER})
+ENDIF (NOT WIN32)
+
+FIND_PATH(LIBGSF_INCLUDE_DIR gsf/gsf.h
+   HINTS
+   ${PC_LIBGSF_INCLUDEDIR}
+   ${PC_LIBGSF_INCLUDE_DIRS}
+   PATH_SUFFIXES libgsf-1
+   )
+
+FIND_LIBRARY(LIBGSF_LIBRARIES NAMES gsf-1 libgsf-1
+   HINTS
+   ${PC_LIBGSF_LIBDIR}
+   ${PC_LIBGSF_LIBRARY_DIRS}
+   )
+
+FIND_PROGRAM(LIBGSF_GSF_EXECUTABLE gsf)
+FIND_PROGRAM(LIBGSF_GSFOFFICETHUMBNAILER_EXECUTABLE gsf-office-thumbnailer)
+FIND_PROGRAM(LIBGSF_GSFVBADUMP_EXECUTABLE gsf-vba-dump)
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+# handle the QUIETLY and REQUIRED arguments and set LIBGSF_FOUND to TRUE if 
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGSF DEFAULT_MSG LIBGSF_LIBRARIES LIBGSF_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(LIBGSF_INCLUDE_DIR LIBGSF_LIBRARIES LIBGSF_GSF_EXECUTABLE LIBGSF_GSFOFFICETHUMBNAILER_EXECUTABLE LIBGSF_GSFVBADUMP_EXECUTABLE )
+
diff -pruN 1:2.3.3-1/.pc/kubuntu_05_libc_multiarch.diff/cmake/modules/FindIconv.cmake 1:2.3.3-0ubuntu9/.pc/kubuntu_05_libc_multiarch.diff/cmake/modules/FindIconv.cmake
--- 1:2.3.3-1/.pc/kubuntu_05_libc_multiarch.diff/cmake/modules/FindIconv.cmake	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_05_libc_multiarch.diff/cmake/modules/FindIconv.cmake	2011-02-17 12:10:35.000000000 +0000
@@ -0,0 +1,57 @@
+# - Try to find Iconv 
+# Once done this will define 
+# 
+#  ICONV_FOUND - system has Iconv 
+#  ICONV_INCLUDE_DIR - the Iconv include directory 
+#  ICONV_LIBRARIES - Link these to use Iconv 
+#  ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
+# 
+include(CheckCXXSourceCompiles)
+
+IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+  # Already in cache, be silent
+  SET(ICONV_FIND_QUIETLY TRUE)
+ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+
+FIND_PATH(ICONV_INCLUDE_DIR iconv.h) 
+ 
+FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
+ 
+IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
+   SET(ICONV_FOUND TRUE) 
+ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
+
+set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+IF(ICONV_FOUND)
+  check_cxx_source_compiles("
+  #include <iconv.h>
+  int main(){
+    iconv_t conv = 0;
+    const char* in = 0;
+    size_t ilen = 0;
+    char* out = 0;
+    size_t olen = 0;
+    iconv(conv, &in, &ilen, &out, &olen);
+    return 0;
+  }
+" ICONV_SECOND_ARGUMENT_IS_CONST )
+ENDIF(ICONV_FOUND)
+set(CMAKE_REQUIRED_INCLUDES)
+set(CMAKE_REQUIRED_LIBRARIES)
+
+IF(ICONV_FOUND) 
+  IF(NOT ICONV_FIND_QUIETLY) 
+    MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") 
+  ENDIF(NOT ICONV_FIND_QUIETLY) 
+ELSE(ICONV_FOUND) 
+  IF(Iconv_FIND_REQUIRED) 
+    MESSAGE(FATAL_ERROR "Could not find Iconv") 
+  ENDIF(Iconv_FIND_REQUIRED) 
+ENDIF(ICONV_FOUND) 
+
+MARK_AS_ADVANCED(
+  ICONV_INCLUDE_DIR
+  ICONV_LIBRARIES
+  ICONV_SECOND_ARGUMENT_IS_CONST
+)
diff -pruN 1:2.3.3-1/.pc/kubuntu_06_krita_link_x.diff/krita/ui/CMakeLists.txt 1:2.3.3-0ubuntu9/.pc/kubuntu_06_krita_link_x.diff/krita/ui/CMakeLists.txt
--- 1:2.3.3-1/.pc/kubuntu_06_krita_link_x.diff/krita/ui/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_06_krita_link_x.diff/krita/ui/CMakeLists.txt	2011-02-17 12:14:27.000000000 +0000
@@ -0,0 +1,274 @@
+include_directories( ${KOTEXT_INCLUDES}	
+	${CMAKE_SOURCE_DIR}/libs/pigment/colorprofiles
+	${CMAKE_CURRENT_SOURCE_DIR}/flake 
+	${CMAKE_CURRENT_SOURCE_DIR}/pigment/resources
+	${CMAKE_CURRENT_SOURCE_DIR}/widgets/resources
+	${CMAKE_CURRENT_SOURCE_DIR}/openrastertk
+	${CMAKE_SOURCE_DIR}/krita/image/metadata 
+	${EXIV2_INCLUDE_DIR} )
+
+add_definitions(-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)
+
+add_subdirectory( tests )
+
+
+configure_file(config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )
+
+include(kdefx.cmake)
+
+set(kritaui_LIB_SRCS
+    canvas/kis_canvas_widget_base.cpp 
+    canvas/kis_canvas2.cpp
+    canvas/kis_canvas_controller.cpp
+    canvas/kis_canvas_decoration.cc
+    canvas/kis_coordinates_converter.cpp 
+    canvas/kis_grid_manager.cpp 
+    canvas/kis_grid_painter_configuration.cpp
+    canvas/kis_perspective_grid_manager.cpp  
+    canvas/kis_prescaled_projection.cpp
+    canvas/kis_qpainter_canvas.cpp
+    canvas/kis_projection_backend.cpp
+    canvas/kis_update_info.cpp
+    canvas/kis_image_patch.cpp
+    canvas/kis_image_pyramid.cpp
+    dialogs/kis_dlg_adj_layer_props.cc 
+    dialogs/kis_dlg_adjustment_layer.cc
+    dialogs/kis_dlg_filter.cpp
+    dialogs/kis_dlg_generator_layer.cpp
+    dialogs/kis_dlg_image_properties.cc
+    dialogs/kis_dlg_layer_properties.cc
+    dialogs/kis_dlg_preferences.cc
+    dialogs/kis_dlg_transformation_effect.cpp
+    flake/kis_layer_container_shape.cc 
+    flake/kis_node_shape.cpp
+    flake/kis_shape_controller.cpp
+    flake/kis_shape_layer.cc 
+    flake/kis_shape_layer_canvas.cpp 
+    flake/kis_shape_selection.cpp
+    flake/kis_shape_selection_canvas.cpp
+    flake/kis_shape_selection_model.cpp 
+    kis_autogradient.cc
+    kis_autogradient_resource.cc
+    kis_bookmarked_configurations_editor.cc
+    kis_bookmarked_configurations_model.cc
+    kis_bookmarked_filter_configurations_model.cc
+    kis_brushengine_selector.cpp
+    kis_canvas_resource_provider.cpp 
+    kis_categorized_item_delegate.cpp
+    kis_clipboard.cc 
+    kis_config.cc
+    kis_config_notifier.cpp 
+    kis_color_data_list.cpp
+    kis_control_frame.cpp
+    kis_composite_ops_model.cc
+    kis_paint_ops_model.cpp
+    kis_cursor.cc
+    kis_custom_palette.cc
+    kis_custom_pattern.cc
+    kis_doc2.cc 
+    kis_exposure_visitor.cc 
+    kis_factory2.cc
+    kis_filter_handler.cc 
+    kis_filter_manager.cc 
+    kis_filters_model.cc
+    kis_histogram_view.cc 
+    kis_image_manager.cc
+    kis_image_view_converter.cpp
+    kis_import_catcher.cc 
+    kis_layer_manager.cc
+    kis_mask_manager.cc
+    kis_node_commands_adapter.cpp
+    kis_node_manager.cpp 
+    kis_node_model.cpp
+    kis_painting_assistant.cc 
+    kis_painting_assistants_manager.cc 
+    kis_paintop_box.cc 
+    kis_palette_manager.cpp
+    kis_popup_palette.cpp
+    kis_png_converter.cpp
+    kis_preference_set_registry.cpp
+    kis_print_job.cpp
+    kis_resource_server_provider.cpp 
+    kis_selection_decoration.cc
+    kis_selection_manager.cc 
+    kis_statusbar.cc
+    kis_view2.cpp 
+    kis_zoom_manager.cc
+    ko_favorite_resource_manager.cpp
+    kisexiv2/kis_exif_io.cpp
+    kisexiv2/kis_exiv2.cpp
+    kisexiv2/kis_iptc_io.cpp
+    kisexiv2/kis_xmp_io.cpp
+    kra/kis_kra_load_visitor.cpp
+    kra/kis_kra_loader.cpp 
+    kra/kis_kra_save_visitor.cpp 
+    kra/kis_kra_saver.cpp
+    kra/kis_kra_savexml_visitor.cpp
+    opengl/kis_opengl.cpp 
+    opengl/kis_opengl_canvas2.cpp
+    opengl/kis_opengl_image_textures.cpp
+    opengl/kis_texture_tile.cpp
+    openrastertk/kis_open_raster_stack_load_visitor.cpp
+    openrastertk/kis_open_raster_stack_save_visitor.cpp
+    recorder/kis_recorded_action_editor_factory.cc
+    recorder/kis_recorded_action_editor_factory_registry.cc
+    recorder/kis_recorded_filter_action_editor.cc
+    recorder/kis_recorded_paint_action_editor.cc
+    tool/kis_selection_tool_helper.cpp 
+    tool/kis_shape_tool_helper.cpp 
+    tool/kis_tool.cc 
+    tool/kis_tool_freehand.cc 
+    tool/kis_tool_freehand_p.cpp
+    tool/kis_tool_paint.cc 
+    tool/kis_tool_shape.cc
+    tool/kis_tool_select_base.cpp
+    tool/kis_tool_ellipse_base.cpp
+    tool/kis_tool_rectangle_base.cpp
+    tool/kis_tool_polyline_base.cpp
+    tool/kis_color_picker_utils.cpp
+    widgets/kis_channelflags_widget.cpp 
+    widgets/kis_cmb_composite.cc
+    widgets/kis_cmb_paintop.cpp
+    widgets/kis_cmb_idlist.cc 
+    widgets/kis_color_space_selector.cc
+    widgets/kis_curve_widget.cpp
+    widgets/kis_custom_image_widget.cc 
+    widgets/kis_double_widget.cc
+    widgets/kis_filter_selector_widget.cc
+    widgets/kis_gradient_chooser.cc 
+    widgets/kis_gradient_slider_widget.cc
+    widgets/kis_iconwidget.cc 
+    widgets/kis_mask_widgets.cpp 
+    widgets/kis_meta_data_merge_strategy_chooser_widget.cc
+    widgets/kis_multi_bool_filter_widget.cc
+    widgets/kis_multi_double_filter_widget.cc
+    widgets/kis_multi_integer_filter_widget.cc
+    widgets/kis_paintop_presets_popup.cpp 
+    widgets/kis_paintop_presets_chooser_popup.cpp
+    widgets/kis_pattern_chooser.cc
+    widgets/kis_popup_button.cc 
+    widgets/kis_preset_chooser.cpp
+    widgets/kis_progress_widget.cpp
+    widgets/kis_selection_options.cc 
+    widgets/kis_scratch_pad.cpp
+    widgets/kis_tree_view_popup.cc 
+    widgets/kis_slider_spin_box.cpp
+    widgets/kis_wdg_generator.cpp
+    widgets/squeezedcombobox.cpp
+)
+
+if(HAVE_OPENGL)
+    if(HAVE_GLEW)
+        set(kritaui_LIB_SRCS
+            ${kritaui_LIB_SRCS}
+            opengl/kis_opengl_shader.cpp
+            opengl/kis_opengl_fragment_shader.cpp
+            opengl/kis_opengl_vertex_shader.cpp
+            opengl/kis_opengl_program.cpp
+            opengl/kis_opengl_hdr_exposure_program.cpp
+            opengl/kis_opengl_gradient_program.cpp
+            )
+    endif(HAVE_GLEW)
+    set(kritaui_LIB_SRCS
+        ${kritaui_LIB_SRCS}
+        kis_3d_object_model.cpp
+        )
+endif(HAVE_OPENGL)
+
+add_definitions(${KDE4_ENABLE_EXCEPTIONS})
+
+
+kde4_add_ui_files(kritaui_LIB_SRCS
+    forms/wdgautogradient.ui
+    forms/wdggeneralsettings.ui
+    forms/wdgperformancesettings.ui
+    forms/wdggridsettings.ui
+    forms/wdggenerators.ui
+    forms/wdgcustompalette.ui
+    forms/wdgbookmarkedconfigurationseditor.ui
+    forms/wdgapplyprofile.ui
+    forms/wdgcustompattern.ui
+    forms/wdglayerproperties.ui
+    forms/wdgcolorsettings.ui
+    forms/wdgtabletsettings.ui
+    forms/wdgcolorspaceselector.ui
+    forms/wdgdisplaysettings.ui
+    forms/kis_previewwidgetbase.ui
+    forms/kis_matrix_widget.ui
+    forms/wdgselectionoptions.ui
+    forms/wdgshapeoptions.ui
+    forms/wdgnewimage.ui
+    forms/wdgimageproperties.ui
+    forms/wdgtransformationeffect.ui
+    forms/wdgmaskfromselection.ui
+    forms/wdgmasksource.ui
+    forms/wdgfilterdialog.ui
+    forms/wdgmetadatamergestrategychooser.ui
+    forms/wdgpaintoppresets.ui
+    forms/wdgpaintopsettings.ui
+    forms/wdgdlggeneratorlayer.ui
+    forms/wdgfilterselector.ui
+    forms/wdgfilternodecreation.ui
+    forms/wdgpaintactioneditor.ui
+)
+
+kde4_add_library(kritaui SHARED ${kritaui_LIB_SRCS} )
+
+target_link_libraries(kritaui ${KDE4_THREADWEAVER_LIBRARIES} kritaimage komain kowidgets ${PNG_LIBRARIES} ${EXIV2_LIBRARIES})
+
+if(HAVE_OPENGL)
+    target_link_libraries(kritaui ${OPENGL_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${OPENEXR_LIBRARIES})
+    set (GL_INTERFACE_LIBRARIES ";${OPENGL_LIBRARIES};${QT_QTOPENGL_LIBRARY}")
+    if(HAVE_GLEW)
+        target_link_libraries(kritaui ${GLEW_LIBRARIES})
+    endif(HAVE_GLEW)
+endif(HAVE_OPENGL)
+
+target_link_libraries(kritaui LINK_INTERFACE_LIBRARIES kritaimage komain ${GL_INTERFACE_LIBRARIES} )
+
+set_target_properties(kritaui
+    PROPERTIES VERSION ${GENERIC_KOFFICE_LIB_VERSION} SOVERSION ${GENERIC_KOFFICE_LIB_SOVERSION}
+)
+install(TARGETS kritaui  ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+
+########### install files ###############
+
+install( FILES
+    canvas/kis_canvas2.h
+    canvas/kis_canvas_decoration.h
+    canvas/kis_coordinates_converter.h
+    tool/kis_tool.h
+    kis_cursor.h
+    kis_view2.h
+    kis_ui_types.h
+#    kis_cmb_composite.h
+#    kis_cmb_idlist.h
+#    kis_color_cup.h
+#    kis_config.h
+#    kis_double_click_event.h
+#    kis_double_widget.h
+#    kis_filter_manager.h
+#    kis_gradient_chooser.h
+#    kis_gradient_slider_widget.h
+#    kis_histogram_view.h
+#    kis_icon_item.h
+#    kis_iconwidget.h
+#    kis_itemchooser.h
+#    kis_label_zoom.h
+#    kis_move_event.h
+   widgets/kis_multi_bool_filter_widget.h
+   widgets/kis_multi_double_filter_widget.h
+   widgets/kis_multi_integer_filter_widget.h
+#    kis_paintop_box.h
+#    kis_previewwidget.h
+#    kis_tool_non_paint.h
+#    kis_tool_paint.h
+#    kis_tool_freehand.h
+#    kis_tool_dummy.h
+#    kis_tool_manager.h
+#    kis_tool_types.h
+#    kis_view2.h
+#    KoInputDevice.h
+#    canvas/kis_perspective_grid_manager.h
+   DESTINATION ${INCLUDE_INSTALL_DIR})
diff -pruN 1:2.3.3-1/.pc/kubuntu_07_krita_plugins_errors.diff/krita/plugins/formats/exr/exr_converter.cc 1:2.3.3-0ubuntu9/.pc/kubuntu_07_krita_plugins_errors.diff/krita/plugins/formats/exr/exr_converter.cc
--- 1:2.3.3-1/.pc/kubuntu_07_krita_plugins_errors.diff/krita/plugins/formats/exr/exr_converter.cc	1970-01-01 00:00:00.000000000 +0000
+++ 1:2.3.3-0ubuntu9/.pc/kubuntu_07_krita_plugins_errors.diff/krita/plugins/formats/exr/exr_converter.cc	2011-02-17 12:13:40.000000000 +0000
@@ -0,0 +1,835 @@
+/*
+ *  Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
+ *  Copyright (c) 2010 Cyrille Berger <cberger@cberger.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "exr_converter.h"
+
+#include <half.h>
+
+#include <ImfAttribute.h>
+#include <ImfChannelList.h>
+#include <ImfInputFile.h>
+#include <ImfOutputFile.h>
+
+#include <kapplication.h>
+
+#include <kio/netaccess.h>
+#include <kio/deletejob.h>
+
+#include <KoColorSpaceRegistry.h>
+#include <KoCompositeOp.h>
+#include <KoColorSpaceTraits.h>
+#include <KoColorModelStandardIds.h>
+
+#include <kis_doc2.h>
+#include <kis_group_layer.h>
+#include <kis_image.h>
+#include <kis_paint_device.h>
+#include <kis_paint_layer.h>
+#include <kis_transaction.h>
+#include <kis_undo_adapter.h>
+
+#include <metadata/kis_meta_data_entry.h>
+#include <metadata/kis_meta_data_schema.h>
+#include <metadata/kis_meta_data_schema_registry.h>
+#include <metadata/kis_meta_data_store.h>
+#include <metadata/kis_meta_data_value.h>
+
+exrConverter::exrConverter(KisDoc2 *doc, KisUndoAdapter *adapter)
+{
+    m_doc = doc;
+    m_adapter = adapter;
+    m_job = 0;
+    m_stop = false;
+}
+
+exrConverter::~exrConverter()
+{
+}
+
+enum ImageType {
+    IT_UNKNOWN,
+    IT_FLOAT16,
+    IT_FLOAT32,
+    IT_UNSUPPORTED
+};
+
+ImageType imfTypeToKisType(Imf::PixelType type)
+{
+    switch (type) {
+    case Imf::UINT:
+    case Imf::NUM_PIXELTYPES:
+        return IT_UNSUPPORTED;
+    case Imf::HALF:
+        return IT_FLOAT16;
+    case Imf::FLOAT:
+        return IT_FLOAT32;
+    }
+}
+
+const KoColorSpace* kisTypeToColorSpace(QString model, ImageType imageType)
+{
+    switch (imageType) {
+    case IT_FLOAT16:
+        return KoColorSpaceRegistry::instance()->colorSpace(model, Float16BitsColorDepthID.id(), "");
+    case IT_FLOAT32:
+        return KoColorSpaceRegistry::instance()->colorSpace(model, Float32BitsColorDepthID.id(), "");
+    case IT_UNKNOWN:
+    case IT_UNSUPPORTED:
+        return 0;
+    }
+}
+
+template<typename _T_>
+struct Rgba {
+    _T_ r;
+    _T_ g;
+    _T_ b;
+    _T_ a;
+};
+
+struct ExrGroupLayerInfo;
+
+struct ExrLayerInfoBase {
+    ExrLayerInfoBase() : colorSpace(0), parent(0) {
+    }
+    const KoColorSpace* colorSpace;
+    QString name;
+    const ExrGroupLayerInfo* parent;
+};
+
+struct ExrGroupLayerInfo : public ExrLayerInfoBase {
+    ExrGroupLayerInfo() : groupLayer(0) {}
+    KisGroupLayerSP groupLayer;
+};
+
+struct ExrPaintLayerInfo : public ExrLayerInfoBase {
+    ExrPaintLayerInfo() : imageType(IT_UNKNOWN) {
+    }
+    ImageType imageType;
+    QMap< QString, QString> channelMap; ///< first is either R, G, B or A second is the EXR channel name
+    struct Remap {
+        Remap(const QString& _original, const QString& _current) : original(_original), current(_current) {
+        }
+        QString original;
+        QString current;
+    };
+    QList< Remap > remappedChannels; ///< this is used to store in the metadata the mapping between exr channel name, and channels used in Krita
+    void updateImageType(ImageType channelType);
+};
+
+void ExrPaintLayerInfo::updateImageType(ImageType channelType)
+{
+    if (imageType == IT_UNKNOWN) {
+        imageType = channelType;
+    } else if (imageType != channelType) {
+        imageType = IT_UNSUPPORTED;
+    }
+}
+
+template<typename _T_>
+void decodeData1(Imf::InputFile& file, ExrPaintLayerInfo& info, KisPaintLayerSP layer, int width, int xstart, int ystart, int height, Imf::PixelType ptype)
+{
+    QVector<_T_> pixels(width*height);
+
+    Q_ASSERT(info.channelMap.contains("G"));
+    dbgFile << "G -> " << info.channelMap["G"];
+
+    for (int y = 0; y < height; ++y) {
+        Imf::FrameBuffer frameBuffer;
+        _T_* frameBufferData = (pixels.data()) - xstart - (ystart + y) * width;
+        frameBuffer.insert(info.channelMap["G"].toAscii().data(),
+                           Imf::Slice(ptype, (char *) frameBufferData,
+                                      sizeof(_T_) * 1,
+                                      sizeof(_T_) * width));
+
+        file.setFrameBuffer(frameBuffer);
+        file.readPixels(ystart + y);
+        _T_ *rgba = pixels.data();
+        KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, y, width);
+        while (!it.isDone()) {
+
+            // XXX: For now unmultiply the alpha, though compositing will be faster if we
+            // keep it premultiplied.
+            _T_ unmultipliedRed = *rgba;
+
+            _T_* dst = reinterpret_cast<_T_*>(it.rawData());
+
+            *dst = unmultipliedRed;
+
+            ++it;
+            ++rgba;
+        }
+    }
+
+}
+
+template<typename _T_>
+void decodeData4(Imf::InputFile& file, ExrPaintLayerInfo& info, KisPaintLayerSP layer, int width, int xstart, int ystart, int height, Imf::PixelType ptype)
+{
+    typedef Rgba<_T_> Rgba;
+
+    QVector<Rgba> pixels(width);
+
+    bool hasAlpha = info.channelMap.contains("A");
+
+    for (int y = 0; y < height; ++y) {
+        Imf::FrameBuffer frameBuffer;
+        Rgba* frameBufferData = (pixels.data()) - xstart - (ystart + y) * width;
+        frameBuffer.insert(info.channelMap["R"].toAscii().data(),
+                           Imf::Slice(ptype, (char *) &frameBufferData->r,
+                                      sizeof(Rgba) * 1,
+                                      sizeof(Rgba) * width));
+        frameBuffer.insert(info.channelMap["G"].toAscii().data(),
+                           Imf::Slice(ptype, (char *) &frameBufferData->g,
+                                      sizeof(Rgba) * 1,
+                                      sizeof(Rgba) * width));
+        frameBuffer.insert(info.channelMap["B"].toAscii().data(),
+                           Imf::Slice(ptype, (char *) &frameBufferData->b,
+                                      sizeof(Rgba) * 1,
+                                      sizeof(Rgba) * width));
+        if (hasAlpha) {
+            frameBuffer.insert(info.channelMap["A"].toAscii().data(),
+                               Imf::Slice(ptype, (char *) &frameBufferData->a,
+                                          sizeof(Rgba) * 1,
+                                          sizeof(Rgba) * width));
+        }
+
+        file.setFrameBuffer(frameBuffer);
+        file.readPixels(ystart + y);
+        Rgba *rgba = pixels.data();
+        KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, y, width);
+        while (!it.isDone()) {
+
+            // XXX: For now unmultiply the alpha, though compositing will be faster if we
+            // keep it premultiplied.
+            _T_ unmultipliedRed = rgba -> r;
+            _T_ unmultipliedGreen = rgba -> g;
+            _T_ unmultipliedBlue = rgba -> b;
+
+            if (hasAlpha && rgba -> a >= HALF_EPSILON) {
+                unmultipliedRed /= rgba -> a;
+                unmultipliedGreen /= rgba -> a;
+                unmultipliedBlue /= rgba -> a;
+            }
+            typename KoRgbTraits<_T_>::Pixel* dst = reinterpret_cast<typename KoRgbTraits<_T_>::Pixel*>(it.rawData());
+
+            dst->red = unmultipliedRed;
+            dst->green = unmultipliedGreen;
+            dst->blue = unmultipliedBlue;
+            if (hasAlpha) {
+                dst->alpha = rgba->a;
+            } else {
+                dst->alpha = 1.0;
+            }
+
+            ++it;
+            ++rgba;
+        }
+    }
+
+}
+
+bool recCheckGroup(const ExrGroupLayerInfo& group, QStringList list, int idx1, int idx2)
+{
+    if (idx1 > idx2) return true;
+    if (group.name == list[idx2]) {
+        return recCheckGroup(*group.parent, list, idx1, idx2 - 1);
+    }
+    return false;
+}
+
+ExrGroupLayerInfo* searchGroup(QList<ExrGroupLayerInfo>* groups, QStringList list, int idx1, int idx2)
+{
+    if (idx1 > idx2) {
+        return 0;
+    }
+    // Look for the group
+    for (int i = 0; i < groups->size(); ++i) {
+        if (recCheckGroup(groups->at(i), list, idx1, idx2)) {
+            return &(*groups)[i];
+        }
+    }
+    // Create the group
+    ExrGroupLayerInfo info;
+    info.name = list.at(idx2);
+    info.parent = searchGroup(groups, list, idx1, idx2 - 1);
+    groups->append(info);
+    return &groups->last();
+}
+
+KisImageBuilder_Result exrConverter::decode(const KUrl& uri)
+{
+    dbgFile << "Load exr: " << uri << " " << QFile::encodeName(uri.toLocalFile());
+    Imf::InputFile file(QFile::encodeName(uri.toLocalFile()));
+
+    Imath::Box2i dw = file.header().dataWindow();
+    int width = dw.max.x - dw.min.x + 1;
+    int height = dw.max.y - dw.min.y + 1;
+    int dx = dw.min.x;
+    int dy = dw.min.y;
+
+    // Display the attributes of a file
+    for (Imf::Header::ConstIterator it = file.header().begin();
+            it != file.header().end(); ++it) {
+        dbgFile << "Attribute: " << it.name() << " type: " << it.attribute().typeName();
+    }
+
+    // Constuct the list of LayerInfo
+
+    QList<ExrPaintLayerInfo> informationObjects;
+    QList<ExrGroupLayerInfo> groups;
+
+    ImageType imageType = IT_UNKNOWN;
+
+    const Imf::ChannelList &channels = file.header().channels();
+    std::set<std::string> layerNames;
+    channels.layers(layerNames);
+
+    // Test if it is a multilayer EXR or singlelayer
+    if (layerNames.empty()) {
+        dbgFile << "Single layer:";
+        ExrPaintLayerInfo info;
+        info.name = i18n("HDR Layer");
+        for (Imf::ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) {
+            const Imf::Channel &channel = i.channel();
+            dbgFile << "Channel name = " << i.name() << " type = " << channel.type;
+
+            info.updateImageType(imfTypeToKisType(channel.type));
+
+            QString qname = i.name();
+            if (qname != "A" && qname != "R" && qname != "G" && qname != "B") {
+                dbgFile << "Unknow: " << i.name();
+                info.imageType = IT_UNSUPPORTED;
+            } else {
+                info.channelMap[qname] = qname;
+            }
+        }
+        informationObjects.push_back(info);
+        imageType = info.imageType;
+    } else {
+        dbgFile << "Multi layers:";
+        for (std::set<std::string>::const_iterator i = layerNames.begin();
+                i != layerNames.end(); ++i) {
+            ExrPaintLayerInfo info;
+            dbgFile << "layer name = " << i->c_str();
+            info.name = i->c_str();
+            Imf::ChannelList::ConstIterator layerBegin, layerEnd;
+            channels.channelsInLayer(*i, layerBegin, layerEnd);
+            for (Imf::ChannelList::ConstIterator j = layerBegin;
+                    j != layerEnd; ++j) {
+                const Imf::Channel &channel = j.channel();
+                dbgFile << "\tchannel " << j.name() << " type = " << channel.type;
+
+                info.updateImageType(imfTypeToKisType(channel.type));
+
+                QString qname = j.name();
+                QStringList list = qname.split('.');
+                QString layersuffix = list.last();
+
+                if (list.size() > 1) {
+                    info.name = list[list.size()-2];
+                    info.parent = searchGroup(&groups, list, 0, list.size() - 3);
+                }
+
+                info.channelMap[layersuffix] = qname;
+            }
+            if (info.imageType != IT_UNKNOWN && info.imageType != IT_UNSUPPORTED) {
+                informationObjects.push_back(info);
+                if (imageType < info.imageType) {
+                    imageType = info.imageType;
+                }
+            }
+        }
+    }
+    dbgFile << "File has " << informationObjects.size() << " layers";
+    // Set the colorspaces
+    for (int i = 0; i < informationObjects.size(); ++i) {
+        ExrPaintLayerInfo& info = informationObjects[i];
+        QString modelId;
+        if (info.channelMap.size() == 1) {
+            modelId = GrayColorModelID.id();
+            QString key = info.channelMap.begin().key();
+            if (key != "G") {
+                info.remappedChannels.push_back(ExrPaintLayerInfo::Remap(key, "G"));
+                QString channel =  info.channelMap.begin().value();
+                info.channelMap.clear();
+                info.channelMap["G"] = channel;
+            }
+        } else if (info.channelMap.size() == 3 || info.channelMap.size() == 4) {
+            if (info.channelMap.contains("R") && info.channelMap.contains("G") && info.channelMap.contains("B")) {
+                modelId = RGBAColorModelID.id();
+            } else if (info.channelMap.contains("X") && info.channelMap.contains("Y") && info.channelMap.contains("Z")) {
+                modelId = XYZAColorModelID.id();
+                QMap<QString, QString> newChannelMap;
+                if (info.channelMap.contains("W")) {
+                    newChannelMap["A"] = info.channelMap["W"];
+                    info.remappedChannels.push_back(ExrPaintLayerInfo::Remap("W", "A"));
+                    info.remappedChannels.push_back(ExrPaintLayerInfo::Remap("X", "X"));
+                    info.remappedChannels.push_back(ExrPaintLayerInfo::Remap("Y", "Y"));
+                    info.remappedChannels.push_back(ExrPaintLayerInfo::Remap("Z", "Z"));
+                } else if (info.channelMap.contains("A")) {
+                    newChannelMap["A"] = info.channelMap["A"];
+                }
+                // The decode function expect R, G, B in the channel map
+                newChannelMap["B"] = info.channelMap["X"];
+                newChannelMap["G"] = info.channelMap["Y"];
+                newChannelMap["R"] = info.channelMap["Z"];
+                info.channelMap = newChannelMap;
+            } else {
+                modelId = RGBAColorModelID.id();
+                QMap<QString, QString> newChannelMap;
+                QMap<QString, QString>::iterator it = info.channelMap.begin();
+                newChannelMap["R"] = it.value();
+                info.remappedChannels.push_back(ExrPaintLayerInfo::Remap(it.key(), "R"));
+                ++it;
+                newChannelMap["G"] = it.value();
+                info.remappedChannels.push_back(ExrPaintLayerInfo::Remap(it.key(), "G"));
+                ++it;
+                newChannelMap["B"] = it.value();
+                info.remappedChannels.push_back(ExrPaintLayerInfo::Remap(it.key(), "B"));
+                if (info.channelMap.size() == 4) {
+                    ++it;
+                    newChannelMap["A"] = it.value();
+                    info.remappedChannels.push_back(ExrPaintLayerInfo::Remap(it.key(), "A"));
+                }
+                info.channelMap = newChannelMap;
+            }
+        }
+        if (!modelId.isEmpty()) {
+            info.colorSpace = kisTypeToColorSpace(modelId, info.imageType);
+        }
+    }
+    // Get colorspace
+    dbgFile << "Image type = " << imageType;
+    const KoColorSpace* colorSpace = kisTypeToColorSpace(RGBAColorModelID.id(), imageType);
+
+    if (!colorSpace) return KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE;
+    dbgFile << "Colorspace: " << colorSpace->name();
+
+    // Set the colorspace on all groups
+    for (int i = 0; i < groups.size(); ++i) {
+        ExrGroupLayerInfo& info = groups[i];
+        info.colorSpace = colorSpace;
+    }
+
+    // Create the image
+    m_image = new KisImage(m_adapter, width, height, colorSpace, "");
+
+    if (!m_image) {
+        return KisImageBuilder_RESULT_FAILURE;
+    }
+    m_image->lock();
+
+    // Create group layers
+    for (int i = 0; i < groups.size(); ++i) {
+        ExrGroupLayerInfo& info = groups[i];
+        Q_ASSERT(info.parent == 0 || info.parent->groupLayer);
+        KisGroupLayerSP groupLayerParent = (info.parent) ? info.parent->groupLayer : m_image->rootLayer();
+        info.groupLayer = new KisGroupLayer(m_image, info.name, OPACITY_OPAQUE_U8);
+        m_image->addNode(info.groupLayer, groupLayerParent);
+    }
+
+    // Load the layers
+    for (int i = 0; i < informationObjects.size(); ++i) {
+        ExrPaintLayerInfo& info = informationObjects[i];
+        if (info.colorSpace) {
+            dbgFile << "Decoding " << info.name << " with " << info.channelMap.size() << " channels, and color space " << info.colorSpace->id();
+            KisPaintLayerSP layer = new KisPaintLayer(m_image, info.name, OPACITY_OPAQUE_U8, info.colorSpace);
+            KisTransaction("", layer->paintDevice());
+
+            layer->setCompositeOp(COMPOSITE_OVER);
+
+            if (!layer) {
+                return KisImageBuilder_RESULT_FAILURE;
+            }
+
+            switch (info.channelMap.size()) {
+            case 1:
+                // Decode the data
+                switch (imageType) {
+                case IT_FLOAT16:
+                    decodeData1<half>(file, info, layer, width, dx, dy, height, Imf::HALF);
+                    break;
+                case IT_FLOAT32:
+                    decodeData1<float>(file, info, layer, width, dx, dy, height, Imf::FLOAT);
+                    break;
+                case IT_UNKNOWN:
+                case IT_UNSUPPORTED:
+                    qFatal("Impossible error");
+                }
+                break;
+            case 3:
+            case 4:
+                // Decode the data
+                switch (imageType) {
+                case IT_FLOAT16:
+                    decodeData4<half>(file, info, layer, width, dx, dy, height, Imf::HALF);
+                    break;
+                case IT_FLOAT32:
+                    decodeData4<float>(file, info, layer, width, dx, dy, height, Imf::FLOAT);
+                    break;
+                case IT_UNKNOWN:
+                case IT_UNSUPPORTED:
+                    qFatal("Impossible error");
+                }
+                break;
+            default:
+                qFatal("Invalid number of channels: %i", info.channelMap.size());
+            }
+            // Check if should set the channels
+            if (!info.remappedChannels.isEmpty()) {
+                QList<KisMetaData::Value> values;
+                foreach(const ExrPaintLayerInfo::Remap& remap, info.remappedChannels) {
+                    QMap<QString, KisMetaData::Value> map;
+                    map["original"] = KisMetaData::Value(remap.original);
+                    map["current"] = KisMetaData::Value(remap.current);
+                    values.append(map);
+                }
+                layer->metaData()->addEntry(KisMetaData::Entry(KisMetaData::SchemaRegistry::instance()->create("http://krita.org/exrchannels/1.0/" , "exrchannels"), "channelsmap", values));
+            }
+            // Add the layer
+            KisGroupLayerSP groupLayerParent = (info.parent) ? info.parent->groupLayer : m_image->rootLayer();
+            m_image->addNode(layer, groupLayerParent);
+            layer->setDirty();
+        } else {
+            dbgFile << "No decoding " << info.name << " with " << info.channelMap.size() << " channels, and lack of a color space";
+        }
+    }
+    m_image->unlock();
+    return KisImageBuilder_RESULT_OK;
+}
+
+KisImageBuilder_Result exrConverter::buildImage(const KUrl& uri)
+{
+    if (uri.isEmpty())
+        return KisImageBuilder_RESULT_NO_URI;
+
+    if (!KIO::NetAccess::exists(uri, false, QApplication::activeWindow())) {
+        return KisImageBuilder_RESULT_NOT_EXIST;
+    }
+
+    // We're not set up to handle asynchronous loading at the moment.
+    KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE;
+    QString tmpFile;
+
+    if (KIO::NetAccess::download(uri, tmpFile, qApp->activeWindow())) {
+        KUrl uriTF;
+        uriTF.setPath(tmpFile);
+        result = decode(uriTF);
+        KIO::NetAccess::removeTempFile(tmpFile);
+    }
+
+    return result;
+}
+
+
+KisImageWSP exrConverter::image()
+{
+    return m_image;
+}
+
+struct ExrPaintLayerSaveInfo {
+    QString name; ///< name of the layer with a "." at the end (ie "group1.group2.layer1.")
+    KisPaintLayerSP layer;
+    QList<QString> channels;
+    Imf::PixelType pixelType;
+};
+
+template<typename _T_, int size>
+struct ExrPixel_ {
+    _T_ data[size];
+};
+
+class Encoder
+{
+public:
+    virtual ~Encoder() {}
+    virtual void prepareFrameBuffer(Imf::FrameBuffer*, int line) = 0;
+    virtual void encodeData(int line) = 0;
+
+};
+
+template<typename _T_, int size, int alphaPos>
+class EncoderImpl : public Encoder
+{
+public:
+    EncoderImpl(Imf::OutputFile* _file, const ExrPaintLayerSaveInfo* _info, int width) : file(_file), info(_info), pixels(width), m_width(width) {}
+    virtual ~EncoderImpl() {}
+    virtual void prepareFrameBuffer(Imf::FrameBuffer*, int line);
+    virtual void encodeData(int line);
+private:
+    typedef ExrPixel_<_T_, size> ExrPixel;
+    Imf::OutputFile* file;
+    const ExrPaintLayerSaveInfo* info;
+    QVector<ExrPixel> pixels;
+    int m_width;
+};
+
+template<typename _T_, int size, int alphaPos>
+void EncoderImpl<_T_, size, alphaPos>::prepareFrameBuffer(Imf::FrameBuffer* frameBuffer, int line)
+{
+    int xstart = 0;
+    int ystart = 0;
+    ExrPixel* frameBufferData = (pixels.data()) - xstart - (ystart + line) * m_width;
+    for (int k = 0; k < size; ++k) {
+        frameBuffer->insert(info->channels[k].toUtf8(),
+                            Imf::Slice(info->pixelType, (char *) &frameBufferData->data[k],
+                                       sizeof(ExrPixel) * 1,
+                                       sizeof(ExrPixel) * m_width));
+    }
+}
+
+template<typename _T_, int size, int alphaPos>
+void EncoderImpl<_T_, size, alphaPos>::encodeData(int line)
+{
+    ExrPixel *rgba = pixels.data();
+    KisHLineIterator it = info->layer->paintDevice()->createHLineIterator(0, line, m_width);
+    while (!it.isDone()) {
+
+        const _T_* dst = reinterpret_cast < const _T_* >(it.oldRawData());
+
+        if (alphaPos == -1) {
+            for (int i = 0; i < size; ++i) {
+                rgba->data[i] = dst[i];
+            }
+        } else {
+            _T_ alpha = dst[alphaPos];
+            for (int i = 0; i < size; ++i) {
+                if (i != alphaPos) {
+                    rgba->data[i] = dst[i] * alpha;
+                }
+            }
+            rgba->data[alphaPos] = alpha;
+        }
+
+        ++it;
+        ++rgba;
+    }
+}
+
+Encoder* encoder(Imf::OutputFile& file, const ExrPaintLayerSaveInfo& info, int width)
+{
+//     bool hasAlpha = info.layer->colorSpace()->channelCount() != info.layer->colorSpace()->colorChannelCount();
+    switch (info.layer->colorSpace()->channelCount()) {
+    case 1: {
+        if (info.layer->colorSpace()->colorDepthId() == Float16BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::HALF);
+            return new EncoderImpl < half, 1, -1 > (&file, &info, width);
+        } else if (info.layer->colorSpace()->colorDepthId() == Float32BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::FLOAT);
+            return new EncoderImpl < float, 1, -1 > (&file, &info, width);
+        }
+        break;
+    }
+    case 2: {
+        if (info.layer->colorSpace()->colorDepthId() == Float16BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::HALF);
+            return new EncoderImpl<half, 2, 1>(&file, &info, width);
+        } else if (info.layer->colorSpace()->colorDepthId() == Float32BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::FLOAT);
+            return new EncoderImpl<float, 2, 1>(&file, &info, width);
+        }
+        break;
+    }
+    case 4: {
+        if (info.layer->colorSpace()->colorDepthId() == Float16BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::HALF);
+            return new EncoderImpl<half, 4, 3>(&file, &info, width);
+        } else if (info.layer->colorSpace()->colorDepthId() == Float32BitsColorDepthID) {
+            Q_ASSERT(info.pixelType == Imf::FLOAT);
+            return new EncoderImpl<float, 4, 3>(&file, &info, width);
+        }
+        break;
+    }
+    }
+    return 0;
+}
+
+void encodeData(Imf::OutputFile& file, const QList<ExrPaintLayerSaveInfo>& informationObjects, int width, int height)
+{
+    QList<Encoder*> encoders;
+    foreach(const ExrPaintLayerSaveInfo& info, informationObjects) {
+        encoders.push_back(encoder(file, info, width));
+    }
+
+    for (int y = 0; y < height; ++y) {
+        Imf::FrameBuffer frameBuffer;
+        foreach(Encoder* encoder, encoders) {
+            encoder->prepareFrameBuffer(&frameBuffer, y);
+        }
+        file.setFrameBuffer(frameBuffer);
+        foreach(Encoder* encoder, encoders) {
+            encoder->encodeData(y);
+        }
+        file.writePixels(1);
+    }
+    qDeleteAll(encoders);
+}
+
+KisImageBuilder_Result exrConverter::buildFile(const KUrl& uri, KisPaintLayerSP layer)
+{
+    if (!layer)
+        return KisImageBuilder_RESULT_INVALID_ARG;
+
+    KisImageWSP image = layer->image();
+    if (!image)
+        return KisImageBuilder_RESULT_EMPTY;
+
+    if (uri.isEmpty())
+        return KisImageBuilder_RESULT_NO_URI;
+
+    if (!uri.isLocalFile())
+        return KisImageBuilder_RESULT_NOT_LOCAL;
+
+    // Make the header
+    qint32 height = image->height();
+    qint32 width = image->width();
+    Imf::Header header(width, height);
+
+    Imf::PixelType pixelType = (layer->colorSpace()->colorDepthId() == Float16BitsColorDepthID) ? Imf::HALF : Imf::FLOAT;
+
+    header.channels().insert("R", Imf::Channel(pixelType));
+    header.channels().insert("G", Imf::Channel(pixelType));
+    header.channels().insert("B", Imf::Channel(pixelType));
+    header.channels().insert("A", Imf::Channel(pixelType));
+
+    ExrPaintLayerSaveInfo info;
+    info.layer = layer;
+    info.channels.push_back("B");
+    info.channels.push_back("G");
+    info.channels.push_back("R");
+    info.channels.push_back("A");
+    info.pixelType = pixelType;
+
+    // Open file for writing
+    Imf::OutputFile file(QFile::encodeName(uri.path()), header);
+
+    QList<ExrPaintLayerSaveInfo> informationObjects;
+    informationObjects.push_back(info);
+
+    encodeData(file, informationObjects, width, height);
+
+    return KisImageBuilder_RESULT_OK;
+}
+
+QString remap(const QMap<QString, QString>& current2original, const QString& current)
+{
+    if (current2original.contains(current)) {
+        return current2original[current];
+    }
+    return current;
+}
+
+void recBuildPaintLayerSaveInfo(QList<ExrPaintLayerSaveInfo>& informationObjects, const QString& name, KisGroupLayerSP parent)
+{
+    for (uint i = 0; i < parent->childCount(); ++i) {
+        KisNodeSP node = parent->at(i);
+        if (KisPaintLayerSP paintLayer = dynamic_cast<KisPaintLayer*>(node.data())) {
+            QMap<QString, QString> current2original;
+            if (paintLayer->metaData()->containsEntry(KisMetaData::SchemaRegistry::instance()->create("http://krita.org/exrchannels/1.0/" , "exrchannels"), "channelsmap")) {
+                const KisMetaData::Entry& entry = paintLayer->metaData()->getEntry(KisMetaData::SchemaRegistry::instance()->create("http://krita.org/exrchannels/1.0/" , "exrchannels"), "channelsmap");
+                QList< KisMetaData::Value> values = entry.value().asArray();
+                foreach(const KisMetaData::Value& value, values) {
+                    QMap<QString, KisMetaData::Value> map = value.asStructure();
+                    if (map.contains("original") && map.contains("current")) {
+                        current2original[map["current"].toString()] = map["original"].toString();
+                    }
+                }
+            }
+            ExrPaintLayerSaveInfo info;
+            info.name = name + paintLayer->name() + '.';
+            info.layer = paintLayer;
+            if (paintLayer->colorSpace()->colorModelId() == RGBAColorModelID) {
+                info.channels.push_back(info.name + remap(current2original, "B"));
+                info.channels.push_back(info.name + remap(current2original, "G"));
+                info.channels.push_back(info.name + remap(current2original, "R"));
+                info.channels.push_back(info.name + remap(current2original, "A"));
+            } else if (paintLayer->colorSpace()->colorModelId() == GrayAColorModelID) {
+                info.channels.push_back(info.name + remap(current2original, "G"));
+                info.channels.push_back(info.name + remap(current2original, "A"));
+            } else if (paintLayer->colorSpace()->colorModelId() == GrayColorModelID) {
+                info.channels.push_back(info.name + remap(current2original, "G"));
+            } else if (paintLayer->colorSpace()->colorModelId() == XYZAColorModelID) {
+                info.channels.push_back(info.name + remap(current2original, "X"));
+                info.channels.push_back(info.name + remap(current2original, "Y"));
+                info.channels.push_back(info.name + remap(current2original, "Z"));
+                info.channels.push_back(info.name + remap(current2original, "A"));
+            }
+            if (paintLayer->colorSpace()->colorDepthId() == Float16BitsColorDepthID) {
+                info.pixelType = Imf::HALF;
+            } else if (paintLayer->colorSpace()->colorDepthId() == Float32BitsColorDepthID) {
+                info.pixelType = Imf::FLOAT;
+            } else {
+                info.pixelType = Imf::NUM_PIXELTYPES;
+            }
+            informationObjects.push_back(info);
+        } else if (KisGroupLayerSP groupLayer = dynamic_cast<KisGroupLayer*>(node.data())) {
+            recBuildPaintLayerSaveInfo(informationObjects, name + groupLayer->name() + '.', groupLayer);
+        }
+    }
+}
+
+KisImageBuilder_Result exrConverter::buildFile(const KUrl& uri, KisGroupLayerSP layer)
+{
+    if (!layer)
+        return KisImageBuilder_RESULT_INVALID_ARG;
+
+    KisImageWSP image = layer->image();
+    if (!image)
+        return KisImageBuilder_RESULT_EMPTY;
+
+    if (uri.isEmpty())
+        return KisImageBuilder_RESULT_NO_URI;
+
+    if (!uri.isLocalFile())
+        return KisImageBuilder_RESULT_NOT_LOCAL;
+
+    qint32 height = image->height();
+    qint32 width = image->width();
+    Imf::Header header(width, height);
+
+    QList<ExrPaintLayerSaveInfo> informationObjects;
+    recBuildPaintLayerSaveInfo(informationObjects, "", layer);
+
+    dbgFile << informationObjects.size() << " layers to save";
+
+    foreach(const ExrPaintLayerSaveInfo& info, informationObjects) {
+        if (info.pixelType < Imf::NUM_PIXELTYPES) {
+            foreach(const QString& channel, info.channels) {
+                dbgFile << channel << " " << info.pixelType;
+                header.channels().insert(channel.toUtf8().data(), Imf::Channel(info.pixelType));
+            }
+        }
+    }
+
+    // Open file for writing
+    Imf::OutputFile file(QFile::encodeName(uri.path()), header);
+
+    encodeData(file, informationObjects, width, height);
+    return KisImageBuilder_RESULT_OK;
+}
+
+void exrConverter::cancel()
+{
+    m_stop = true;
+}
+
+#include "exr_converter.moc"
+
