Bug 123109 - RTF code - swapped \clpadl and \clpadt
Summary: RTF code - swapped \clpadl and \clpadt
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:rtf
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2019-02-01 10:46 UTC by Sevo
Modified: 2019-02-18 08:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sevo 2019-02-01 10:46:56 UTC
Description:
When saving document in RTF format in code are swapped \clpadl and \clpadt (table cell padding).
Top padding is writing as \clpadl and left padding is writing as \clpadt.

Actual Results:
- In LibreOffice Writer set top padding for cell in table to 2mm and left padding to 5mm
- Save document in RTF format
- Check code of document


Expected Results:
In code are swapped \clpadl and \clpadt values.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Julien Nabet 2019-02-01 11:20:01 UTC
Miklos:
looking at https://opengrok.libreoffice.org/xref/core/writerfilter/source/rtftok/rtfdispatchvalue.cxx?r=6d38fc3d#1381
1392                  case RTF_CLPADB:
1393                      nSprm = NS_ooxml::LN_CT_TcMar_bottom;
1394                      break;
1395                  case RTF_CLPADL:
1396                      nSprm = NS_ooxml::LN_CT_TcMar_top;
1397                      break;
1398                  case RTF_CLPADR:
1399                      nSprm = NS_ooxml::LN_CT_TcMar_right;
1400                      break;
1401                  case RTF_CLPADT:
1402                      nSprm = NS_ooxml::LN_CT_TcMar_left;
1403                      break;

Shouldn't it be:
1395                  case RTF_CLPADT:
1396                      nSprm = NS_ooxml::LN_CT_TcMar_top;
1397                      break;
1401                  case RTF_CLPADL:
1402                      nSprm = NS_ooxml::LN_CT_TcMar_left;
1403                      break;
?
Comment 2 Miklos Vajna 2019-02-01 14:17:03 UTC
> // Top and left is swapped, that's what Word does.

Is the comment above the block, did you consider that?
Comment 3 Julien Nabet 2019-02-01 14:29:12 UTC
(In reply to Miklos Vajna from comment #2)
> > // Top and left is swapped, that's what Word does.
> 
> Is the comment above the block, did you consider that?

Oups, I should open my eyes more widely! :-)
Comment 4 raal 2019-02-16 06:06:35 UTC
(In reply to Miklos Vajna from comment #2)
> > // Top and left is swapped, that's what Word does.
> 
> Is the comment above the block, did you consider that?

Miklos, should this bug be closed as Wontfix? Thanks
Comment 5 Miklos Vajna 2019-02-18 08:46:27 UTC
I think so, yes.

The Writer RTF import follows the RTF spec and also Word's behavior. But in case of conflict, we follow Word's behavior, not what's in the spec. Based on this guideline, I think it makes no sense to change behavior here, sorry.