Review Request: KoReport: fix save/load page margins

Dag Andersen danders at get2net.dk
Fri Jun 29 15:13:01 BST 2012


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

(Updated June 29, 2012, 2:13 p.m.)


Review request for Calligra, Jarosław Staniek and Adam Pigg.


Changes
-------

I made a mistake in the last patch (misread the docs) and also discovered localized value in section height,
so I decided to have look at the whole xml stuff.

The new patch contains the following:
* All distances (size, position, margins) now saved in pt, and in the same format as found in KoGenStyle.
* The unit used for presentation is the one saved as page-unit in report:grid element.
* Hence unit is updated in KoReportDesigner c'tor with a call to  slotPropertyChanged(*m_set, *m_unit). Adam: Is this ok or could it have side effects?
* The xml methods for this is put into the KRUtils namespace as I found some other xml code in there.

Reading of old formats, localized and with other units than pt should still work as this is handled by KoUnit::parseValue().


Description
-------

Seems page margins never worked:
* Saveing used namespace fo, loading used report
* Loading expected values in pt, saving was in localized value + unit

This changes:
* Saving to use namespace 'fo' and value in points.
* Loading to try to load any value + optional unit (with KoUnit::parseValue()).


Diffs (updated)
-----

  libs/koreport/common/KoReportItemBase.cpp 76dc9a8 
  libs/koreport/common/krreportdata.cpp 4adf547 
  libs/koreport/common/krutils.h 962e1e7 
  libs/koreport/common/krutils.cpp 3c2f037 
  libs/koreport/items/field/KoReportDesignerItemField.cpp 0dc9325 
  libs/koreport/wrtembed/KoReportDesigner.cpp 78dda97 
  libs/koreport/wrtembed/KoReportDesignerItemBase.cpp 33bd17d 
  libs/koreport/wrtembed/KoReportDesignerItemLine.cpp e173787 
  libs/koreport/wrtembed/reportsection.cpp 2fae3d9 

Diff: http://git.reviewboard.kde.org/r/105305/diff/


Testing
-------


Thanks,

Dag Andersen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120629/69af262a/attachment.htm>


More information about the calligra-devel mailing list