summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx2
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx6
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx17
-rw-r--r--connectivity/source/drivers/mork/mork_helper.cxx6
-rw-r--r--connectivity/source/drivers/mozab/MDatabaseMetaData.cxx3
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx4
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx10
8 files changed, 20 insertions, 32 deletions
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index bb16d729f2fb..a35badddc2c8 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -137,7 +137,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
if (Tables)
{
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); tableIter++ )
+ for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
{
if ( 0 == tableIter->first ) continue;
SAL_INFO("connectivity.mork", "table->first : " << tableIter->first);
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index ab6a20f7a4fa..2f24c94c7092 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -960,9 +960,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
{
SAL_INFO("connectivity.mork", "=> ODatabaseMetaData::getTablePrivileges()" );
::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTablePrivileges);
- Reference< XResultSet > xRef = NULL;
-
- xRef = pResult;
+ Reference< XResultSet > xRef = pResult;
::std::vector< ::rtl::OUString > tables;
if ( !m_pMetaDataHelper->getTableStrings( m_pConnection, tables) )
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index f21bd28881b7..9091d108e0ae 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -246,18 +246,18 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection)
MorkRowMap::iterator rowIter;
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); tableIter++ )
+ for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
{
if (tableIter->first != 1) break;
Rows = xConnection->getMorkParser()->getRows( 0x80, &tableIter->second );
if ( Rows )
{
// Iterate all rows
- for ( rowIter = Rows->begin(); rowIter != Rows->end(); rowIter++ )
+ for ( rowIter = Rows->begin(); rowIter != Rows->end(); ++rowIter )
{
MQueryHelperResultEntry* entry = new MQueryHelperResultEntry();
for (MorkCells::iterator CellsIter = rowIter->second.begin();
- CellsIter != rowIter->second.end(); CellsIter++ )
+ CellsIter != rowIter->second.end(); ++CellsIter )
{
std::string column = xConnection->getMorkParser()->getColumn(CellsIter->first);
std::string value = xConnection->getMorkParser()->getValue(CellsIter->second);
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index b57fb94f6952..da772a101f49 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -102,10 +102,9 @@ void MorkParser::initVars()
bool MorkParser::parse()
{
bool Result = true;
- char cur = 0;
// Run over mork chars and parse each term
- cur = nextChar();
+ char cur = nextChar();
int i = 0;
@@ -606,7 +605,7 @@ void MorkParser::dump()
//// columns dict
for ( MorkDict::iterator iter = columns_.begin();
- iter != columns_.end(); iter++ )
+ iter != columns_.end(); ++iter )
{
std::cout << std::hex << std::uppercase << iter->first
<< " : "
@@ -619,7 +618,7 @@ void MorkParser::dump()
std::cout << "=============================================\r\n\r\n";
for ( MorkDict::iterator iter = values_.begin();
- iter != values_.end(); iter++ )
+ iter != values_.end(); ++iter )
{
if (iter->first >= nextAddValueId_) {
continue;
@@ -637,27 +636,27 @@ void MorkParser::dump()
//// Mork data
for ( TableScopeMap::iterator iter = mork_.begin();
- iter != mork_.end(); iter++ )
+ iter != mork_.end(); ++iter )
{
std::cout << "\r\n Scope:" << std::hex << std::uppercase
<< iter->first << std::endl;
for ( MorkTableMap::iterator TableIter = iter->second.begin();
- TableIter != iter->second.end(); TableIter++ )
+ TableIter != iter->second.end(); ++TableIter )
{
std::cout << "\t Table:"
<< ( ( int ) TableIter->first < 0 ? "-" : " " )
<< std::hex << std::uppercase << TableIter->first << std::endl;
for (RowScopeMap::iterator RowScopeIter = TableIter->second.begin();
- RowScopeIter != TableIter->second.end(); RowScopeIter++ )
+ RowScopeIter != TableIter->second.end(); ++RowScopeIter )
{
std::cout << "\t\t RowScope:"
<< std::hex << std::uppercase
<< RowScopeIter->first << std::endl;
for (MorkRowMap::iterator RowIter = RowScopeIter->second.begin();
- RowIter != RowScopeIter->second.end(); RowIter++ )
+ RowIter != RowScopeIter->second.end(); ++RowIter )
{
std::cout << "\t\t\t Row Id:"
<< ((int) RowIter->first < 0 ? "-" : " ")
@@ -666,7 +665,7 @@ void MorkParser::dump()
std::cout << "\t\t\t\t Cells:" << std::endl;
for (MorkCells::iterator CellsIter = RowIter->second.begin();
- CellsIter != RowIter->second.end(); CellsIter++ )
+ CellsIter != RowIter->second.end(); ++CellsIter )
{
// Write ids
std::cout << "\t\t\t\t\t"
diff --git a/connectivity/source/drivers/mork/mork_helper.cxx b/connectivity/source/drivers/mork/mork_helper.cxx
index e0c75c7d3fb0..df2758147f05 100644
--- a/connectivity/source/drivers/mork/mork_helper.cxx
+++ b/connectivity/source/drivers/mork/mork_helper.cxx
@@ -13,14 +13,12 @@ bool openAddressBook(const std::string& path)
return false;
}
const int defaultScope = 0x80;
- MorkTableMap *Tables = 0;
MorkTableMap::iterator tableIter;
- MorkRowMap::iterator rowIter;
- Tables = mork.getTables( defaultScope );
+ MorkTableMap *Tables = mork.getTables( defaultScope );
if ( Tables )
{
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); tableIter++ )
+ for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
{
if ( 0 == tableIter->first ) continue;
SAL_INFO("connectivity.mork", "table->first : " << tableIter->first);
diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
index 81300185f66b..ea4a680f2e34 100644
--- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
@@ -959,9 +959,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException)
{
::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTablePrivileges);
- Reference< XResultSet > xRef = NULL;
- xRef = pResult;
+ Reference< XResultSet > xRef = pResult;
::std::vector< ::rtl::OUString > tables;
::std::vector< ::rtl::OUString > types;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
index 2d5c740733d8..bb4af33dfc6e 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
@@ -450,8 +450,6 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const PRUnichar *profileName, nsIFile **p
NS_ENSURE_ARG_POINTER(profileDir);
*profileDir = nsnull;
- nsresult rv = NS_OK;
-
// PRUnichar != sal_Unicode in mingw
rtl::OUString path = xMozillaBootstrap->getProfilePath(xMozillaBootstrap->getCurrentProduct(),reinterpret_cast_mingw_only<const sal_Unicode *>(profileName));
@@ -459,7 +457,7 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const PRUnichar *profileName, nsIFile **p
// PRUnichar != sal_Unicode in mingw
nsAutoString filePath(reinterpret_cast_mingw_only<const PRUnichar *>(path.getStr()));
- rv = NS_NewLocalFile(filePath, PR_TRUE,
+ nsresult rv = NS_NewLocalFile(filePath, PR_TRUE,
getter_AddRefs(localFile));
if (localFile && NS_SUCCEEDED(rv))
return localFile->QueryInterface(NS_GET_IID(nsIFile), (void**)profileDir);
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
index 4b6e2733101e..e841826a6d98 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
@@ -121,9 +121,8 @@ static nsresult enumSubs(nsISimpleEnumerator * subDirs,nsISupportsArray * array)
//enum all sub folders
static nsresult enumSubs(nsIAbDirectory * parentDir,nsISupportsArray * array)
{
- nsresult rv = NS_OK ;
nsCOMPtr<nsISimpleEnumerator> subDirectories;
- rv = parentDir->GetChildNodes(getter_AddRefs(subDirectories));
+ nsresult rv = parentDir->GetChildNodes(getter_AddRefs(subDirectories));
if (NS_FAILED(rv)) { return rv; }
rv = enumSubs(subDirectories,array);
@@ -206,12 +205,11 @@ static nsresult getSubsFromParent(const rtl::OString& aParent, nsIEnumerator **a
if (aSubs == nsnull) { return NS_ERROR_NULL_POINTER ; }
*aSubs = nsnull ;
- nsresult retCode = NS_OK ;
nsCOMPtr<nsISupportsArray> array ;
NS_NewISupportsArray(getter_AddRefs(array)) ;
- retCode = insertPABDescription();
+ nsresult retCode = insertPABDescription();
NS_ENSURE_SUCCESS(retCode, retCode) ;
nsCOMPtr<nsIRDFService> rdfService(do_GetService(kRDFServiceCID, &retCode)) ;
@@ -747,14 +745,12 @@ sal_Bool MDatabaseMetaDataHelper::NewAddressBook(OConnection* _pCon,const ::rtl:
OSL_TRACE("Create table");
// Get the mozilla addressbooks from the base directory.
- nsresult rv = NS_OK;
-
MNSMozabProxy xMProxy;
RunArgs args;
args.funcIndex = ProxiedFunc::FUNC_NEW_ADDRESS_BOOK;
args.argCount = 1;
args.arg1 = (void*)&aTableName;
- rv = xMProxy.StartProxy(&args,m_ProductType,m_ProfileName);
+ nsresult rv = xMProxy.StartProxy(&args,m_ProductType,m_ProfileName);
_pCon->setForceLoadTables(sal_True); //force reload table next time
if (rv == NS_ERROR_FILE_IS_LOCKED)