rev 5007 - trunk/packages/koffice/debian/patches

Isaac Clerencia isaac at alioth.debian.org
Tue Nov 28 07:47:07 UTC 2006


Author: isaac
Date: 2006-11-28 08:47:07 +0100 (Tue, 28 Nov 2006)
New Revision: 5007

Added:
   trunk/packages/koffice/debian/patches/12_krita_profile.diff
   trunk/packages/koffice/debian/patches/13_krita_fill_tablet.diff
   trunk/packages/koffice/debian/patches/15_krita_tablet_stylus.diff
   trunk/packages/koffice/debian/patches/17_krita_color_range_crash.diff
Log:
Add patches to fix some crashes in 1.6.0-1


Added: trunk/packages/koffice/debian/patches/12_krita_profile.diff
===================================================================
--- trunk/packages/koffice/debian/patches/12_krita_profile.diff	2006-11-27 22:21:24 UTC (rev 5006)
+++ trunk/packages/koffice/debian/patches/12_krita_profile.diff	2006-11-28 07:47:07 UTC (rev 5007)
@@ -0,0 +1,24 @@
+diff -Nur koffice-1.6.0/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h koffice-1.6.0.new/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h
+--- koffice-1.6.0/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h	2006-10-07 15:35:29.000000000 +0200
++++ koffice-1.6.0.new/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h	2006-10-23 08:11:25.000000000 +0200
+@@ -117,7 +117,7 @@
+ 
+     virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykU16ColorSpace(parent, p); };
+ 
+-    virtual QString defaultProfile() { return "Adobe CMYK"; };
++    virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; };
+ };
+ 
+ #endif // KIS_STRATEGY_COLORSPACE_CMYK_U16_H_
+diff -Nur koffice-1.6.0/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h koffice-1.6.0.new/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h
+--- koffice-1.6.0/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h	2006-10-07 15:35:23.000000000 +0200
++++ koffice-1.6.0.new/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h	2006-10-23 08:11:07.000000000 +0200
+@@ -120,7 +120,7 @@
+ 
+     virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykColorSpace(parent, p); };
+ 
+-    virtual QString defaultProfile() { return "Adobe CMYK"; }; //  Do not i18n -- this is from a data file
++    virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; //  Do not i18n -- this is from a data file
+ };
+ 
+ #endif // KIS_STRATEGY_COLORSPACE_CMYK_H_

