Kaydet (Commit) 6f531db2 authored tarafından Caolán McNamara's avatar Caolán McNamara

add salhelper::LinkResolver

üst f6a80c4d
......@@ -52,6 +52,7 @@
#include "boost/scoped_array.hpp"
#include "boost/shared_ptr.hpp"
#include <comphelper/processfactory.hxx>
#include <salhelper/linkhelper.hxx>
#ifdef WNT
#define UNICODE
......@@ -145,18 +146,13 @@ bool existsOfficePipe()
//get modification time
static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
{
::osl::DirectoryItem item;
if (::osl::DirectoryItem::get(rFileURL, item) != ::osl::File::E_None)
return false;
salhelper::LinkResolver aResolver(osl_FileStatus_Mask_ModifyTime);
::osl::FileStatus stat(osl_FileStatus_Mask_ModifyTime|osl_FileStatus_Mask_Type|osl_FileStatus_Mask_LinkTargetURL);
if (item.getFileStatus(stat) != ::osl::File::E_None)
if (aResolver.fetchFileStatus(rFileURL) != osl::FileBase::E_None)
return false;
if( stat.getFileType() == ::osl::FileStatus::Link )
return getModifyTimeTargetFile(stat.getLinkTargetURL(), rTime);
rTime = aResolver.m_aStatus.getModifyTime();
rTime = stat.getModifyTime();
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment