[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source
basctl/source/dlged/dlgedobj.cxx |2 +- basic/source/classes/sb.cxx|2 +- binaryurp/source/bridgefactory.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit c05595d2420b92a428b45cfaf65a3adf88fd8bed Author: Julien Nabet AuthorDate: Sat Nov 18 12:41:05 2023 +0100 Commit: Julien Nabet CommitDate: Sat Nov 18 18:38:01 2023 +0100 c++20: use std::erase instead of std::removed followed by erase (part 1) Change-Id: I8d038fc37a4de25bdeff2e2cc55775e3981240b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159610 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index a3c2b396f791..5b87393e51bc 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -1288,7 +1288,7 @@ void DlgEdForm::AddChild( DlgEdObj* pDlgEdObj ) void DlgEdForm::RemoveChild( DlgEdObj* pDlgEdObj ) { -pChildren.erase( std::remove( pChildren.begin() , pChildren.end() , pDlgEdObj ) ); +std::erase(pChildren, pDlgEdObj); } void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt ) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index eeef54222647..8187e6126651 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1074,7 +1074,7 @@ void StarBASIC::Remove( SbxVariable* pVar ) { // #87540 Can be last reference! SbModuleRef xVar = pModule; -pModules.erase(std::remove(pModules.begin(), pModules.end(), xVar)); +std::erase(pModules, xVar); pVar->SetParent( nullptr ); EndListening( pVar->GetBroadcaster() ); } diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index 835c264a9d92..cd43fe592b0e 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -49,7 +49,7 @@ void BridgeFactory::removeBridge( osl::MutexGuard g(m_aMutex); if (n.isEmpty()) { -unnamed_.erase(std::remove(unnamed_.begin(), unnamed_.end(), bridge), unnamed_.end()); +std::erase(unnamed_, bridge); } else {
[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source canvas/workben chart2/source comphelper/source connectivity/source cppcanvas/source cppuhelper/qa cppuhelper/source cui/sour
basctl/source/dlged/propbrw.cxx |2 basic/source/comp/token.cxx |2 basic/source/sbx/sbxscan.cxx |2 binaryurp/source/bridge.cxx |2 canvas/workben/canvasdemo.cxx |2 chart2/source/tools/ConfigColorScheme.cxx |2 comphelper/source/misc/base64.cxx |4 comphelper/source/misc/graphicmimetype.cxx|2 comphelper/source/misc/syntaxhighlight.cxx|4 connectivity/source/commontools/TDatabaseMetaDataBase.cxx |2 connectivity/source/drivers/ado/Awrapado.cxx | 24 +-- connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |2 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx |2 connectivity/source/drivers/postgresql/pq_statics.cxx | 32 ++-- connectivity/source/parse/sqlnode.cxx |2 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 cppuhelper/qa/unourl/cppu_unourl.cxx | 18 +- cppuhelper/source/bootstrap.cxx |4 cui/source/customize/acccfg.cxx |2 cui/source/options/optcolor.cxx |2 cui/source/options/optgenrl.cxx |2 cui/source/options/treeopt.cxx| 24 +-- cui/source/tabpages/border.cxx|4 cui/source/tabpages/chardlg.cxx |4 cui/source/tabpages/numfmt.cxx|2 cui/source/tabpages/page.cxx |4 cui/source/tabpages/swpossizetabpage.cxx | 96 +++--- 27 files changed, 125 insertions(+), 125 deletions(-) New commits: commit 6abc09926c9b55a445b906303f56c6ec7fdeabf9 Author: Pragat Pandya AuthorDate: Sun May 8 23:56:45 2022 +0530 Commit: Bartosz Kosiorek CommitDate: Mon May 9 20:42:03 2022 +0200 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027 Reviewed-by: Bartosz Kosiorek Tested-by: Jenkins diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 4a8481249640..d7ab2ee633ef 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -137,7 +137,7 @@ void PropBrw::ImplReCreateController() ::cppu::ContextEntry_Init( "ContextDocument", Any( m_xContextDocument ) ) }; Reference< XComponentContext > xInspectorContext( -::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) ); +::cppu::createComponentContext( aHandlerContextInfo, std::size( aHandlerContextInfo ), xOwnContext ) ); // create a property browser controller Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW ); diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 9be47bf41ba1..a060b3fd9318 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -377,7 +377,7 @@ SbiToken SbiTokenizer::Next() } // valid token? short lb = 0; -short ub = SAL_N_ELEMENTS(aTokTable_Basic)-1; +short ub = std::size(aTokTable_Basic)-1; short delta; do { diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 82080df4a62a..ec2783b1b837 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -600,7 +600,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const sal_Unicode aBuf[2]; aBuf[0] = '0'; aBuf[1] = '0' + nMin; - rRes = OUString(aBuf, SAL_N_ELEMENTS(aBuf)); + rRes = OUString(aBuf, std::size(aBuf)); } else { diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 050ebec7403c..d06e7d29f31a 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -991,7 +991,7 @@ void Bridge::makeReleaseCall( // its own: static auto const tid = [] { static sal_Int8 const id[] = {'r', 'e', 'l', 'e', 'a', 's', 'e', 'h', 'a', 'c', 'k'}; -return rtl::ByteSequence(id, SAL_N_ELEMENTS(id)); +return rtl::ByteSequence(id, std::size(id)); }(); sendRequest( tid, oid, type, diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index 031068adf9e9..431f9cee04a1 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -208,7 +208,7 @@ class DemoRenderer { const
[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source
basctl/source/basicide/baside2b.cxx |4 ++-- basic/source/basmgr/basmgr.cxx |4 ++-- basic/source/uno/namecont.cxx |2 +- binaryurp/source/bridgefactory.cxx |2 +- 4 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 7874cba9709dd0973a81d5894d6daa9570ac86bf Author: Noel AuthorDate: Tue Feb 16 08:54:57 2021 +0200 Commit: Noel Grandin CommitDate: Tue Feb 16 08:57:02 2021 +0100 loplugin:referencecasting in basctl..binaryurp Change-Id: I3fbc287cf76e453e2c464837d2431ff19501fde3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110968 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 3bb09f3bb140..4da4b8fc1956 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -257,7 +257,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : notifier_ = n; } const Sequence aPropertyNames{"FontHeight", "FontName"}; -n->addPropertiesChangeListener(aPropertyNames, listener_.get()); +n->addPropertiesChangeListener(aPropertyNames, listener_); } @@ -280,7 +280,7 @@ void EditorWindow::dispose() n = notifier_; } if (n.is()) { -n->removePropertiesChangeListener(listener_.get()); +n->removePropertiesChangeListener(listener_); } aSyntaxIdle.Stop(); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 1254768a2b00..881deabd75e1 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -497,7 +497,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star static void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInfo ) { -uno::Reference< script::XLibraryContainer > xScriptCont( rInfo.mxScriptCont.get() ); +uno::Reference< script::XLibraryContainer > xScriptCont( rInfo.mxScriptCont ); if ( !xScriptCont.is() ) return; @@ -538,7 +538,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo ) { mpImpl->maContainerInfo = rInfo; -uno::Reference< script::XLibraryContainer > xScriptCont( mpImpl->maContainerInfo.mxScriptCont.get() ); +uno::Reference< script::XLibraryContainer > xScriptCont( mpImpl->maContainerInfo.mxScriptCont ); if( xScriptCont.is() ) { // Register listener for lib container diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 61b62632ef6f..a2b0391f92da 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -2681,7 +2681,7 @@ void SfxLibraryContainer::_disposing( const EventObject& _rSource ) void SAL_CALL SfxLibraryContainer::disposing() { Reference< XModel > xModel = mxOwnerDocument; -EventObject aEvent( xModel.get() ); +EventObject aEvent( xModel ); maVBAScriptListeners.disposing( aEvent ); stopAllComponentListening(); mxOwnerDocument.clear(); diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index 2178351015c0..803899c8a7e3 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -113,7 +113,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( } } b->start(); -return css::uno::Reference< css::bridge::XBridge >(b.get()); +return b; } css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source
basctl/source/dlged/dlgedobj.cxx|2 +- basic/source/comp/sbcomp.cxx|4 ++-- basic/source/runtime/dllmgr-x86.cxx |2 +- binaryurp/source/marshal.cxx|2 +- 4 files changed, 5 insertions(+), 5 deletions(-) New commits: commit a5090ccf756aac2365fd52d7cf9b423f54c5c6f6 Author: Herbert Dürr h...@apache.org Date: Tue Feb 4 08:48:47 2014 + Related: #i123862# use O*String's isEmpty() method... to check for emptiness in modules starting with 'b' Patch-by: j.nitsc...@ok.de Review-by: h...@apache.org (cherry picked from commit 87204b0f4062ef8fc8f138ad15f4378da609d4e2) Conflicts: basctl/source/basicide/baside2.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/localizationmgr.cxx basctl/source/dlged/dlgedobj.cxx basic/source/basmgr/basmgr.cxx basic/source/basmgr/vbahelper.cxx basic/source/classes/sbunoobj.cxx basic/source/comp/sbcomp.cxx basic/source/runtime/iosys.cxx basic/source/runtime/methods.cxx basic/source/runtime/methods1.cxx basic/source/runtime/step2.cxx basic/source/uno/namecont.cxx basic/source/uno/scriptcont.cxx binaryurp/source/bridge.cxx binaryurp/source/bridgefactory.cxx binaryurp/source/reader.cxx binaryurp/source/unmarshal.cxx bridges/source/cpp_uno/cc50_solaris_intel/except.cxx bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx bridges/source/cpp_uno/shared/vtablefactory.cxx bridges/source/jni_uno/jni_data.cxx Change-Id: I37bd84e0a1d6426759dba81854faf32c88147fe1 diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 3645142..35c41cf 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -499,7 +499,7 @@ void SAL_CALL DlgEdObj::NameChange( const ::com::sun::star::beans::PropertyChan Reference container::XNameAccess xNameAcc((GetDlgEdForm()-GetUnoControlModel()), UNO_QUERY); if ( xNameAcc.is() xNameAcc-hasByName(aOldName) ) { -if ( !xNameAcc-hasByName(aNewName) !aNewName.isEmpty()) +if (!xNameAcc-hasByName(aNewName) !aNewName.isEmpty()) { // remove the control by the old name and insert the control by the new name in the container Reference container::XNameContainer xCont(xNameAcc, UNO_QUERY ); diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 043af20..e5f0ada 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -594,7 +594,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) const TraceTextData rTraceTextData = itInner-second; const OString rStr_STMNT = rTraceTextData.m_aTraceStr_STMNT; bool bSTMT = false; -if( rStr_STMNT.getLength() ) +if( !rStr_STMNT.isEmpty() ) { bSTMT = true; } @@ -628,7 +628,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) nIndent += GnIndentForPCode; const OString rStr_PCode = rTraceTextData.m_aTraceStr_PCode; -if( rStr_PCode.getLength() ) +if( !rStr_PCode.isEmpty() ) { lcl_lineOut( rStr_PCode.getStr(), lcl_getSpaces( nIndent ), bPrintTimeStamp ? TimeBuffer : NULL ); diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index a4fcbf3..d97f298 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -572,7 +572,7 @@ SbError call( SbError getProcData(HMODULE handle, OUString const name, ProcData * proc) { OSL_ASSERT(proc != 0); -if (name.getLength() != 0 name[0] == '@') { //TODO: @ vs. #??? +if ( !name.isEmpty() name[0] == '@' ) { //TODO: @ vs. #??? sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input if (n = 0 || n 0x) { return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode? diff --git a/binaryurp/source/marshal.cxx b/binaryurp/source/marshal.cxx index 476fb19..241c2be 100644 --- a/binaryurp/source/marshal.cxx +++ b/binaryurp/source/marshal.cxx @@ -154,7 +154,7 @@ void Marshal::writeOid( { bool found; sal_uInt16 idx; -if (oid.getLength() == 0) { +if ( oid.isEmpty() ) { found = true; idx = cache::ignore; } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits