summaryrefslogtreecommitdiff
path: root/basic/source/classes/image.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-23 15:55:53 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-23 15:55:53 +0000
commit34e66c83601030dd37ec071a43b22a2cc1d3fafc (patch)
tree0a877903895bd780c558194e33141988ae33e38c /basic/source/classes/image.cxx
parent762183207fc8262a1fb0414f61b4e5fc75c28425 (diff)
INTEGRATION: CWS uno2 (1.7.6); FILE MERGED
2003/04/11 14:20:42 ab 1.7.6.1: #108672# Basic Modules > 64K
Diffstat (limited to 'basic/source/classes/image.cxx')
-rw-r--r--basic/source/classes/image.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index f7e2454518c1..2aed5e33fdc8 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: image.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hr $ $Date: 2003-03-18 16:28:30 $
+ * last change: $Author: rt $ $Date: 2003-04-23 16:55:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -194,9 +194,13 @@ BOOL SbiImage::Load( SvStream& r )
//r >> aComment;
break;
case B_SOURCE:
- r.ReadByteString( aSource, eCharSet );
+ {
+ String aTmp;
+ r.ReadByteString( aTmp, eCharSet );
+ aOUSource = aTmp;
//r >> aSource;
break;
+ }
case B_PCODE:
if( bBadVer ) break;
pCode = new char[ nLen ];
@@ -284,10 +288,16 @@ BOOL SbiImage::Save( SvStream& r )
SbiCloseRecord( r, nPos );
}
// Source?
- if( aSource.Len() && SbiGood( r ) )
+ if( aOUSource.getLength() && SbiGood( r ) )
{
nPos = SbiOpenRecord( r, B_SOURCE, 1 );
- r.WriteByteString( aSource, eCharSet );
+ String aTmp;
+ sal_Int32 nLen = aOUSource.getLength();
+ if( nLen > STRING_MAXLEN )
+ aTmp = aOUSource.copy( 0, STRING_MAXLEN - 1 );
+ else
+ aTmp = aOUSource;
+ r.WriteByteString( aTmp, eCharSet );
//r << aSource;
SbiCloseRecord( r, nPos );
}