[Libreoffice-commits] core.git: 2 commits - connectivity/source vcl/source vcl/win

2018-10-21 Thread Libreoffice Gerrit user
 connectivity/source/drivers/mysqlc/mysqlc_connection.hxx |6 ++
 vcl/source/graphic/UnoGraphicProvider.cxx|5 +++--
 vcl/win/app/salinst.cxx  |1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 6e15a3e2e45c21d947d36f47bfcb66d9f02b8c63
Author: Caolán McNamara 
AuthorDate: Sat Oct 20 20:19:33 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 21 20:12:15 2018 +0200

pvs-studio: A part of conditional expression is always true: !pIStm

Change-Id: I32af1d0041cebdb195e6433a0b44fa6ea271275c
Reviewed-on: https://gerrit.libreoffice.org/62105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx 
b/vcl/source/graphic/UnoGraphicProvider.cxx
index ef0fd14c0149..09e911c7bc3a 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -297,7 +297,6 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL 
GraphicProvider::queryGraphic( co
 {
 uno::Reference< ::graphic::XGraphic >   xRet;
 OUStringaPath;
-std::unique_ptr pIStm;
 
 uno::Reference< io::XInputStream > xIStm;
 uno::Reference< awt::XBitmap >xBtm;
@@ -307,7 +306,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL 
GraphicProvider::queryGraphic( co
 bool bLazyRead = false;
 bool bLoadAsLink = false;
 
-for( sal_Int32 i = 0; ( i < rMediaProperties.getLength() ) && !pIStm && 
!xRet.is(); ++i )
+for (sal_Int32 i = 0; ( i < rMediaProperties.getLength() ) && !xRet.is(); 
++i)
 {
 const OUString   aName( rMediaProperties[ i ].Name );
 const uno::Any  aValue( rMediaProperties[ i ].Value );
@@ -365,6 +364,8 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL 
GraphicProvider::queryGraphic( co
 
 SolarMutexGuard g;
 
+std::unique_ptr pIStm;
+
 if( xIStm.is() )
 {
 pIStm = ::utl::UcbStreamHelper::CreateStream( xIStm );
commit f222cec758f62537b96d7681671f60212cc62a89
Author: Caolán McNamara 
AuthorDate: Sat Oct 20 19:37:58 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 21 20:12:03 2018 +0200

pvs-studio: Not all members of a class are initialized inside the 
constructor

Change-Id: I914c715c96a6701995212fdb76615a19c984a128
Reviewed-on: https://gerrit.libreoffice.org/62113
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx 
b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
index 6c8632c29492..ed96d5e42290 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
@@ -65,12 +65,18 @@ typedef css::uno::Reference 
my_XNameAccessRef;
 typedef ::cppu::WeakComponentImplHelper3
 OMetaConnection_BASE;
+
 struct ConnectionSettings
 {
 rtl_TextEncoding encoding;
 rtl::OUString schema;
 rtl::OUString connectionURL;
 bool readOnly;
+ConnectionSettings()
+: encoding(RTL_TEXTENCODING_DONTKNOW)
+, readOnly(false)
+{
+}
 };
 
 class MysqlCDriver;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index d5fca66f6bd2..7011f8b2404b 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -388,6 +388,7 @@ VCLPLUG_WIN_PUBLIC SalInstance* create_SalInstance()
 
 WinSalInstance::WinSalInstance()
 : SalInstance(o3tl::make_unique())
+, mhInst( nullptr )
 , mhComWnd( nullptr )
 , m_nNoYieldLock( 0 )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-05-17 Thread Lionel Elie Mamane
 connectivity/source/drivers/jdbc/ResultSet.cxx |3 ---
 vcl/source/edit/texteng.cxx|5 +++--
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit f7e2f18e897198c5ee79d9825ac3b3ecbd2bd398
Author: Lionel Elie Mamane 
Date:   Sat May 17 19:40:02 2014 +0200

avoid segfault when nBrekPos is past the end

Change-Id: Ieedc24c0443ba10d8277cd6327b3b735203e5d45

diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 2223ff0..b114ade 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1708,8 +1708,9 @@ void TextEngine::ImpBreakLine( sal_uLong nPara, TextLine* 
pLine, TETextPortion*,
 pLine->SetEnd( nBreakPos );
 sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
 
-bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
- ( pNode->GetText()[ nBreakPos ] == ' ' ) );
+bool bBlankSeparator = ( nBreakPos >= pLine->GetStart() &&
+ nBreakPos < pNode->GetText().getLength() &&
+ pNode->GetText()[ nBreakPos ] == ' ' );
 if ( bBlankSeparator )
 {
 // generally suppress blanks at the end of line
commit fcf4b4c3ebc46de974d57bdf6211ccb084b0835d
Author: Lionel Elie Mamane 
Date:   Sat May 17 19:35:34 2014 +0200

remove wrongly added IsBookmarkable property

Change-Id: I7bde1200dbe9da76e062f2783cc223a07084c6fd

diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx 
b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 18f9a85..b247671 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -884,9 +884,6 @@ void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) 
throw(::com::sun::star::s
 pProperties[nPos++] = 
::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE),
 PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0);
 
-pProperties[nPos++] = 
::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE),
-PROPERTY_ID_ISBOOKMARKABLE, ::getBooleanCppuType(), 
PropertyAttribute::READONLY);
-
 pProperties[nPos++] = 
::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY),
 PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType::get(), 
PropertyAttribute::READONLY);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits