fdo#60740: Handle empty paragraphs correctly.
Change-Id: I47d4f60daec82d2b6a4b5e8f20b8cb6484c55057
This commit is contained in:
@@ -902,6 +902,13 @@ void EditTextObjectImpl::GetAllSectionAttributes( std::vector<editeng::SectionAt
|
||||
{
|
||||
size_t nPara = distance(aParaBorders.begin(), it);
|
||||
const SectionBordersType& rBorders = *it;
|
||||
if (rBorders.size() == 1 && rBorders[0] == 0)
|
||||
{
|
||||
// Empty paragraph. Push an empty section.
|
||||
aAttrs.push_back(editeng::SectionAttribute(nPara, 0, 0));
|
||||
continue;
|
||||
}
|
||||
|
||||
SectionBordersType::const_iterator itBorder = rBorders.begin(), itBorderEnd = rBorders.end();
|
||||
size_t nPrev = *itBorder;
|
||||
size_t nCur;
|
||||
|
@@ -3067,9 +3067,6 @@ void flushParagraph(
|
||||
const ScXMLEditAttributeMap& rAttrMap,
|
||||
std::vector<editeng::SectionAttribute>::const_iterator it, std::vector<editeng::SectionAttribute>::const_iterator itEnd )
|
||||
{
|
||||
if (it == itEnd)
|
||||
return;
|
||||
|
||||
OUString aElemName = rExport.GetNamespaceMap().GetQNameByKey(
|
||||
XML_NAMESPACE_TEXT, GetXMLToken(XML_P));
|
||||
SvXMLElementExport aElemP(rExport, aElemName, false, false);
|
||||
|
Reference in New Issue
Block a user