summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-27 13:42:36 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-27 13:42:36 +0000
commitb45c680da2fe352fcfb4fad4282f4c30c41ad34f (patch)
treefea25be557edce76bfae6f7008b290e85df6db14 /sfx2
parent1d03c9e52e8bd57dfe5660f7efec7b276aaa47d1 (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')
-rw-r--r--sfx2/source/doc/objcont.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 199a3795fc..341592a14b 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 )