From 42a05b4b2aa980cc8443813e6ab903034f9f4dbc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 21 Oct 2014 08:52:43 +0200 Subject: Remove unnecessary jfw_plugin::getVendorNames Change-Id: I3c134c27db4c1496fcacc519da68af10ab3ce574 --- jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx | 19 ++----------------- jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx | 3 --- 2 files changed, 2 insertions(+), 20 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx index 3f23ff31cc1b..ee4d6d0ee2da 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx @@ -53,27 +53,12 @@ BEGIN_VENDOR_MAP() END_VENDOR_MAP() -Sequence getVendorNames() +bool isVendorSupported(const OUString& sVendor) { const size_t count = sizeof(gVendorMap) / sizeof (VendorSupportMapEntry) - 1; - OUString arNames[count]; for ( size_t pos = 0; pos < count; ++pos ) { - OString sVendor(gVendorMap[pos].sVendorName); - arNames[pos] = OStringToOUString(sVendor, RTL_TEXTENCODING_UTF8); - } - return Sequence(arNames, count); -} - -bool isVendorSupported(const OUString& sVendor) -{ - Sequence seqNames = getVendorNames(); - const OUString * arNames = seqNames.getConstArray(); - sal_Int32 count = seqNames.getLength(); - - for (int i = 0; i < count; i++) - { - if (sVendor.equals(arNames[i])) + if (sVendor.equalsAscii(gVendorMap[pos].sVendorName)) return true; } #if OSL_DEBUG_LEVEL >= 2 diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx index 72fd317191c8..5709e79a8f7a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx @@ -45,9 +45,6 @@ VendorSupportMapEntry gVendorMap[] ={ #define END_VENDOR_MAP() \ {NULL, NULL, NULL} }; - -com::sun::star::uno::Sequence getVendorNames(); - /* Examines if the vendor supplied in parameter sVendor is part of the list of supported vendors. That is the arry of VendorSupportMapEntry is search for an respective entry. -- cgit v1.2.3