[Libreoffice-commits] core.git: cli_ure/source connectivity/source

2023-02-28 Thread Gabor Kelemen (via logerrit)
 cli_ure/source/climaker/climaker_app.cxx   |9 -
 connectivity/source/drivers/ado/AStatement.cxx |1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit ed989d6b79ae2d6dbd9d4b17567497d228259a58
Author: Gabor Kelemen 
AuthorDate: Mon Feb 27 10:23:14 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Feb 28 11:17:57 2023 +

Drop 'using namespace ::std' in Windows-specific files

Change-Id: Id66d42f2139fbcac0fed56fe534107f65d198f02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147877
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cli_ure/source/climaker/climaker_app.cxx 
b/cli_ure/source/climaker/climaker_app.cxx
index 7b9bc001ae1b..9c596cd97017 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -39,7 +39,6 @@
 #include "com/sun/star/uno/XComponentContext.hpp"
 #include "unoidl/unoidl.hxx"
 
-using namespace ::std;
 using namespace ::System::Reflection;
 
 
@@ -285,10 +284,10 @@ SAL_IMPLEMENT_MAIN()
 get_option_info( "assembly-trademark" );
 
 OUString output;
-vector< OUString > mandatory_registries;
-vector< OUString > extra_registries;
-vector< OUString > extra_assemblies;
-vector< OUString > explicit_types;
+std::vector< OUString > mandatory_registries;
+std::vector< OUString > extra_registries;
+std::vector< OUString > extra_assemblies;
+std::vector< OUString > explicit_types;
 OUString version, product, description, company, copyright, trademark,
 keyfile, delaySign;
 
diff --git a/connectivity/source/drivers/ado/AStatement.cxx 
b/connectivity/source/drivers/ado/AStatement.cxx
index 1c48734d84fb..c2a09385dee6 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -51,7 +51,6 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
-using namespace ::std;
 
 OStatement_Base::OStatement_Base(OConnection* _pConnection ) :  
OStatement_BASE(m_aMutex)
 
,OPropertySetHelper(OStatement_BASE::rBHelper)


[Libreoffice-commits] core.git: cli_ure/source connectivity/source cppuhelper/source dbaccess/source registry/source sal/rtl sc/qa sc/source sd/source sfx2/source starmath/source svx/source sw/source

2018-10-27 Thread Libreoffice Gerrit user
 cli_ure/source/uno_bridge/cli_environment.cxx |3 +--
 connectivity/source/drivers/postgresql/pq_statics.cxx |1 -
 cppuhelper/source/propshlp.cxx|6 +-
 dbaccess/source/ui/dlg/DbAdminImpl.cxx|2 +-
 registry/source/keyimpl.cxx   |4 ++--
 sal/rtl/digest.cxx|   18 ++
 sc/qa/unit/helper/qahelper.cxx|3 +--
 sc/source/core/data/dptabres.cxx  |1 -
 sc/source/core/tool/interpr5.cxx  |6 ++
 sd/source/ui/app/sdxfer.cxx   |2 +-
 sfx2/source/appl/appserv.cxx  |7 ---
 starmath/source/parse.cxx |2 --
 svx/source/form/fmshimp.cxx   |1 -
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx|1 -
 svx/source/svdraw/svddrgv.cxx |1 -
 sw/source/core/unocore/unoframe.cxx   |9 -
 sw/source/filter/ww8/writerwordglue.cxx   |5 ++---
 sw/source/filter/ww8/ww8par.cxx   |4 ++--
 sw/source/uibase/uno/unodispatch.cxx  |1 -
 vbahelper/source/vbahelper/vbacommandbar.cxx  |4 ++--
 vcl/source/control/button.cxx |4 ++--
 vcl/source/gdi/impgraph.cxx   |1 -
 vcl/win/window/salframe.cxx   |4 
 xmloff/source/draw/sdxmlimp.cxx   |3 +--
 24 files changed, 32 insertions(+), 61 deletions(-)

New commits:
commit dc1858783e72bba808dbd87b5b03d5170449ad52
Author: Mike Kaganski 
AuthorDate: Sat Oct 27 03:16:18 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 27 09:23:52 2018 +0200

