From e2b260fc98e833d4e64426b90992094f2da0498c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 3 Jun 2014 12:44:37 +0200 Subject: sw: let layout not mark embedded object as modified The problem was that right after the import, the document wasn't marked as modified, but as layout settled, it got marked as modified. Given that we already have code to avoid modification when updating the replacement image, do something similar here: when setting the view area, make sure the embedded object's component is not marked as modified. Change-Id: I88a42829ec48db54178553661863a571cd2a268b --- sw/source/uibase/wrtsh/wrtsh1.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sw/source') diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index dbd8c055eec9..6c03ee9c7a3e 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -650,7 +650,18 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, awt::Size aSz; aSz.Width = aSize.Width(); aSz.Height = aSize.Height(); + + // Action 'setVisualAreaSize' doesn't have to change the + // modified state of the document, either. + bool bModified = false; + uno::Reference xModifiable(xObj->getComponent(), uno::UNO_QUERY); + if (xModifiable.is()) + bModified = xModifiable->isModified(); xObj->setVisualAreaSize( nAspect, aSz ); + xModifiable.set(xObj->getComponent(), uno::UNO_QUERY); + if (xModifiable.is()) + xModifiable->setModified(bModified); + // #i48419# - action 'UpdateReplacement' doesn't // have to change the modified state of the document. // This is only a workaround for the defect, that this action -- cgit