Kaydet (Commit) b00a5928 authored tarafından Vinaya Mandke's avatar Vinaya Mandke Kaydeden (comit) Miklos Vajna

fdo#80514 LO crashes on opening; tries to remove a para with NumPicBullet

LO crashes while opening the issue file as, an extra Num Pic Bullets is
attached to the dummy para. All NumPicBullets were disposed in
dtor of ListsManager.
LO tries to remove dummy para after the section, while the pic bullet is still attached to it.
This causes Lo to crash while removing the paragraph.

Added a 'ListsManager::DisposeNumPicBullets( )' to remove the extra bullets from the document
Added the issue file in sw/qa/core/data/ooxml/pass/

Change-Id: I578f48364dcb4ff939fa3800e90db88a99d5ca1a
Reviewed-on: https://gerrit.libreoffice.org/9897Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 8a0df1b7
......@@ -299,6 +299,12 @@ void DomainMapper_Impl::RemoveDummyParaForTableInSection()
return;
uno::Reference< text::XTextCursor > xCursor = GetTopTextAppend()->createTextCursorByRange(pSectionContext->GetStartingRange());
// Remove the extra NumPicBullets from the document,
// which get attached to the first paragraph in the
// document
ListsManager::Pointer pListTable = GetListTable();
pListTable->DisposeNumPicBullets();
uno::Reference<container::XEnumerationAccess> xEnumerationAccess(xCursor, uno::UNO_QUERY);
if (xEnumerationAccess.is() && m_aTextAppendStack.size() == 1 )
{
......
......@@ -698,6 +698,11 @@ ListsManager::ListsManager(DomainMapper& rDMapper,
}
ListsManager::~ListsManager( )
{
DisposeNumPicBullets();
}
void ListsManager::DisposeNumPicBullets( )
{
uno::Reference<drawing::XShape> xShape;
for (std::vector<NumPicBullet::Pointer>::iterator it = m_aNumPicBullets.begin(); it != m_aNumPicBullets.end(); ++it)
......
......@@ -263,6 +263,9 @@ public:
// Mapping methods
void CreateNumberingRules( );
// Dispose the NumPicBullets
void DisposeNumPicBullets( );
};
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment