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

List:       koffice-devel
Subject:    Re: Review Request: bug fix "Text displayed at wrong place in this
From:       "Matus Hanzes" <matus.hanzes () ixonos ! com>
Date:       2010-05-11 13:09:22
Message-ID: 20100511130922.7517.72771 () localhost
[Download RAW message or body]



> On 2010-05-11 11:56:03, Thomas Zander wrote:
> > You seemed to have redesigned the anchor strategies totally, I really like the \
> > ones we had. :( 
> > Please keep in mind that KOffice is *NOT* a OOo replacement and also certainly \
> > not going to be driven by the ODF specification. So changes need to make sense, \
> > have an impact on usecases and usability. If you have the idea to make changes to \
> > the current version please bring them forward and explain why based on the above \
> > reasoning.

KoTextAnchor :
My intention wasn't to rewrite the anchors .
At first I wanted to use the old approach, but then a little problem appeared.

In the old approach the anchor relative position is written into one enum.
In the new approach the old enum is rewritten into two enums.
For example  AnchorVertical::TopOfParagraph is rewritten into \
VerticalRel::VParagraph; VerticalPos::VTop.

The reason for it is that I need to support odf standard because of my bug. And when \
I want to add support for it in kword I have to save the anchor information somehow. \
With the old approach there are 50 vertical enums needed and 91 horizontal enums. \
With the new approach there are 15 vertical enums needed and 20 horizontal enums. But \
if the community thinks that the old approach is better I will rewrite it.

KoAnchorStrategy:
Because of previous mentioned changes in KoTextAnchor I had to rewrite the switch \
little bit. But the idea is the same as in previous approach.

My proposal to move the layout recalculation code from KoAnchorStrategy to \
KWTextDocumentLayout, is because I think there is no enough information in \
KoAnchorStrategy to avoid unnecessary layout recalculations.  For example when the \
anchored shape is in background there is no need for layout recalculation.

KWFrameLayout:
I had to work with page margins and because there is a buffer overflow I wasn't able. \


Another problem is that OOo and msword-odf filter understands the page \
"margin-bottom" and "min-height" differently than the KWFrameLayout.

To solve this problem there are two possibilities.
I can modify the KWFrameLayout code and we will show the OOo and msword documents \
correctly. Or I can modify the msword-odf filter code and we will show msword \
documents correctly.

I choose the first option.


- Matus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3699/#review5593
-----------------------------------------------------------


On 2010-05-07 15:20:10, Matus Hanzes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3699/
> -----------------------------------------------------------
> 
> (Updated 2010-05-07 15:20:10)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> To place draw objects properly in kword document I needed to add more support for \
> anchoring in kword.(style:vertical-pos,style:vertical-rel,style:horizontal-pos,style:vertical-rel)
>  I tried to make anchoring backward compatible.
> 
> Comments are welcome.
> 
> 
> Diffs
> -----
> 
> trunk/koffice/kword/part/KWPageStyle.h 1123976 
> trunk/koffice/kword/part/KWPageStyle.cpp 1123976 
> trunk/koffice/kword/part/KWPageStyle_p.h 1123976 
> trunk/koffice/kword/part/KWPageTextInfo.h 1123976 
> trunk/koffice/kword/part/KWPageTextInfo.cpp 1123976 
> trunk/koffice/kword/part/frames/KWAnchorStrategy.h 1123976 
> trunk/koffice/kword/part/frames/KWAnchorStrategy.cpp 1123976 
> trunk/koffice/kword/part/frames/KWFrameLayout.cpp 1123976 
> trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp 1123976 
> trunk/koffice/libs/kotext/KoTextAnchor.h 1123976 
> trunk/koffice/libs/kotext/KoTextAnchor.cpp 1123976 
> trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp 1123976 
> 
> Diff: http://reviewboard.kde.org/r/3699/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matus
> 
> 

_______________________________________________
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