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

List:       koffice-devel
Subject:    Re: Bug: Line width in paragraphs which belong to a list
From:       Florian Merz <FlorianMerz () gmx ! de>
Date:       2008-03-12 15:27:31
Message-ID: 200803121627.31430.FlorianMerz () gmx ! de
[Download RAW message or body]

Am Samstag, 8. März 2008 schrieb Sebastian Sauer:
> On Wednesday 05 March 2008, Florian Merz wrote:
> > Hi,
>
> Hi Florian :)

Hi Sebastian,

> > when I tried to make my spacing tool aware of lists I noticed, that
> > there seems to be a bug in the text layouting code (svn trunk from
> > about a week ago):
> >
> > To reproduce it create a paragraph and fill at least two lines
> > completely up to the right border ("a b c d e f g h ..." works fine).
> > Then turn this paragraph into a list. The first line will be layed out
> > properly, but the second line is too wide. It seems like the
> > calculation of the non-first lines doesn't take counter width and/or
> > counter spacing into account.
>
> y, I can reproduce it :-/ Probably create a bugreport for it, so that we
> don't forget about that issue?

Will do that, and a few more for other list-related bugs :(

> > I also have a question on a different matter:
> > Is there a signal, which gets emitted when a relayout of the text has
> > been done?
> > Right now I call the layout() function of the KoTextDocumentLayout
> > myself, but I'm afraid this might block the user interace on bigger
> > paragraphs, and this also causes the layout not to flow around other
> > shapes. So I'd rather let the text engine do the layouting and get a
> > notice when the results are in.
> > I know there is an update() signal defined in
> > QAbstractTextDocumentLayout, and it is emitted in QTextDocumentLayout,
> > but grepping KoTextDocumentLayout revealed that it never gets emitted
> > in the KoOffice implementation.
>
> Well,
> bool KWDocument::loadOdf( KoOdfReadStore & odfStore )
> does call
> endOfLoading();
> once the document got loaded and then in
> void KWDocument::endOfLoading()
> emit sigProgress(-1);
> is done.
>
> So, probably catch that signal? Though I am not sure if that's a good
> idea since after it got emitted there are still some thing done like e.g.
> firePageSetupChanged();

But that's only for after loading the document from an odf file. I'm 
interested in the layouting that happens when I change a part of the 
document, for example the margin of a paragraph. I'd like to have a 
notification when that particular paragraph has been relayed out so I can 
update my tool accordingly.

> Maybe if would be an idea to add an additional signal. Where exactly
> would you need it? So, at KWord/KWDocument or within kotext or...?
I think the right place would be either kotext or the TextShape layouting 
code. Right now I don't feel very comfortable with the layouting code, so I 
don't know which one is the better place.
_______________________________________________
koffice-devel mailing list
koffice-devel@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