summaryrefslogtreecommitdiffstats
path: root/svx/source/editeng/editobj.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-08-28 08:34:09 +0000
committerMalte Timmermann <mt@openoffice.org>2001-08-28 08:34:09 +0000
commit7379c1a1b2d8a87b5ab0018ad70b5529e20b7a28 (patch)
tree965c9cf30332ad3e51e032c5adccd9738664e6a7 /svx/source/editeng/editobj.cxx
parent#74241# no data type NUMERIC - upon writing, this is mapped to DECIMAL anyway (diff)
downloadcore-7379c1a1b2d8a87b5ab0018ad70b5529e20b7a28.tar.gz
core-7379c1a1b2d8a87b5ab0018ad70b5529e20b7a28.zip
#91575# Store StyleSheetName as Unicode too...
Diffstat (limited to 'svx/source/editeng/editobj.cxx')
-rw-r--r--svx/source/editeng/editobj.cxx28
1 files changed, 23 insertions, 5 deletions
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx
index 06561868fcfa..8dfafb810300 100644
--- a/svx/source/editeng/editobj.cxx
+++ b/svx/source/editeng/editobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: editobj.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: mt $ $Date: 2001-08-20 12:30:55 $
+ * last change: $Author: mt $ $Date: 2001-08-28 09:34:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1262,9 +1262,16 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const
for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
- ULONG nL = pC->GetText().Len();
+ USHORT nL = pC->GetText().Len();
rOStream << nL;
rOStream.Write( pC->GetText().GetBuffer(), nL*sizeof(sal_Unicode) );
+
+ // #91575# StyleSheetName must be Unicode too!
+ // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed...
+ // If needed, change nL back to ULONG and increase version...
+ nL = pC->GetStyle().Len();
+ rOStream << nL;
+ rOStream.Write( pC->GetStyle().GetBuffer(), nL*sizeof(sal_Unicode) );
}
}
}
@@ -1498,14 +1505,25 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
- ULONG nL;
+ USHORT nL;
+
+ // Text
rIStream >> nL;
if ( nL )
{
- pC->GetText().AllocBuffer( (USHORT)nL );
+ pC->GetText().AllocBuffer( nL );
rIStream.Read( pC->GetText().GetBufferAccess(), nL*sizeof(sal_Unicode) );
pC->GetText().ReleaseBufferAccess( (USHORT)nL );
}
+
+ // StyleSheetName
+ rIStream >> nL;
+ if ( nL )
+ {
+ pC->GetStyle().AllocBuffer( nL );
+ rIStream.Read( pC->GetStyle().GetBufferAccess(), nL*sizeof(sal_Unicode) );
+ pC->GetStyle().ReleaseBufferAccess( (USHORT)nL );
+ }
}
}
}