summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-20 10:45:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-20 11:11:45 +0100
commit2b8113a31da85d685306dcfa123632d2f11e3ee9 (patch)
tree3584295c10f2ca299b32b6401cf5096652453230 /sw/source/filter/ww8/ww8par5.cxx
parent55b8a3013a9a8c23bf920be4f8f35e401ea5fb26 (diff)
survive missing storage
Diffstat (limited to 'sw/source/filter/ww8/ww8par5.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index c28e1a22eeef..ba49306d312c 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -773,21 +773,24 @@ sal_uInt16 SwWW8ImplReader::End_Field()
// Store it now!
uno::Reference< embed::XStorage > xDocStg = GetDoc().GetDocStorage();
- uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::WRITE );
- SotStorageRef xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId );
-
- if ( xObjDst.Is() )
+ if (xDocStg.is())
{
- xSrc1->CopyTo( xObjDst );
+ uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::WRITE );
+ SotStorageRef xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId );
- if ( !xObjDst->GetError() )
- xObjDst->Commit();
- }
+ if ( xObjDst.Is() )
+ {
+ xSrc1->CopyTo( xObjDst );
- uno::Reference< embed::XTransactedObject > xTransact( xOleStg, uno::UNO_QUERY );
- if ( xTransact.is() )
- xTransact->commit();
+ if ( !xObjDst->GetError() )
+ xObjDst->Commit();
+ }
+
+ uno::Reference< embed::XTransactedObject > xTransact( xOleStg, uno::UNO_QUERY );
+ if ( xTransact.is() )
+ xTransact->commit();
+ }
// Store the OLE Id as a parameter
pFieldmark->GetParameters()->insert(