diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2001-11-08 18:06:46 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2001-11-08 18:06:46 +0000 |
commit | 6af264883910fe31433b4164b1956f4f9ed75ecb (patch) | |
tree | 92e25a1b4b362c19452a9b99d891a1ed04a9c51b /sw/source/filter/xml/wrtxml.cxx | |
parent | #94187# prevent screen update during XML export (the export switches redline ... (diff) | |
download | core-6af264883910fe31433b4164b1956f4f9ed75ecb.tar.gz core-6af264883910fe31433b4164b1956f4f9ed75ecb.zip |
#94187# switch redline mode outside of XML export components (or inside for each of them)
(also fixes #94465#)
Diffstat (limited to 'sw/source/filter/xml/wrtxml.cxx')
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 03efcd017920..2c598751d5de 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wrtxml.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: mib $ $Date: 2001-10-19 14:30:12 $ + * last change: $Author: dvo $ $Date: 2001-11-08 19:06:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -219,6 +219,9 @@ sal_uInt32 SwXMLWriter::_Write() { "UsePrettyPrinting", sizeof("UsePrettyPrinting")-1, 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0}, + { "ShowChanges", sizeof("ShowChanges")-1, 0, + &::getBooleanCppuType(), + beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( @@ -280,6 +283,18 @@ sal_uInt32 SwXMLWriter::_Write() aAny.setValue( &bUsePrettyPrinting, ::getBooleanCppuType() ); xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny ); + // save show redline mode ... + OUString sShowChanges(RTL_CONSTASCII_USTRINGPARAM("ShowChanges")); + sal_uInt16 nRedlineMode = pDoc->GetRedlineMode(); + sal_Bool bShowChanges( IsShowChanges( nRedlineMode ) ); + aAny.setValue( &bShowChanges, ::getBooleanCppuType() ); + xInfoSet->setPropertyValue( sShowChanges, aAny ); + // ... and hide redlines for export + nRedlineMode &= ~REDLINE_SHOW_MASK; + nRedlineMode |= REDLINE_SHOW_INSERT; + pDoc->SetRedlineMode( nRedlineMode ); + + // filter arguments // - graphics + object resolver for styles + content // - status indicator @@ -433,6 +448,15 @@ sal_uInt32 SwXMLWriter::_Write() SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper ); xObjectResolver = 0; + // restore redline mode + aAny = xInfoSet->getPropertyValue( sShowChanges ); + nRedlineMode = pDoc->GetRedlineMode(); + nRedlineMode &= ~REDLINE_SHOW_MASK; + nRedlineMode |= REDLINE_SHOW_INSERT; + if ( *(sal_Bool*)aAny.getValue() ) + nRedlineMode |= REDLINE_SHOW_DELETE; + pDoc->SetRedlineMode( nRedlineMode ); + if (xStatusIndicator.is()) { xStatusIndicator->end(); |