Kaydet (Commit) dc65b024 authored tarafından David Tardon's avatar David Tardon

astyle

Change-Id: I733f1f777bbe30f3ce8b15b60fe56b8dba240ffd
üst 773bb53d
...@@ -117,50 +117,50 @@ DirectoryStream::~DirectoryStream() ...@@ -117,50 +117,50 @@ DirectoryStream::~DirectoryStream()
DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent) DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent)
{ {
try try
{ {
if (!xContent.is()) if (!xContent.is())
return 0; return 0;
DirectoryStream *pDir(0); DirectoryStream *pDir(0);
const uno::Reference<container::XChild> xChild(xContent, uno::UNO_QUERY); const uno::Reference<container::XChild> xChild(xContent, uno::UNO_QUERY);
if (xChild.is()) if (xChild.is())
{
const uno::Reference<ucb::XContent> xDirContent(xChild->getParent(), uno::UNO_QUERY);
if (xDirContent.is())
{ {
pDir = new writerperfect::DirectoryStream(xDirContent); const uno::Reference<ucb::XContent> xDirContent(xChild->getParent(), uno::UNO_QUERY);
if (!pDir->isStructured()) if (xDirContent.is())
{ {
delete pDir; pDir = new writerperfect::DirectoryStream(xDirContent);
pDir = 0; if (!pDir->isStructured())
{
delete pDir;
pDir = 0;
}
} }
} }
}
return pDir; return pDir;
} }
catch (...) catch (...)
{ {
return 0; return 0;
} }
} }
bool DirectoryStream::isDirectory(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent) bool DirectoryStream::isDirectory(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent)
{ {
try try
{ {
if (!xContent.is()) if (!xContent.is())
return false; return false;
ucbhelper::Content aContent(xContent, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext()); ucbhelper::Content aContent(xContent, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext());
return aContent.isFolder(); return aContent.isFolder();
} }
catch (...) catch (...)
{ {
return false; return false;
} }
} }
bool DirectoryStream::isStructured() bool DirectoryStream::isStructured()
......
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