diff options
author | David Tardon <dtardon@redhat.com> | 2017-01-11 17:27:42 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-01-11 17:35:35 +0100 |
commit | d9d14d0a4c4470de19b81d0df64e8635bb720560 (patch) | |
tree | a6835b6524921f13f51d7db74a234ba35b90eb85 /writerperfect | |
parent | c2447d0b6aeffe0c76a549467036df573642a303 (diff) |
astyle
Change-Id: Iee24a1b7bc4ada389dfa5f0f39c9d06938ed1481
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/source/calc/MSWorksCalcImportFilter.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index cff8a02c2d39..1c80fa79bcf7 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -133,39 +133,39 @@ public: } /** return a new stream for a ole zone */ librevenge::RVNGInputStream *getSubStreamByName(const char *name) override -{ - if (m_nameToPathMap.find(name)== m_nameToPathMap.end() || !m_xContent.is()) return nullptr; - - try { - const uno::Reference<sdbc::XResultSet> xResultSet=getResultSet(m_xContent); - if (xResultSet.is() && xResultSet->first()) + if (m_nameToPathMap.find(name)== m_nameToPathMap.end() || !m_xContent.is()) return nullptr; + + try { - const uno::Reference<ucb::XContentAccess> xContentAccess(xResultSet, uno::UNO_QUERY_THROW); - const uno::Reference<sdbc::XRow> xRow(xResultSet, uno::UNO_QUERY_THROW); - OUString lPath=m_nameToPathMap.find(name)->second; - do + const uno::Reference<sdbc::XResultSet> xResultSet=getResultSet(m_xContent); + if (xResultSet.is() && xResultSet->first()) { - const rtl::OUString aTitle(xRow->getString(1)); - if (aTitle != lPath) continue; - - const uno::Reference<ucb::XContent> xSubContent(xContentAccess->queryContent()); - ucbhelper::Content aSubContent(xSubContent, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext()); - uno::Reference<io::XInputStream> xInputStream = aSubContent.openStream(); - if (xInputStream.is()) - return new writerperfect::WPXSvInputStream(xInputStream); - break; + const uno::Reference<ucb::XContentAccess> xContentAccess(xResultSet, uno::UNO_QUERY_THROW); + const uno::Reference<sdbc::XRow> xRow(xResultSet, uno::UNO_QUERY_THROW); + OUString lPath=m_nameToPathMap.find(name)->second; + do + { + const rtl::OUString aTitle(xRow->getString(1)); + if (aTitle != lPath) continue; + + const uno::Reference<ucb::XContent> xSubContent(xContentAccess->queryContent()); + ucbhelper::Content aSubContent(xSubContent, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext()); + uno::Reference<io::XInputStream> xInputStream = aSubContent.openStream(); + if (xInputStream.is()) + return new writerperfect::WPXSvInputStream(xInputStream); + break; + } + while (xResultSet->next()); } - while (xResultSet->next()); } - } - catch (...) - { - SAL_WARN("writerperfect", "ignoring Exception in MSWorksCalcImportFilterInternal::FolderStream::getSubStreamByName"); - } + catch (...) + { + SAL_WARN("writerperfect", "ignoring Exception in MSWorksCalcImportFilterInternal::FolderStream::getSubStreamByName"); + } - return nullptr; -} + return nullptr; + } /** return a new stream for a ole zone */ librevenge::RVNGInputStream *getSubStreamById(unsigned id) override { |