Kaydet (Commit) 73e2c6ae authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up C-style casts from pointers to void

Change-Id: I9564d76c9b6fb808ca92b53f1bca07ec0850c6f8
üst c7ea19cc
...@@ -445,7 +445,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick) ...@@ -445,7 +445,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick)
if (!xSet.is()) if (!xSet.is())
return 0L; return 0L;
if (FormButtonType_PUSH == *(FormButtonType*)xSet->getPropertyValue(PROPERTY_BUTTONTYPE).getValue()) if (FormButtonType_PUSH == *static_cast<FormButtonType const *>(xSet->getPropertyValue(PROPERTY_BUTTONTYPE).getValue()))
{ {
// notify the action listeners for a push button // notify the action listeners for a push button
::cppu::OInterfaceIteratorHelper aIter(m_aActionListeners); ::cppu::OInterfaceIteratorHelper aIter(m_aActionListeners);
......
...@@ -573,7 +573,7 @@ Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XContr ...@@ -573,7 +573,7 @@ Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XContr
sal_Int32 nLen = aMemStream.Seek(STREAM_SEEK_TO_END); sal_Int32 nLen = aMemStream.Seek(STREAM_SEEK_TO_END);
rContentType = aParent.GetContentType(); rContentType = aParent.GetContentType();
return Sequence<sal_Int8>((sal_Int8*)pData, nLen); return Sequence<sal_Int8>(static_cast<sal_Int8*>(pData), nLen);
} }
......
...@@ -692,7 +692,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) ...@@ -692,7 +692,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
DBG_ASSERT(isA(aLocale, static_cast<Locale*>(NULL)), "OFormattedModel::write : invalid language property !"); DBG_ASSERT(isA(aLocale, static_cast<Locale*>(NULL)), "OFormattedModel::write : invalid language property !");
if (isA(aLocale, static_cast<Locale*>(NULL))) if (isA(aLocale, static_cast<Locale*>(NULL)))
{ {
Locale* pLocale = (Locale*)aLocale.getValue(); Locale const * pLocale = static_cast<Locale const *>(aLocale.getValue());
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false); eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
} }
} }
......
...@@ -1883,8 +1883,8 @@ namespace frm ...@@ -1883,8 +1883,8 @@ namespace frm
bool bModified(false); bool bModified(false);
Any aValue = xSet->getPropertyValue(PROPERTY_SELECT_SEQ); Any aValue = xSet->getPropertyValue(PROPERTY_SELECT_SEQ);
Sequence<sal_Int16>& rSelection = *(Sequence<sal_Int16> *)aValue.getValue(); Sequence<sal_Int16> const & rSelection = *static_cast<Sequence<sal_Int16> const *>(aValue.getValue());
Sequence<sal_Int16>& rOldSelection = *(Sequence<sal_Int16> *)m_aCurrentSelection.getValue(); Sequence<sal_Int16> const & rOldSelection = *static_cast<Sequence<sal_Int16> const *>(m_aCurrentSelection.getValue());
sal_Int32 nLen = rSelection.getLength(); sal_Int32 nLen = rSelection.getLength();
if (nLen != rOldSelection.getLength()) if (nLen != rOldSelection.getLength())
bModified = true; bModified = true;
......
...@@ -155,7 +155,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any& ...@@ -155,7 +155,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any&
sal_Int32 nNumSiblings = xIndexAccess->getCount(); sal_Int32 nNumSiblings = xIndexAccess->getCount();
for (sal_Int32 i=0; i<nNumSiblings; ++i) for (sal_Int32 i=0; i<nNumSiblings; ++i)
{ {
Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY); Reference<XPropertySet> xSiblingProperties(*static_cast<InterfaceRef const *>(xIndexAccess->getByIndex(i).getValue()), UNO_QUERY);
if (!xSiblingProperties.is()) if (!xSiblingProperties.is())
continue; continue;
if (xMyProps == xSiblingProperties) if (xMyProps == xSiblingProperties)
...@@ -230,7 +230,7 @@ void ORadioButtonModel::setControlSource() ...@@ -230,7 +230,7 @@ void ORadioButtonModel::setControlSource()
query_interface(static_cast<XWeak*>(this), xMyProps); query_interface(static_cast<XWeak*>(this), xMyProps);
for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i) for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i)
{ {
Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY); Reference<XPropertySet> xSiblingProperties(*static_cast<InterfaceRef const *>(xIndexAccess->getByIndex(i).getValue()), UNO_QUERY);
if (!xSiblingProperties.is()) if (!xSiblingProperties.is())
continue; continue;
......
...@@ -379,7 +379,7 @@ static bool parseDuration(const xmlChar* aString, bool& bNegative, sal_Int32& nY ...@@ -379,7 +379,7 @@ static bool parseDuration(const xmlChar* aString, bool& bNegative, sal_Int32& nY
{ {
bool bTime = false; // in part after T bool bTime = false; // in part after T
sal_Int32 nLength = strlen(reinterpret_cast<char const *>(aString))+1; sal_Int32 nLength = strlen(reinterpret_cast<char const *>(aString))+1;
char *pString = (char*)rtl_allocateMemory(nLength); char *pString = static_cast<char*>(rtl_allocateMemory(nLength));
char *pString0 = pString; char *pString0 = pString;
strncpy(pString, reinterpret_cast<char const *>(aString), nLength); strncpy(pString, reinterpret_cast<char const *>(aString), nLength);
...@@ -506,7 +506,7 @@ void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs) ...@@ -506,7 +506,7 @@ void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs)
if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8);
Reference< XModel > aModel = ((CLibxml2XFormsExtension*)ctxt->context->funcLookupData)->getModel(); Reference< XModel > aModel = static_cast<CLibxml2XFormsExtension*>(ctxt->context->funcLookupData)->getModel();
if (aModel.is()) if (aModel.is())
{ {
Reference< XDocument > aInstance = aModel->getInstanceDocument(aString); Reference< XDocument > aInstance = aModel->getInstanceDocument(aString);
...@@ -536,7 +536,7 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs) ...@@ -536,7 +536,7 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs)
{ {
if (nargs != 0) XP_ERROR(XPATH_INVALID_ARITY); if (nargs != 0) XP_ERROR(XPATH_INVALID_ARITY);
Reference< XNode > aNode = ((CLibxml2XFormsExtension*)ctxt->context->funcLookupData)->getContextNode(); Reference< XNode > aNode = static_cast<CLibxml2XFormsExtension*>(ctxt->context->funcLookupData)->getContextNode();
if (aNode.is()) if (aNode.is())
{ {
......
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