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

loplugin:cstylecast: deal with those that are (technically) const_cast

Change-Id: I23f887e88ad21b715e62b05ac6874ab88597ea90
üst e60cea3c
...@@ -65,7 +65,7 @@ ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xV ...@@ -65,7 +65,7 @@ ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xV
for(::std::list<ScAddInListener*>::iterator iter = aAllListeners.begin(); iter != aAllListeners.end(); ++iter) for(::std::list<ScAddInListener*>::iterator iter = aAllListeners.begin(); iter != aAllListeners.end(); ++iter)
{ {
if ( pComp == (sheet::XVolatileResult*)(*iter)->xVolRes.get() ) if ( pComp == (*iter)->xVolRes.get() )
{ {
pLst = *iter; pLst = *iter;
break; break;
......
...@@ -176,13 +176,13 @@ bool InitExternalFunc(const OUString& rModuleName) ...@@ -176,13 +176,13 @@ bool InitExternalFunc(const OUString& rModuleName)
osl::Module* pLib = new osl::Module( aNP ); osl::Module* pLib = new osl::Module( aNP );
if (pLib->is()) if (pLib->is())
{ {
FARPROC fpGetCount = (FARPROC)pLib->getFunctionSymbol(GETFUNCTIONCOUNT); FARPROC fpGetCount = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONCOUNT));
FARPROC fpGetData = (FARPROC)pLib->getFunctionSymbol(GETFUNCTIONDATA); FARPROC fpGetData = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONDATA));
if ((fpGetCount != NULL) && (fpGetData != NULL)) if ((fpGetCount != NULL) && (fpGetData != NULL))
{ {
FARPROC fpIsAsync = (FARPROC)pLib->getFunctionSymbol(ISASYNC); FARPROC fpIsAsync = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ISASYNC));
FARPROC fpAdvice = (FARPROC)pLib->getFunctionSymbol(ADVICE); FARPROC fpAdvice = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ADVICE));
FARPROC fpSetLanguage = (FARPROC)pLib->getFunctionSymbol(SETLANGUAGE); FARPROC fpSetLanguage = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(SETLANGUAGE));
if ( fpSetLanguage ) if ( fpSetLanguage )
{ {
LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
...@@ -257,7 +257,7 @@ bool FuncData::Call(void** ppParam) const ...@@ -257,7 +257,7 @@ bool FuncData::Call(void** ppParam) const
#else #else
bool bRet = false; bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance(); osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName); FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(aFuncName));
if (fProc != NULL) if (fProc != NULL)
{ {
switch (nParamCount) switch (nParamCount)
...@@ -355,7 +355,7 @@ bool FuncData::Unadvice( double nHandle ) ...@@ -355,7 +355,7 @@ bool FuncData::Unadvice( double nHandle )
#else #else
bool bRet = false; bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance(); osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(UNADVICE); FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(UNADVICE));
if (fProc != NULL) if (fProc != NULL)
{ {
reinterpret_cast< ::Unadvice>(fProc)(nHandle); reinterpret_cast< ::Unadvice>(fProc)(nHandle);
...@@ -382,7 +382,7 @@ bool FuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam ...@@ -382,7 +382,7 @@ bool FuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam
if ( nParam <= nParamCount ) if ( nParam <= nParamCount )
{ {
osl::Module* pLib = pModuleData->GetInstance(); osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC) pLib->getFunctionSymbol(GETPARAMDESC); FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETPARAMDESC));
if ( fProc != NULL ) if ( fProc != NULL )
{ {
sal_Char pcName[256]; sal_Char pcName[256];
......
...@@ -701,7 +701,6 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, ...@@ -701,7 +701,6 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, bool bManaged) OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, bool bManaged)
{ {
OUString sReturn; OUString sReturn;
sal_Int32 nSize = 0;
OString sTagName; OString sTagName;
OString sTagValue; OString sTagValue;
...@@ -745,7 +744,8 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, ...@@ -745,7 +744,8 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
xmlAddChild(pXmlRoot, pXmlNode); xmlAddChild(pXmlRoot, pXmlNode);
xmlDocDumpMemory(pXmlDoc, &pBuffer, (int*)&nSize); int nSize = 0;
xmlDocDumpMemory(pXmlDoc, &pBuffer, &nSize);
sReturn = OUString(reinterpret_cast<char const *>(pBuffer), nSize, RTL_TEXTENCODING_UTF8); sReturn = OUString(reinterpret_cast<char const *>(pBuffer), nSize, RTL_TEXTENCODING_UTF8);
......
...@@ -5674,7 +5674,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe ...@@ -5674,7 +5674,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
uno::Reference<beans::XPropertySet> xPropSet( xDescriptor, uno::UNO_QUERY ); uno::Reference<beans::XPropertySet> xPropSet( xDescriptor, uno::UNO_QUERY );
if (xPropSet.is()) if (xPropSet.is())
lcl_CopyProperties( aImpl, *(beans::XPropertySet*)xPropSet.get() ); lcl_CopyProperties( aImpl, *xPropSet.get() );
// ausfuehren... // ausfuehren...
......
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