diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 13:42:36 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 13:42:36 +0000 |
commit | 2964087da5b91d24b9c9459a1fbaca02c70a14f2 (patch) | |
tree | b10b58a0f8c8e3c3719eb461208c1128e3ebcc35 /sfx2/source/doc | |
parent | 3a84f833437f2968a97ce0f50e6671c4a195805b (diff) |
INTEGRATION: CWS fwk97_DEV300 (1.76.42); FILE MERGED
2008/08/22 14:43:11 mst 1.76.42.1: workaround for 158429 (stack id 6011):
- sfx2/source/doc/doctemplates.cxx:
+ SfxDocTplService_Impl::init_Impl:
handle exceptions thrown by failing DocumentProperties creation
(there have been 20 crash reports on this last week)
- sfx2/source/doc/objcont.cxx:
+ SfxObjectShell::UpdateFromTemplate_Impl: handle similar case here as well
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 04fea5e2aeb6..836c11cfc6d7 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: objcont.cxx,v $ - * $Revision: 1.77 $ + * $Revision: 1.78 $ * * This file is part of OpenOffice.org. * @@ -1266,27 +1266,27 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) // load document info of template BOOL bOK = FALSE; util::DateTime aTemplDate; - Reference < document::XStandaloneDocumentInfo > xDocInfo ( - ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.StandaloneDocumentInfo") ) ), UNO_QUERY ); - Reference < beans::XFastPropertySet > xSet( xDocInfo, UNO_QUERY ); - if ( xDocInfo.is() && xSet.is() ) + try { - try - { - xDocInfo->loadFromURL( aTemplURL ); - Any aAny = xSet->getFastPropertyValue( WID_DATE_MODIFIED ); - ::com::sun::star::util::DateTime aTmp; - if ( aAny >>= aTemplDate ) - { - // get modify date from document info - bOK = TRUE; - } - } - catch ( Exception& ) + Reference < document::XStandaloneDocumentInfo > xDocInfo ( + ::comphelper::getProcessServiceFactory()->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.document.StandaloneDocumentInfo") ) ), + UNO_QUERY_THROW ); + Reference < beans::XFastPropertySet > xSet( xDocInfo, + UNO_QUERY_THROW ); + xDocInfo->loadFromURL( aTemplURL ); + Any aAny = xSet->getFastPropertyValue( WID_DATE_MODIFIED ); + ::com::sun::star::util::DateTime aTmp; + if ( aAny >>= aTemplDate ) { + // get modify date from document info + bOK = TRUE; } } + catch ( Exception& ) + { + } // if modify date was read successfully if ( bOK ) |