summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-04-26 13:25:00 +0000
committerKurt Zenker <kz@openoffice.org>2006-04-26 13:25:00 +0000
commit5e53d73129e9d9fbef29d91310732ef59fd3bef9 (patch)
treebc1e76f994c79ee863902f733bbf06e2fa81ae13 /sot
parent294d8e82d2f40767315c8ef497aaa3bace301901 (diff)
INTEGRATION: CWS fwk37 (1.6.36); FILE MERGED
2006/03/31 12:25:09 mav 1.6.36.1: #132481# create the string correctly
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgole.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index f86acd80223c..6e4134175aad 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: stgole.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 07:42:44 $
+ * last change: $Author: kz $ $Date: 2006-04-26 14:25:00 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -135,7 +135,7 @@ BOOL StgCompObjStream::Load()
sal_Char* p = new sal_Char[ (USHORT) nLen1 ];
if( Read( p, nLen1 ) == (ULONG) nLen1 )
{
- aUserName = String( p, gsl_getSystemTextEncoding() );
+ aUserName = nLen1 ? String( p, gsl_getSystemTextEncoding() ) : String();
/* // Now we can read the CB format
INT32 nLen2 = 0;
*this >> nLen2;
@@ -144,7 +144,7 @@ BOOL StgCompObjStream::Load()
// get a string name
if( nLen2 > nLen1 )
delete p, p = new char[ nLen2 ];
- if( Read( p, nLen2 ) == (ULONG) nLen2 )
+ if( Read( p, nLen2 ) == (ULONG) nLen2 && nLen2 )
nCbFormat = Exchange::RegisterFormatName( String( p ) );
else
SetError( SVSTREAM_GENERALERROR );