summaryrefslogtreecommitdiff
path: root/package/source/xstor/xstorage.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-10-14 16:58:08 +0000
committerKurt Zenker <kz@openoffice.org>2009-10-14 16:58:08 +0000
commitdd74e6d59eab15a9ad7c674372293a7d3dbad975 (patch)
tree476cd284f1003569e254ff567be850908f07aea7 /package/source/xstor/xstorage.cxx
parent9033e68b120609c2817915b9b6c024a395f09280 (diff)
CWS-TOOLING: integrate CWS fwk121
2009-09-30 11:20:33 +0200 mav r276548 : #i105387# allow manifest.xml have no ODF version attribute even for ODF1.2 2009-09-30 10:54:46 +0200 mav r276545 : #i105387# allow manifest.xml have no ODF version attribute even for ODF1.2 2009-09-30 10:02:12 +0200 mav r276543 : #i105082# integrating the fix from fwk117, since it is necessary for some scenarios fixed in this cws 2009-09-30 07:33:48 +0200 jsc r276537 : #i105360# explicitly flush OStorageStream after write operations and OStoreFile when registry file is closed 2009-09-29 14:15:09 +0200 jsc r276528 : #i105360# explicitly flush OStorageStream after write operations and OStoreFile when registry file is closed 2009-09-29 09:45:28 +0200 dr r276507 : #i105325# set correct format while opening zip package 2009-09-28 18:46:45 +0200 mav r276500 : CWS-TOOLING: rebase CWS fwk121 to trunk@276429 (milestone: DEV300:m60)
Diffstat (limited to 'package/source/xstor/xstorage.cxx')
-rw-r--r--package/source/xstor/xstorage.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 4d0af7bb7619..74c30049e9bd 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -4780,7 +4780,10 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
//TODO: think about interaction handler
- if ( m_pData->m_bReadOnlyWrap )
+ // WORKAROUND:
+ // The old document might have no version in the manifest.xml, so we have to allow to set the version
+ // even for readonly storages, so that the version from content.xml can be used.
+ if ( m_pData->m_bReadOnlyWrap && !aPropertyName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) )
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); // TODO: Access denied
if ( m_pData->m_nStorageType == ZIP_STORAGE )
@@ -4800,11 +4803,16 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
aValue >>= m_pImpl->m_aVersion;
m_pImpl->m_bControlVersion = sal_True;
- m_pImpl->m_bBroadcastModified = sal_True;
- m_pImpl->m_bIsModified = sal_True;
+ // this property can be set even for readonly storage
+ if ( !m_pData->m_bReadOnlyWrap )
+ {
+ m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bIsModified = sal_True;
+ }
}
else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
|| aPropertyName.equalsAscii( "HasNonEncryptedEntries" )
+ || aPropertyName.equalsAscii( "IsInconsistent" )
|| aPropertyName.equalsAscii( "URL" )
|| aPropertyName.equalsAscii( "RepairPackage" ) )
|| aPropertyName.equalsAscii( "IsRoot" )
@@ -4939,7 +4947,9 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa
return uno::makeAny( sal_False ); // RepairPackage
}
else if ( m_pData->m_nStorageType == PACKAGE_STORAGE
- && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) ) )
+ && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
+ || aPropertyName.equalsAscii( "HasNonEncryptedEntries" )
+ || aPropertyName.equalsAscii( "IsInconsistent" ) ) )
{
try {
m_pImpl->ReadContents();