Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello.

Bug:
====
https://bugs.freedesktop.org/show_bug.cgi?id=31005

Patch:
=====
https://bugs.freedesktop.org/attachment.cgi?id=60462

Patch review:
===========
https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=31005&attachment=60462

Summary:
=========
Extended the number of properties supported in AutoFormats, mainly for
Writer. Borders, border styles, table shadow, cell spacing, and text
flow options are now part of autoformats.

AutoFormat file format was modified so that Writer can use
writer-specific types in the format without having to expose them to
Calc. Calc treats such data as binary blobs that it can skip over. The
same mechanism allows Calc to create autoformats that can be read by
Writer, even when they're missing the Writer-specific types.

Detailed Changes (copied from patch):
========================
This change expands the number of properties supported by autoformats,
mainly for Writer.
Some improvements affect Calc as well (e.g. border styles are now
preserved for Calc).

Common: boxitem.hxx, frmitems.cxx
* Added a new version for SvxBoxItem serialization that includes border styles.
* Updated SvxBoxItem and SvxBorderLine serialization logic accordingly.

Writer: fmtornt.hxx, attrfrm.cxx
* Added serialization/deserialization logic for SwFmtVertOrient.

Writer: tblafmt.hxx, tblafmt.cxx, ndtbl.cxx
* Updated file version for autotbl.fmt to be SOFFICE_FILEFORMAT_50.
* Autoformats now record the text orientation and vertical alignment
of table cells.
* Autoformats now record the following table-level properties:
    - Break
    - Keep with next paragraph
    - Repeat heading
    - Allow table split across pages
    - Allow rows to break across pages
    - Merge adjacent line styles
    - Table shadow

Writer: UndoTable.hxx, undtbl.cxx
* Undo support for "Repeat Heading" in autoformat application.

Calc: autoform.hxx, autoform.cxx
* Added support for reading/writing writer-specific data as binary blobs.
* Updated file version for autotbl.fmt to be SOFFICE_FILEFORMAT_50.

Known Issues:
============
* The sharing of autotbl.fmt between Calc and Writer is rather
annoying, and leads to a lot of duplicate code. It might make more
sense to split it into two files, but I'm not sure if autoformat
sharing (between Calc and Writer) is an actively used feature.
* Table->Text Flow->"With Page Style" is not applied, even though it's
saved as part of the autoformat. I'll have to open a bug to track
this.
* The newly added properties were not added to AutoFormat preview
(e.g. table shadow doesn't show up as part of autoformat preview, even
if it's included in the autoformat).
* The table properties in the "Table", "Columns", and "Background"
tabs were untouched. "Columns" is for manual table layout, and it's
not clear to me how it can be generalized as part of an autoformat
(i.e. it's highly dependent on the exact number of rows/columns).
"Background" is rather low priority, seeing as that cell background's
already working. I ran out of steam for "Table->Alignment" and
"Table->Spacing". I'll probably follow up with another patch for those
once I work on something other than AutoFormats :)

QA
===
Ideally, I'd like to have someone do some testing to make sure
autoformats are working as expected. I did a lot of ad-hoc testing for
each newly-supported property, as well as old properties. However, one
should not be trusted to test his own code, especially with such big
changes :)

Pieter, who reported the bug, is willing to do some testing provided
he's given a Windows build. He's not a developer, so if there's an
easy way to get him a Windows build with the changes, it'd be great.

Regards,
--Muhammad

Context


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.