https://bugs.documentfoundation.org/show_bug.cgi?id=128540
--- Comment #21 from Julien Nabet <[email protected]> --- (In reply to David Tardon from comment #14) > > No. That just removes the symptom without fixing the problem. The CSS > property *should* be removed, but new code should be added that emits > (X)HTML dir attribute. See > https://www.w3.org/International/questions/qa-bidi-css-markup and > https://github.com/w3c/epub-specs/issues/335 for more info. I've submitted https://gerrit.libreoffice.org/c/core/+/205798 for the remove of "direction" attribute in css included the epub file. To add "dir" attribute in xhtml, I thought about: - changing EPUBHTMLGenerator::endDocument() to EPUBHTMLGenerator::endDocument(RVNGPropertyList htmlAttrs) in libepubgen - modifying XMLImport::endDocument() in /writerperfect/source/writer/exp/xmlimp.cxx to pass attributes from LO to libepubgen but the pb is to retrieve the direction value. I checked where "ltr" was calculated and here's the bt: #0 libepubgen::EPUBBodyStyleManager::extractProperties (this=0x55aa511329a0, pList=..., cssProps=std::map with 0 elements) at EPUBBodyStyleManager.cpp:21 #1 0x00007f2f94cd0955 in libepubgen::EPUBSpanStyleManager::getClass[abi:cxx11](librevenge::RVNGPropertyList const&) (this=0x55aa511329a0, pList=...) at EPUBSpanStyleManager.cpp:36 #2 0x00007f2f94c990af in libepubgen::EPUBHTMLGenerator::endDocument (this=0x55aa511aaee0) at EPUBHTMLGenerator.cpp:618 #3 0x00007f2f94c8f1bc in libepubgen::EPUBGenerator::endDocument (this=0x55aa51132610) at EPUBGenerator.cpp:77 #4 0x00007f2f94c89046 in libepubgen::EPUBTextGenerator::endDocument (this=0x7ffe05f61440) at EPUBTextGenerator.cpp:194 #5 0x00007f2f94c7c415 in writerperfect::exp::XMLImport::endDocument (this=0x55aa50d730d0) at /home/julien/lo/libo_perf/writerperfect/source/writer/exp/xmlimp.cxx:545 So it's from this block in src/lib/EPUBHTMLGenerator.cpp: 617 case EPUB_STYLES_METHOD_CSS: 618 bodyAttrs.insert("class", m_impl->m_bodyManager.getClass(m_impl->m_actualPageProperties).c_str()); 619 break; which is after (where the goal is to have "dir" attribute): 572 RVNGPropertyList htmlAttrs; 573 // TODO: set lang and xml:lang from metadata 574 htmlAttrs.insert("xmlns", "http://www.w3.org/1999/xhtml"); 575 m_impl->m_document.openElement("html", htmlAttrs); Perhaps we should get this from LO directly but not sure to find my way there. First thing I'd like to know is if it's the right way to pursue to change libepubgen. -- You are receiving this mail because: You are the assignee for the bug.
