diff options
author | Release Engineers <releng@openoffice.org> | 2008-12-01 16:41:51 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2008-12-01 16:41:51 +0000 |
commit | 349503971a68afef19df9b05d00f9897915e49e3 (patch) | |
tree | b9eb2b4968f306a4f55f96e842275216c54d554e /sfx2 | |
parent | bbbbee3b5ebca6344d91d1a2b45332fc72893327 (diff) |
CWS-TOOLING: integrate CWS mav42_DEV300
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docinf.cxx | 26 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 9 |
3 files changed, 35 insertions, 12 deletions
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index f540f01322..d1e7203e0c 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: docinf.cxx,v $ - * $Revision: 1.54 $ + * $Revision: 1.54.174.2 $ * * This file is part of OpenOffice.org. * @@ -117,8 +117,11 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( i_xDocProps->setPrintDate( aInvalid ); if( xGlobSect->GetStringValue( aStrValue, PROPID_REVNUMBER ) ) - i_xDocProps->setEditingCycles( - static_cast< sal_Int16 >( aStrValue.ToInt32() ) ); + { + sal_Int16 nRevision = static_cast< sal_Int16 >( aStrValue.ToInt32() ); + if ( nRevision > 0 ) + i_xDocProps->setEditingCycles( nRevision ); + } if( xGlobSect->GetFileTimeValue( aDateTime, PROPID_EDITTIME ) ) { @@ -126,11 +129,18 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( aDateTime.Year -= 1601; aDateTime.Month -= 1; aDateTime.Day -= 1; - i_xDocProps->setEditingDuration( - aDateTime.Day * 60*60*24 + - aDateTime.Hours * 60*60 + - aDateTime.Minutes * 60 + - aDateTime.Seconds ); + try + { + i_xDocProps->setEditingDuration( + aDateTime.Day * 60*60*24 + + aDateTime.Hours * 60*60 + + aDateTime.Minutes * 60 + + aDateTime.Seconds ); + } + catch (lang::IllegalArgumentException &) + { + // ignore + } } } diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 341592a14b..fe56d8c937 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -514,9 +514,15 @@ void SfxObjectShell::UpdateTime_Impl( } pImp->nTime = aNow; - i_xDocProps->setEditingDuration( - aOldTime.GetHour()*3600+aOldTime.GetMin()*60+aOldTime.GetSec()); - i_xDocProps->setEditingCycles(i_xDocProps->getEditingCycles() + 1); + try { + i_xDocProps->setEditingDuration( + aOldTime.GetHour()*3600+aOldTime.GetMin()*60+aOldTime.GetSec()); + i_xDocProps->setEditingCycles(i_xDocProps->getEditingCycles() + 1); + } + catch (lang::IllegalArgumentException &) + { + // ignore overflow + } } //-------------------------------------------------------------------- diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 4b80f4c358..a2659374c4 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1879,7 +1879,14 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV ) xDocProps->setAutoloadURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) ); } - xDocProps->setAutoloadSecs( nTime ); + try + { + xDocProps->setAutoloadSecs( nTime ); + } + catch (lang::IllegalArgumentException &) + { + // ignore + } } else if( rKV.GetKey().CompareIgnoreCaseToAscii( "expires" ) == COMPARE_EQUAL ) { |