summaryrefslogtreecommitdiff
path: root/sc/source/filter/xcl97
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-04-08 12:17:20 +0200
committerDaniel Rentz <dr@openoffice.org>2010-04-08 12:17:20 +0200
commit897974e77d86cf351b1a24788a67fdcefd79ac0e (patch)
tree66612d74a29994c3fe9d004eaeaa98fadb59118e /sc/source/filter/xcl97
parent3295b3c835de65c3c407881073025beef57c25e3 (diff)
tl78: #i109779# import/export password-to-modify
Diffstat (limited to 'sc/source/filter/xcl97')
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 67a295ccec8b..df6bdcbbe671 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1354,9 +1354,10 @@ void XclExpWriteAccess::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpFileSharing::XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPasswordHash ) :
+XclExpFileSharing::XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPasswordHash, bool bRecommendReadOnly ) :
XclExpRecord( EXC_ID_FILESHARING ),
- mnPasswordHash( nPasswordHash )
+ mnPasswordHash( nPasswordHash ),
+ mbRecommendReadOnly( bRecommendReadOnly )
{
if( rRoot.GetBiff() <= EXC_BIFF5 )
maUserName.AssignByte( rRoot.GetUserName(), rRoot.GetTextEncoding(), EXC_STR_8BITLENGTH );
@@ -1366,13 +1367,13 @@ XclExpFileSharing::XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPassw
void XclExpFileSharing::Save( XclExpStream& rStrm )
{
- if( mnPasswordHash != 0 )
+ if( (mnPasswordHash != 0) || mbRecommendReadOnly )
XclExpRecord::Save( rStrm );
}
void XclExpFileSharing::WriteBody( XclExpStream& rStrm )
{
- rStrm << sal_uInt16( 0 ) << mnPasswordHash << maUserName;
+ rStrm << sal_uInt16( mbRecommendReadOnly ? 1 : 0 ) << mnPasswordHash << maUserName;
}
// ============================================================================