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
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;
break;
......
......@@ -176,13 +176,13 @@ bool InitExternalFunc(const OUString& rModuleName)
osl::Module* pLib = new osl::Module( aNP );
if (pLib->is())
{
FARPROC fpGetCount = (FARPROC)pLib->getFunctionSymbol(GETFUNCTIONCOUNT);
FARPROC fpGetData = (FARPROC)pLib->getFunctionSymbol(GETFUNCTIONDATA);
FARPROC fpGetCount = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONCOUNT));
FARPROC fpGetData = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONDATA));
if ((fpGetCount != NULL) && (fpGetData != NULL))
{
FARPROC fpIsAsync = (FARPROC)pLib->getFunctionSymbol(ISASYNC);
FARPROC fpAdvice = (FARPROC)pLib->getFunctionSymbol(ADVICE);
FARPROC fpSetLanguage = (FARPROC)pLib->getFunctionSymbol(SETLANGUAGE);
FARPROC fpIsAsync = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ISASYNC));
FARPROC fpAdvice = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ADVICE));
FARPROC fpSetLanguage = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(SETLANGUAGE));
if ( fpSetLanguage )
{
LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
......@@ -257,7 +257,7 @@ bool FuncData::Call(void** ppParam) const
#else
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName);
FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(aFuncName));
if (fProc != NULL)
{
switch (nParamCount)
......@@ -355,7 +355,7 @@ bool FuncData::Unadvice( double nHandle )
#else
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(UNADVICE);
FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(UNADVICE));
if (fProc != NULL)
{
reinterpret_cast< ::Unadvice>(fProc)(nHandle);
......@@ -382,7 +382,7 @@ bool FuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam
if ( nParam <= nParamCount )
{
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC) pLib->getFunctionSymbol(GETPARAMDESC);
FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETPARAMDESC));
if ( fProc != NULL )
{
sal_Char pcName[256];
......
......@@ -701,7 +701,6 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, bool bManaged)
{
OUString sReturn;
sal_Int32 nSize = 0;
OString sTagName;
OString sTagValue;
......@@ -745,7 +744,8 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
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);
......
......@@ -5674,7 +5674,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
uno::Reference<beans::XPropertySet> xPropSet( xDescriptor, uno::UNO_QUERY );
if (xPropSet.is())
lcl_CopyProperties( aImpl, *(beans::XPropertySet*)xPropSet.get() );
lcl_CopyProperties( aImpl, *xPropSet.get() );
// 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