--- kxstitch-0.8.3.1.orig/debian/compat +++ kxstitch-0.8.3.1/debian/compat @@ -0,0 +1 @@ +4 --- kxstitch-0.8.3.1.orig/debian/changelog +++ kxstitch-0.8.3.1/debian/changelog @@ -0,0 +1,151 @@ +kxstitch (0.8.3.1-1ubuntu2) karmic; urgency=low + + * No-change rebuild against libmagick++2 + + -- Steve Langasek Sat, 05 Sep 2009 22:02:10 +0000 + +kxstitch (0.8.3.1-1ubuntu1) karmic; urgency=low + + * Merge from Debian unstable (LP: #389803), remaining changes: + - Add --without-arts to ./configure params + - Add dh_icons + * Dropped Ubuntu changes: + - debian/control: Replace build-depends on libmagick++9-dev with + graphicsmagick-libmagick-dev-compat + (upstream code now compiles with libmagick++-dev) + - Add --with-extra-includes=/usr/include/GraphicsMagick to ./configure + (Debian package adds /usr/include/ImageMagick) + - debian/patches/gcc_minmax.patch: Fix FTBFS when building with gcc 4.2 + (fixed upstream) + - Add quilt support, build-depend on quilt + (added in Debian package) + + -- Ilya Barygin Sat, 20 Jun 2009 10:58:28 +0400 + +kxstitch (0.8.3.1-1) unstable; urgency=low + + * New Upstream Version + * Chnage build-dep to work with new libmagick++-dev (Closes: 485893) + + -- Mike O'Connor Sun, 15 Mar 2009 09:07:18 -0400 + +kxstitch (0.8.1-2) experimental; urgency=low + + * Build-depend strictly on libmagick++9-dev and not on + libmagick++-dev as source changes to upstream will be necessary before + source will build with libmagick++-dev + + -- Mike O'Connor Wed, 22 Oct 2008 03:24:35 -0400 + +kxstitch (0.8.1-1) experimental; urgency=low + + * New Maintainer + * New upstream version + - no longer uses latin1 function for pathnames (Closes: 349423) + * Moved url from description to Homepage: entry in debian/control + * Updated Standards-Version to 3.8.0.0 + - move menu entry from Apps to Applications + * No longer ignoring errors on make distclean + * removing rpath with chrpath + - added Build-Depends: on chrpath + * Moved 'watch' to 'debian/watch' + - updated to version=3 + * Moved changes to upstream files in .diff.gz to quilt (Closes: 482749) + * Prepared for ImageMagick++ transition (Closes: 485893) + - Use Magick++-config to generate LDADD/CFLAGS + - change Build-Depends: from libmagick++9-dev to libmagick++-dev to + * Removed no-op preinst/prerm scripts + * Updated debian/copyright with additional copyright years + * Stop installing README since it only contains build instructions + + -- Mike O'Connor Mon, 13 Oct 2008 06:34:12 -0400 + +kxstitch (0.8-0ubuntu5) jaunty; urgency=low + + * No-change rebuild to fix lpia shared library dependencies. + + -- Matthias Klose Sun, 22 Mar 2009 16:48:56 +0100 + +kxstitch (0.8-0ubuntu4) jaunty; urgency=low + + * debian/rules: + - Add --without-arts to ./configure params. (LP: #320915) + - Add --with-extra-includes=/usr/include/GraphicsMagick to ./configure + * debian/control: Replace build-depends on libmagick++9-dev with + graphicsmagick-libmagick-dev-compat + + -- Andreas Wenning Sun, 15 Mar 2009 19:05:11 +0100 + +kxstitch (0.8-0ubuntu3) hardy; urgency=low + + * debian/patches/gcc_minmax.patch: + - Fix FTBFS when building with gcc 4.2. + * debian/rules: + - Add quilt support. + - Use dh_icons instead of dh_iconcache. + * debian/control: + - Build-depend on quilt. + - Update Maintainer field as per spec. + + -- Luca Falavigna Fri, 29 Feb 2008 00:10:12 +0100 + +kxstitch (0.8-0ubuntu2) gutsy; urgency=low + + * No-change rebuild for libjasper transition. + + -- Steve Kowalik Fri, 22 Jun 2007 23:32:16 +1000 + +kxstitch (0.8-0ubuntu1) feisty; urgency=low + + * New Upstream Source + + -- Richard A. Johnson Fri, 15 Sep 2006 18:51:39 -0500 + +kxstitch (0.7-2.1) unstable; urgency=low + + * Non-maintainer upload to fix RC bug. + * Fix to allow build with GCC 4.2. (Closes: #385520) + Patch by Mike O'Connor + * Add build-dep on quilt and modified debian/rules to apply patch. + + -- Ana Beatriz Guerrero Lopez Mon, 22 Oct 2007 05:23:03 +0200 + +kxstitch (0.7-2ubuntu1) dapper; urgency=low + + * Add dh_iconcache + + -- Sarah Hobbs Sat, 6 May 2006 20:37:56 +1000 + +kxstitch (0.7-2build1) dapper; urgency=low + + * Rebuild KDE universe for libstdc++ transition + + -- Jonathan Riddell Sat, 17 Dec 2005 16:24:51 +0000 + +kxstitch (0.7-2) unstable; urgency=low + + * Fixed Build-Depends to depend on libmagick++9-dev (Closes: #332459) + + -- eric pareja Fri, 7 Oct 2005 02:15:49 +0800 + +kxstitch (0.7-1) unstable; urgency=low + + * New upstream release (Closes: #325000) + + -- eric pareja Sat, 27 Aug 2005 00:44:51 +0800 + +kxstitch (0.6-2) unstable; urgency=low + + * configure: removed checking of lib64 for kdelibsuff to enable sparc build. Thanks to Regis Boudin for the patch. (Closes: #304133) + * debian/control: added dependencies for kde4libs and changed section to kde + + -- eric pareja Thu, 16 Jun 2005 10:37:37 +0800 + +kxstitch (0.6-1) unstable; urgency=low + + * Initial Release. (Closes: #295824) + * Modified configure script to install HTML doc in /usr/share/doc/kde/HTML + * Wrote a man page for kxstitch in section 1x + + -- eric pareja Sat, 19 Feb 2005 12:37:22 +0800 + --- kxstitch-0.8.3.1.orig/debian/kxstitch.1 +++ kxstitch-0.8.3.1/debian/kxstitch.1 @@ -0,0 +1,68 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH KXSTITCH 1x "February 19, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +kxstitch \- cross-stitch pattern creator and editor for KDE +.SH SYNOPSIS +.B kxstitch +.RI [ options ] " files" ... +.br +.SH DESCRIPTION +This manual page documents briefly the +.B kxstitch +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBkxstitch\fP is a program that allows users to create and edit cross-stitch +patterns. + +For a complete description, see the online manual. +.TP +.B \-\-help +Show summary of options. +.TP +.B \-\-help\-qt +Show Qt specific options. +.TP +.B \-\-help\-kde +Show KDE specific options. +.TP +.B \-\-help\-all +Show all options. +.TP +.B \-\-author +Show author information. +.TP +.B \-v, \-\-version +Show version of program. +.TP +.B \-\-license +Show license information. + +.SH Arguments +.B filename +name of file to open +.br +The program has online documentation which is +available via the KDE Documentation system. +.SH AUTHOR +kxstitch was written by Stephen Allewell +.PP +This manual page was written by eric pareja , +for the Debian project (but may be used by others). --- kxstitch-0.8.3.1.orig/debian/watch +++ kxstitch-0.8.3.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/kxstitch/kxstitch-(.+)\.tar\.gz debian uupdate --- kxstitch-0.8.3.1.orig/debian/postrm +++ kxstitch-0.8.3.1/debian/postrm @@ -0,0 +1,38 @@ +#! /bin/sh +# postrm script for kxstitch +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- kxstitch-0.8.3.1.orig/debian/postinst +++ kxstitch-0.8.3.1/debian/postinst @@ -0,0 +1,42 @@ +#! /bin/sh +# postinst script for kxstitch +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- kxstitch-0.8.3.1.orig/debian/copyright +++ kxstitch-0.8.3.1/debian/copyright @@ -0,0 +1,18 @@ +This package was debianized by eric pareja on +Sat, 19 Feb 2005 12:37:22 +0800. + +It was downloaded from http://prdownloads.sourceforge.net/kxstitch + +Copyright: 2003,2004,2006 (C) Stephen Allewell + +Upstream Author: Stephen Allewell + +License: + +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. + +On Debian systems, the complete text of the GNU General Public License can +be found in the file `/usr/share/common-licenses/GPL'. --- kxstitch-0.8.3.1.orig/debian/rules +++ kxstitch-0.8.3.1/debian/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +include /usr/share/quilt/quilt.make + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: configure + dh_testdir + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-qt-includes=/usr/include/qt3 --with-extra-includes=/usr/include/ImageMagick --disable-rpath --without-arts + +build: build-stamp + +build-stamp: patch config.status + dh_testdir + $(MAKE) + chrpath -d kxstitch/kxstitch + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/kxstitch + + rm debian/kxstitch/usr/share/man/man1/kxstitch.1.gz + sed -i '/MiniIcon/d' debian/kxstitch/usr/share/applnk/Graphics/kxstitch.desktop + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_installmenu + dh_icons + dh_installman $(CURDIR)/debian/kxstitch.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- kxstitch-0.8.3.1.orig/debian/control +++ kxstitch-0.8.3.1/debian/control @@ -0,0 +1,19 @@ +Source: kxstitch +Section: kde +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Mike O'Connor +Build-Depends: debhelper (>= 4.0.0), kdelibs4-dev, libmagick++9-dev | libmagick++-dev, libqt3-mt-dev, libltdl3-dev, quilt, chrpath +Standards-Version: 3.8.0.0 +Homepage: http://kxstitch.sourceforge.net + +Package: kxstitch +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: cross-stitch pattern creator and editor for KDE + This program allows the user to create and edit cross-stitch patterns. It + allows the use of existing patterns, like those made by PC Stitch 5. It uses + various floss palletes (DMC, Anchor, Madeira). User can create custom + palletes and colors. Uses standard stitches. Free use of backstitching. + Imports from various picture formats. Prints patterns and floss keys. + --- kxstitch-0.8.3.1.orig/debian/menu +++ kxstitch-0.8.3.1/debian/menu @@ -0,0 +1,2 @@ +?package(kxstitch):needs="X11" section="Applications/Graphics"\ + title="KXstitch" command="/usr/bin/kxstitch" --- kxstitch-0.8.3.1.orig/debian/dirs +++ kxstitch-0.8.3.1/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin --- kxstitch-0.8.3.1.orig/debian/docs +++ kxstitch-0.8.3.1/debian/docs @@ -0,0 +1,2 @@ +TODO + --- kxstitch-0.8.3.1.orig/debian/patches/html-doc-dir +++ kxstitch-0.8.3.1/debian/patches/html-doc-dir @@ -0,0 +1,11 @@ +--- kxstitch-0.8.1.orig/configure ++++ kxstitch-0.8.1/configure +@@ -34074,7 +34074,7 @@ + if test "$ac_use_path_checking" = "default"; then + + if test -z "$kde_htmldir"; then +- kde_htmldir='\${datadir}/doc/HTML' ++ kde_htmldir='\${datadir}/doc/kde/HTML' + fi + if test -z "$kde_appsdir"; then + kde_appsdir='\${datadir}/applnk' --- kxstitch-0.8.3.1.orig/debian/patches/kxstitch.gcc-4.2.diff +++ kxstitch-0.8.3.1/debian/patches/kxstitch.gcc-4.2.diff @@ -0,0 +1,238 @@ +diff -ru kxstitch-0.7.orig/kxstitch/editview.cpp kxstitch-0.7/kxstitch/editview.cpp +--- kxstitch-0.7.orig/kxstitch/editview.cpp 2005-07-03 06:54:14.000000000 -0400 ++++ kxstitch-0.7/kxstitch/editview.cpp 2007-09-27 21:37:25.000000000 -0400 +@@ -47,6 +47,9 @@ + + extern "C" double round(double x); + ++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) ++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) ++ + #define TIMERSPEED 50 + + EditView::EditView(KXStitchDoc* doc,QWidget* parent) +@@ -800,13 +803,13 @@ + QRect EditView::selectionArea() + { + int left = m_selectedArea.left(); +- left = left>?0; ++ left = MAX(left,0); + int top = m_selectedArea.top(); +- top = top>?0; ++ top = MAX(top,0); + int right = m_selectedArea.right(); +- right = rightfillRect(b,QBrush(Qt::black)); + painter->fillRect(r,QBrush(Qt::white)); + painter->drawRect(r); +- QRect currentPage(r.left()+(50*x/patternHeight),r.top()+(50*y/patternHeight),(50*pageCellsWide/patternHeight)fillRect(currentPage,QBrush(Qt::lightGray)); + painter->drawRect(currentPage); + } +- printContents(printer, painter, x, y, printable, pageCellsWidedrawText(0,height+dy,width,dy,Qt::AlignHCenter,QString(i18n("Page %1")).arg(++pages)); + if (--totalPages) +@@ -1758,7 +1761,7 @@ + m_end = snapToContents(bs->end); + // found a backstitch that starts and ends where indicated + m_doc->deleteBackstitch(bs); // this should also update the iterator +- updateContents(QRect(QPoint((m_start.x()?m_end.x())+2,(m_start.y()>?m_end.y())+2))); ++ updateContents(QRect(QPoint(MIN(m_start.x(),m_end.x())-2,MIN(m_start.y(),m_end.y())-2),QPoint(MAX(m_start.x(),m_end.x())+2,MAX(m_start.y(),m_end.y())+2))); + break; + } + } +@@ -1810,7 +1813,7 @@ + drawBoundingRect(m_start, m_end); + painter.begin(&dm); + painter.setPen(QPen(black,1)); +- painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); ++ painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); + painter.end(); + m_doc->addStitches(processPixmap(dm),m_currentStitchType); + emit locationOrSize(QPoint(-1,-1)); +@@ -1821,7 +1824,7 @@ + painter.begin(&dm); + painter.setPen(QPen(black,1)); + painter.setBrush(black); +- painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); ++ painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); + painter.end(); + m_doc->addStitches(processPixmap(dm),m_currentStitchType); + emit locationOrSize(QPoint(-1,-1)); +@@ -1831,7 +1834,7 @@ + drawBoundingEllipse(m_start, m_end); + painter.begin(&dm); + painter.setPen(QPen(black,1)); +- painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); ++ painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); + painter.end(); + m_doc->addStitches(processPixmap(dm),m_currentStitchType); + emit locationOrSize(QPoint(-1,-1)); +@@ -1842,7 +1845,7 @@ + painter.begin(&dm); + painter.setPen(QPen(black,1)); + painter.setBrush(black); +- painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); ++ painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); + painter.end(); + m_doc->addStitches(processPixmap(dm),m_currentStitchType); + emit locationOrSize(QPoint(-1,-1)); +@@ -1971,7 +1974,7 @@ + int height=m_doc->canvas()->patternHeight(); + QPoint tl = contentsToCell(QPoint(contentsX(), contentsY())); + QPoint br = contentsToCell(QPoint(contentsX()+visibleWidth(), contentsY()+visibleHeight())); +- cells.setCoords(tl.x(), tl.y(), br.x()canvas()->patternWidth())canvas()->patternHeight()); ++ m_cellSize = MIN((visibleWidth()/m_doc->canvas()->patternWidth()),(visibleHeight()/m_doc->canvas()->patternHeight())); + resizeGrid(); + } + +Only in kxstitch-0.7.orig/kxstitch: extendpattern.cpp +Only in kxstitch-0.7.orig/kxstitch: extendpattern.h +Only in kxstitch-0.7.orig/kxstitch: importimage.cpp +diff -ru kxstitch-0.7.orig/kxstitch/importimagedlg.cpp kxstitch-0.7/kxstitch/importimagedlg.cpp +--- kxstitch-0.7.orig/kxstitch/importimagedlg.cpp 2005-06-23 17:03:18.000000000 -0400 ++++ kxstitch-0.7/kxstitch/importimagedlg.cpp 2007-09-27 21:37:25.000000000 -0400 +@@ -28,6 +28,9 @@ + #include "flossscheme.h" + #include "floss.h" + ++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) ++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) ++ + ImportImageDlg::ImportImageDlg(const Magick::Image& image, QWidget *parent, const char *name, bool modal) + : ImportImage(parent,name,modal), + m_pixmap(new QPixmap), +@@ -47,7 +50,7 @@ + m_preferredSize = QSize(KXSConfig().NewPattern_Width,KXSConfig().NewPattern_Height); + int sw = m_preferredSize.width()*100/m_originalSize.width(); + int sh = m_preferredSize.height()*100/m_originalSize.height(); +- int s = sw insertStringList(((KXStitchApplication*)kapp)->schemes()); + Configuration::setComboBoxItem(Import_FlossScheme,KXSConfig().NewPattern_FlossScheme); +@@ -211,4 +214,4 @@ + { + killTimers(); + renderPixmap(); +-} +\ No newline at end of file ++} +Only in kxstitch-0.7.orig/kxstitch: importimage.h +diff -ru kxstitch-0.7.orig/kxstitch/kxstitchdoc.cpp kxstitch-0.7/kxstitch/kxstitchdoc.cpp +--- kxstitch-0.7.orig/kxstitch/kxstitchdoc.cpp 2005-06-30 18:30:14.000000000 -0400 ++++ kxstitch-0.7/kxstitch/kxstitchdoc.cpp 2007-09-27 21:37:24.000000000 -0400 +@@ -45,6 +45,9 @@ + #include "importimagedlg.h" + #include "configuration.h" + ++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) ++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) ++ + #define FILE_FORMAT_VERSION 5 + + QPtrList *KXStitchDoc::viewList = 0L; +@@ -241,12 +244,12 @@ + requestedSize.setHeight(currentRect.height()); + if (requestedSize.width() > currentRect.width()) + { +- l = (requestedSize.width()-currentRect.width()) currentRect.height()) + { +- t = (requestedSize.height()-currentRect.height())slotStateChanged("palette_empty"); + } +- f.setPixelSize(m_cellWidthsetFont(f); + for (int i = 0 ; i < palette->colors() ; i++) + { +diff -ru kxstitch-0.7.orig/kxstitch/patterncanvas.cpp kxstitch-0.7/kxstitch/patterncanvas.cpp +--- kxstitch-0.7.orig/kxstitch/patterncanvas.cpp 2005-06-20 12:55:39.000000000 -0400 ++++ kxstitch-0.7/kxstitch/patterncanvas.cpp 2007-09-27 21:37:24.000000000 -0400 +@@ -13,6 +13,9 @@ + #include "patterncanvas.h" + #include "stitch.h" + ++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) ++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) ++ + PatternCanvas::PatternCanvas() + : m_width(0), + m_height(0), +@@ -143,10 +146,10 @@ + int y2 = 0; + for (Knot *k = m_pKnot->first() ; k ; k = m_pKnot->next()) + { +- x1 = x1 pos.x(); +- y1 = y1 pos.y(); +- x2 = x2 >? k->pos.x(); +- y2 = y2 >? k->pos.y(); ++ x1 = MIN(x1, k->pos.x()); ++ y1 = MIN(y1, k->pos.y()); ++ x2 = MAX(x2, k->pos.x()); ++ y2 = MAX(y2, k->pos.y()); + } + stitchesRect|=QRect(x1/2,y1/2,(x2-x1)/2,(y2-y1)/2); + } +@@ -159,10 +162,10 @@ + QPoint s = bs->start; + QPoint e = bs->end; + int x1,y1,x2,y2; +- x1 = s.x() ? e.x(); +- y1 = s.y() ? e.y(); ++ x1 = MIN(s.x(), e.x()); ++ x2 = MAX(s.x(), e.x()); ++ y1 = MIN(s.y(), e.y()); ++ y2 = MAX(s.y(), e.y()); + if (x1 == x2 || y1 == y2) + { + // special case as a QRect would show as zero m_width or m_height (ie invalid) --- kxstitch-0.8.3.1.orig/debian/patches/series +++ kxstitch-0.8.3.1/debian/patches/series @@ -0,0 +1 @@ +html-doc-dir