diff options
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 7 |
2 files changed, 5 insertions, 13 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c1c645562cb4..07a3c6dbe5c0 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2278,14 +2278,9 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, if (xModifiable.is() && xModifiable->isModified()) { uno::Reference<embed::XEmbedPersist> const xPers(xObj, uno::UNO_QUERY); - if (xPers.is()) - { // store it before resetting modified! - xPers->storeOwn(); - } - else - { - SAL_WARN("sfx.doc", "Modified object without persistence!"); - } + assert(xPers.is() && "Modified object without persistence!"); + // store it before resetting modified! + xPers->storeOwn(); xModifiable->setModified(sal_False); } } diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index f3f53c1a4f49..2f3b75a8aab4 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -864,11 +864,8 @@ bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, cons if( xMod.is() && xMod->isModified() ) { uno::Reference < embed::XEmbedPersist > xPers( xObj, uno::UNO_QUERY ); - if ( xPers.is() ) - xPers->storeOwn(); - else { - OSL_FAIL("Modified object without persistence in cache!"); - } + assert(xPers.is() && "Modified object without persistence in cache!"); + xPers->storeOwn(); } // setting object to loaded state will remove it from cache |