[Libreoffice-commits] core.git: dbaccess/source

Jelle van der Waa jelle at vdwaa.nl
Mon Jun 17 12:46:03 PDT 2013


 dbaccess/source/core/api/OptimisticSet.cxx             |    6 ++---
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |    4 +--
 dbaccess/source/core/inc/composertools.hxx             |    2 -
 dbaccess/source/filter/xml/xmlExport.cxx               |    2 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx     |   18 ++++++++---------
 dbaccess/source/ui/uno/copytablewizard.cxx             |    2 -
 6 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 9a95669e5035758fc115f4c7be3e0a00651fe993
Author: Jelle van der Waa <jelle at vdwaa.nl>
Date:   Mon Jun 17 20:01:18 2013 +0200

    fdo#43460 dbaccess: use isEmpty()
    
    Change-Id: Ie27a81f4e59c48ef5aa03fb82ab38e920c0646a1
    Reviewed-on: https://gerrit.libreoffice.org/4321
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index be34382..ac73c44 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -237,7 +237,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
     TSQLStatements::iterator aSqlEnd  = aSql.end();
     for(;aSqlIter != aSqlEnd ; ++aSqlIter)
     {
-        if ( aSqlIter->second.getLength() )
+        if ( !aSqlIter->second.isEmpty() )
         {
             m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first];
             OUString sCatalog,sSchema,sTable;
@@ -303,7 +303,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
     TSQLStatements::iterator aSqlEnd  = aSql.end();
     for(;aSqlIter != aSqlEnd ; ++aSqlIter)
     {
-        if ( aSqlIter->second.getLength() )
+        if ( !aSqlIter->second.isEmpty() )
         {
             m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first];
             OUString sCatalog,sSchema,sTable;
@@ -630,7 +630,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
     TSQLStatements::iterator aSqlEnd  = aSql.end();
     for(;aSqlIter != aSqlEnd ; ++aSqlIter)
     {
-        if ( aSqlIter->second.getLength() )
+        if ( !aSqlIter->second.isEmpty() )
         {
             OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
             if ( !rCondition.isEmpty() )
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 7bd978d..52926c7 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1497,7 +1497,7 @@ namespace
                 sRet.append(R_BRACKET);
             }
             ++pOrIter;
-            if ( pOrIter != pOrEnd && sRet.getLength() )
+            if ( pOrIter != pOrEnd && !sRet.isEmpty() )
                 sRet.append(STR_OR);
         }
         return sRet.makeStringAndClear();
@@ -1669,7 +1669,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
     // Construct SELECT without WHERE and ORDER BY
     OUString sFilter = getFilter();
 
-    if ( !sFilter.isEmpty() && aSQL.getLength() )
+    if ( !sFilter.isEmpty() && !aSQL.isEmpty() )
     {
         OUString sTemp(L_BRACKET + sFilter + R_BRACKET);
         sTemp += andCriteria ? OUString(STR_AND) : OUString(STR_OR);
diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx
index 1cd475b..34dae33 100644
--- a/dbaccess/source/core/inc/composertools.hxx
+++ b/dbaccess/source/core/inc/composertools.hxx
@@ -82,7 +82,7 @@ namespace dbaccess
             #endif
             if ( !lhs.isEmpty() )
             {
-                if ( m_aBuffer.getLength() )
+                if ( !m_aBuffer.isEmpty() )
                     appendNonEmptyToNonEmpty( lhs );
                 else
                     m_aBuffer.append( lhs );
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 135ef75..632ff19 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -565,7 +565,7 @@ void ODBExport::exportConnectionData()
                 {
                     ::svt::OFileNotation aTransformer( sFileName );
                     OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
-                    if (sURL.getLength() == 0 || sURL[sURL.getLength() - 1] != '/')
+                    if (sURL.isEmpty() || sURL[sURL.getLength() - 1] != '/')
                         sURL.append('/');
 
                     AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index a07b18e..99f24d3 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -307,7 +307,7 @@ namespace
                 for(;aIter != aEnd;++aIter)
                 {
                     OConnectionLineDataRef pLineData = *aIter;
-                    if(aCondition.getLength())
+                    if(!aCondition.isEmpty())
                         aCondition.append(C_AND);
                     aCondition.append(quoteTableAlias(sal_True,pData->GetAliasName(JTCS_FROM),aQuote));
                     aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_FROM) ));
@@ -723,7 +723,7 @@ namespace
                     aFieldListStr.append(sFieldSeparator);
                 }
             }
-            if(aFieldListStr.getLength())
+            if(!aFieldListStr.isEmpty())
                 aFieldListStr.setLength(aFieldListStr.getLength()-2);
         }
         catch(SQLException&)
