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

List:       koffice-devel
Subject:    kpresenter patch for bugs 72120, 72126 and 72129
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2004-01-17 16:40:31
Message-ID: 200401171740.31186.t.zachmann () zagge ! de
[Download RAW message or body]

Hello all,

the attached patch fixes the following bugs:

- 72120: Font sizes are lost after reload
- 72126: "Duplicate slide"doesn't exactly duplicate it, some formats are lost
- 72129: Text style is not used if text field is empty 

it also fixes that the last spaces at the end of a pragraph is removed.

please review. 

Is it ok to backport to kpresenter 1.3 Branch? I really think this should go 
into 1.3 as some formats are lost during save and open.

@Lukáš: If it is ok to backport can u please apply it to the 1.3 Branch. If 
there are no objections I will apply it to head tomorrow.

Thorsten

["patch67" (text/x-diff)]

Index: kptextobject.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kptextobject.cc,v
retrieving revision 1.403
diff -u -3 -p -r1.403 kptextobject.cc
--- kptextobject.cc	3 Jan 2004 06:58:45 -0000	1.403
+++ kptextobject.cc	17 Jan 2004 16:35:44 -0000
@@ -686,9 +686,7 @@ void KPTextObject::loadKTextObject( cons
                         txt.fill(' ', ws);
                     }
                     n=n.nextSibling().toElement();
-                    if ( txt.isEmpty() )
-                        txt = ' ';
-                    if ( !txt[txt.length()-1].isSpace() && n.isNull() )
+                    if ( n.isNull() )
                         txt += ' '; // trailing space at end of paragraph
                     lastParag->append( txt, true );
                     lastParag->setFormat( i, txt.length(), textDocument()->formatCollection()->format( &fm ) );
@@ -2345,9 +2343,11 @@ void KPTextObject::saveParagraph( QDomDo
         }
         tmpText+=QString(c.c);
     }
-    if ( lastFormat ) {
+    if ( lastFormat )
         paragraph.appendChild(saveHelper(tmpText, lastFormat, doc));
-    }
+    else
+        paragraph.appendChild(saveHelper(tmpText, parag->string()->at(0).format(), doc));
+    
     parentElem.appendChild(paragraph);
 }
 


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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