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

Julien Nabet serval2412 at yahoo.fr
Fri Dec 13 15:03:51 PST 2013


 connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx |    2 +-
 sc/source/ui/app/scmod.cxx                                          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d67684f62fc99dd25fb46ddb547e8ff4345d0970
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Dec 14 00:01:59 2013 +0100

    cppcheck: fix same expression, no need to cast twice
    
    Change-Id: I08a68071db45ee79491558dd88e723dcdf0d24d5

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index dfeeba9..f31cc57 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1123,7 +1123,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
 
     if ( rOptSet.HasItem(SID_ATTR_GRID_OPTIONS,&pItem) )
     {
-        ScGridOptions aNewGridOpt( (const SvxOptionsGrid&)((const SvxGridItem&)*pItem) );
+        ScGridOptions aNewGridOpt( (const SvxGridItem&)*pItem) );
 
         if ( pViewSh )
         {
commit ffbde4e6a6ead7efdd65aa6bd31e9ea55f9c637e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri Dec 13 23:53:29 2013 +0100

    cppcheck: fix same expression
    
    !pSchemaPat->isEmpty() checked twice where line before we test if aPKQ is empty
    so it seemed quite logical to test aPKO here
    
    Change-Id: I79d7ec89f7ae67520492bbd4121a4a86918f2fbf

diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 2e772fc..f7af806 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -999,7 +999,7 @@ void ODatabaseMetaDataResultSet::openColumns(   const Any& catalog,
     aCOL = OUStringToOString(columnNamePattern,m_nTextEncoding);
 
     const char  *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr()  : NULL,
-                *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
+                *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
                 *pPKN = aPKN.getStr(),
                 *pCOL = aCOL.getStr();
 


More information about the Libreoffice-commits mailing list