Kaydet (Commit) 9c0cb455 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: jvmfwk

Change-Id: Iaa1be4b338b75c340555eb4bf0760cadca16713f
üst 62edaa0f
......@@ -111,7 +111,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData)
{
const sal_Unicode* chars = (sal_Unicode*) vendorData.getConstArray();
const sal_Unicode* chars = reinterpret_cast<sal_Unicode const *>(vendorData.getConstArray());
sal_Int32 len = vendorData.getLength();
OUString sData(chars, len / 2);
//the runtime lib is on the first line
......
......@@ -169,7 +169,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
}
OUString sVendorData = buf.makeStringAndClear();
rtl::ByteSequence byteSeq( (sal_Int8*) sVendorData.pData->buffer,
rtl::ByteSequence byteSeq( reinterpret_cast<sal_Int8*>(sVendorData.pData->buffer),
sVendorData.getLength() * sizeof(sal_Unicode));
pInfo->arVendorData = byteSeq.get();
rtl_byte_sequence_acquire(pInfo->arVendorData);
......@@ -179,7 +179,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
OUString getRuntimeLib(const rtl::ByteSequence & data)
{
const sal_Unicode* chars = (sal_Unicode*) data.getConstArray();
const sal_Unicode* chars = reinterpret_cast<sal_Unicode const *>(data.getConstArray());
sal_Int32 len = data.getLength();
OUString sData(chars, len / 2);
//the runtime lib is on the first line
......@@ -694,7 +694,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
OUString sSymbolCreateJava("JNI_CreateJavaVM");
JNI_CreateVM_Type * pCreateJavaVM =
(JNI_CreateVM_Type *)moduleRt.getFunctionSymbol(sSymbolCreateJava);
reinterpret_cast<JNI_CreateVM_Type *>(moduleRt.getFunctionSymbol(sSymbolCreateJava));
if (!pCreateJavaVM)
{
OSL_ASSERT(false);
......
This diff is collapsed.
......@@ -111,8 +111,8 @@ VendorSettings::VendorSettings():
m_xmlPathContextVendorSettings = xmlXPathNewContext(m_xmlDocVendorSettings);
int res = xmlXPathRegisterNs(
m_xmlPathContextVendorSettings, (xmlChar*) "jf",
(xmlChar*) NS_JAVA_FRAMEWORK);
m_xmlPathContextVendorSettings, reinterpret_cast<xmlChar const *>("jf"),
reinterpret_cast<xmlChar const *>(NS_JAVA_FRAMEWORK));
if (res == -1)
throw FrameworkException(JFW_E_ERROR, sMsgExc);
}
......@@ -130,7 +130,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
CXPathObjectPtr xPathObjectMin;
xPathObjectMin =
xmlXPathEvalExpression((xmlChar*) sExpresion.getStr(),
xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpresion.getStr()),
m_xmlPathContextVendorSettings);
if (xmlXPathNodeSetIsEmpty(xPathObjectMin->nodesetval))
{
......@@ -142,7 +142,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings,
xPathObjectMin->nodesetval->nodeTab[0]->xmlChildrenNode, 1);
OString osVersion((sal_Char*)(xmlChar*) sVersion);
OString osVersion(sVersion);
aVersionInfo.sMinVersion = OStringToOUString(
osVersion, RTL_TEXTENCODING_UTF8);
}
......@@ -152,7 +152,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
osVendor + OString("\"]/jf:maxVersion");
CXPathObjectPtr xPathObjectMax;
xPathObjectMax = xmlXPathEvalExpression(
(xmlChar*) sExpresion.getStr(),
reinterpret_cast<xmlChar const *>(sExpresion.getStr()),
m_xmlPathContextVendorSettings);
if (xmlXPathNodeSetIsEmpty(xPathObjectMax->nodesetval))
{
......@@ -164,7 +164,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings,
xPathObjectMax->nodesetval->nodeTab[0]->xmlChildrenNode, 1);
OString osVersion((sal_Char*) (xmlChar*) sVersion);
OString osVersion(sVersion);
aVersionInfo.sMaxVersion = OStringToOUString(
osVersion, RTL_TEXTENCODING_UTF8);
}
......@@ -174,7 +174,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
osVendor + OString("\"]/jf:excludeVersions/jf:version");
CXPathObjectPtr xPathObjectVersions;
xPathObjectVersions =
xmlXPathEvalExpression((xmlChar*) sExpresion.getStr(),
xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpresion.getStr()),
m_xmlPathContextVendorSettings);
if (!xmlXPathNodeSetIsEmpty(xPathObjectVersions->nodesetval))
{
......@@ -183,12 +183,12 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
{
if (cur->type == XML_ELEMENT_NODE )
{
if (xmlStrcmp(cur->name, (xmlChar*) "version") == 0)
if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("version")) == 0)
{
CXmlCharPtr sVersion;
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings, cur->xmlChildrenNode, 1);
OString osVersion((sal_Char*)(xmlChar*) sVersion);
OString osVersion(sVersion);
OUString usVersion = OStringToOUString(
osVersion, RTL_TEXTENCODING_UTF8);
aVersionInfo.addExcludeVersion(usVersion);
......@@ -206,7 +206,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors()
//get the nodeset for the vendor elements
jfw::CXPathObjectPtr result;
result = xmlXPathEvalExpression(
(xmlChar*)"/jf:javaSelection/jf:vendorInfos/jf:vendor",
reinterpret_cast<xmlChar const *>("/jf:javaSelection/jf:vendorInfos/jf:vendor"),
m_xmlPathContextVendorSettings);
if (!xmlXPathNodeSetIsEmpty(result->nodesetval))
{
......@@ -217,7 +217,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors()
//between vendor elements are also text elements
if (cur->type == XML_ELEMENT_NODE)
{
jfw::CXmlCharPtr sAttrVendor(xmlGetProp(cur, (xmlChar*) "name"));
jfw::CXmlCharPtr sAttrVendor(xmlGetProp(cur, reinterpret_cast<xmlChar const *>("name")));
vecVendors.push_back(sAttrVendor);
}
cur = cur->next;
......
......@@ -134,7 +134,7 @@ rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData)
pCurBuf++;
}
rtl::ByteSequence ret((sal_Int8*) pBuf.get(), lenRaw * 2);
rtl::ByteSequence ret(reinterpret_cast<sal_Int8*>(pBuf.get()), lenRaw * 2);
return ret;
}
......@@ -173,7 +173,7 @@ rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data)
}
pBuf[i] = nibble;
}
rtl::ByteSequence ret((sal_Int8*) pBuf.get(), lenBuf );
rtl::ByteSequence ret(reinterpret_cast<sal_Int8*>(pBuf.get()), lenBuf );
return ret;
}
......
......@@ -124,7 +124,7 @@ CXmlCharPtr::operator OUString()
OUString ret;
if (_object != NULL)
{
OString aOStr((sal_Char*)_object);
OString aOStr(reinterpret_cast<char*>(_object));
ret = OStringToOUString(aOStr, RTL_TEXTENCODING_UTF8);
}
return ret;
......
......@@ -90,7 +90,7 @@ public:
CXmlCharPtr & operator = (xmlChar* pObj);
operator xmlChar* () const { return _object;}
operator OUString ();
operator OString () { return OString((sal_Char*) _object);}
operator OString () { return OString(reinterpret_cast<sal_Char*>(_object));}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment