[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: [Patch] after copy & paste kpshadowobjects have wrong pen width
From:       Laurent Montel <lmontel () mandrakesoft ! com>
Date:       2002-03-20 15:00:59
[Download RAW message or body]

Le Wednesday 20 March 2002 14:47, Thorsten Zachmann a écrit :
> Hello all

Hi,

>
> There is an error in kpresenter. When a KPshadowObject(line, circle ...)
> is copied and pasted the new object has not the same pen width. Instead
> it is created with a width of 0.

Yes it's a bug.


>
> The following patch solves this problem by saving the pen width when it
> is not equal 0.
No it's not a good idea. By default a object must have a pen width = 1
So I change your patch :

--- kpobject.cc 2002/03/15 15:53:08     1.91
+++ kpobject.cc 2002/03/20 15:00:24
@@ -752,7 +752,7 @@ double KPShadowObject::load(const QDomEl
     if(!e.isNull())
         setPen(KPObject::toPen(e));
     else
-        pen=QPen();
+        pen.setWidth(1);

So we reduce size of kpresenter file.

Regards.

>
> Please tell me what you think about it.
>
> Thorsten
>
> Index: kpobject.cc
> ===================================================================
> RCS file: /home/kde/koffice/kpresenter/kpobject.cc,v
> retrieving revision 1.91
> diff -u -3 -p -r1.91 kpobject.cc
> --- kpobject.cc	2002/03/15 15:53:08	1.91
> +++ kpobject.cc	2002/03/20 04:59:13
> @@ -738,7 +738,7 @@ QDomDocumentFragment KPShadowObject::sav
>  {
>      QDomDocumentFragment fragment=KPObject::save(doc, offset);
>
> -    if(pen.color()!=Qt::black || pen.width()!=1 ||
> pen.style()!=Qt::SolidLine)
> +    if(pen.color()!=Qt::black || pen.width()!=0 ||
> pen.style()!=Qt::SolidLine)
>          fragment.appendChild(KPObject::createPenElement(tagPEN, pen,
> doc));
>      if(brush.color()!=Qt::black || brush.style()!=Qt::NoBrush)
>          fragment.appendChild(KPObject::createBrushElement(tagBRUSH,
> brush, doc));

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic