[Libreoffice] fdo #31005 Autoformats does not save

Julien Nabet serval2412 at yahoo.fr
Sun Sep 18 11:59:42 PDT 2011


Le 18/09/2011 17:45, Joost Eekhoorn a écrit :
> Hi Julien,
Hi Joost,
>
> I tried several evenings to implement only the vertical alignment of 
> fdo#31005, but I fail. Fine that you will look at this issue.
>
> 1. tblafmt.cxx and tblafmt.hxx are the main places for writer, but you 
> have also to look at sc/inc/autoformat.hxx, because the autoformat in 
> calc and witer are related!
I took a look at sw/inc/tblafmt.hxx, I was quite astonished to read this :
  // Calc specific
      99     SvxHorJustifyItem   aHorJustify;
     100     SvxVerJustifyItem   aVerJustify;
     101     SfxBoolItem         aStacked;
     102     SvxMarginItem       aMargin;
     103     SfxBoolItem         aLinebreak;
     104     SfxInt32Item        aRotateAngle;
     105     SvxRotateModeItem   aRotateMode;

In sc/inc/autoform.hxx, you can read too :
  // Writer specific
     107     SvxAdjustItem               aAdjust;

>
> 2. Each time a new feature is added to table-autoformat, a new 
> AUTOFORMAT_ID must be created, so it would be nice to add several 
> features once, otherwise we get very many IDs.
A search of AUTOFORMAT_ID on opengrok gives these results :
- sw/source/core/doc/tblafmt.cxx
- sc/source/core/tool/autoform.cxx
A quick reading shows it's quite the same structure
>
> 3. First I tought that the vertical alignment was in 
> SvxParaVertAlignItem (editeng/inc/editeng/paravertalignitem.hxx), but 
> then I found out that is done by SwFmtVertOrient (sw/inc/fmtornt.hxx). 
> The last one can not be seen by calc, thus that gives a problem with 
> point 1
I don't know what's the role of editengine, I only found this :
http://wiki.documentfoundation.org/Development/Code_Overview#editeng
> .4. I have Implemented SwFmtVertOrient, but it did not autoformat the 
> table.
Have you already commited and pushed something about this ?


I understand better now why this bug has been there since years.
At this point, I don't know if it can be resolved effectively and safely 
without some refactoring.

Julien.

PS : Perhaps http://api.libreoffice.org/ could help too
>
> Regards
> Joost
>
>
> 2011/9/18 Julien Nabet <serval2412 at yahoo.fr <mailto:serval2412 at yahoo.fr>>
>
>     Le 18/09/2011 11:07, Cor Nouws a écrit :
>     ...
>
>     Julien.
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110918/66c50074/attachment.htm>


More information about the LibreOffice mailing list