tdf#120703 (PVS): V519 The variable is assigned values twice successively

Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27
Reviewed-on: https://gerrit.libreoffice.org/62406
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cli_ure/source/uno_bridge/cli_environment.cxx 
b/cli_ure/source/uno_bridge/cli_environment.cxx
index 2c4bdcde4129..3c054b5be870 100644
--- a/cli_ure/source/uno_bridge/cli_environment.cxx
+++ b/cli_ure/source/uno_bridge/cli_environment.cxx
@@ -117,8 +117,7 @@ System::Object^ 
Cli_environment::getRegisteredInterface(System::String^ oid,
 System::Type^ type)
 {
 //try if it is a UNO interface
-System::Object^ ret = nullptr;
-ret = m_objects[oid];
+System::Object^ ret = m_objects[oid];
 if (! ret)
 {
 //try if it is a proxy for a cli object
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx 
b/connectivity/source/drivers/postgresql/pq_statics.cxx
index 622a06ef7fac..0bec73919687 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -124,7 +124,6 @@ Statics & getStatics()
 statics.NO_NULLS = "NO_NULLS";
 statics.NULABLE = "NULABLE";
 statics.NULLABLE_UNKNOWN = "NULLABLE_UNKNOWN";
-statics.cPERCENT = "%";
 
 statics.TYPE = "Type";
 statics.TYPE_NAME = "TypeName";
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 46494e00c827..1a54edffe40e 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -756,11 +756,7 @@ void OPropertySetHelper::fire
 
 if( !bVetoable )
 {
-OInterfaceContainerHelper * pCont = nullptr;
-pCont = rBHelper.aLC.getContainer(
-getPropertiesTypeIdentifier(  )
- );
-if( pCont )
+if (auto pCont = 
rBHelper.aLC.getContainer(getPropertiesTypeIdentifier()))
 {
 // Here is a Bug, unbound properties are also fired
 OInterfaceIteratorHelper aIt( *pCont );
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx 
b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 20f814313551..b5f514cf41d0 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -258,7 +258,7 @@ bool 
ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal
 AuthenticationRequest aRequest;
 aRequest.ServerName = sName;
 aRequest.Diagnostic = sLoginRequest;
-aRequest.HasRealm   = aRequest.HasAccount = false;
+aRequest.HasRealm   = false;
 // aRequest.Realm
 aRequest.HasUserName = pUser != nullptr;
 aRequest.UserName= pUser ? pUser->GetValue() : OUString();
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index a717c5df6764..508d36ea3a66 100644
--- a/registry/source/keyimpl.cxx
+++ 

[Libreoffice-commits] core.git: cli_ure/source connectivity/source

2014-12-08 Thread Michael Weghorn
 cli_ure/source/uno_bridge/cli_data.cxx  |4 +---
 connectivity/source/drivers/dbase/DTable.cxx|6 ++
 connectivity/source/drivers/dbase/dindexnode.cxx|3 +--
 connectivity/source/drivers/file/FStatement.cxx |3 +--
 connectivity/source/drivers/firebird/Util.cxx   |2 +-
 connectivity/source/drivers/hsqldb/HDriver.cxx  |3 +--
 connectivity/source/drivers/jdbc/PreparedStatement.cxx  |3 ++-
 connectivity/source/drivers/macab/MacabRecords.cxx  |3 +--
 connectivity/source/drivers/odbc/OPreparedStatement.cxx |5 +
 9 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 54cbb57d4c3ccf1e1c8455ac413183edbdeb3416
Author: Michael Weghorn m.wegh...@posteo.de
Date:   Mon Dec 8 19:36:22 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ib35eb591534c3f23adc3cb7b7fa9696dc5cbeabf
Reviewed-on: https://gerrit.libreoffice.org/13383
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/cli_ure/source/uno_bridge/cli_data.cxx 
b/cli_ure/source/uno_bridge/cli_data.cxx
index c1671d7..3efd7a4 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -1058,12 +1058,10 @@ void Bridge::map_to_uno(void * uno_data, 
System::Object^ cli_data,
 sal_Int32 nPos = 0;
 try
 {
-typelib_TypeDescriptionReference * member_type= NULL;
-
 OUString usUnoException(com.sun.star.uno.Exception);
 for (; nPos  nMembers; ++nPos)
 {
-member_type= comp_td-ppTypeRefs[nPos];
+typelib_TypeDescriptionReference * member_type= 
comp_td-ppTypeRefs[nPos];
 System::Object^ val= nullptr;
 if (cli_data != nullptr)
 {
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index 19fc244..8f10214 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2551,12 +2551,11 @@ void ODbaseTable::copyData(ODbaseTable* 
_pNewTable,sal_Int32 _nPos)
 (aRow-get())[nPos]-setBound(false);
 
 
-bool bOk = true;
 sal_Int32 nCurPos;
 OValueRefVector::Vector::iterator aIter;
 for(sal_uInt32 nRowPos = 0; nRowPos  m_aHeader.db_anz;++nRowPos)
 {
-bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
+bool bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
 if ( bOk )
 {
 bOk = fetchRow( aRow, *m_aColumns, true, true);
@@ -2698,8 +2697,6 @@ End:
 
 bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue aVariable)
 {
-bool bIsText = true;
-
 m_pMemoStream-Seek(nBlockNo * m_aMemoHeader.db_size);
 switch (m_aMemoHeader.db_typ)
 {
@@ -2732,6 +2729,7 @@ bool ODbaseTable::ReadMemo(sal_Size nBlockNo, 
ORowSetValue aVariable)
 case MemoFoxPro:
 case MemodBaseIV: // dBase IV-Memofield with length
 {
+bool bIsText = true;
 char sHeader[4];
 m_pMemoStream-Read(sHeader,4);
 // Foxpro stores text and binary data
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx 
b/connectivity/source/drivers/dbase/dindexnode.cxx
index 01f66a9..65774cb 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -194,7 +194,6 @@ bool ONDXPage::Insert(ONDXNode rNode, sal_uInt32 nRowsLeft)
 bool bAppend = nRowsLeft  0;
 if (IsFull())
 {
-bool bResult = true;
 ONDXNode aSplitNode;
 if (bAppend)
 aSplitNode = rNode;
@@ -204,7 +203,7 @@ bool ONDXPage::Insert(ONDXNode rNode, sal_uInt32 nRowsLeft)
 aSplitNode = (*this)[nCount-1];
 if(rNode.GetKey() = aSplitNode.GetKey())
 {
-
+bool bResult = true;
 // this practically reduces the number of nodes by 1
 if (IsLeaf()  this == rIndex.m_aCurLeaf)
 {
diff --git a/connectivity/source/drivers/file/FStatement.cxx 
b/connectivity/source/drivers/file/FStatement.cxx
index d93fef8..d0d0ab2 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -574,11 +574,10 @@ void OStatement_Base::GetAssignValues()
 OSL_ENSURE(pInsertAtomCommalist != NULL,OResultSet: 
pInsertAtomCommalist darf nicht NULL sein!);
 OSL_ENSURE(pInsertAtomCommalist-count()  0,OResultSet: 
pInsertAtomCommalist = 0);
 
-OSQLParseNode * pRow_Value_Const;
 sal_Int32 nIndex=0;
 for (sal_uInt32 i = 0; i  pInsertAtomCommalist-count(); i++)
 {
-pRow_Value_Const =