summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2009-11-19 11:36:38 +0000
committerMikhail Voitenko <mav@openoffice.org>2009-11-19 11:36:38 +0000
commitcac6eb1698182093fc708ccc5c378bbefc406d7c (patch)
treecb8d10f26ef56d9097e0ba66bfab4ab52c8216d1 /sfx2
parent875ac20478f16e5107acb222c0b851b99d2e0f27 (diff)
#i106854# check the date of the original file
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 302233a93ad7..4d3e025719dd 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -590,11 +590,14 @@ sal_Bool SfxMedium::DocNeedsFileDateCheck()
//------------------------------------------------------------------
util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue )
{
- if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && GetContent().is() )
+ if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && aLogicName.Len() )
{
try
{
- pImp->aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= pImp->m_aDateTime;
+ uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv;
+ ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv );
+
+ aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= pImp->m_aDateTime;
pImp->m_bGotDateTime = sal_True;
}
catch ( ::com::sun::star::uno::Exception& )