diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-01 20:30:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-01 20:30:03 +0000 |
commit | 705b43516215b67683ea0436c42bf5cada7ed445 (patch) | |
tree | 674f16dc5781ea58fe13473d7e742b38f8fa00ad /extensions | |
parent | e777637ffccd88a7aa51dc93bcf1744eb5367fd5 (diff) |
so ResourceStringListIndexAccess isn't needed
Change-Id: Ic25fc6f2f8f3e471a90e10c3f2319f40888520e6
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/resource/ResourceIndexAccess.cxx | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx index 6f24b2be682e..2edb7ccc91c1 100644 --- a/extensions/source/resource/ResourceIndexAccess.cxx +++ b/extensions/source/resource/ResourceIndexAccess.cxx @@ -69,18 +69,6 @@ namespace virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException, std::exception) override { return ::cppu::UnoType<OUString>::get(); }; }; - - class ResourceStringListIndexAccess : public ResourceIndexAccessBase - { - public: - explicit ResourceStringListIndexAccess(const std::shared_ptr<ResMgr>& pResMgr) - : ResourceIndexAccessBase(pResMgr) {} - // XIndexAccess - virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - // XElementAccessBase - virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException, std::exception) override - { return cppu::UnoType<Sequence<PropertyValue>>::get(); }; - }; } ResourceIndexAccess::ResourceIndexAccess(Sequence<Any> const& rArgs, Reference<XComponentContext> const&) @@ -140,30 +128,4 @@ Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) return makeAny(aId.toString()); } -Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx) - throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception) -{ - if(nIdx > SAL_MAX_UINT16 || nIdx < 0) - throw IndexOutOfBoundsException(); - SolarMutexGuard aGuard; - - if(!m_pResMgr.get()) - throw RuntimeException("resource manager not available"); - - const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr); - aId.SetRT(RSC_STRINGARRAY); - if(!m_pResMgr->IsAvailable(aId)) - throw RuntimeException("string list resource for id not available"); - const ResStringArray aStringList(aId); - Sequence<PropertyValue> aPropList(aStringList.Count()); - for(sal_Int32 nCount = 0; nCount != aPropList.getLength(); ++nCount) - { - aPropList[nCount].Name = aStringList.GetString(nCount); - aPropList[nCount].Handle = -1; - aPropList[nCount].Value <<= aStringList.GetValue(nCount); - aPropList[nCount].State = PropertyState_DIRECT_VALUE; - } - return makeAny(aPropList); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |