summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:48 +0200
commit9e1e8858d12ab76ce928b1f499e2de210a6e443d (patch)
tree711cbcdc86cd19a791c3c47d6d785d0366c8817c /sc
parente60cea3c8d14c1146ed2855024872fecb0959f66 (diff)
loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I23f887e88ad21b715e62b05ac6874ab88597ea90
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/addinlis.cxx2
-rw-r--r--sc/source/core/tool/callform.cxx16
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index a6797798ebcd..d0e3c46ef484 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -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;
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 64cc52bb8b43..2b941ac895ca 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -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];
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 37ec636a2bb0..fec9373c4f6c 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -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);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 29343a1f3d2e..d25986bde0c4 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -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...