diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:03:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:20 +0100 |
commit | 73e2c6ae2734683893657b7f38a9a7ee130e9eb0 (patch) | |
tree | 848d4dae9a39b794762c016ff9c292fc2d6fcd3a /forms | |
parent | c7ea19cc0c97f3187011c5e82760a112b2007b73 (diff) |
Clean up C-style casts from pointers to void
Change-Id: I9564d76c9b6fb808ca92b53f1bca07ec0850c6f8
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Button.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/RadioButton.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/xpathlib/xpathlib.cxx | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 05aefec23513..ac576027344e 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -445,7 +445,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick) if (!xSet.is()) 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 ::cppu::OInterfaceIteratorHelper aIter(m_aActionListeners); diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 28b312a157fe..82a6d7822eaf 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -573,7 +573,7 @@ Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XContr sal_Int32 nLen = aMemStream.Seek(STREAM_SEEK_TO_END); rContentType = aParent.GetContentType(); - return Sequence<sal_Int8>((sal_Int8*)pData, nLen); + return Sequence<sal_Int8>(static_cast<sal_Int8*>(pData), nLen); } diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index c5ef478545b1..1d2fada88d51 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -692,7 +692,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) DBG_ASSERT(isA(aLocale, static_cast<Locale*>(NULL)), "OFormattedModel::write : invalid language property !"); 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); } } diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index d87da0bd7eb5..e0b593c19495 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1883,8 +1883,8 @@ namespace frm bool bModified(false); Any aValue = xSet->getPropertyValue(PROPERTY_SELECT_SEQ); - Sequence<sal_Int16>& rSelection = *(Sequence<sal_Int16> *)aValue.getValue(); - Sequence<sal_Int16>& rOldSelection = *(Sequence<sal_Int16> *)m_aCurrentSelection.getValue(); + Sequence<sal_Int16> const & rSelection = *static_cast<Sequence<sal_Int16> const *>(aValue.getValue()); + Sequence<sal_Int16> const & rOldSelection = *static_cast<Sequence<sal_Int16> const *>(m_aCurrentSelection.getValue()); sal_Int32 nLen = rSelection.getLength(); if (nLen != rOldSelection.getLength()) bModified = true; diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 4a6ee60ef373..03781be00f8a 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -155,7 +155,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any& sal_Int32 nNumSiblings = xIndexAccess->getCount(); 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()) continue; if (xMyProps == xSiblingProperties) @@ -230,7 +230,7 @@ void ORadioButtonModel::setControlSource() query_interface(static_cast<XWeak*>(this), xMyProps); 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()) continue; diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index ae2a650b19e3..0f3a9fcd0df2 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -379,7 +379,7 @@ static bool parseDuration(const xmlChar* aString, bool& bNegative, sal_Int32& nY { bool bTime = false; // in part after T 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; strncpy(pString, reinterpret_cast<char const *>(aString), nLength); @@ -506,7 +506,7 @@ void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs) if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); 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()) { Reference< XDocument > aInstance = aModel->getInstanceDocument(aString); @@ -536,7 +536,7 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs) { 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()) { |