@@ -881,7 +881,7 @@ namespace
                 if (!aWhereStr.isEmpty())
                 {
                     aWhereStr += OUString(')');                      // close bracket for the AND branch
-                    if (rRetStr.getLength())                            // are there conditions on the field?
+                    if (!rRetStr.isEmpty())                            // are there conditions on the field?
                         rRetStr.append(C_OR);
                     else                                        // open bracket for the OR branch
                         rRetStr.append(sal_Unicode('('));
@@ -890,7 +890,7 @@ namespace
                 if (!aHavingStr.isEmpty())
                 {
                     aHavingStr += OUString(')');                     // close bracket for the AND branch
-                    if (rHavingStr.getLength())                         // are there conditions on the field?
+                    if (!rHavingStr.isEmpty())                         // are there conditions on the field?
                         rHavingStr.append(C_OR);
                     else                                        // Open bracket for the OR branch
                         rHavingStr.append(sal_Unicode('('));
@@ -898,9 +898,9 @@ namespace
                 }
             }
 
-            if (rRetStr.getLength())
+            if (!rRetStr.isEmpty())
                 rRetStr.append(sal_Unicode(')'));                               // close bracket for the OR branch
-            if (rHavingStr.getLength())
+            if (!rHavingStr.isEmpty())
                 rHavingStr.append(sal_Unicode(')'));                                // close bracket for the OR branch
         }
         catch(SQLException&)
@@ -2933,7 +2933,7 @@ OUString OQueryDesignView::getStatement()
         OUString aTmp("( ");
         aTmp += aJoinCrit;
         aTmp += OUString(" )");
-        if(aCriteriaListStr.getLength())
+        if(!aCriteriaListStr.isEmpty())
         {
             aTmp += C_AND;
             aTmp += aCriteriaListStr.makeStringAndClear();
@@ -2948,7 +2948,7 @@ OUString OQueryDesignView::getStatement()
     aSqlCmd.append(OUString(" FROM "));
     aSqlCmd.append(aTableListStr);
 
-    if (aCriteriaListStr.getLength())
+    if (!aCriteriaListStr.isEmpty())
     {
         aSqlCmd.append(OUString(" WHERE "));
         aSqlCmd.append(aCriteriaListStr.makeStringAndClear());
@@ -2963,7 +2963,7 @@ OUString OQueryDesignView::getStatement()
 
     aSqlCmd.append(GenerateGroupBy(this,rFieldList,bUseAlias));
     // ----------------- attache having  ------------
-    if(aHavingStr.getLength())
+    if(!aHavingStr.isEmpty())
     {
         aSqlCmd.append(OUString(" HAVING "));
         aSqlCmd.append(aHavingStr.makeStringAndClear());
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 7af883e..9bb4591 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1503,7 +1503,7 @@ OUString CopyTableWizard::impl_getServerSideCopyStatement_throw(const Reference<
     {
         if ( COLUMN_POSITION_NOT_FOUND != aPosIter->second )
         {
-            if ( sColumns.getLength() )
+            if ( !sColumns.isEmpty() )
                 sColumns.append(",");
             sColumns.append(sQuote + aDestColumnNames[aPosIter->second - 1] + sQuote);
         }


More information about the Libreoffice-commits mailing list