Added: trunk/packages/koffice/debian/patches/13_krita_fill_tablet.diff
===================================================================
--- trunk/packages/koffice/debian/patches/13_krita_fill_tablet.diff	2006-11-27 22:21:24 UTC (rev 5006)
+++ trunk/packages/koffice/debian/patches/13_krita_fill_tablet.diff	2006-11-28 07:47:07 UTC (rev 5007)
@@ -0,0 +1,39 @@
+Index: krita/plugins/tools/defaulttools/kis_tool_fill.cc
+===================================================================
+--- krita/plugins/tools/defaulttools/kis_tool_fill.cc	(revision 599730)
++++ krita/plugins/tools/defaulttools/kis_tool_fill.cc	(revision 599731)
+@@ -50,7 +50,7 @@
+ #include "kis_selection.h"
+ 
+ KisToolFill::KisToolFill()
+-    : super(i18n("Fill"))
++    : super(i18n("Fill")), m_wasPressed(false)
+ {
+     setName("tool_fill");
+     m_subject = 0;
+@@ -138,10 +138,13 @@
+ void KisToolFill::buttonPress(KisButtonPressEvent *e)
+ {
+     m_startPos = e->pos();
++    m_wasPressed = true;
+ }
+ 
+ void KisToolFill::buttonRelease(KisButtonReleaseEvent *e)
+ {
++    if(!m_wasPressed) return;
++    m_wasPressed = false;
+     if (!m_subject) return;
+     if (!m_currentImage || !m_currentImage->activeDevice()) return;
+     if (e->button() != QMouseEvent::LeftButton) return;
+Index: krita/plugins/tools/defaulttools/kis_tool_fill.h
+===================================================================
+--- krita/plugins/tools/defaulttools/kis_tool_fill.h	(revision 599730)
++++ krita/plugins/tools/defaulttools/kis_tool_fill.h	(revision 599731)
+@@ -79,6 +79,7 @@
+     QCheckBox *m_checkUsePattern;
+     QCheckBox *m_checkSampleMerged;
+     QCheckBox *m_checkFillSelection;
++    bool m_wasPressed; // use for preventing bug:133148
+ };
+ 
+ 

Added: trunk/packages/koffice/debian/patches/15_krita_tablet_stylus.diff
===================================================================
--- trunk/packages/koffice/debian/patches/15_krita_tablet_stylus.diff	2006-11-27 22:21:24 UTC (rev 5006)
+++ trunk/packages/koffice/debian/patches/15_krita_tablet_stylus.diff	2006-11-28 07:47:07 UTC (rev 5007)
@@ -0,0 +1,76 @@
+Index: krita/plugins/tools/defaulttools/kis_tool_fill.cc
+===================================================================
+--- krita/plugins/tools/defaulttools/kis_tool_fill.cc	(revision 599735)
++++ krita/plugins/tools/defaulttools/kis_tool_fill.cc	(revision 599736)
+@@ -143,11 +143,11 @@
+ 
+ void KisToolFill::buttonRelease(KisButtonReleaseEvent *e)
+ {
+-    if(!m_wasPressed) return;
+-    m_wasPressed = false;
+     if (!m_subject) return;
+     if (!m_currentImage || !m_currentImage->activeDevice()) return;
+     if (e->button() != QMouseEvent::LeftButton) return;
++    if(!m_wasPressed) return;
++    m_wasPressed = false;
+     int x, y;
+     x = m_startPos.floorX();
+     y = m_startPos.floorY();
+Index: krita/plugins/tools/defaulttools/kis_tool_text.cc
+===================================================================
+--- krita/plugins/tools/defaulttools/kis_tool_text.cc	(revision 599735)
++++ krita/plugins/tools/defaulttools/kis_tool_text.cc	(revision 599736)
+@@ -45,12 +45,13 @@
+ #include "kis_tool_text.h"
+ #include "kis_paint_device.h"
+ #include "kis_canvas_subject.h"
++#include "kis_button_press_event.h"
+ #include "kis_button_release_event.h"
+ #include "kis_color.h"
+ #include "kis_undo_adapter.h"
+ 
+ KisToolText::KisToolText()
+-    : super(i18n("Text"))
++    : super(i18n("Text")), m_wasPressed(false)
+ {
+     setName("tool_text");
+     m_subject = 0;
+@@ -67,9 +68,18 @@
+     super::update(subject);
+ }
+ 
++void KisToolText::buttonPress(KisButtonPressEvent *e)
++{
++    if (m_subject && e->button() == QMouseEvent::LeftButton) {
++      m_wasPressed = true;
++    }
++}
++
+ void KisToolText::buttonRelease(KisButtonReleaseEvent *e)
+ {
+     if (m_subject && e->button() == QMouseEvent::LeftButton) {
++        if(!m_wasPressed) return;
++        m_wasPressed = false;
+         KisImageSP img = m_subject->currentImg();
+ 
+         bool ok;
+Index: krita/plugins/tools/defaulttools/kis_tool_text.h
+===================================================================
+--- krita/plugins/tools/defaulttools/kis_tool_text.h	(revision 599735)
++++ krita/plugins/tools/defaulttools/kis_tool_text.h	(revision 599736)
+@@ -43,6 +43,7 @@
+     virtual void setup(KActionCollection *collection);
+     virtual enumToolType toolType() { return TOOL_FILL; }
+     virtual Q_UINT32 priority() { return 2; }
++    virtual void buttonPress(KisButtonPressEvent*);
+     virtual void buttonRelease(KisButtonReleaseEvent *e);
+ 
+     virtual QWidget* createOptionWidget(QWidget* parent);
+@@ -55,6 +56,7 @@
+     QLabel *m_lbFont;
+     KSqueezedTextLabel *m_lbFontName;
+     QPushButton *m_btnMoreFonts;
++    bool m_wasPressed; // use for preventing bug:136151
+ };
+ 
+ 

Added: trunk/packages/koffice/debian/patches/17_krita_color_range_crash.diff
===================================================================
--- trunk/packages/koffice/debian/patches/17_krita_color_range_crash.diff	2006-11-27 22:21:24 UTC (rev 5006)
+++ trunk/packages/koffice/debian/patches/17_krita_color_range_crash.diff	2006-11-28 07:47:07 UTC (rev 5007)
@@ -0,0 +1,45 @@
+Index: krita/core/kis_selection.cc
+===================================================================
+--- krita/core/kis_selection.cc	(revision 599746)
++++ krita/core/kis_selection.cc	(revision 599747)
+@@ -79,23 +79,21 @@
+ {
+     // If part of a KisAdjustmentLayer, there may be no parent device.
+     QImage img;
+-    Q_INT32 x, y, w, h, y2, x2;
++    QRect bounds;
+     if (m_parentPaintDevice) {
+ 
+-        m_parentPaintDevice->exactBounds(x, y, w, h);
+-        img = QImage(w, h, 32);
++        bounds = m_parentPaintDevice->exactBounds();
++        bounds = bounds.intersect( m_parentPaintDevice->image()->bounds() );
++        img = QImage(bounds.width(), bounds.height(), 32);
+     }
+     else {
+-        x = 0;
+-        y = 0;
+-        w = image()->width();
+-        h = image()->width();
+-        img = QImage(w, h, 32);
++        bounds = QRect( 0, 0, image()->width(), image()->height());
++        img = QImage(bounds.width(), bounds.height(), 32);
+     }
+ 
+-    for (y2 = y; y2 < h - y; ++y2) {
+-            KisHLineIteratorPixel it = createHLineIterator(x, y2, w, false);
+-            x2 = 0;
++    KisHLineIteratorPixel it = createHLineIterator(bounds.x(), bounds.y(), bounds.width(), false);
++    for (int y2 = bounds.y(); y2 < bounds.height() - bounds.y(); ++y2) {
++            int x2 = 0;
+             while (!it.isDone()) {
+                     Q_UINT8 s = MAX_SELECTED - *(it.rawData());
+                     Q_INT32 c = qRgb(s, s, s);
+@@ -103,6 +101,7 @@
+                     ++x2;
+                     ++it;
+             }
++            it.nextRow();
+     }
+     return img;
+ }




More information about the pkg-kde-commits mailing list