summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-09 14:39:42 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-09 14:39:42 +0000
commit7ddbc4637b53141190041e494b6cf8bc1fe31e59 (patch)
tree2ed5bd08369c02db4ca1a7a9d418082de5ee7762 /package
parent138364a85a34ecd26ee877d4522eb33d9b67df4f (diff)
INTEGRATION: CWS tdoc3 (1.13.12); FILE MERGED
2004/11/03 13:08:30 kso 1.13.12.4: i36554# - parent storage must be set to modified on commit of child. 2004/11/03 12:27:16 mav 1.13.12.3: #i36554# the storage is modified only after the new child is commited 2004/11/01 16:58:25 kso 1.13.12.2: #i36025# - removeElement, renamElement, moveElementTo must set internal state to 'modified' on success. 2004/11/01 10:35:09 mav 1.13.12.1: #i36346# transfer the mediatype for empty storages
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/xstorage.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 3931bdbf8..ac2561972 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xstorage.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: kz $ $Date: 2004-10-04 21:08:31 $
+ * last change: $Author: rt $ $Date: 2004-11-09 15:39:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -772,8 +772,17 @@ void OStorage_Impl::Commit()
// nothing was changed, but a new empty storage must be marked as commited one
ReadContents();
if ( !m_bIsRoot && !m_aChildrenList.size() )
+ {
+ // move properties to the destination package folder
+ uno::Reference< beans::XPropertySet > xProps( m_xPackageFolder, uno::UNO_QUERY_THROW );
+ xProps->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), uno::makeAny( m_aMediaType ) );
+
m_bCommited = sal_True;
+ if ( m_pParent )
+ m_pParent->SetModifiedInternally( sal_True );
+ }
+
return;
}
@@ -1182,7 +1191,6 @@ SotElement_Impl* OStorage_Impl::InsertStorage( ::rtl::OUString aName, sal_Int32
pNewElement->m_pStorage = new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xFactory );
m_aChildrenList.push_back( pNewElement );
- SetModifiedInternally( sal_True );
return pNewElement;
}
@@ -2167,6 +2175,7 @@ void SAL_CALL OStorage::removeElement( const ::rtl::OUString& aElementName )
throw container::NoSuchElementException(); //???
m_pImpl->RemoveElement( pElement );
+ m_pImpl->SetModifiedInternally( sal_True );
}
//-----------------------------------------------
@@ -2199,6 +2208,7 @@ void SAL_CALL OStorage::renameElement( const ::rtl::OUString& aElementName, cons
throw container::NoSuchElementException(); //???
pElement->m_aName = aNewName;
+ m_pImpl->SetModifiedInternally( sal_True );
}
//-----------------------------------------------
@@ -2275,6 +2285,7 @@ void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName,
m_pImpl->CopyStorageElement( pElement, xDest, aNewName );
m_pImpl->RemoveElement( pElement );
+ m_pImpl->SetModifiedInternally( sal_True );
}
void SAL_CALL OStorage::insertRawEncrStreamElement( const ::rtl::OUString& aStreamName,