diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-05-27 11:02:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-05-27 15:19:47 +0200 |
commit | 1aba7cd7385a08e450a4b86ce0b378be5eedb903 (patch) | |
tree | b5bf20cb194485b6c5974bdd631f357dbddba641 /sw/source | |
parent | e1f1f2b85379faa79e2b52ee221089b1d01646f7 (diff) |
ReqIF: do not write 'align' attribute to 'div' element
To keep the alignment information, use 'style' in this case. Maybe it
makes sense to unify on 'style' also in normal case in a later change.
Change-Id: I6e07acd46fbabeaa47ae9dbe71c00e1b1abc6b73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152340
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/html/htmltabw.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index db18995ebb25..d7e5e107969d 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -1113,10 +1113,20 @@ SwHTMLWriter& OutHTML_SwTableNode( SwHTMLWriter& rWrt, SwTableNode & rNode, } else { - OStringLiteral sOut = OOO_STRING_SVTOOLS_HTML_division - " " OOO_STRING_SVTOOLS_HTML_O_align "=\"" - OOO_STRING_SVTOOLS_HTML_AL_right "\""; - HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), Concat2View(rWrt.GetNamespace() + sOut) ); + if (rWrt.mbReqIF) + { + // In ReqIF, div cannot have an 'align' attribute. For now, use 'style' only + // for ReqIF; maybe it makes sense to use it in both cases? + static constexpr char sOut[] = OOO_STRING_SVTOOLS_HTML_division + " style=\"display: flex; flex-direction: column; align-items: flex-end\""; + HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), Concat2View(rWrt.GetNamespace() + sOut)); + } + else + { + static constexpr char sOut[] = OOO_STRING_SVTOOLS_HTML_division + " " OOO_STRING_SVTOOLS_HTML_O_align "=\"" OOO_STRING_SVTOOLS_HTML_AL_right "\""; + HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), Concat2View(rWrt.GetNamespace() + sOut)); + } } rWrt.IncIndentLevel(); // indent content of <CENTER> rWrt.m_bLFPossible = true; |