diff options
author | Christian Lippka <cl@openoffice.org> | 2001-05-16 12:55:23 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-05-16 12:55:23 +0000 |
commit | 1f54fd0a2ae90e08cb433ce52362fba6c07c5bcd (patch) | |
tree | 6189d4f25320751db73e8dca7f5b1904a8e2b174 /sd/source/ui/unoidl/UnoDocumentSettings.cxx | |
parent | 7af65311cd3fbb39ad736d26d6bb3ed5735b4a2b (diff) |
#87003# fixed printer binary settings import/export
Diffstat (limited to 'sd/source/ui/unoidl/UnoDocumentSettings.cxx')
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index fd8354aaa..9f64f569d 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -2,9 +2,9 @@ * * $RCSfile: UnoDocumentSettings.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: sj $ $Date: 2001-05-11 08:56:34 $ + * last change: $Author: cl $ $Date: 2001-05-16 13:55:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -680,9 +680,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c bOk = sal_True; #ifndef SVX_LIGHT sal_uInt32 nSize = aSequence.getLength(); - SvMemoryStream aStream; - aStream.Write ( aSequence.getArray(), nSize ); - aStream.Flush(); + SvMemoryStream aStream (aSequence.getArray(), nSize, STREAM_READ ); aStream.Seek ( STREAM_SEEK_TO_BEGIN ); SfxItemSet* pItemSet = new SfxItemSet(pDoc->GetPool(), SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN, @@ -940,7 +938,9 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A { SvMemoryStream aStream; pPrinter->Store( aStream ); - sal_uInt32 nSize = aStream.GetSize(); + aStream.Seek ( STREAM_SEEK_TO_END ); + sal_uInt32 nSize = aStream.Tell(); + aStream.Seek ( STREAM_SEEK_TO_BEGIN ); Sequence < sal_Int8 > aSequence ( nSize ); memcpy ( aSequence.getArray(), aStream.GetData(), nSize ); *pValue <<= aSequence; |