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

add salhelper::LinkResolver

üst f6a80c4d
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "boost/scoped_array.hpp" #include "boost/scoped_array.hpp"
#include "boost/shared_ptr.hpp" #include "boost/shared_ptr.hpp"
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <salhelper/linkhelper.hxx>
#ifdef WNT #ifdef WNT
#define UNICODE #define UNICODE
...@@ -145,18 +146,13 @@ bool existsOfficePipe() ...@@ -145,18 +146,13 @@ bool existsOfficePipe()
//get modification time //get modification time
static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime) static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
{ {
::osl::DirectoryItem item; salhelper::LinkResolver aResolver(osl_FileStatus_Mask_ModifyTime);
if (::osl::DirectoryItem::get(rFileURL, item) != ::osl::File::E_None)
return false;
::osl::FileStatus stat(osl_FileStatus_Mask_ModifyTime|osl_FileStatus_Mask_Type|osl_FileStatus_Mask_LinkTargetURL); if (aResolver.fetchFileStatus(rFileURL) != osl::FileBase::E_None)
if (item.getFileStatus(stat) != ::osl::File::E_None)
return false; return false;
if( stat.getFileType() == ::osl::FileStatus::Link ) rTime = aResolver.m_aStatus.getModifyTime();
return getModifyTimeTargetFile(stat.getLinkTargetURL(), rTime);
rTime = stat.getModifyTime();
return true; 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