INTEGRATION: CWS swqbf105 (1.51.30); FILE MERGED

2007/10/16 10:47:52 fme 1.51.30.1: #i81697# Lock view to prevent view update
This commit is contained in:
Rüdiger Timm
2007-11-07 11:19:53 +00:00
parent 41c60fddb0
commit 50b12373c3

View File

@@ -4,9 +4,9 @@
* *
* $RCSfile: shellio.cxx,v $ * $RCSfile: shellio.cxx,v $
* *
* $Revision: 1.51 $ * $Revision: 1.52 $
* *
* last change: $Author: hr $ $Date: 2007-09-27 09:44:59 $ * last change: $Author: rt $ $Date: 2007-11-07 12:19:53 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@@ -997,9 +997,14 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
} }
} }
BOOL bLockedView(FALSE);
SwEditShell* pESh = pOutDoc->GetEditShell(); SwEditShell* pESh = pOutDoc->GetEditShell();
if( pESh ) if( pESh )
{
bLockedView = pESh->IsViewLocked();
pESh->LockView( TRUE ); //lock visible section
pESh->StartAllAction(); pESh->StartAllAction();
}
BOOL bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE); BOOL bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, false); pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, false);
@@ -1015,8 +1020,12 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
nError = rxWriter->Write( *pPam, xStg, pRealFileName ); nError = rxWriter->Write( *pPam, xStg, pRealFileName );
pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, bWasPurgeOle ); pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, bWasPurgeOle );
if( pESh ) if( pESh )
{
pESh->EndAllAction(); pESh->EndAllAction();
pESh->LockView( bLockedView );
}
// Falls nur zum Schreiben eine Selektion aufgespannt wurde, vor der // Falls nur zum Schreiben eine Selektion aufgespannt wurde, vor der
// Rueckkehr den alten Crsr wieder herstellen. // Rueckkehr den alten Crsr wieder herstellen.