<div dir="ltr">Hi,<div><br></div><div>I have been working on a patch for <a href="https://bugs.documentfoundation.org/show_bug.cgi?id=93240">EasyHack 93240</a>  and I have run into a problem.</div><div>All the changes I'll describe are in the sw/source/filter/html directory.</div><div><br></div><div><b>svxcss1.hxx , svxcss1.cxx , htmlcss1.cxx:-</b></div><div><ul><li><a href="http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/svxcss1.hxx#201">http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/svxcss1.hxx#201</a> . According to the bug description, boost::ptr_vector<..> should be changed to std::vector<std::unique_ptr<CSS1Selector> > . aSelectors would be renamed to m_Selectors. </li><li><a href="http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/svxcss1.cxx#659">http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/svxcss1.cxx#659</a>  . In SvcCSS1Parser::SelectorParsed, since pSelector (which is of type CSS1Selector*) would be pushed back into m_Selectors now and there is no conversion from a normal pointer to a unique_ptr, pSelector itself would have to be a unique_ptr. Hence, the StyleParsed method's prototype would also be changed.<br></li><li><a href="http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/htmlcss1.cxx#696">http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/htmlcss1.cxx#696</a> . Is another implementation of SvxCSS1Parser::StyleParsed.</li></ul><div><br></div>Since SvxCSS1Parser inherits CSS1Parser, and the SelectorParsed method is overloaded, changes are also required in <b>parcss1.hxx and parcss1.cxx </b>, where ParseRule() calls SelectorParsed():-</div><div><br></div><div><ul><li><a href="http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/parcss1.cxx#739">http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/parcss1.cxx#739</a> . pSelector (which should become a unique_ptr ) is obtained from ParseSelector() (whose return type should also change) and then passed to SelectorParsed() <br></li><li><a href="http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/parcss1.cxx#833">http://opengrok.libreoffice.org/xref/core/sw/source/filter/html/parcss1.cxx#833</a> . In ParseSelector(), pRoot, pNew and pLast would have to be unique_ptr s (initialized to nullptr). Lines 882, 894, 911 and 924 would now have calls to std::move. The problem arises in the if block starting at line 936, where pRoot and pLast are checked for equality (which should fail for unique_ptr s) Also, pRoot and pLast could both be assigned to the object owned by pNew, which is not possible.<br></li></ul><div>How should I go about solving this problem?</div></div><div><br></div><div>Regards,</div><div>Shreyansh</div></div><div dir="ltr">-- <br></div><div dir="ltr">Regards,<div>Shreyansh Gandhi</div></div>