diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-09-13 15:25:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-09-16 13:29:48 +0200 |
commit | 348a03f3e47b89609ca3843b52da129df15e68f8 (patch) | |
tree | b0a2439e7e26b0d37ae713b901805135d335bcef /unoidl | |
parent | 342b1895d768dc633c3067df6618cd3567b72a6d (diff) |
Hook SourceProvider into unoidl::loadProvider
Change-Id: I0a499fd98a1008ced0efdeec3b10bff30df57c0e
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/unoidl.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/unoidl/source/unoidl.cxx b/unoidl/source/unoidl.cxx index a9939e4b9755..bdc7b98ed0d4 100644 --- a/unoidl/source/unoidl.cxx +++ b/unoidl/source/unoidl.cxx @@ -12,10 +12,13 @@ #include <set> #include <vector> +#include "osl/file.h" +#include "osl/file.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "unoidl/legacyprovider.hxx" +#include "unoidl/sourceprovider.hxx" #include "unoidl/unoidl.hxx" #include "unoidl/unoidlprovider.hxx" @@ -104,6 +107,15 @@ Provider::~Provider() throw () {} rtl::Reference< Provider > loadProvider( rtl::Reference< Manager > const & manager, OUString const & uri) { + osl::DirectoryItem item; + if (osl::DirectoryItem::get(uri, item) == osl::FileBase::E_None) { + osl::FileStatus status(osl_FileStatus_Mask_Type); + if (item.getFileStatus(status) == osl::FileBase::E_None + && status.getFileType() == osl::FileStatus::Directory) + { + return new SourceProvider(manager, uri); + } + } try { return new UnoidlProvider(uri); } catch (FileFormatException & e) { |