summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/docuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index cd63adc33989..3e2295d73471 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -221,7 +221,8 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
pPrintFuncCache( NULL ),
- maChangesListeners( m_aMutex )
+ maChangesListeners( m_aMutex ),
+ mnXlsWriteProtPass( 0 )
{
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
if ( pDocShell )
@@ -1448,6 +1449,14 @@ void SAL_CALL ScModelObj::setPropertyValue(
if ( aObjName.getLength() )
pDoc->RestoreChartListener( aObjName );
}
+ else if ( aString.EqualsAscii( "WriteProtectionPassword" ) )
+ {
+ /* This is a hack for #160550# to preserve the write-protection
+ password in an XLS roundtrip. This property MUST NOT be used
+ for any other purpose. This property will be deleted when the
+ feature "Write Protection With Password" will be implemented. */
+ aValue >>= mnXlsWriteProtPass;
+ }
if ( aNewOpt != rOldOpt )
{
@@ -1610,6 +1619,14 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
}
+ else if ( aString.EqualsAscii( "WriteProtectionPassword" ) )
+ {
+ /* This is a hack for #160550# to preserve the write-protection
+ password in an XLS roundtrip. This property MUST NOT be used
+ for any other purpose. This property will be deleted when the
+ feature "Write Protection With Password" will be implemented. */
+ aRet <<= mnXlsWriteProtPass;
+ }
}
return aRet;