From efba08812c1534534f4807c2e5dcbcf060255176 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 10 May 2005 07:06:11 +0000 Subject: INTEGRATION: CWS swqbugfixes31 (1.49.56); FILE MERGED 2005/05/02 12:05:48 od 1.49.56.1: #i48419# - assure that method call UpdateReplacement()> doesn't change the modified state of the document. --- sw/source/ui/wrtsh/wrtsh1.cxx | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 69cbc9b81d23..7a70f09044cd 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wrtsh1.cxx,v $ * - * $Revision: 1.49 $ + * $Revision: 1.50 $ * - * last change: $Author: rt $ $Date: 2005-04-04 08:19:08 $ + * last change: $Author: rt $ $Date: 2005-05-10 08:06:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -865,7 +865,30 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, aSz.Width = aSize.Width(); aSz.Height = aSize.Height(); xObj->setVisualAreaSize( nAspect, aSz ); - xObj.UpdateReplacement(); + // --> OD 2005-05-02 #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 + // modifies a document after load, because unnecessarily the + // replacement graphic is updated, in spite of the fact that + // nothing has been changed. + // If the replacement graphic changes by this action, the document + // will be already modified via other mechanisms. + { + bool bResetEnableSetModified(false); + if ( GetDoc()->GetDocShell()->IsEnableSetModified() ) + { + GetDoc()->GetDocShell()->EnableSetModified( FALSE ); + bResetEnableSetModified = true; + } + + xObj.UpdateReplacement(); + + if ( bResetEnableSetModified ) + { + GetDoc()->GetDocShell()->EnableSetModified( TRUE ); + } + } + // <-- } } -- cgit