Bug 156647 - ReqIF: cell padding is exported, but not imported
Summary: ReqIF: cell padding is exported, but not imported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.2.0 target:7.6.1
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-07 05:29 UTC by Mike Kaganski
Modified: 2023-08-09 08:57 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Table with cell padding (1.44 KB, application/vnd.oasis.opendocument.text)
2023-08-07 05:29 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-08-07 05:29:52 UTC
Created attachment 188818 [details]
Table with cell padding

The attached FODT has a table with cell padding of 1.24 cm. When exported as ReqIF, the padding is output correctly (as 47 px); but when the  ReqIF is imported back, the padding is lost.

Steps:
1. Open the FODT.
2. Execute this macro:

sub ReqIF_SaveAndReload
  dim doc as object, url as string
  doc = ThisComponent
  url = Replace(doc.URL, "fodt", "xhtml")

  Dim args1(6) As New com.sun.star.beans.PropertyValue
  args1(0).Name  = "FilterName"
  args1(0).Value = "HTML (StarWriter)"
  args1(1).Name  = "FilterOptions"
  args1(1).Value = "xhtmlns=reqif-xhtml"
  args1(2).Name  = "Overwrite"
  args1(2).Value = true
  args1(3).Name  = "RTFOLEMimeType"
  args1(3).Value = "text/rtf"
  args1(4).Name  = "OnMainThread"
  args1(4).Value = true
  args1(5).Name  = "ExportImagesAsOLE"
  args1(5).Value = false
  args1(6).Name  = "ShapeDPI"
  args1(6).Value = 300

  doc.storeToUrl(url, args1())

  Dim args2(2) As New com.sun.star.beans.PropertyValue
  args2(0).Name  = "FilterName"
  args2(0).Value = "HTML (StarWriter)"
  args2(1).Name  = "FilterOptions"
  args2(1).Value = "xhtmlns=reqif-xhtml"

  Dim types(1) As String
  types(0) = "text/rtf"
  types(1) = "application/oleobject"
  args2(2).Name  = "AllowedRTFOLEMimeTypes"
  args2(2).Value = types

  StarDesktop.LoadComponentFromUrl(url, "_blank", 0, args2())
end sub

=> the newly opened "table_cell_padding.xhtml" has no cell padding in the table.
If you open the .xhtml in a text editor, the 'cellpadding' attribute is there in the table element.
Comment 1 Commit Notification 2023-08-07 07:50:53 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/97a6e3f22185b26745dbe27949a9b283937f98da

tdf#156647: restore the explicitly set properties after applying defaults

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2023-08-09 08:57:54 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/7ae758b3c00e4b190290bb59da32cc31fb9feb28

tdf#156647: restore the explicitly set properties after applying defaults

It will be available in 7.6.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.