diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-11 13:12:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-28 08:25:24 +0200 |
commit | 77856e81ce4d279f00d0f92e917099f4f5220034 (patch) | |
tree | b2d006504cb2cb4cf678877de5a27f1b1dbc862a /xmloff | |
parent | ce1b932bba8f90363399a9fa6515b91d7d679efa (diff) |
fdo#46808, Adapt document::*PropertyValues UNO service to new style
The services are:
document::NamedPropertyValues
document::IndexedPropertyValues
The services already existed, they just did not have IDL files
Change-Id: Ibafe9b5afb9b30785df4f66aa923f4b96ceabeed
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmloff/XMLSettingsExportContext.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 70 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 185 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsexport.cxx | 6 |
5 files changed, 113 insertions, 162 deletions
diff --git a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx index 7859b387734b..46e51baa69aa 100644 --- a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx +++ b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx @@ -20,7 +20,7 @@ #ifndef XML_SETTINGS_EXPORT_CONTEXT_HXX #define XML_SETTINGS_EXPORT_CONTEXT_HXX -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include "xmloff/xmltoken.hxx" @@ -46,8 +46,8 @@ namespace xmloff virtual void Characters( const ::rtl::OUString& i_rCharacters ) = 0; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - GetServiceFactory() const = 0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + GetComponentContext() const = 0; protected: ~XMLSettingsExportContext() {} diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 6ec025ce021a..c0dc4ce7e135 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -41,6 +41,8 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> +#include <com/sun/star/document/IndexedPropertyValues.hpp> +#include <com/sun/star/document/NamedPropertyValues.hpp> #include <rtl/ustrbuf.hxx> #include <xmlenums.hxx> @@ -52,13 +54,10 @@ class XMLMyList std::list<beans::PropertyValue> aProps; sal_uInt32 nCount; - // #110680# - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; public: - // #110680# - XMLMyList(const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory); - ~XMLMyList(); + XMLMyList(const uno::Reference<uno::XComponentContext>& rxContext); void push_back(beans::PropertyValue& aProp) { aProps.push_back(aProp); nCount++; } uno::Sequence<beans::PropertyValue> GetSequence(); @@ -66,17 +65,11 @@ public: uno::Reference<container::XIndexContainer> GetIndexContainer(); }; -// #110680# -XMLMyList::XMLMyList(const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory) +XMLMyList::XMLMyList(const uno::Reference<uno::XComponentContext>& rxContext) : nCount(0), - mxServiceFactory(xServiceFactory) -{ - DBG_ASSERT( mxServiceFactory.is(), "got no service manager" ); -} - -// #110680# -XMLMyList::~XMLMyList() + m_xContext(rxContext) { + DBG_ASSERT( rxContext.is(), "got no service manager" ); } uno::Sequence<beans::PropertyValue> XMLMyList::GetSequence() @@ -100,48 +93,29 @@ uno::Sequence<beans::PropertyValue> XMLMyList::GetSequence() uno::Reference<container::XNameContainer> XMLMyList::GetNameContainer() { - uno::Reference<container::XNameContainer> xNameContainer; - - // #110680# - - if( mxServiceFactory.is() ) + uno::Reference<container::XNameContainer> xNameContainer = document::NamedPropertyValues::create(m_xContext); + std::list<beans::PropertyValue>::iterator aItr = aProps.begin(); + while (aItr != aProps.end()) { - rtl::OUString sName("com.sun.star.document.NamedPropertyValues"); - xNameContainer = uno::Reference<container::XNameContainer>(mxServiceFactory->createInstance(sName), uno::UNO_QUERY); - if (xNameContainer.is()) - { - std::list<beans::PropertyValue>::iterator aItr = aProps.begin(); - while (aItr != aProps.end()) - { - xNameContainer->insertByName(aItr->Name, aItr->Value); - ++aItr; - } - } + xNameContainer->insertByName(aItr->Name, aItr->Value); + ++aItr; } + return xNameContainer; } uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer() { - uno::Reference<container::XIndexContainer> xIndexContainer; - // #110680# - - if( mxServiceFactory.is() ) + uno::Reference<container::XIndexContainer> xIndexContainer = document::IndexedPropertyValues::create(m_xContext); + std::list<beans::PropertyValue>::iterator aItr = aProps.begin(); + sal_uInt32 i(0); + while (aItr != aProps.end()) { - rtl::OUString sName("com.sun.star.document.IndexedPropertyValues"); - xIndexContainer = uno::Reference<container::XIndexContainer>(mxServiceFactory->createInstance(sName), uno::UNO_QUERY); - if (xIndexContainer.is()) - { - std::list<beans::PropertyValue>::iterator aItr = aProps.begin(); - sal_uInt32 i(0); - while (aItr != aProps.end()) - { - xIndexContainer->insertByIndex(i, aItr->Value); - ++aItr; - ++i; - } - } + xIndexContainer->insertByIndex(i, aItr->Value); + ++aItr; + ++i; } + return xIndexContainer; } @@ -488,7 +462,7 @@ XMLConfigBaseContext::XMLConfigBaseContext(SvXMLImport& rImport, sal_uInt16 nPrf XMLConfigBaseContext* pTempBaseContext) : SvXMLImportContext( rImport, nPrfx, rLName ), // #110680# - maProps(rImport.getServiceFactory()), + maProps( comphelper::getComponentContext(rImport.getServiceFactory())), maProp(), mrAny(rTempAny), mpBaseContext(pTempBaseContext) diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index d28dab4f7ff8..a1de3f713322 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/formula/SymbolDescriptor.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> +#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <xmloff/XMLSettingsExportContext.hxx> #include <xmlenums.hxx> @@ -291,63 +292,53 @@ void XMLSettingsExportHelper::exportSymbolDescriptors( const uno::Sequence < formula::SymbolDescriptor > &rProps, const rtl::OUString rName) const { - // #110680# - uno::Reference< lang::XMultiServiceFactory > xServiceFactory( m_rContext.GetServiceFactory() ); - DBG_ASSERT( xServiceFactory.is(), "XMLSettingsExportHelper::exportSymbolDescriptors: got no service manager" ); - - if( xServiceFactory.is() ) + uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext()); + + const rtl::OUString sName ( "Name" ); + const rtl::OUString sExportName ( "ExportName" ); + const rtl::OUString sSymbolSet ( "SymbolSet" ); + const rtl::OUString sCharacter ( "Character" ); + const rtl::OUString sFontName ( "FontName" ); + const rtl::OUString sCharSet ( "CharSet" ); + const rtl::OUString sFamily ( "Family" ); + const rtl::OUString sPitch ( "Pitch" ); + const rtl::OUString sWeight ( "Weight" ); + const rtl::OUString sItalic ( "Italic" ); + + sal_Int32 nCount = rProps.getLength(); + const formula::SymbolDescriptor *pDescriptor = rProps.getConstArray(); + + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++, pDescriptor++ ) { - uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance( "com.sun.star.document.IndexedPropertyValues" ), uno::UNO_QUERY); - DBG_ASSERT( xBox.is(), "could not create service com.sun.star.document.IndexedPropertyValues" ); - if (xBox.is() ) - { - const rtl::OUString sName ( "Name" ); - const rtl::OUString sExportName ( "ExportName" ); - const rtl::OUString sSymbolSet ( "SymbolSet" ); - const rtl::OUString sCharacter ( "Character" ); - const rtl::OUString sFontName ( "FontName" ); - const rtl::OUString sCharSet ( "CharSet" ); - const rtl::OUString sFamily ( "Family" ); - const rtl::OUString sPitch ( "Pitch" ); - const rtl::OUString sWeight ( "Weight" ); - const rtl::OUString sItalic ( "Italic" ); - - sal_Int32 nCount = rProps.getLength(); - const formula::SymbolDescriptor *pDescriptor = rProps.getConstArray(); - - for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++, pDescriptor++ ) - { - uno::Sequence < beans::PropertyValue > aSequence ( XML_SYMBOL_DESCRIPTOR_MAX ); - beans::PropertyValue *pSymbol = aSequence.getArray(); - - pSymbol[XML_SYMBOL_DESCRIPTOR_NAME].Name = sName; - pSymbol[XML_SYMBOL_DESCRIPTOR_NAME].Value <<= pDescriptor->sName; - pSymbol[XML_SYMBOL_DESCRIPTOR_EXPORT_NAME].Name = sExportName; - pSymbol[XML_SYMBOL_DESCRIPTOR_EXPORT_NAME].Value<<= pDescriptor->sExportName; - pSymbol[XML_SYMBOL_DESCRIPTOR_FONT_NAME].Name = sFontName; - pSymbol[XML_SYMBOL_DESCRIPTOR_FONT_NAME].Value <<= pDescriptor->sFontName; - pSymbol[XML_SYMBOL_DESCRIPTOR_CHAR_SET].Name = sCharSet; - pSymbol[XML_SYMBOL_DESCRIPTOR_CHAR_SET].Value <<= pDescriptor->nCharSet; - pSymbol[XML_SYMBOL_DESCRIPTOR_FAMILY].Name = sFamily; - pSymbol[XML_SYMBOL_DESCRIPTOR_FAMILY].Value <<= pDescriptor->nFamily; - pSymbol[XML_SYMBOL_DESCRIPTOR_PITCH].Name = sPitch; - pSymbol[XML_SYMBOL_DESCRIPTOR_PITCH].Value <<= pDescriptor->nPitch; - pSymbol[XML_SYMBOL_DESCRIPTOR_WEIGHT].Name = sWeight; - pSymbol[XML_SYMBOL_DESCRIPTOR_WEIGHT].Value <<= pDescriptor->nWeight; - pSymbol[XML_SYMBOL_DESCRIPTOR_ITALIC].Name = sItalic; - pSymbol[XML_SYMBOL_DESCRIPTOR_ITALIC].Value <<= pDescriptor->nItalic; - pSymbol[XML_SYMBOL_DESCRIPTOR_SYMBOL_SET].Name = sSymbolSet; - pSymbol[XML_SYMBOL_DESCRIPTOR_SYMBOL_SET].Value <<= pDescriptor->sSymbolSet; - pSymbol[XML_SYMBOL_DESCRIPTOR_CHARACTER].Name = sCharacter; - pSymbol[XML_SYMBOL_DESCRIPTOR_CHARACTER].Value <<= pDescriptor->nCharacter; - - xBox->insertByIndex(nIndex, uno::makeAny( aSequence )); - } - - uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); - exportIndexAccess( xIA, rName ); - } + uno::Sequence < beans::PropertyValue > aSequence ( XML_SYMBOL_DESCRIPTOR_MAX ); + beans::PropertyValue *pSymbol = aSequence.getArray(); + + pSymbol[XML_SYMBOL_DESCRIPTOR_NAME].Name = sName; + pSymbol[XML_SYMBOL_DESCRIPTOR_NAME].Value <<= pDescriptor->sName; + pSymbol[XML_SYMBOL_DESCRIPTOR_EXPORT_NAME].Name = sExportName; + pSymbol[XML_SYMBOL_DESCRIPTOR_EXPORT_NAME].Value<<= pDescriptor->sExportName; + pSymbol[XML_SYMBOL_DESCRIPTOR_FONT_NAME].Name = sFontName; + pSymbol[XML_SYMBOL_DESCRIPTOR_FONT_NAME].Value <<= pDescriptor->sFontName; + pSymbol[XML_SYMBOL_DESCRIPTOR_CHAR_SET].Name = sCharSet; + pSymbol[XML_SYMBOL_DESCRIPTOR_CHAR_SET].Value <<= pDescriptor->nCharSet; + pSymbol[XML_SYMBOL_DESCRIPTOR_FAMILY].Name = sFamily; + pSymbol[XML_SYMBOL_DESCRIPTOR_FAMILY].Value <<= pDescriptor->nFamily; + pSymbol[XML_SYMBOL_DESCRIPTOR_PITCH].Name = sPitch; + pSymbol[XML_SYMBOL_DESCRIPTOR_PITCH].Value <<= pDescriptor->nPitch; + pSymbol[XML_SYMBOL_DESCRIPTOR_WEIGHT].Name = sWeight; + pSymbol[XML_SYMBOL_DESCRIPTOR_WEIGHT].Value <<= pDescriptor->nWeight; + pSymbol[XML_SYMBOL_DESCRIPTOR_ITALIC].Name = sItalic; + pSymbol[XML_SYMBOL_DESCRIPTOR_ITALIC].Value <<= pDescriptor->nItalic; + pSymbol[XML_SYMBOL_DESCRIPTOR_SYMBOL_SET].Name = sSymbolSet; + pSymbol[XML_SYMBOL_DESCRIPTOR_SYMBOL_SET].Value <<= pDescriptor->sSymbolSet; + pSymbol[XML_SYMBOL_DESCRIPTOR_CHARACTER].Name = sCharacter; + pSymbol[XML_SYMBOL_DESCRIPTOR_CHARACTER].Value <<= pDescriptor->nCharacter; + + xBox->insertByIndex(nIndex, uno::makeAny( aSequence )); } + + uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); + exportIndexAccess( xIA, rName ); } void XMLSettingsExportHelper::exportbase64Binary( const uno::Sequence<sal_Int8>& aProps, @@ -440,56 +431,45 @@ void XMLSettingsExportHelper::exportForbiddenCharacters( if( !xForbChars.is() || !xLocales.is() ) return; - // #110680# - uno::Reference< lang::XMultiServiceFactory > xServiceFactory( m_rContext.GetServiceFactory() ); - DBG_ASSERT( xServiceFactory.is(), "XMLSettingsExportHelper::exportForbiddenCharacters: got no service manager" ); - - if( xServiceFactory.is() ) - { - uno::Reference< container::XIndexContainer > xBox(xServiceFactory->createInstance( "com.sun.star.document.IndexedPropertyValues" ), uno::UNO_QUERY); - DBG_ASSERT( xBox.is(), "could not create service com.sun.star.document.IndexedPropertyValues" ); - if (xBox.is() ) - { - const uno::Sequence< lang::Locale > aLocales( xLocales->getLocales() ); - const lang::Locale* pLocales = aLocales.getConstArray(); + uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext()); + const uno::Sequence< lang::Locale > aLocales( xLocales->getLocales() ); + const lang::Locale* pLocales = aLocales.getConstArray(); - const sal_Int32 nCount = aLocales.getLength(); + const sal_Int32 nCount = aLocales.getLength(); - const rtl::OUString sLanguage ( "Language" ); - const rtl::OUString sCountry ( "Country" ); - const rtl::OUString sVariant ( "Variant" ); - const rtl::OUString sBeginLine ( "BeginLine" ); - const rtl::OUString sEndLine ( "EndLine" ); - - sal_Int32 nPos = 0; - for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++, pLocales++ ) - { - if( xForbChars->hasForbiddenCharacters( *pLocales ) ) - { - const i18n::ForbiddenCharacters aChars( xForbChars->getForbiddenCharacters( *pLocales ) ); - - - uno::Sequence < beans::PropertyValue > aSequence ( XML_FORBIDDEN_CHARACTER_MAX ); - beans::PropertyValue *pForChar = aSequence.getArray(); - - pForChar[XML_FORBIDDEN_CHARACTER_LANGUAGE].Name = sLanguage; - pForChar[XML_FORBIDDEN_CHARACTER_LANGUAGE].Value <<= pLocales->Language; - pForChar[XML_FORBIDDEN_CHARACTER_COUNTRY].Name = sCountry; - pForChar[XML_FORBIDDEN_CHARACTER_COUNTRY].Value <<= pLocales->Country; - pForChar[XML_FORBIDDEN_CHARACTER_VARIANT].Name = sVariant; - pForChar[XML_FORBIDDEN_CHARACTER_VARIANT].Value <<= pLocales->Variant; - pForChar[XML_FORBIDDEN_CHARACTER_BEGIN_LINE].Name = sBeginLine; - pForChar[XML_FORBIDDEN_CHARACTER_BEGIN_LINE].Value <<= aChars.beginLine; - pForChar[XML_FORBIDDEN_CHARACTER_END_LINE].Name = sEndLine; - pForChar[XML_FORBIDDEN_CHARACTER_END_LINE].Value <<= aChars.endLine; - xBox->insertByIndex(nPos++, uno::makeAny( aSequence )); - } - } + const rtl::OUString sLanguage ( "Language" ); + const rtl::OUString sCountry ( "Country" ); + const rtl::OUString sVariant ( "Variant" ); + const rtl::OUString sBeginLine ( "BeginLine" ); + const rtl::OUString sEndLine ( "EndLine" ); - uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); - exportIndexAccess( xIA, rName ); + sal_Int32 nPos = 0; + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++, pLocales++ ) + { + if( xForbChars->hasForbiddenCharacters( *pLocales ) ) + { + const i18n::ForbiddenCharacters aChars( xForbChars->getForbiddenCharacters( *pLocales ) ); + + + uno::Sequence < beans::PropertyValue > aSequence ( XML_FORBIDDEN_CHARACTER_MAX ); + beans::PropertyValue *pForChar = aSequence.getArray(); + + pForChar[XML_FORBIDDEN_CHARACTER_LANGUAGE].Name = sLanguage; + pForChar[XML_FORBIDDEN_CHARACTER_LANGUAGE].Value <<= pLocales->Language; + pForChar[XML_FORBIDDEN_CHARACTER_COUNTRY].Name = sCountry; + pForChar[XML_FORBIDDEN_CHARACTER_COUNTRY].Value <<= pLocales->Country; + pForChar[XML_FORBIDDEN_CHARACTER_VARIANT].Name = sVariant; + pForChar[XML_FORBIDDEN_CHARACTER_VARIANT].Value <<= pLocales->Variant; + pForChar[XML_FORBIDDEN_CHARACTER_BEGIN_LINE].Name = sBeginLine; + pForChar[XML_FORBIDDEN_CHARACTER_BEGIN_LINE].Value <<= aChars.beginLine; + pForChar[XML_FORBIDDEN_CHARACTER_END_LINE].Name = sEndLine; + pForChar[XML_FORBIDDEN_CHARACTER_END_LINE].Value <<= aChars.endLine; + xBox->insertByIndex(nPos++, uno::makeAny( aSequence )); } } + + uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); + exportIndexAccess( xIA, rName ); } void XMLSettingsExportHelper::exportAllSettings( @@ -525,11 +505,10 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const rtl::OUSt { if( !mxStringSubsitution.is() ) { - if( m_rContext.GetServiceFactory().is() ) try + try { - uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(m_rContext.GetServiceFactory()) ); const_cast< XMLSettingsExportHelper* >(this)->mxStringSubsitution = - util::PathSubstitution::create(xContext); + util::PathSubstitution::create( m_rContext.GetComponentContext() ); } catch( uno::Exception& ) { diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 1ac34542f76c..94e145412a34 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -166,8 +166,8 @@ public: virtual void Characters( const ::rtl::OUString& i_rCharacters ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - GetServiceFactory() const; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + GetComponentContext() const; private: SvXMLExport& m_rExport; ::std::stack< ::rtl::OUString > m_aElements; @@ -202,9 +202,9 @@ void SettingsExportFacade::Characters( const ::rtl::OUString& i_rCharacters ) m_rExport.GetDocHandler()->characters( i_rCharacters ); } -Reference< XMultiServiceFactory > SettingsExportFacade::GetServiceFactory() const +Reference< XComponentContext > SettingsExportFacade::GetComponentContext() const { - return m_rExport.getServiceFactory(); + return comphelper::getComponentContext( m_rExport.getServiceFactory() ); } //============================================================================== diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 8166f37088d5..44ca5d465b7f 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -38,6 +38,7 @@ #include <tools/diagnose_ex.h> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/document/NamedPropertyValues.hpp> #include <com/sun/star/xml/dom/XDocument.hpp> #include <com/sun/star/form/binding/XValueBinding.hpp> #include <com/sun/star/form/binding/XBindableValue.hpp> @@ -794,10 +795,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop Sequence< ::rtl::OUString > aModelNames( _rXForms->getElementNames() ); - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); - Reference< XNameContainer > xModelSettings( - aContext.createComponent( "com.sun.star.document.NamedPropertyValues" ), - UNO_QUERY_THROW ); + Reference< XNameContainer > xModelSettings = document::NamedPropertyValues::create( comphelper::getProcessComponentContext() ); for ( const ::rtl::OUString* pModelName = aModelNames.getConstArray(); pModelName != aModelNames.getConstArray() + aModelNames.getLength(); |