summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2008-12-01 16:41:51 +0000
committerRelease Engineers <releng@openoffice.org>2008-12-01 16:41:51 +0000
commit0db5af172a377cc7c081c76d68bdbcbdb46515fb (patch)
tree6ef83c8ff465489b7aa7c995e4570429eb9ec4d2 /sfx2
parent66faa30852ccf28403868557db1f8a4cc415b9cc (diff)
CWS-TOOLING: integrate CWS mav42_DEV300
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docinf.cxx26
-rw-r--r--sfx2/source/doc/objcont.cxx12
-rw-r--r--sfx2/source/doc/objmisc.cxx9
3 files changed, 35 insertions, 12 deletions
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 49f8db42dea8..0b33dd3fd93d 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 836c11cfc6d7..a164f9cdf384 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 55419e79f112..6f717e6874ec 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 )
{