diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-25 00:07:45 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-25 14:51:10 -0400 |
commit | d81b56c7f679477fed471f8150e1b95e6902e249 (patch) | |
tree | 5ae5b8f1f4144b4f07444ce9b50baa1b9d424a61 /editeng | |
parent | 882bee5ede38b6ed4e1ec870d835546868c6586d (diff) |
fdo#60740: Handle empty paragraphs correctly.
Change-Id: I47d4f60daec82d2b6a4b5e8f20b8cb6484c55057
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index ac6b8098d49c..8f3b9a00bce5 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -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; |