Review Request 115314: Fix crash with custom sized reports

Jarosław Staniek staniek at kde.org
Wed Feb 5 11:48:53 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115314/#review49010
-----------------------------------------------------------


Thanks for this work Andrius, and I am sorry for the delay.
We're going to ship it on time for 2.8.0.

As in any work involving formats, we need to be supercareful because mistakes often cannot be fixed due to a requirement of backward compatibility.

I just updated the page Reports Fileformat page and especially the section for <report:page-style>  http://community.kde.org/Kexi/Plugins/Reports/Fileformat#.3Creport:page-style.3E 

My proposal:
- I noticed there's a legacy text element report:page-style/$TEXT. I explained on the wiki to only have two possible values there: "predefined" and empty.
- Alter the name of the new elements, this leads to better harmonization with ODF 1.2
- Saving should be fixed too: save fo:page-width/fo:page-height even for non-custom page sizes. Also do not save "custom" value of report:page-style/$TEXT.


Example change for custom page size:
CURRENT:
  <report:page-style report:custom-page-height="141.732529000000000pt" report:print-orientation="portrait" fo:margin-bottom="28.346505799999999pt" fo:margin-top="28.346505799999999pt" fo:margin-left="19.842554059999991pt" fo:margin-right="28.346505799999999pt" report:custom-page-width="141.732529000000000pt">custom</report:page-style>
EXPECTED, notice lack of text:
  <report:page-style report:page-size="Custom" fo:page-height="141.732529000000000pt" report:print-orientation="portrait" fo:margin-bottom="28.346505799999999pt" fo:margin-top="28.346505799999999pt" fo:margin-left="19.842554059999991pt" fo:margin-right="28.346505799999999pt" fo:page-width="141.732529000000000pt"></report:page-style>

Example change for predefined page size A4:
CUSTOM:
  <report:grid report:grid-divisions="4" report:grid-snap="1" report:page-unit="cm" report:grid-visible="1"/>
  <report:page-style report:print-orientation="portrait" fo:margin-bottom="1.00cm" fo:margin-top="1.00cm" fo:margin-left="1.00cm" fo:margin-right="1.00cm" report:page-size="A4">predefined</report:page-style>
NEW: added fo:page-width, fo:page-height even for A4:
  <report:grid report:grid-divisions="4" report:grid-snap="1" report:page-unit="cm" report:grid-visible="1"/>
  <report:page-style report:print-orientation="portrait" fo:margin-bottom="1.00cm" fo:margin-top="1.00cm" fo:margin-left="1.00cm" fo:margin-right="1.00cm" report:page-size="A4" fo:page-height="....pt" fo:page-width="....pt">predefined</report:page-style>



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34606>

    Check this value, if it's "Custom" or "" then perform steps for the custom size.



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34607>

    custom-page-width -> page-width
    
    report:custom-page-width -> fo:page-width
    
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34608>

    custom-page-height -> page-height
    
    report:custom-page-height -> fo:page-height
    
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34609>

    report:custom-page-height -> fo:page-height
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34610>

    report:custom-page-width -> fo:page-width
    
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34616>

    Please remove spaces:
    ( foo ) -> (foo)
    
    -here and everywhere



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34611>

    custom-page-width -> page-width
    
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34612>

    custom-page-height -> page-height
    



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34613>

    remove "custom-"



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34614>

    remove "custom-"



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34615>

    remove "custom-" here and below



libs/koreport/wrtembed/KoReportDesigner.cpp
<https://git.reviewboard.kde.org/r/115314/#comment34617>

    remove "custom-" here and below


- Jarosław Staniek


On Jan. 25, 2014, 8:33 p.m., Andrius da Costa Ribas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115314/
> -----------------------------------------------------------
> 
> (Updated Jan. 25, 2014, 8:33 p.m.)
> 
> 
> Review request for Calligra, Friedrich W. H. Kossebau, Adam Pigg, and Jarosław Staniek.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> This patch enables "Custom" sized reports which were not working before.
> 
> 
> Diffs
> -----
> 
>   libs/koreport/wrtembed/KoReportDesigner.cpp 7644c1d 
> 
> Diff: https://git.reviewboard.kde.org/r/115314/diff/
> 
> 
> Testing
> -------
> 
> Tested using MSVC, with both Plan and Kexi reports.
> 
> 
> Thanks,
> 
> Andrius da Costa Ribas
> 
>

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


More information about the calligra-devel mailing list