Remove unnecessary jfw_plugin::getVendorNames
Change-Id: I3c134c27db4c1496fcacc519da68af10ab3ce574
This commit is contained in:
@@ -53,27 +53,12 @@ BEGIN_VENDOR_MAP()
|
|||||||
END_VENDOR_MAP()
|
END_VENDOR_MAP()
|
||||||
|
|
||||||
|
|
||||||
Sequence<OUString> getVendorNames()
|
|
||||||
{
|
|
||||||
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<OUString>(arNames, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isVendorSupported(const OUString& sVendor)
|
bool isVendorSupported(const OUString& sVendor)
|
||||||
{
|
{
|
||||||
Sequence<OUString> seqNames = getVendorNames();
|
const size_t count = sizeof(gVendorMap) / sizeof (VendorSupportMapEntry) - 1;
|
||||||
const OUString * arNames = seqNames.getConstArray();
|
for ( size_t pos = 0; pos < count; ++pos )
|
||||||
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;
|
return true;
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL >= 2
|
#if OSL_DEBUG_LEVEL >= 2
|
||||||
|
@@ -45,9 +45,6 @@ VendorSupportMapEntry gVendorMap[] ={
|
|||||||
#define END_VENDOR_MAP() \
|
#define END_VENDOR_MAP() \
|
||||||
{NULL, NULL, NULL} };
|
{NULL, NULL, NULL} };
|
||||||
|
|
||||||
|
|
||||||
com::sun::star::uno::Sequence<OUString> getVendorNames();
|
|
||||||
|
|
||||||
/* Examines if the vendor supplied in parameter sVendor is part of the
|
/* Examines if the vendor supplied in parameter sVendor is part of the
|
||||||
list of supported vendors. That is the arry of VendorSupportMapEntry
|
list of supported vendors. That is the arry of VendorSupportMapEntry
|
||||||
is search for an respective entry.
|
is search for an respective entry.
|
||||||
|
Reference in New Issue
Block a user