diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 09:50:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 11:10:58 +0000 |
commit | f22c19c0a47df4c848b40d78c2788da797f33d09 (patch) | |
tree | 6050b9d3875358043adaffca5f4c1a14577943f4 /filter/source | |
parent | coverity#1267665 Logically dead code (diff) | |
download | core-f22c19c0a47df4c848b40d78c2788da797f33d09.tar.gz core-f22c19c0a47df4c848b40d78c2788da797f33d09.zip |
coverity#1267694 Uncaught exception
Change-Id: Idfa32d54ed8af7eda823da2223cbaaf2f396e8d9
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 57 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.hxx | 7 |
2 files changed, 28 insertions, 36 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index c6da21f3d930..1bbdfc667e14 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -2161,53 +2161,50 @@ void FilterCache::impl_interpretDataVal4Filter(const OUString& sValue, That would be useful to guarantee a consistent cache. -----------------------------------------------*/ void FilterCache::impl_readOldFormat() - throw(css::uno::Exception) { // Attention: Opening/Reading of this old configuration format has to be handled gracefully. // Its optional and should not disturb our normal work! // E.g. we must check, if the package exists ... - - css::uno::Reference< css::container::XNameAccess > xCfg; try { css::uno::Reference< css::uno::XInterface > xInt = impl_openConfig(E_PROVIDER_OLD); - xCfg = css::uno::Reference< css::container::XNameAccess >(xInt, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::container::XNameAccess > xCfg = + css::uno::Reference< css::container::XNameAccess >(xInt, css::uno::UNO_QUERY_THROW); + + OUString TYPES_SET("Types"); + + // May be there is no type set ... + if (xCfg->hasByName(TYPES_SET)) + { + css::uno::Reference< css::container::XNameAccess > xSet; + xCfg->getByName(TYPES_SET) >>= xSet; + const css::uno::Sequence< OUString > lItems = xSet->getElementNames(); + const OUString* pItems = lItems.getConstArray(); + for (sal_Int32 i=0; i<lItems.getLength(); ++i) + m_lTypes[pItems[i]] = impl_readOldItem(xSet, E_TYPE, pItems[i]); + } + + OUString FILTER_SET("Filters"); + // May be there is no filter set ... + if (xCfg->hasByName(FILTER_SET)) + { + css::uno::Reference< css::container::XNameAccess > xSet; + xCfg->getByName(FILTER_SET) >>= xSet; + const css::uno::Sequence< OUString > lItems = xSet->getElementNames(); + const OUString* pItems = lItems.getConstArray(); + for (sal_Int32 i=0; i<lItems.getLength(); ++i) + m_lFilters[pItems[i]] = impl_readOldItem(xSet, E_FILTER, pItems[i]); + } } /* corrupt filter addon ? because it's external (optional) code .. we can ignore it. Addon wont work then ... but that seems to be acceptable. see #139088# for further information */ catch(const css::uno::Exception&) - { return; } - - OUString TYPES_SET("Types"); - - // May be there is no type set ... - if (xCfg->hasByName(TYPES_SET)) - { - css::uno::Reference< css::container::XNameAccess > xSet; - xCfg->getByName(TYPES_SET) >>= xSet; - const css::uno::Sequence< OUString > lItems = xSet->getElementNames(); - const OUString* pItems = lItems.getConstArray(); - for (sal_Int32 i=0; i<lItems.getLength(); ++i) - m_lTypes[pItems[i]] = impl_readOldItem(xSet, E_TYPE, pItems[i]); - } - - OUString FILTER_SET("Filters"); - // May be there is no filter set ... - if (xCfg->hasByName(FILTER_SET)) { - css::uno::Reference< css::container::XNameAccess > xSet; - xCfg->getByName(FILTER_SET) >>= xSet; - const css::uno::Sequence< OUString > lItems = xSet->getElementNames(); - const OUString* pItems = lItems.getConstArray(); - for (sal_Int32 i=0; i<lItems.getLength(); ++i) - m_lFilters[pItems[i]] = impl_readOldItem(xSet, E_FILTER, pItems[i]); } } - - CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::container::XNameAccess >& xSet , EItemType eType, const OUString& sItem) diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx index 1c3d998fc0d2..59339eb88e4c 100644 --- a/filter/source/config/cache/filtercache.hxx +++ b/filter/source/config/cache/filtercache.hxx @@ -905,13 +905,8 @@ class FilterCache : public BaseLock const CacheItem& rItem) throw(css::uno::Exception); - - /** TODO */ - void impl_readOldFormat() - throw(css::uno::Exception); - - + void impl_readOldFormat(); /** TODO */ CacheItem impl_readOldItem(const css::uno::Reference< css::container::XNameAccess >& xSet , |