summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-10-11 06:47:22 +0000
committerMathias Bauer <mba@openoffice.org>2001-10-11 06:47:22 +0000
commit31557bd63dd57b8ec5d68fe3d40f4c5c064a6dee (patch)
treec28f08bdeb2fa73491d3ed19e0aa9dca30ee92ff /sot/source
parent42304467ac08f24b20c1a52b3798574845518f54 (diff)
#92510#: avoid element not loaded exception
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index cba522ae8b32..18cd35c58741 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -291,6 +291,8 @@ struct UCBStorageElement_Impl
String GetContentType();
void SetContentType( const String& );
String GetOriginalContentType();
+ BOOL IsLoaded()
+ { return m_xStream.Is() || m_xStorage.Is(); }
};
::ucb::Content* UCBStorageElement_Impl::GetContent()
@@ -1483,7 +1485,7 @@ sal_Int16 UCBStorage_Impl::Commit()
pContent->setPropertyValue( ::rtl::OUString::createFromAscii("Title"), aAny );
}
- if ( pElement->GetContentType() != pElement->GetOriginalContentType() )
+ if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() )
{
// errors will be caught in the "catch" statement outside the loop
nRet = COMMIT_RESULT_SUCCESS;