summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorTushar Bende <tushar.bende@synerzip.com>2014-04-11 22:47:33 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-16 08:43:57 +0000
commitcebb4abec105c2576b065853eb48af9be1d9fde6 (patch)
tree669d8a6df1f8bc35a407440b84f2d013f41c9737 /writerfilter
parentAdjust header guard to modified filename. (diff)
downloadcore-cebb4abec105c2576b065853eb48af9be1d9fde6.tar.gz
core-cebb4abec105c2576b065853eb48af9be1d9fde6.zip
fdo#74652 : Extra image gets added to the document body after RT.
Description: There was a problem for some documents, that when opened in LibreOffice extra image was getting added to the first page of the doc and same could be noticed even in RoundTripped doc. The root cause was if picture bullet is added to the doc and there is no <w:lvlPicBulletId> tag in <w:lvl> of <w:abstractNum> then removal of extra added graphic object from document body was getting missed because currently that is handled in ListsManager::lcl_sprm() inside "case NS_ooxml::LN_CT_Lvl_lvlPicBulletId". Checking if there is any remaining item in m_aNumPicBullets when LO hits the ListsManager destructor. If there is any calling dispose() for all of them. Change-Id: Ibfc3c93b68ff7d6ef0909fe789dda6db67ac11e2 Reviewed-on: https://gerrit.libreoffice.org/8940 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index da88e528f124..17e359ef6cee 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -710,6 +710,16 @@ ListsManager::ListsManager(DomainMapper& rDMapper,
ListsManager::~ListsManager( )
{
+ uno::Reference<drawing::XShape> xShape;
+ for (std::vector<NumPicBullet::Pointer>::iterator it = m_aNumPicBullets.begin(); it != m_aNumPicBullets.end(); ++it)
+ {
+ xShape = (*it)->GetShape();
+ if (xShape.is())
+ {
+ uno::Reference<lang::XComponent> xShapeComponent(xShape, uno::UNO_QUERY);
+ xShapeComponent->dispose();
+ }
+ }
}
void ListsManager::lcl_attribute( Id nName, Value& rVal )