summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 13:08:56 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 13:08:56 +0000
commit8115b282f1b0625f4c72fdf93a6357b350d86bd7 (patch)
tree6f665095bd7753b82006d9a04a23c86f7bfdcf3f /package
parent99a5570135ec89b795ba2efe3437924a2460a717 (diff)
INTEGRATION: CWS insight01 (1.6.14); FILE MERGED
2004/07/30 08:23:30 oj 1.6.14.4: RESYNC: (1.8-1.9); FILE MERGED 2004/07/01 15:00:05 mav 1.6.14.3: #i30983# merge fix from mav09 cws 2004/05/28 20:23:56 oj 1.6.14.2: RESYNC: (1.6-1.8); FILE MERGED 2004/03/12 14:35:41 mav 1.6.14.1: #i29398# the access mode to substorage is a virtual information
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/xstorage.cxx60
1 files changed, 34 insertions, 26 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 7d25a21cbfce..d7a37d92e9e5 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xstorage.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-07-23 11:13:03 $
+ * last change: $Author: hr $ $Date: 2004-08-02 14:08:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -688,8 +688,13 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
// TODO: copy encrypted element
if ( !pElement->m_pStream->IsEncrypted() )
{
+<<<<<<< xstorage.cxx
+ uno::Reference< io::XStream > xSubStr =
+ xDest->openStreamElement( pElement->m_aName,
+=======
uno::Reference< io::XStream > xSubStr =
xDest->openStreamElement( aName,
+>>>>>>> 1.9
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
OSL_ENSURE( xSubStr.is(), "No destination substream!\n" );
@@ -697,8 +702,13 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
}
else if ( pElement->m_pStream->HasCachedPassword() && pElement->m_pStream->IsModified() )
{
+<<<<<<< xstorage.cxx
+ uno::Reference< io::XStream > xSubStr =
+ xDest->openEncryptedStreamElement( pElement->m_aName,
+=======
uno::Reference< io::XStream > xSubStr =
xDest->openEncryptedStreamElement( aName,
+>>>>>>> 1.9
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE,
pElement->m_pStream->GetCachedPassword() );
OSL_ENSURE( xSubStr.is(), "No destination substream!\n" );
@@ -1591,8 +1601,15 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone
xComponent->addEventListener( uno::Reference< lang::XEventListener >(
static_cast< ::cppu::OWeakObject* >( m_pData->m_pSubElDispListener ), uno::UNO_QUERY ) );
+<<<<<<< xstorage.cxx
+
+ sal_Int32 nLength = m_pData->m_aOpenSubComponentsList.getLength();
+ m_pData->m_aOpenSubComponentsList.realloc( nLength + 1 );
+ m_pData->m_aOpenSubComponentsList[nLength] = xComponent;
+=======
m_pData->m_aOpenSubComponentsList.push_back( xComponent );
+>>>>>>> 1.9
}
//____________________________________________________________________________________________________
@@ -1918,30 +1935,21 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
}
else
{
- if ( ( nStorageMode & embed::ElementModes::WRITE )
- && !( pElement->m_pStorage->m_nStorageMode & embed::ElementModes::WRITE ) )
- {
- delete pElement->m_pStorage;
- pElement->m_pStorage = NULL;
- }
- else
- {
- // in case parent storage allows writing the readonly mode of the child storage is
- // virtual, that means that it is just enough to change the flag to let it be writable
- // and since there is no AntiImpl nobody should be notified about it
- pElement->m_pStorage->m_nStorageMode = nStorageMode | embed::ElementModes::READ;
+ // in case parent storage allows writing the readonly mode of the child storage is
+ // virtual, that means that it is just enough to change the flag to let it be writable
+ // and since there is no AntiImpl nobody should be notified about it
+ pElement->m_pStorage->m_nStorageMode = nStorageMode | embed::ElementModes::READ;
- if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) )
- {
- for ( SotElementList_Impl::iterator pElementIter = pElement->m_pStorage->m_aChildrenList.begin();
- pElementIter != pElement->m_pStorage->m_aChildrenList.end(); )
- {
- SotElement_Impl* pElementToDel = (*pElementIter);
- pElementIter++;
-
- m_pImpl->RemoveElement( pElementToDel );
- }
- }
+ if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) )
+ {
+ for ( SotElementList_Impl::iterator pElementIter = pElement->m_pStorage->m_aChildrenList.begin();
+ pElementIter != pElement->m_pStorage->m_aChildrenList.end(); )
+ {
+ SotElement_Impl* pElementToDel = (*pElementIter);
+ pElementIter++;
+
+ m_pImpl->RemoveElement( pElementToDel );
+ }
}
}
}
@@ -2833,7 +2841,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa
return uno::makeAny( sal_False ); // RepairPackage
}
- else if ( aPropertyName.equalsAscii( "HasEncriptedEntries" ) )
+ else if ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) )
{
try {
m_pImpl->ReadContents();