so we can drop StringList access from ResourceIndexAccess

Change-Id: Ie855a45f7994e9d58ddecc51b54c25424fc544d6
This commit is contained in:
Caolán McNamara 2017-01-01 20:28:47 +00:00
parent ae7aaf16ab
commit e777637ffc
2 changed files with 2 additions and 7 deletions

View File

@ -97,9 +97,6 @@ Any SAL_CALL ResourceIndexAccess::getByName(const OUString& aName)
case 0:
xResult.set(new ResourceStringIndexAccess(m_pResMgr));
break;
case 1:
xResult.set(new ResourceStringListIndexAccess(m_pResMgr));
break;
default:
throw NoSuchElementException();
}
@ -112,9 +109,8 @@ Sequence<OUString> SAL_CALL ResourceIndexAccess::getElementNames( )
static Sequence<OUString> aResult;
if( aResult.getLength() == 0)
{
aResult.realloc(2);
aResult.realloc(1);
aResult[0] = "String";
aResult[1] = "StringList";
}
return aResult;
}

View File

@ -32,9 +32,8 @@ namespace extensions { namespace resource
/** The ctor takes a sequence with one element: the name of the resource, e.g. svt */
ResourceIndexAccess(css::uno::Sequence< css::uno::Any> const& rArgs, css::uno::Reference< css::uno::XComponentContext> const&);
// XNameAccess
// The XNameAccess provides access to two named elements:
// The XNameAccess provides access to one named elements:
// "String" returns a XIndexAccess to String resources
// "StringList" returns a XIndexAccess to StringList/StringArray resources
virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException, std::exception) override;