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

List:       koffice-devel
Subject:    Re: shift+enter in kword
From:       Krister Wicksell Eriksson <krister.wicksell () spray ! se>
Date:       2002-03-01 19:30:45
[Download RAW message or body]

On Thursday 28 February 2002 23:56, David Faure wrote:
> On Thursday 28 February 2002 14:31, Krister Wicksell Eriksson wrote:
> > Hi
> >
> > On Wednesday 27 February 2002 21:08, David Faure wrote:
> > > On Wednesday 27 February 2002 19:29, Krister Wicksell Eriksson wrote:
> > > > Hi
> > > >
> > > > Wanted to learn some of the kword code so I have started trying to
> > > > implement line break (shift+enter) cause that is a thing I really
> > > > miss in kword.
> > > >
> > > > Have attached a patch that I be happy if someone could take a look at
> > > > and give some feedback.
> > >
> > > Wow! This is really great job. I'm amazed, you seem to have grasped the
> > > text formatter quickly, as complex as it is ;)))
> > >
> > > I like the formatting-chars drawing change very much. The UI part is
> > > fine too, no problem.
> > >
> > > I'm surprised by the patch to the formatter though. It's already
> > > supposed to have support for line breaks, by using the character '\n'
> > > in the string (and enabling something like setAllowNewLine() in
> > > paragraphs). This comes from the original Qt classes, and was never
> > > tested/used in KWord. Did you try it out and determined you'd prefer
> > > writing separate code for this, or did you miss that code ? If it works
> > > and it's the same functionality, I'd rather use it than add special
> > > support for 0x0b with its own code.
> >
> > Have rewritten my patch with setNewLinesAllowed(TRUE) and'\n' insted.
> > Don't know if this is any better. Had to change QTextParag::paint() so it
> > now sends '\n' to drawParagString(), if not there is no way (at least
> > that I know of) to know where to draw the line breaks in
> > drawFormattingChars(). The thing is if there are only a line break on a
> > line no char from that line i sent to drawFormattingChars().
>
> This looks really excellent.

Thanks.

>
> About the change in ::paint() : it's probably the last method of the
> original QRichText that we're still using for painting, since
> kotextdocument and kotextparag have their own methods for all the rest now,
> anyway. So we might want to move this to kotextparag anyway, for
> consistency ... (I have started to work on a script that "transforms" the
> QRT classes into the Ko classes, adding our changes, instead of inheriting
> from the Q classes ... to make the whole design less confusing).
>

OK

> After testing, the main bug that meets the eye is the cutting of the
> formatting characters, they're not completely drawn - I know it doesn't
> come from this patch, it was already doing that since the WYSIWYG changes.
> Just something you might want to look at if you don't know what to do next
> ;)

Have noticed that to...will try to fix it.

>
> I have committed this patch (and added an entry in kword/CHANGES). Thanks a
> lot! BTW if you want a CVS account, don't hesitate to send me an encrypted
> password ;)

Great

>
> > > David, really glad to see more and more KWord contributions coming in
> > > ;)
> >
> > Hope this mail will reach the list...got a return on the last mail I sent
> > saying that it had to be approved by a moderator cause I was not on the
> > list...but I am.
>
> koffice-devel (like kde-core-devel) has a list of allowed poster,
> independent from subscribers. I added you (and the other new contributors)
> to that list.

-- 
krister.wicksell@spray.se
http://hem.spray.se/krister.wicksell/
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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