Hello Tamas,
On Sun, 2013-06-30 at 18:35 +0200, Zolnai Tamás wrote:
Some notes about my progress in the second week.
In this week I added the "Borders" tab page to the character dialog
and so the UI part of the implementation works. After this I started
to learn about character attributes, fonts and layout.
Great!
Questions of this week (some of them are answered just partly):
- How to use a general attribute (e.g. background, or in our case
border) as character attribute?
Just set it to the appropriate SfxItemSet as any other attribute.
- Is it necessary to add a separate character attribute or just use
the general one?
You should may be look at what is done for the character background as
we may have the same problems there. The problem would be that the
paragraph and caracter attributes could conflict in some cases.
- How does the system store attributes? (SwFmt, SwAttrSet,
SwAttrStack)
You got the proper classes. If you need some help to debug the
SfxItemSet, you can have a look at my old gdbinit here (function
dump_psfxitemset):
http://cgit.freedesktop.org/libreoffice/build/plain/scratch/writer/gdbinit-cbosdo?h=libreoffice-3-4
- How to paint text lines into font structure? (e.g. overlining,
underlining, strikethrough)
IMHO that would be too limited for borders work... remember all the
border types we can have (those specified by CSS at least).
- How does layout frame work? How does frame hierarchy look like?
How to calculate the border properties of the current frame?
(SwBorderAttr)
Do you know this wiki page explaining quite a lot of things?
http://wiki.openoffice.org/wiki/Writer/Core_And_Layout
Characters are at a lower level as these are SwLinePortions. You can
also debug that by exporting SW_DEBUG=t, open a sample document, and
press F12: that will dump a layout.xml in $PWD. This layout.xml will
show you quite a lot of informations on the layout structure. (Shift+F12
will do the same with a nodes.xml showing the model structure).
--
Cedric
Context
- Re: Weekly report about character border (continued)
Re: Weekly report about character border · Cedric Bosdonnat
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.