diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:27:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:27:31 +0200 |
commit | 1c5613e108b4fe98a415296a5b6c0bc7636548ef (patch) | |
tree | 331ae13fdbc03859091ec3d78b9614d9dd57dcf3 /sc | |
parent | 2c2bafeedf6a7ce99f8c30d1f69ef9d0a0bf8587 (diff) |
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I700b727c048aff5c19411fb9d5bd9601b296cb06
Diffstat (limited to 'sc')
54 files changed, 132 insertions, 132 deletions
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index afc28efd3185..7f9eccfdbd6c 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -636,7 +636,7 @@ ScChangeActionDelMoveEntry::ScChangeActionDelMoveEntry( : ScChangeActionLinkEntry( reinterpret_cast<ScChangeActionLinkEntry**>( ppPrevP), - (ScChangeAction*) pMove ), + static_cast<ScChangeAction*>(pMove) ), nCutOffFrom( nFrom ), nCutOffTo( nTo ) {} diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 7ff020310c20..1f4db41acf6b 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2229,7 +2229,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags // initialize // -> pTransClip has to be delted before the original document! - pTransClip->ResetClip(this, (ScMarkData*)NULL); // all + pTransClip->ResetClip(this, nullptr); // all // Take over range diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index d6c7ede891a9..ae647d046add 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -227,7 +227,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program ) } SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << mpClmem); - err = clSetKernelArg(k, argno, sizeof(cl_mem), (void*)&mpClmem); + err = clSetKernelArg(k, argno, sizeof(cl_mem), static_cast<void*>(&mpClmem)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -286,7 +286,7 @@ public: // Pass the scalar result back to the rest of the formula kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_uint: " << hashCode); - cl_int err = clSetKernelArg(k, argno, sizeof(cl_uint), (void*)&hashCode); + cl_int err = clSetKernelArg(k, argno, sizeof(cl_uint), static_cast<void*>(&hashCode)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -336,7 +336,7 @@ public: double tmp = GetDouble(); // Pass the scalar result back to the rest of the formula kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": double: " << tmp); - cl_int err = clSetKernelArg(k, argno, sizeof(double), (void*)&tmp); + cl_int err = clSetKernelArg(k, argno, sizeof(double), static_cast<void*>(&tmp)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -376,7 +376,7 @@ public: double tmp = 0.0; // Pass the scalar result back to the rest of the formula kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": double: " << tmp); - cl_int err = clSetKernelArg(k, argno, sizeof(double), (void*)&tmp); + cl_int err = clSetKernelArg(k, argno, sizeof(double), static_cast<void*>(&tmp)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -741,7 +741,7 @@ threefry2x32 (threefry2x32_ctr_t in, threefry2x32_key_t k)\n\ cl_int seed = formula::rng::nRandom(0, SAL_MAX_INT32); // Pass the scalar result back to the rest of the formula kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_int: " << seed); - cl_int err = clSetKernelArg(k, argno, sizeof(cl_int), (void*)&seed); + cl_int err = clSetKernelArg(k, argno, sizeof(cl_int), static_cast<void*>(&seed)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -852,7 +852,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro throw OpenCLError("clEnqueueUnmapMemObject", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << mpClmem); - err = clSetKernelArg(k, argno, sizeof(cl_mem), (void*)&mpClmem); + err = clSetKernelArg(k, argno, sizeof(cl_mem), static_cast<void*>(&mpClmem)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); return 1; @@ -1506,7 +1506,7 @@ public: cl_mem buf = Base::GetCLBuffer(); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 0 << ": cl_mem: " << buf); err = clSetKernelArg(redKernel, 0, sizeof(cl_mem), - (void*)&buf); + static_cast<void*>(&buf)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); @@ -1516,12 +1516,12 @@ public: throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 2 << ": cl_int: " << nInput); - err = clSetKernelArg(redKernel, 2, sizeof(cl_int), (void*)&nInput); + err = clSetKernelArg(redKernel, 2, sizeof(cl_int), static_cast<void*>(&nInput)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 3 << ": cl_int: " << nCurWindowSize); - err = clSetKernelArg(redKernel, 3, sizeof(cl_int), (void*)&nCurWindowSize); + err = clSetKernelArg(redKernel, 3, sizeof(cl_int), static_cast<void*>(&nCurWindowSize)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); @@ -1564,7 +1564,7 @@ public: buf = Base::GetCLBuffer(); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 0 << ": cl_mem: " << buf); err = clSetKernelArg(redKernel, 0, sizeof(cl_mem), - (void*)&buf); + static_cast<void*>(&buf)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); @@ -1574,12 +1574,12 @@ public: throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 2 << ": cl_int: " << nInput); - err = clSetKernelArg(redKernel, 2, sizeof(cl_int), (void*)&nInput); + err = clSetKernelArg(redKernel, 2, sizeof(cl_int), static_cast<void*>(&nInput)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 3 << ": cl_int: " << nCurWindowSize); - err = clSetKernelArg(redKernel, 3, sizeof(cl_int), (void*)&nCurWindowSize); + err = clSetKernelArg(redKernel, 3, sizeof(cl_int), static_cast<void*>(&nCurWindowSize)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); @@ -2293,12 +2293,12 @@ public: SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << j << ": " << (vclmem[j] ? "cl_mem" : "double") << ": " << vclmem[j]); err = clSetKernelArg(redKernel, j, vclmem[j] ? sizeof(cl_mem) : sizeof(double), - (void*)&vclmem[j]); + static_cast<void*>(&vclmem[j])); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); } SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << vclmem.size() << ": cl_mem: " << pClmem2); - err = clSetKernelArg(redKernel, vclmem.size(), sizeof(cl_mem), (void*)&pClmem2); + err = clSetKernelArg(redKernel, vclmem.size(), sizeof(cl_mem), static_cast<void*>(&pClmem2)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); @@ -2316,7 +2316,7 @@ public: // Pass pClmem2 to the "real" kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << pClmem2); - err = clSetKernelArg(k, argno, sizeof(cl_mem), (void*)&pClmem2); + err = clSetKernelArg(k, argno, sizeof(cl_mem), static_cast<void*>(&pClmem2)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); } @@ -2346,7 +2346,7 @@ public: else if (DynamicKernelConstantArgument* CA = dynamic_cast<DynamicKernelConstantArgument*>(it->get())) vclmem.push_back(SumIfsArgs(CA->GetDouble())); else - vclmem.push_back(SumIfsArgs((cl_mem)NULL)); + vclmem.push_back(SumIfsArgs(nullptr)); } mpClmem2 = clCreateBuffer(kEnv.mpkContext, CL_MEM_READ_WRITE, sizeof(double) * nVectorWidth, NULL, &err); @@ -2369,23 +2369,23 @@ public: SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << j << ": double: " << vclmem[j].mConst); err = clSetKernelArg(redKernel, j, vclmem[j].mCLMem ? sizeof(cl_mem) : sizeof(double), - vclmem[j].mCLMem ? (void*)&vclmem[j].mCLMem : - (void*)&vclmem[j].mConst); + vclmem[j].mCLMem ? static_cast<void*>(&vclmem[j].mCLMem) : + static_cast<void*>(&vclmem[j].mConst)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); } SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << vclmem.size() << ": cl_mem: " << mpClmem2); - err = clSetKernelArg(redKernel, vclmem.size(), sizeof(cl_mem), (void*)&mpClmem2); + err = clSetKernelArg(redKernel, vclmem.size(), sizeof(cl_mem), static_cast<void*>(&mpClmem2)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << (vclmem.size() + 1) << ": cl_int: " << nInput); - err = clSetKernelArg(redKernel, vclmem.size() + 1, sizeof(cl_int), (void*)&nInput); + err = clSetKernelArg(redKernel, vclmem.size() + 1, sizeof(cl_int), static_cast<void*>(&nInput)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << (vclmem.size() + 2) << ": cl_int: " << nCurWindowSize); - err = clSetKernelArg(redKernel, vclmem.size() + 2, sizeof(cl_int), (void*)&nCurWindowSize); + err = clSetKernelArg(redKernel, vclmem.size() + 2, sizeof(cl_int), static_cast<void*>(&nCurWindowSize)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); // set work group size and execute @@ -2407,7 +2407,7 @@ public: // Pass mpClmem2 to the "real" kernel SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << mpClmem2); - err = clSetKernelArg(k, argno, sizeof(cl_mem), (void*)&mpClmem2); + err = clSetKernelArg(k, argno, sizeof(cl_mem), static_cast<void*>(&mpClmem2)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); } @@ -3935,7 +3935,7 @@ void DynamicKernel::Launch( size_t nr ) SAL_INFO("sc.opencl", "Created buffer " << mpResClmem << " size " << nr << "*" << sizeof(double) << "=" << (nr*sizeof(double))); SAL_INFO("sc.opencl", "Kernel " << mpKernel << " arg " << 0 << ": cl_mem: " << mpResClmem); - err = clSetKernelArg(mpKernel, 0, sizeof(cl_mem), (void*)&mpResClmem); + err = clSetKernelArg(mpKernel, 0, sizeof(cl_mem), static_cast<void*>(&mpResClmem)); if (CL_SUCCESS != err) throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__); // The rest of buffers diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index 59bcd4097bc0..f43f3d9e824a 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -749,7 +749,7 @@ IMPL_LINK_NOARG(ScAppCfg, CompatCommitHdl) void ScAppCfg::SetOptions( const ScAppOptions& rNew ) { - *(ScAppOptions*)this = rNew; + *static_cast<ScAppOptions*>(this) = rNew; OptionsChanged(); } diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index 494fd43e0abf..987194a99af9 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -463,7 +463,7 @@ void ScChartPositioner::CreatePositionMap() { sal_uLong nKey = it1->first; for (ColumnMap::const_iterator it2 = ++pCols->begin(); it2 != pCols->end(); ++it2 ) - it2->second->insert( RowMap::value_type( nKey, (ScAddress *)NULL )); // no data + it2->second->insert( RowMap::value_type( nKey, nullptr )); // no data } } } diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx index cf5965134b2c..46d004bf0285 100644 --- a/sc/source/core/tool/defaultsoptions.cxx +++ b/sc/source/core/tool/defaultsoptions.cxx @@ -166,7 +166,7 @@ void ScDefaultsCfg::ImplCommit() void ScDefaultsCfg::SetOptions( const ScDefaultsOptions& rNew ) { - *(ScDefaultsOptions*)this = rNew; + *static_cast<ScDefaultsOptions*>(this) = rNew; SetModified(); } diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx index f5fa545f5884..b1574a627469 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -376,7 +376,7 @@ IMPL_LINK_NOARG(ScDocCfg, LayoutCommitHdl) void ScDocCfg::SetOptions( const ScDocOptions& rNew ) { - *(ScDocOptions*)this = rNew; + *static_cast<ScDocOptions*>(this) = rNew; aCalcItem.SetModified(); aLayoutItem.SetModified(); diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 5192f46fd129..3e35c626a66c 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -656,7 +656,7 @@ void ScFormulaCfg::ImplCommit() void ScFormulaCfg::SetOptions( const ScFormulaOptions& rNew ) { - *(ScFormulaOptions*)this = rNew; + *static_cast<ScFormulaOptions*>(this) = rNew; SetModified(); } diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index 437c047d2ee7..d5ce5b4b2859 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -243,7 +243,7 @@ void ScInputCfg::Notify( const Sequence<OUString>& /* aPropertyNames */ ) void ScInputCfg::SetOptions( const ScInputOptions& rNew ) { - *(ScInputOptions*)this = rNew; + *static_cast<ScInputOptions*>(this) = rNew; SetModified(); } diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index 209b8968614e..4b3aa5c6765a 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -183,7 +183,7 @@ void ScPrintCfg::ImplCommit() void ScPrintCfg::SetOptions( const ScPrintOptions& rNew ) { - *(ScPrintOptions*)this = rNew; + *static_cast<ScPrintOptions*>(this) = rNew; SetModified(); } diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 8b1bb08a20c0..90a01ffacc1a 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -1592,7 +1592,7 @@ ScRangePair** ScRangePairList::CreateNameSortedArray( size_t& nListCount, pSortArray[j].pPair = maPairs[ j ]; pSortArray[j].pDoc = pDoc; } - qsort( (void*)pSortArray, nListCount, sizeof(ScRangePairNameSort), &ScRangePairList_QsortNameCompare ); + qsort( static_cast<void*>(pSortArray), nListCount, sizeof(ScRangePairNameSort), &ScRangePairList_QsortNameCompare ); // ScRangePair Pointer aufruecken ScRangePair** ppSortArray = reinterpret_cast<ScRangePair**>(pSortArray); for ( j=0; j < nListCount; j++ ) diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index f1c529ad2064..37ac3ab285d0 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -662,7 +662,7 @@ IMPL_LINK_NOARG(ScViewCfg, GridCommitHdl) void ScViewCfg::SetOptions( const ScViewOptions& rNew ) { - *(ScViewOptions*)this = rNew; + *static_cast<ScViewOptions*>(this) = rNew; aLayoutItem.SetModified(); aDisplayItem.SetModified(); aGridItem.SetModified(); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 777e68b6dce6..9ec2733e6fda 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -127,7 +127,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_createInstance( { // #110680# // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_ALL); - return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_getImplementationName(), SvXMLImportFlags::ALL ); + return static_cast<cppu::OWeakObject*>(new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_getImplementationName(), SvXMLImportFlags::ALL )); } OUString SAL_CALL ScXMLImport_Meta_getImplementationName() throw() @@ -146,7 +146,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Meta_createInstance( { // #110680# // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_META); - return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Meta_getImplementationName(), SvXMLImportFlags::META ); + return static_cast<cppu::OWeakObject*>(new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Meta_getImplementationName(), SvXMLImportFlags::META )); } OUString SAL_CALL ScXMLImport_Styles_getImplementationName() throw() @@ -165,7 +165,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Styles_createInstance( { // #110680# // return (cppu::OWeakObject*)new ScXMLImport(SvXMLImportFlagsSTYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES|SvXMLImportFlags::FONTDECLS); - return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Styles_getImplementationName(), SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES|SvXMLImportFlags::FONTDECLS); + return static_cast<cppu::OWeakObject*>(new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Styles_getImplementationName(), SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES|SvXMLImportFlags::FONTDECLS)); } OUString SAL_CALL ScXMLImport_Content_getImplementationName() throw() @@ -184,7 +184,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Content_createInstance( { // #110680# // return (cppu::OWeakObject*)new ScXMLImport(SvXMLImportFlags::META|SvXMLImportFlags::STYLES|SvXMLImportFlags::MASTERSTYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::SETTINGS|SvXMLImportFlags::FONTDECLS); - return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Content_getImplementationName(), SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS); + return static_cast<cppu::OWeakObject*>(new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Content_getImplementationName(), SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS)); } OUString SAL_CALL ScXMLImport_Settings_getImplementationName() throw() @@ -203,7 +203,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Settings_createInstance( { // #110680# // return (cppu::OWeakObject*)new ScXMLImport(SvXMLImportFlags::SETTINGS); - return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Settings_getImplementationName(), SvXMLImportFlags::SETTINGS ); + return static_cast<cppu::OWeakObject*>(new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Settings_getImplementationName(), SvXMLImportFlags::SETTINGS )); } const SvXMLTokenMap& ScXMLImport::GetTableRowCellAttrTokenMap() diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 9cb0a7139afa..4f96f25bb65d 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -190,7 +190,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo { // sax parser sends wrapped exceptions, // try to find the original one - xml::sax::SAXException aSaxEx = *(xml::sax::SAXException*)(&r); + xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException const *>(&r); bool bTryChild = true; while( bTryChild ) diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index ecc1a8bcdf8b..fe7624e05303 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -342,7 +342,7 @@ IMPL_LINK( ScRandomNumberGeneratorDialog, GetFocusHandler, Control*, pCtrl ) { Edit* pEdit = NULL; - if( (pCtrl == (Control*) mpInputRangeEdit) || (pCtrl == (Control*) mpInputRangeButton) ) + if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) ) pEdit = mpInputRangeEdit; if( pEdit ) diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index e8bd197f7949..f423d6f3148d 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -292,9 +292,9 @@ IMPL_LINK( ScSamplingDialog, GetFocusHandler, Control*, pCtrl ) { mpActiveEdit = NULL; - if( (pCtrl == (Control*) mpInputRangeEdit) || (pCtrl == (Control*) mpInputRangeButton) ) + if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) ) mpActiveEdit = mpInputRangeEdit; - else if( (pCtrl == (Control*) mpOutputRangeEdit) || (pCtrl == (Control*) mpOutputRangeButton) ) + else if( (pCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (pCtrl == static_cast<Control*>(mpOutputRangeButton)) ) mpActiveEdit = mpOutputRangeEdit; if( mpActiveEdit ) diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 8887c5a1425c..54b623a7dea4 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -194,9 +194,9 @@ IMPL_LINK( ScStatisticsInputOutputDialog, GetFocusHandler, Control*, pCtrl ) { mpActiveEdit = NULL; - if( (pCtrl == (Control*) mpInputRangeEdit) || (pCtrl == (Control*) mpInputRangeButton) ) + if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) ) mpActiveEdit = mpInputRangeEdit; - else if( (pCtrl == (Control*) mpOutputRangeEdit) || (pCtrl == (Control*) mpOutputRangeButton) ) + else if( (pCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (pCtrl == static_cast<Control*>(mpOutputRangeButton)) ) mpActiveEdit = mpOutputRangeEdit; if( mpActiveEdit ) diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 9279bffdaa2c..8662cf4fed25 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -509,7 +509,7 @@ bool ScDrawTransferObj::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, voi uno::Reference< embed::XStorage > xWorkStore = ::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE ); - uno::Reference < embed::XEmbedPersist > xPers( (embed::XVisualObject*)pEmbObj, uno::UNO_QUERY ); + uno::Reference < embed::XEmbedPersist > xPers( static_cast<embed::XVisualObject*>(pEmbObj), uno::UNO_QUERY ); if ( xPers.is() ) { try diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index e6e2b9890039..83fdfdf91e5f 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -661,13 +661,13 @@ IMPL_LINK(ScPivotLayoutDialog, GetFocusHandler, Control*, pCtrl) { mpActiveEdit = NULL; - if (pCtrl == (Control*) mpSourceEdit || - pCtrl == (Control*) mpSourceButton) + if (pCtrl == static_cast<Control*>(mpSourceEdit) || + pCtrl == static_cast<Control*>(mpSourceButton)) { mpActiveEdit = mpSourceEdit; } - else if (pCtrl == (Control*) mpDestinationEdit || - pCtrl == (Control*) mpDestinationButton) + else if (pCtrl == static_cast<Control*>(mpDestinationEdit) || + pCtrl == static_cast<Control*>(mpDestinationButton)) { mpActiveEdit = mpDestinationEdit; } diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 675b089032b9..17092f568f88 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -347,16 +347,16 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr ) { - if ( pCtr ==(Control*)pEdDataArea || - pCtr ==(Control*)pEdDestArea) + if ( pCtr ==static_cast<Control*>(pEdDataArea) || + pCtr ==static_cast<Control*>(pEdDestArea)) { pRefInputEdit = static_cast<formula::RefEdit*>(pCtr); } - else if(pCtr ==(Control*)pLbDataArea ) + else if(pCtr ==static_cast<Control*>(pLbDataArea) ) { pRefInputEdit = pEdDataArea; } - else if(pCtr ==(Control*)pLbDestArea ) + else if(pCtr ==static_cast<Control*>(pLbDestArea) ) { pRefInputEdit = pEdDestArea; } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 9be99b626c84..bbb6fd5ab174 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5117,7 +5117,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi ) if (!r.HasType(RT_DATABASE) && !pLocalList->findByUpperName(itr->first)) ppSortArray[j++] = &r; } - qsort( (void*)ppSortArray.get(), nValidCount, sizeof(ScRangeData*), + qsort( static_cast<void*>(ppSortArray.get()), nValidCount, sizeof(ScRangeData*), &ScRangeData_QsortNameCompare ); OUString aName; OUStringBuffer aContent; diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 6d320959f46e..09aa41a4b34f 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -216,7 +216,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool() { - return (SfxStyleSheetBasePool*)aDocument.GetStyleSheetPool(); + return static_cast<SfxStyleSheetBasePool*>(aDocument.GetStyleSheetPool()); } // nach dem Laden von Vorlagen aus einem anderen Dokment (LoadStyles, Insert) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 6e75c9bacc0d..a213ddfff834 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -293,7 +293,7 @@ bool ScImportExport::ImportString( const OUString& rText, SotClipboardFormatId n { rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); OString aTmp( rText.getStr(), rText.getLength(), eEnc ); - SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), StreamMode::READ ); + SvMemoryStream aStrm( const_cast<char *>(aTmp.getStr()), aTmp.getLength() * sizeof(sal_Char), StreamMode::READ ); aStrm.SetStreamCharSet( eEnc ); SetNoEndianSwap( aStrm ); //! no swapping in memory return ImportStream( aStrm, OUString(), nFmt ); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 34002b8273ca..80f9d963447d 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -135,7 +135,7 @@ bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) ) { - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, 1); + pView->BegDragObj(aMDPos, nullptr, pHdl, 1); bReturn = true; } else if ( pView->AreObjectsMarked() ) diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index a51363d91865..49d9b7764a63 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -143,7 +143,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if ( bDrag ) { aDragTimer.Start(); - if (pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl)) + if (pView->BegDragObj(aMDPos, nullptr, pHdl)) pView->GetDragMethod()->SetShiftPressed( rMEvt.IsShift() ); bReturn = true; } @@ -289,7 +289,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) aDragTimer.Start(); pHdl=pView->PickHandle(aMDPos); - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); + pView->BegDragObj(aMDPos, nullptr, pHdl); bReturn = true; } else // Objekt am Rand getroffen diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index 7b72133b5d29..ce7cf5c03b5d 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -250,7 +250,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if ( bDrag ) { aDragTimer.Start(); - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); + pView->BegDragObj(aMDPos, nullptr, pHdl); } } } @@ -289,7 +289,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) pHdl=pView->GetHdl(nHdlNum); } - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); + pView->BegDragObj(aMDPos, nullptr, pHdl); } else { @@ -324,7 +324,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) // also adjusted ) Point aGridOff = CurrentGridSyncOffsetAndPos( aMDPos ); - bool bRet = pView->BegCreateObj(aMDPos, (OutputDevice*) NULL); + bool bRet = pView->BegCreateObj(aMDPos, nullptr); if ( bRet ) pView->GetCreateObj()->SetGridOffset( aGridOff ); } @@ -336,7 +336,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) pView->MarkObj(pObj,pPV,false,false); pHdl=pView->PickHandle(aMDPos); - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); + pView->BegDragObj(aMDPos, nullptr, pHdl); return true; } } diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index d1a331f270aa..372fae7c7bda 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -762,7 +762,7 @@ void ScFunctionDockWin::UpdateFunctionList() { pAllFuncList->SetEntryData( pAllFuncList->InsertEntry( *(pDesc->pFuncName) ), - (void*)pDesc ); + const_cast<ScFuncDesc *>(pDesc) ); pDesc = pFuncMgr->Next(); } } @@ -773,7 +773,7 @@ void ScFunctionDockWin::UpdateFunctionList() { const formula::IFunctionDescription* pDesc = *iter; if (pDesc) - pAllFuncList->SetEntryData( pAllFuncList->InsertEntry( pDesc->getFunctionName()), (void*)pDesc); + pAllFuncList->SetEntryData( pAllFuncList->InsertEntry( pDesc->getFunctionName()), const_cast<formula::IFunctionDescription *>(pDesc)); } } diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index 3aca0c89fefd..d34092227cb1 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -186,7 +186,7 @@ class ScImportStringStream : public SvMemoryStream { public: ScImportStringStream( const OUString& rStr ) - : SvMemoryStream( (void*)rStr.getStr(), + : SvMemoryStream( const_cast<sal_Unicode *>(rStr.getStr()), rStr.getLength() * sizeof(sal_Unicode), StreamMode::READ) { SetStreamCharSet( RTL_TEXTENCODING_UNICODE ); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index ceb73ce51289..f7453f02ba9f 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -368,7 +368,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( OUString aDesc; ScRedlinData* pNewData=new ScRedlinData; - pNewData->pData=(void *)pScChangeAction; + pNewData->pData=const_cast<ScChangeAction *>(pScChangeAction); pNewData->nActionNo=pScChangeAction->GetActionNumber(); pNewData->bIsAcceptable=pScChangeAction->IsClickable(); pNewData->bIsRejectable=pScChangeAction->IsRejectable(); @@ -545,7 +545,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( OUString aDesc; ScRedlinData* pNewData=new ScRedlinData; - pNewData->pData=(void *)pScChangeAction; + pNewData->pData=const_cast<ScChangeAction *>(pScChangeAction); pNewData->nActionNo=pScChangeAction->GetActionNumber(); pNewData->bIsAcceptable=pScChangeAction->IsClickable(); pNewData->bIsRejectable=pScChangeAction->IsRejectable(); @@ -733,7 +733,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC ScRedlinData* pNewData=new ScRedlinData; pNewData->nInfo=nSpecial; - pNewData->pData=(void *)pScChangeAction; + pNewData->pData=const_cast<ScChangeActionContent *>(pScChangeAction); pNewData->nActionNo=pScChangeAction->GetActionNumber(); pNewData->bIsAcceptable=pScChangeAction->IsClickable(); pNewData->bIsRejectable=false; @@ -1181,7 +1181,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL { bTheTestFlag=false; ScRedlinData *pParentData=static_cast<ScRedlinData *>(pOriginal->GetUserData()); - pParentData->pData=(void *)pScChangeAction; + pParentData->pData=const_cast<ScChangeAction *>(pScChangeAction); pParentData->nActionNo=pScChangeAction->GetActionNumber(); pParentData->bIsAcceptable=pScChangeAction->IsRejectable(); // select old value pParentData->bIsRejectable=false; @@ -1209,7 +1209,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL { bTheTestFlag=false; ScRedlinData *pParentData=static_cast<ScRedlinData *>(pEntry->GetUserData()); - pParentData->pData=(void *)pScChangeAction; + pParentData->pData=const_cast<ScChangeAction *>(pScChangeAction); pParentData->nActionNo=pScChangeAction->GetActionNumber(); pParentData->bIsAcceptable=pScChangeAction->IsClickable(); pParentData->bIsRejectable=false; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 078d8c08a625..45f93b2fcda7 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -493,7 +493,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: pChild = pChild->GetWindow(GetWindowType::Next)) { vcl::Window *pWin = pChild->GetWindow(GetWindowType::Client); - if (pWin == (vcl::Window*)pRefEdit || pWin == (vcl::Window*)pRefBtn) + if (pWin == static_cast<vcl::Window*>(pRefEdit) || pWin == static_cast<vcl::Window*>(pRefBtn)) continue; // do nothing else if (pWin->IsVisible()) { diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 9bfa8571f08c..dc188dd35d6d 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -811,9 +811,9 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RowClickHdl) IMPL_LINK( ScColRowNameRangesDlg, GetFocusHdl, Control*, pCtrl ) { - if( (pCtrl == (Control*)pEdAssign) || (pCtrl == (Control*)pRbAssign) ) + if( (pCtrl == static_cast<Control*>(pEdAssign)) || (pCtrl == static_cast<Control*>(pRbAssign)) ) pEdActive = pEdAssign; - else if( (pCtrl == (Control*)pEdAssign2) || (pCtrl == (Control*)pRbAssign2) ) + else if( (pCtrl == static_cast<Control*>(pEdAssign2)) || (pCtrl == static_cast<Control*>(pRbAssign2)) ) pEdActive = pEdAssign2; else pEdActive = NULL; diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 995aa7267e49..b589a592f5a0 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -249,7 +249,7 @@ void ScMoveTableDlg::InitDocListBox() } pLbDoc->InsertEntry( aEntryName, i ); - pLbDoc->SetEntryData( i, (void*)&pScSh->GetDocument() ); + pLbDoc->SetEntryData( i, static_cast<void*>(&pScSh->GetDocument()) ); i++; } diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index 511a3413637c..019c3ea4d686 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -118,7 +118,7 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc) pFtSheetStatus->Show(true); pFtSheetStatus->SetStyle(WB_VCENTER); - VclPtr<PushButton> pBtnSheet = VclPtr<PushButton>::Create((vcl::Window*)pSheet); + VclPtr<PushButton> pBtnSheet = VclPtr<PushButton>::Create(static_cast<vcl::Window*>(pSheet)); pBtnSheet->SetText(ScResId(STR_RETYPE)); pBtnSheet->SetClickHdl(LINK(this, ScRetypePassDlg, RetypeBtnHdl)); pBtnSheet->Disable(); diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index e8904376f098..09d0fa1cea88 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -262,11 +262,11 @@ IMPL_LINK( ScSolverDlg, GetFocusHdl, Control*, pCtrl ) Edit* pEdit = NULL; pEdActive = NULL; - if( (pCtrl == (Control*)m_pEdFormulaCell) || (pCtrl == (Control*)m_pRBFormulaCell) ) + if( (pCtrl == static_cast<Control*>(m_pEdFormulaCell)) || (pCtrl == static_cast<Control*>(m_pRBFormulaCell)) ) pEdit = pEdActive = m_pEdFormulaCell; - else if( (pCtrl == (Control*)m_pEdVariableCell) || (pCtrl == (Control*)m_pRBVariableCell) ) + else if( (pCtrl == static_cast<Control*>(m_pEdVariableCell)) || (pCtrl == static_cast<Control*>(m_pRBVariableCell)) ) pEdit = pEdActive = m_pEdVariableCell; - else if( pCtrl == (Control*)m_pEdTargetVal ) + else if( pCtrl == static_cast<Control*>(m_pEdTargetVal) ) pEdit = m_pEdTargetVal; if( pEdit ) diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 3706a34edced..5ff6903d29f2 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -326,11 +326,11 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn ) IMPL_LINK( ScTabOpDlg, GetFocusHdl, Control*, pCtrl ) { - if( (pCtrl == (Control*)m_pEdFormulaRange) || (pCtrl == (Control*)m_pRBFormulaRange) ) + if( (pCtrl == static_cast<Control*>(m_pEdFormulaRange)) || (pCtrl == static_cast<Control*>(m_pRBFormulaRange)) ) pEdActive = m_pEdFormulaRange; - else if( (pCtrl == (Control*)m_pEdRowCell) || (pCtrl == (Control*)m_pRBRowCell) ) + else if( (pCtrl == static_cast<Control*>(m_pEdRowCell)) || (pCtrl == static_cast<Control*>(m_pRBRowCell)) ) pEdActive = m_pEdRowCell; - else if( (pCtrl == (Control*)m_pEdColCell) || (pCtrl == (Control*)m_pRBColCell) ) + else if( (pCtrl == static_cast<Control*>(m_pEdColCell)) || (pCtrl == static_cast<Control*>(m_pRBColCell)) ) pEdActive = m_pEdColCell; else pEdActive = NULL; diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 30a124ebc9da..273e14368bdc 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -517,21 +517,21 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr ) { - if ( pCtr ==(Control *) pEdPrintArea || - pCtr ==(Control *) pEdRepeatRow || - pCtr ==(Control *) pEdRepeatCol) + if ( pCtr ==static_cast<Control *>(pEdPrintArea) || + pCtr ==static_cast<Control *>(pEdRepeatRow) || + pCtr ==static_cast<Control *>(pEdRepeatCol)) { pRefInputEdit = static_cast<formula::RefEdit*>(pCtr); } - else if ( pCtr ==(Control *) pLbPrintArea) + else if ( pCtr ==static_cast<Control *>(pLbPrintArea)) { pRefInputEdit = pEdPrintArea; } - else if ( pCtr ==(Control *) pLbRepeatRow) + else if ( pCtr ==static_cast<Control *>(pLbRepeatRow)) { pRefInputEdit = pEdRepeatRow; } - else if ( pCtr ==(Control *) pLbRepeatCol) + else if ( pCtr ==static_cast<Control *>(pLbRepeatCol)) { pRefInputEdit = pEdRepeatCol; } diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index eb82931e80e1..14959c292c80 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -185,7 +185,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScSpreadsheetSettings_CreateInstance( { SolarMutexGuard aGuard; ScDLL::Init(); - return (cppu::OWeakObject*)new ScSpreadsheetSettings(); + return static_cast<cppu::OWeakObject*>(new ScSpreadsheetSettings()); } OUString ScSpreadsheetSettings::getImplementationName_Static() diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index d25986bde0c4..247c7e19957c 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1637,7 +1637,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // SFX_HINT_DATACHANGED. lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); // the EventObject holds a Ref to this object until after the listener calls @@ -3994,7 +3994,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl( if (bFound) { ScAddress aFoundPos( nCol, nRow, nTab ); - xRet.set((cppu::OWeakObject*) new ScCellObj( pDocShell, aFoundPos )); + xRet.set(static_cast<cppu::OWeakObject*>(new ScCellObj( pDocShell, aFoundPos ))); } } } @@ -5109,7 +5109,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula, { if ( !rFormula.isEmpty() ) { - if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) ) + if ( ScTableSheetObj::getImplementation( static_cast<cppu::OWeakObject*>(this) ) ) { // don't set array formula for sheet object throw uno::RuntimeException(); @@ -5182,7 +5182,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula { if ( rTokens.getLength() ) { - if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) ) + if ( ScTableSheetObj::getImplementation( static_cast<cppu::OWeakObject*>(this) ) ) { throw uno::RuntimeException(); } @@ -5214,7 +5214,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray() { SolarMutexGuard aGuard; - if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) ) + if ( ScTableSheetObj::getImplementation( static_cast<cppu::OWeakObject*>(this) ) ) { // don't create a data array for the sheet throw uno::RuntimeException(); @@ -5261,7 +5261,7 @@ uno::Sequence< uno::Sequence<OUString> > SAL_CALL ScCellRangeObj::getFormulaArra { SolarMutexGuard aGuard; - if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) ) + if ( ScTableSheetObj::getImplementation( static_cast<cppu::OWeakObject*>(this) ) ) { // don't create a data array for the sheet throw uno::RuntimeException(); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 903d10a85db1..d98cea5b3c18 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2853,7 +2853,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint { m_aDataArray.clear(); lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); if( m_pDocument ) { diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 22719a585c3c..44cb4d0bb51d 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1371,7 +1371,7 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScDataPilotTableObj::Refreshed_Impl() { lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); // the EventObject holds a Ref to this object until after the listener calls diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 32941b01b38b..0b826ff680c8 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -1963,7 +1963,7 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener( void ScDatabaseRangeObj::Refreshed_Impl() { lang::EventObject aEvent; - aEvent.Source = (cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); for ( size_t n=0; n<aRefreshListeners.size(); n++ ) aRefreshListeners[n]->refreshed( aEvent ); } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 87d967155cb9..2ee2f0f392b5 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -407,7 +407,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter() xFormatter = NULL; if (xNumberAgg.is()) - xNumberAgg->setDelegator( (cppu::OWeakObject*)this ); + xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) ); osl_atomic_decrement( &m_refCount ); } // if ( !xNumberAgg.is() ) return xNumberAgg; diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 13772e37070e..f3f2c70c9be6 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -188,7 +188,7 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener( void ScSheetLinkObj::Refreshed_Impl() { lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); for ( size_t n=0; n<aRefreshListeners.size(); n++ ) aRefreshListeners[n]->refreshed( aEvent ); } @@ -741,7 +741,7 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener( void ScAreaLinkObj::Refreshed_Impl() { lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); for ( size_t n=0; n<aRefreshListeners.size(); n++ ) aRefreshListeners[n]->refreshed( aEvent ); } @@ -1241,7 +1241,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >& void ScDDELinkObj::Refreshed_Impl() { lang::EventObject aEvent; - aEvent.Source.set((cppu::OWeakObject*)this); + aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); for ( size_t n=0; n<aRefreshListeners.size(); n++ ) aRefreshListeners[n]->refreshed( aEvent ); } diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx index e74c770a3564..80b67b4d4056 100644 --- a/sc/source/ui/unoobj/notesuno.cxx +++ b/sc/source/ui/unoobj/notesuno.cxx @@ -102,7 +102,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScAnnotationObj::getParent() throw(uno: //! existierendes Objekt finden und zurueckgeben ??? if (pDocShell) - return (cppu::OWeakObject*)new ScCellObj( pDocShell, aCellPos ); + return static_cast<cppu::OWeakObject*>(new ScCellObj( pDocShell, aCellPos )); return NULL; } diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 4d2581f8d7c3..68913f657749 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -434,7 +434,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( { case SC_SERVICE_SHEET: // noch nicht eingefuegt - DocShell=Null - xRet.set((sheet::XSpreadsheet*)new ScTableSheetObj(NULL,0)); + xRet.set(static_cast<sheet::XSpreadsheet*>(new ScTableSheetObj(NULL,0))); break; case SC_SERVICE_URLFIELD: case SC_SERVICE_PAGEFIELD: @@ -452,28 +452,28 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( } break; case SC_SERVICE_CELLSTYLE: - xRet.set((style::XStyle*)new ScStyleObj( NULL, SFX_STYLE_FAMILY_PARA, OUString() )); + xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PARA, OUString() ))); break; case SC_SERVICE_PAGESTYLE: - xRet.set((style::XStyle*)new ScStyleObj( NULL, SFX_STYLE_FAMILY_PAGE, OUString() )); + xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PAGE, OUString() ))); break; case SC_SERVICE_AUTOFORMAT: - xRet.set((container::XIndexAccess*)new ScAutoFormatObj( SC_AFMTOBJ_INVALID )); + xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID ))); break; case SC_SERVICE_CELLRANGES: // wird nicht eingefuegt, sondern gefuellt // -> DocShell muss gesetzt sein, aber leere Ranges if (pDocShell) - xRet.set((sheet::XSheetCellRanges*)new ScCellRangesObj( pDocShell, ScRangeList() )); + xRet.set(static_cast<sheet::XSheetCellRanges*>(new ScCellRangesObj( pDocShell, ScRangeList() ))); break; case SC_SERVICE_DOCDEFLTS: if (pDocShell) - xRet.set((beans::XPropertySet*)new ScDocDefaultsObj( pDocShell )); + xRet.set(static_cast<beans::XPropertySet*>(new ScDocDefaultsObj( pDocShell ))); break; case SC_SERVICE_DRAWDEFLTS: if (pDocShell) - xRet.set((beans::XPropertySet*)new ScDrawDefaultsObj( pDocShell )); + xRet.set(static_cast<beans::XPropertySet*>(new ScDrawDefaultsObj( pDocShell ))); break; // Drawing layer tables are not in SvxUnoDrawMSFactory, @@ -512,7 +512,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( case SC_SERVICE_SHEETDOCSET: case SC_SERVICE_DOCCONF: if (pDocShell) - xRet.set((beans::XPropertySet*)new ScDocumentConfiguration(pDocShell)); + xRet.set(static_cast<beans::XPropertySet*>(new ScDocumentConfiguration(pDocShell))); break; case SC_SERVICE_IMAP_RECT: @@ -527,21 +527,21 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( // Support creation of GraphicObjectResolver and EmbeddedObjectResolver case SC_SERVICE_EXPORT_GOR: - xRet.set((::cppu::OWeakObject * )new SvXMLGraphicHelper( GRAPHICHELPER_MODE_WRITE )); + xRet.set(static_cast<cppu::OWeakObject *>(new SvXMLGraphicHelper( GRAPHICHELPER_MODE_WRITE ))); break; case SC_SERVICE_IMPORT_GOR: - xRet.set((::cppu::OWeakObject * )new SvXMLGraphicHelper( GRAPHICHELPER_MODE_READ )); + xRet.set(static_cast<cppu::OWeakObject *>(new SvXMLGraphicHelper( GRAPHICHELPER_MODE_READ ))); break; case SC_SERVICE_EXPORT_EOR: if (pDocShell) - xRet.set((::cppu::OWeakObject * )new SvXMLEmbeddedObjectHelper( *pDocShell, EMBEDDEDOBJECTHELPER_MODE_WRITE )); + xRet.set(static_cast<cppu::OWeakObject *>(new SvXMLEmbeddedObjectHelper( *pDocShell, EMBEDDEDOBJECTHELPER_MODE_WRITE ))); break; case SC_SERVICE_IMPORT_EOR: if (pDocShell) - xRet.set((::cppu::OWeakObject * )new SvXMLEmbeddedObjectHelper( *pDocShell, EMBEDDEDOBJECTHELPER_MODE_READ )); + xRet.set(static_cast<cppu::OWeakObject *>(new SvXMLEmbeddedObjectHelper( *pDocShell, EMBEDDEDOBJECTHELPER_MODE_READ ))); break; case SC_SERVICE_VALBIND: diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 0b35f4c361d3..57dfd482024c 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -107,7 +107,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : { xShape = NULL; // during setDelegator, mxShapeAgg must be the only ref - mxShapeAgg->setDelegator( (cppu::OWeakObject*)this ); + mxShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) ); xShape.set(uno::Reference<drawing::XShape>( mxShapeAgg, uno::UNO_QUERY )); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 45e062197488..6edee14ed8c4 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -1335,7 +1335,7 @@ bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e ) void ScTabViewObj::EndMouseListening() { lang::EventObject aEvent; - aEvent.Source = (cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); for (const XMouseClickHandlerUnoRef rListener : aMouseClickHandlers) { try @@ -1352,7 +1352,7 @@ void ScTabViewObj::EndMouseListening() void ScTabViewObj::EndActivationListening() { lang::EventObject aEvent; - aEvent.Source = (cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); for (const XActivationEventListenerUnoRef rListener : aActivationListeners) { try diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index d70c508b787a..20b9daf19055 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -468,7 +468,7 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::excepti pMeth->SetParameters( aArgs ); SbxVariableRef refTemp = pMeth; // forces a broadcast - SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth)); + SbxVariableRef pNew = new SbxMethod( *static_cast<SbxMethod*>(pMeth)); } } @@ -1266,7 +1266,7 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep { SbxVariableRef refTemp = pMeth; // forces a broadcast - SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth)); + SbxVariableRef pNew = new SbxMethod( *static_cast<SbxMethod*>(pMeth)); OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), OUStringToOString( pNew->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() ); aRet = sbxToUnoValue( pNew ); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index eb1c5af20a57..a844b1a78bc7 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1870,7 +1870,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta SfxInt16Item aPosXItem( SID_RANGE_COL, nPosX ); SfxInt32Item aPosYItem( SID_RANGE_ROW, nPosY ); pViewData->GetDispatcher().Execute( SID_FILL_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aPosXItem, &aPosYItem, (void*)0L ); + &aPosXItem, &aPosYItem, nullptr ); } nButtonDown = 0; @@ -2567,7 +2567,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // back to the origin of the selection where the cell cursor is. SfxBoolItem aAlignCursorItem( FN_PARAM_2, false ); pDisp->Execute( SID_CURRENTCELL, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aPosItem, &aAlignCursorItem, (void*)0L ); + &aPosItem, &aAlignCursorItem, nullptr ); pViewData->GetView()->InvalidateAttribs(); } @@ -4240,7 +4240,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName ); sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; pViewData->GetDispatcher().Execute( nId, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aRangeItem, &aNameItem, (void*) NULL ); + &aRangeItem, &aNameItem, nullptr ); bDone = true; } else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) ) diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 1c19b55751bf..c83383d24ec0 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -275,7 +275,7 @@ void ScTabControl::Select() // Tabelle fuer Basic ist 1-basiert SfxUInt16Item aItem( SID_CURRENTTAB, nPage + 1 ); rDisp.Execute( SID_CURRENTTAB, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, (void*) NULL ); + &aItem, nullptr ); } SfxBindings& rBind = pViewData->GetBindings(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 64a6e9f0f063..fa35ea977b78 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -326,7 +326,7 @@ void ScTabViewShell::UpdateOleZoom() if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { //TODO/LATER: is there a difference between the two GetVisArea methods? - Size aObjSize = ((const SfxObjectShell*)pDocSh)->GetVisArea().GetSize(); + Size aObjSize = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea().GetSize(); if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 ) { vcl::Window* pWin = GetActiveWin(); @@ -1476,7 +1476,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { //TODO/LATER: is there a difference between the two GetVisArea methods? - Rectangle aVisArea = ((const SfxObjectShell*)pDocSh)->GetVisArea(); + Rectangle aVisArea = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea(); SCTAB nVisTab = rDoc.GetVisibleTab(); if (!rDoc.HasTable(nVisTab)) diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index 05c25855b56d..00b324e0cc25 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -129,7 +129,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq ) SdrObject* pSdrObj = pMark->GetMarkedSdrObj(); SvxIMapDlg* pDlg = GetIMapDlg(); - if ( ScIMapDlgGetObj(pDlg) == (void*) pSdrObj ) + if ( ScIMapDlgGetObj(pDlg) == static_cast<void*>(pSdrObj) ) { const ImageMap& rImageMap = ScIMapDlgGetMap(pDlg); ScIMapInfo* pIMapInfo = ScDrawLayer::GetIMapInfo( pSdrObj ); @@ -189,7 +189,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); if ( rMarkList.GetMarkCount() == 1 ) if ( ScIMapDlgGetObj(GetIMapDlg()) == - (void*) rMarkList.GetMark(0)->GetMarkedSdrObj() ) + static_cast<void*>(rMarkList.GetMark(0)->GetMarkedSdrObj()) ) bDisable = false; } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 8795afe9539a..65e9fd10dcbb 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -476,7 +476,7 @@ void ScViewData::InsertTab( SCTAB nTab ) if( nTab >= static_cast<SCTAB>(maTabData.size())) maTabData.resize(nTab+1, NULL); else - maTabData.insert( maTabData.begin() + nTab, (ScViewDataTable *)NULL ); + maTabData.insert( maTabData.begin() + nTab, nullptr ); CreateTabData( nTab ); UpdateCurrentTab(); @@ -539,7 +539,7 @@ void ScViewData::CopyTab( SCTAB nSrcTab, SCTAB nDestTab ) if ( maTabData[nSrcTab] ) maTabData.insert(maTabData.begin() + nDestTab, new ScViewDataTable( *maTabData[nSrcTab] )); else - maTabData.insert(maTabData.begin() + nDestTab, (ScViewDataTable *)NULL); + maTabData.insert(maTabData.begin() + nDestTab, nullptr); UpdateCurrentTab(); mpMarkData->InsertTab( nDestTab ); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 046f01ed808a..cfd2dc0ae653 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -408,7 +408,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, // asynchronous, to avoid doing the whole import in drop handler SfxDispatcher& rDisp = GetViewData().GetDispatcher(); rDisp.Execute(SID_SBA_IMPORT, SfxCallMode::ASYNCHRON, - &aDataDesc, &aTarget, &aAreaNew, (void*)0 ); + &aDataDesc, &aTarget, &aAreaNew, nullptr ); bRet = true; } |