[Libreoffice-commits] core.git: 2 commits - basic/source sc/source
basic/source/classes/sb.cxx| 30 - basic/source/inc/sbintern.hxx | 12 +++--- basic/source/inc/stdobj.hxx|5 +- basic/source/runtime/stdobj.cxx|6 +-- sc/source/filter/excel/xilink.cxx |6 +-- sc/source/filter/inc/xcl97esc.hxx |3 + sc/source/filter/inc/xilink.hxx|3 + sc/source/filter/xcl97/xcl97esc.cxx|4 +- sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx |8 ++-- sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx |2 - sc/source/filter/xml/xmlimprt.cxx | 10 ++--- sc/source/filter/xml/xmlimprt.hxx |4 +- 12 files changed, 49 insertions(+), 44 deletions(-) New commits: commit 4d0d98238b427b98310b6d0624e21bbec6d553f8 Author: Noel Grandin AuthorDate: Thu Mar 2 11:13:28 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 2 12:23:47 2023 + flatten some classes in sc no need to allocate separately where the contained class is only one pointer big Change-Id: Ibd31ff94c6fae6683d2784173057290dd547954e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148087 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index ada9bb1a36b0..10933aecf9c5 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -399,7 +399,7 @@ XclImpExtName::XclImpExtName( XclImpSupbook& rSupbook, XclImpStream& rStrm, XclS } break; case xlExtOLE: -mpMOper.reset( new MOper(rSupbook.GetSharedStringPool(), rStrm) ); +moMOper.emplace( rSupbook.GetSharedStringPool(), rStrm ); break; default: ; @@ -472,7 +472,7 @@ bool extractSheetAndRange(const OUString& rName, OUString& rSheet, OUString& rRa bool XclImpExtName::CreateOleData(const ScDocument& rDoc, const OUString& rUrl, sal_uInt16& rFileId, OUString& rTabName, ScRange& rRange) const { -if (!mpMOper) +if (!moMOper) return false; OUString aSheet, aRangeStr; @@ -488,7 +488,7 @@ bool XclImpExtName::CreateOleData(const ScDocument& rDoc, const OUString& rUrl, // We don't support multi-sheet range for this. return false; -const ScMatrix& rCache = mpMOper->GetCache(); +const ScMatrix& rCache = moMOper->GetCache(); SCSIZE nC, nR; rCache.GetDimensions(nC, nR); if (!nC || !nR) diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index d7724d758981..3a0a606113a7 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include #include "xeroot.hxx" @@ -37,7 +38,7 @@ private: virtual SvStream* ImplQueryPictureStream() override; private: -::std::unique_ptr< ::utl::TempFileFast > mxPicTempFile; +::std::optional< ::utl::TempFileFast > moPicTempFile; SvStream* mpPicStrm; }; diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx index cdfef4c82397..686f928ff1c6 100644 --- a/sc/source/filter/inc/xilink.hxx +++ b/sc/source/filter/inc/xilink.hxx @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include "xllink.hxx" #include "xiroot.hxx" @@ -154,7 +155,7 @@ private: typedef ::std::unique_ptr< ScTokenArray > TokenArrayPtr; XclImpCachedMatrixPtr mxDdeMatrix; /// Cached results of the DDE link. -std::unique_ptr mpMOper; /// Cached values for OLE link +std::optional moMOper; /// Cached values for OLE link TokenArrayPtr mxArray; /// Formula tokens for external name. OUString maName; /// The name of the external name. sal_uInt32 mnStorageId; /// Storage ID for OLE object storages. diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 03336e90b577..99d4db7ca53f 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -75,8 +75,8 @@ XclEscherExGlobal::XclEscherExGlobal( const XclExpRoot& rRoot ) SvStream* XclEscherExGlobal::ImplQueryPictureStream() { -mxPicTempFile.reset( new ::utl::TempFileFast ); -mpPicStrm = mxPicTempFile->GetStream( StreamMode::READWRITE ); +moPicTempFile.emplace(); +mpPicStrm = moPicTempFile->GetStream( StreamMode::READWRITE ); mpPicStrm->SetEndian( SvStreamEndian::LITTLE ); return mpPicStrm; } diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index b8737d663d97..efe429b49faa 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++
[Libreoffice-commits] core.git: 2 commits - basic/source sc/source
basic/source/inc/filefmt.hxx |2 -- sc/source/core/inc/addinlis.hxx |2 +- sc/source/core/inc/adiasync.hxx |2 +- sc/source/core/inc/ddelink.hxx|2 +- sc/source/core/inc/doubleref.hxx |4 ++-- sc/source/core/inc/formulagroupcl.hxx |2 +- sc/source/core/inc/poolhelp.hxx |2 +- sc/source/core/inc/webservicelink.hxx |2 +- sc/source/ui/inc/cellsh.hxx |2 +- sc/source/ui/inc/chartsh.hxx |3 +-- sc/source/ui/inc/client.hxx |2 +- sc/source/ui/inc/docfunc.hxx |2 +- sc/source/ui/inc/drformsh.hxx |2 +- sc/source/ui/inc/drtxtob.hxx |2 +- sc/source/ui/inc/drwtrans.hxx |2 +- sc/source/ui/inc/editsh.hxx |2 +- sc/source/ui/inc/graphsh.hxx |2 +- sc/source/ui/inc/mediash.hxx |2 +- sc/source/ui/inc/msgpool.hxx |4 ++-- sc/source/ui/inc/oleobjsh.hxx |2 +- sc/source/ui/inc/pgbrksh.hxx |2 +- sc/source/ui/inc/pivotsh.hxx |2 +- sc/source/ui/inc/prevwsh.hxx |3 +-- 23 files changed, 24 insertions(+), 28 deletions(-) New commits: commit f6a38df16cb2749f007a644db3d0dee829960114 Author: Arnaud Versini AuthorDate: Sun Jan 31 13:52:33 2021 +0100 Commit: Noel Grandin CommitDate: Mon Feb 1 07:27:41 2021 +0100 basic : remove useless class pre declaration Change-Id: Iba78fb4d28651b298ed6ec5e53b30b2afebb28a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110203 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx index f6cc8e1fe88f..3460b1abbd7f 100644 --- a/basic/source/inc/filefmt.hxx +++ b/basic/source/inc/filefmt.hxx @@ -19,8 +19,6 @@ #pragma once -class SvStream; - // Version 2: data type of the return value for publics // Version 3: new opcodes // Version 4: new opcodes commit e65b1480426667622335aeb2e2413d3d8703a273 Author: Noel AuthorDate: Fri Jan 29 09:57:09 2021 +0200 Commit: Noel Grandin CommitDate: Mon Feb 1 07:27:34 2021 +0100 loplugin:finalclasses in sc Change-Id: Iac689d15effa08dd6216d275ad5294471e48f1b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110155 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx index 612ed992d133..ea83de408e68 100644 --- a/sc/source/core/inc/addinlis.hxx +++ b/sc/source/core/inc/addinlis.hxx @@ -31,7 +31,7 @@ namespace rtl { template class Reference; } class ScDocument; -class ScAddInListener : public cppu::WeakImplHelper< +class ScAddInListener final : public cppu::WeakImplHelper< css::sheet::XResultListener, css::lang::XServiceInfo >, public SvtBroadcaster diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx index bc0a22ee3315..1fd3dd4334cc 100644 --- a/sc/source/core/inc/adiasync.hxx +++ b/sc/source/core/inc/adiasync.hxx @@ -33,7 +33,7 @@ void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData ); class ScDocument; using ScAddInDocs = std::set; -class ScAddInAsync : public SvtBroadcaster +class ScAddInAsync final : public SvtBroadcaster { private: union diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx index 548fd7e0fd03..47cf54475a3a 100644 --- a/sc/source/core/inc/ddelink.hxx +++ b/sc/source/core/inc/ddelink.hxx @@ -31,7 +31,7 @@ class ScMultipleReadHeader; class ScMultipleWriteHeader; class SvStream; -class ScDdeLink : public ::sfx2::SvBaseLink, public SvtBroadcaster +class ScDdeLink final : public ::sfx2::SvBaseLink, public SvtBroadcaster { private: static bool bIsInUpdate; diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx index 621bb2e6ba66..15e30f04 100644 --- a/sc/source/core/inc/doubleref.hxx +++ b/sc/source/core/inc/doubleref.hxx @@ -89,7 +89,7 @@ private: ScDocument* mpDoc; }; -class ScDBInternalRange : public ScDBRangeBase +class ScDBInternalRange final : public ScDBRangeBase { public: explicit ScDBInternalRange(ScDocument* pDoc, const ScRange& rRange); @@ -132,7 +132,7 @@ private: ScRange maRange; }; -class ScDBExternalRange : public ScDBRangeBase +class ScDBExternalRange final : public ScDBRangeBase { public: explicit ScDBExternalRange(ScDocument* pDoc, const ScMatrixRef& pMat); diff --git a/sc/source/core/inc/formulagroupcl.hxx b/sc/source/core/inc/formulagroupcl.hxx index 0e5eb9ee9147..a9853f35b0d9 100644 --- a/sc/source/core/inc/formulagroupcl.hxx +++ b/sc/source/core/inc/formulagroupcl.hxx @@ -14,7 +14,7 @@ namespace sc::opencl { -class FormulaGroupInterpreterOpenCL : public FormulaGroupInterpreter +class FormulaGroupInterpreterOpenCL final : public FormulaGroupInterpreter { public: FormulaGroupInterpreterOpenCL(); diff
[Libreoffice-commits] core.git: 2 commits - basic/source sc/source
basic/source/classes/sbxmod.cxx | 18 ++ sc/source/core/tool/address.cxx |3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) New commits: commit 6755977f590ffcef629f8ccee7675a8368a2ea83 Author: Caolán McNamara AuthorDate: Mon Nov 11 10:52:37 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 11 14:34:51 2019 +0100 cid#1455213 Dereference after null check Change-Id: I2f59ed3c94d3a27fe50ca99f511f9ba5b47ff5d1 Reviewed-on: https://gerrit.libreoffice.org/82426 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index b4cb3af77e0f..b210e7bedc03 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1332,7 +1332,8 @@ static ScRefFlags lcl_ScAddress_Parse_OOo( const sal_Unicode* p, const ScDocumen long n = rtl_ustr_toInt32( p, 10 ) - 1; while (rtl::isAsciiDigit( *p )) p++; -if( n < 0 || n > pDoc->MaxRow() ) +const SCROW nMaxRow = (pDoc ? pDoc->MaxRow() : MAXROW); +if( n < 0 || n > nMaxRow ) nBits = ScRefFlags::ZERO; nRow = static_cast(n); } commit 2297f042693a3c788d1eb264c170c6f59c439001 Author: Caolán McNamara AuthorDate: Mon Nov 11 11:10:29 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 11 14:34:37 2019 +0100 call GetSbData just once Change-Id: Idb63c169c7e39f27bc99e3c3aa9155583f2a65ab Reviewed-on: https://gerrit.libreoffice.org/82431 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0015aeadc098..bbab27dec8c8 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1210,26 +1210,28 @@ void SbModule::RunInit() && !pImage->bInit && pImage->IsFlag( SbiImageFlags::INITCODE ) ) { +SbiGlobals* pSbData = GetSbData(); + // Set flag, so that RunInit get active (Testtool) -GetSbData()->bRunInit = true; +pSbData->bRunInit = true; -SbModule* pOldMod = GetSbData()->pMod; -GetSbData()->pMod = this; +SbModule* pOldMod = pSbData->pMod; +pSbData->pMod = this; // The init code starts always here std::unique_ptr pRt(new SbiRuntime( this, nullptr, 0 )); -pRt->pNext = GetSbData()->pInst->pRun; -GetSbData()->pInst->pRun = pRt.get(); +pRt->pNext = pSbData->pInst->pRun; +pSbData->pInst->pRun = pRt.get(); while( pRt->Step() ) {} -GetSbData()->pInst->pRun = pRt->pNext; +pSbData->pInst->pRun = pRt->pNext; pRt.reset(); -GetSbData()->pMod = pOldMod; +pSbData->pMod = pOldMod; pImage->bInit = true; pImage->bFirstInit = false; // RunInit is not active anymore -GetSbData()->bRunInit = false; +pSbData->bRunInit = false; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - basic/source sc/source sd/source svtools/source svx/source sw/source uui/source vcl/source
basic/source/classes/sb.cxx | 30 - basic/source/classes/sb.src | 646 +++--- sc/source/ui/src/scerrors.src | 228 - sd/source/core/glob.src | 19 - svtools/source/dialogs/so3res.src | 215 svtools/source/misc/ehdl.cxx | 60 +-- svx/source/items/svxerr.src | 163 +++-- svx/source/src/errtxt.src | 483 ++-- sw/source/ui/app/error.src| 174 ++ uui/source/iahndl.cxx | 10 uui/source/iahndl.hxx |8 uui/source/ids.src| 429 - vcl/source/gdi/pngread.cxx|4 13 files changed, 674 insertions(+), 1795 deletions(-) New commits: commit e5b23d924d60e7a0fb67c44c6dad3f4cb3bd5ddc Author: Caolán McNamaraDate: Wed Feb 8 13:33:02 2017 + clarify we're not setting a pal index in the mask no logic changed intended, SetPixelIndex expands to this, just want to clarify that this is an alpha value, not an index into a palette Change-Id: Ie9bb188b116adf3eab4e2bb1d6da8badbaead88b diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index c0a0007..055456a 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -1628,7 +1628,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, nX >>= mnPreviewShift; mxAcc->SetPixelIndex( nY, nX, nPalIndex ); -mpMaskAcc->SetPixelIndex( nY, nX, ~nAlpha ); +mpMaskAcc->SetPixel(nY, nX, BitmapColor(~nAlpha)); } void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, @@ -1642,7 +1642,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, mxAcc->SetPixel( nY, nX, rBitmapColor ); if (!mpMaskAcc) return; -mpMaskAcc->SetPixelIndex( nY, nX, ~nAlpha ); +mpMaskAcc->SetPixel(nY, nX, BitmapColor(~nAlpha)); } sal_uInt32 PNGReaderImpl::ImplReadsal_uInt32() commit 2c91fc19445bb503652e97cc8b9f9014db436c37 Author: Caolán McNamara Date: Wed Feb 8 12:51:44 2017 + replace localresource of strings and keys with StringArray Change-Id: I402f5485af0c1e60677b8291c879bc7ca14633d3 diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 60d71c7..fde845d 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -19,6 +19,7 @@ #include "sb.hxx" #include +#include #include #include #include @@ -1584,39 +1585,22 @@ void StarBASIC::SetErrorData( SbError nCode, sal_uInt16 nLine, aGlobals.nCol2 = nCol2; } - -// help class for access to string SubResource of a Resource. -// Source: sfx2\source\doc\docfile.cxx (TLX) -struct BasicStringList_Impl : private Resource -{ -ResId aResId; - -BasicStringList_Impl( ResId& rErrIdP, sal_uInt16 nId) -: Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr() ){} -~BasicStringList_Impl() { FreeResource(); } - -OUString GetString(){ return aResId.toString(); } -bool IsErrorTextAvailable() -{ return IsAvailableRes(aResId.SetRT(RSC_STRING)); } -}; - - void StarBASIC::MakeErrorText( SbError nId, const OUString& aMsg ) { SolarMutexGuard aSolarGuard; sal_uInt16 nOldID = GetVBErrorCode( nId ); // instantiate the help class -BasResId aId( RID_BASIC_START ); -BasicStringList_Impl aMyStringList( aId, sal_uInt16(nId & ERRCODE_RES_MASK) ); - -if( aMyStringList.IsErrorTextAvailable() ) +ResStringArray aMyStringList(BasResId(RID_BASIC_START)); +sal_uInt32 nErrIdx = aMyStringList.FindIndex(sal_uInt16(nId & ERRCODE_RES_MASK)); +if (nErrIdx != RESARRAY_INDEX_NOTFOUND) { // merge message with additional text -OUStringBuffer aMsg1(aMyStringList.GetString()); +OUString sError = aMyStringList.GetString(nErrIdx); +OUStringBuffer aMsg1(sError); // replace argument placeholder with %s OUString aSrgStr( "$(ARG1)" ); -sal_Int32 nResult = aMyStringList.GetString().indexOf( aSrgStr ); +sal_Int32 nResult = sError.indexOf(aSrgStr); if( nResult >= 0 ) { diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index e3da1c4..5b75b94 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -21,522 +21,142 @@ #include "sb.hrc" #include -Resource RID_BASIC_START +StringArray RID_BASIC_START { -String ERRCODE_BASIC_SYNTAX & ERRCODE_RES_MASK -{ -Text [ en-US ] = "Syntax error." ; -}; -String ERRCODE_BASIC_NO_GOSUB & ERRCODE_RES_MASK -{ -Text [ en-US ] = "Return without Gosub." ; -}; -String ERRCODE_BASIC_REDO_FROM_START & ERRCODE_RES_MASK -{ -Text [ en-US ] = "Incorrect entry; please retry." ; -}; -String ERRCODE_BASIC_BAD_ARGUMENT & ERRCODE_RES_MASK -{ -Text [ en-US ] = "Invalid procedure call." ; -}; -
[Libreoffice-commits] core.git: 2 commits - basic/source sc/source sw/source vcl/inc
basic/source/comp/parser.cxx |3 -- basic/source/runtime/methods.cxx | 22 ++ basic/source/runtime/runtime.cxx | 55 ++-- basic/source/sbx/sbxobj.cxx | 20 ++--- sc/source/core/data/documen8.cxx | 25 +++- sc/source/core/data/documen9.cxx |3 -- sc/source/core/data/drwlayer.cxx |7 ++-- sc/source/core/data/validat.cxx |3 -- sc/source/core/tool/editutil.cxx |9 ++ sc/source/core/tool/interpr2.cxx |3 -- sc/source/filter/html/htmlexp.cxx |4 -- sc/source/ui/app/scmod.cxx| 17 --- sc/source/ui/docshell/docfunc.cxx |4 +- sc/source/ui/docshell/docsh3.cxx |3 -- sc/source/ui/docshell/docsh4.cxx | 57 ++ sc/source/ui/docshell/docsh6.cxx |6 +--- sc/source/ui/docshell/servobj.cxx |8 ++--- sc/source/ui/drawfunc/drtxtob.cxx |6 +--- sw/source/core/frmedt/fefly1.cxx | 52 +++--- vcl/inc/svdata.hxx|1 20 files changed, 150 insertions(+), 158 deletions(-) New commits: commit 70409a450f62736885cf596991cdb7b42a19a88a Author: Caolán McNamaraDate: Tue Oct 6 12:30:18 2015 +0100 test tool is gone Change-Id: I3d99a62c27b914cc6286ddf013f55d677484 diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index f45ade7..52ea411 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -342,7 +342,6 @@ struct ImplSVData VclPtr mpIntroWindow; // the splash screen DockingManager* mpDockingManager; BlendFrameCache*mpBlendFrameCache; -boolmbIsTestTool; oslThreadIdentifier mnMainThreadId; rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; commit 31ee230b6efac9a6a60ceb5c2367ae9a5cf98929 Author: Caolán McNamara Date: Tue Oct 6 10:50:12 2015 +0100 Related: tdf#94814 some cleanup of static_cast following dynamic_cast to the same type Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index c3e7a89..2953387 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -156,10 +156,9 @@ SbiSymDef* SbiParser::CheckRTLForSym(const OUString& rSym, SbxDataType eType) if (!pVar) return nullptr; -if (dynamic_cast(pVar) != nullptr) +if (SbxMethod* pMethod = dynamic_cast (pVar)) { SbiProcDef* pProc_ = aRtlSyms.AddProc( rSym ); -SbxMethod* pMethod = static_cast (pVar); if (pMethod->IsRuntimeFunction()) { pProc_->SetType( pMethod->GetRuntimeFunctionReturnType() ); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9d83fcc..6c396ae 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4449,13 +4449,13 @@ RTLFUNC(Load) SbxBase* pObj = static_cast (rPar.Get(1)->GetObject()); if ( pObj ) { -if( dynamic_cast(pObj) != nullptr ) +if (SbUserFormModule* pModule = dynamic_cast (pObj)) { -static_cast (pObj)->Load(); +pModule->Load(); } -else if( dynamic_cast(pObj) != nullptr ) +else if (SbxObject* pSbxObj = dynamic_cast (pObj)) { -SbxVariable* pVar = static_cast (pObj)->Find( OUString("Load"), SbxCLASS_METHOD ); +SbxVariable* pVar = pSbxObj->Find(OUString("Load"), SbxCLASS_METHOD); if( pVar ) { pVar->GetInteger(); @@ -4480,14 +4480,13 @@ RTLFUNC(Unload) SbxBase* pObj = static_cast (rPar.Get(1)->GetObject()); if ( pObj ) { -if( dynamic_cast(pObj) != nullptr ) +if (SbUserFormModule* pFormModule = dynamic_cast (pObj)) { -SbUserFormModule* pFormModule = static_cast (pObj); pFormModule->Unload(); } -else if( dynamic_cast(pObj) != nullptr ) +else if (SbxObject *pSbxObj = dynamic_cast (pObj)) { -SbxVariable* pVar = static_cast (pObj)->Find( OUString("Unload"), SbxCLASS_METHOD ); +SbxVariable* pVar = pSbxObj->Find(OUString("Unload"), SbxCLASS_METHOD); if( pVar ) { pVar->GetInteger(); @@ -4534,17 +4533,14 @@ RTLFUNC(SavePicture) } SbxBase* pObj = static_cast (rPar.Get(1)->GetObject()); -if( dynamic_cast(pObj) != nullptr ) +if (SbStdPicture *pPicture = dynamic_cast (pObj)) { SvFileStream aOStream( rPar.Get(2)->GetOUString(), StreamMode::WRITE | StreamMode::TRUNC ); -Graphic aGraphic = static_cast (pObj)->GetGraphic(); +