Tag: cws_src680_mozab05 User: windly Date: 05/01/27 03:30:15 Modified: /dba/connectivity/source/drivers/mozab/ MPreparedStatement.cxx, MResultSet.cxx, MResultSet.hxx, MStatement.cxx, makefile.mk /dba/connectivity/source/drivers/mozab/bootstrap/ MMozillaBootstrap.cxx, MMozillaBootstrap.hxx, MNSINIParser.cxx, MNSINIParser.hxx, MNSInit.cxx, MNSProfileDiscover.cxx, MNSProfileDiscover.hxx /dba/connectivity/source/drivers/mozab/defs/ wntmsci10 /dba/connectivity/source/drivers/mozab/mozillasrc/ MDatabaseMetaDataHelper.cxx, MDatabaseMetaDataHelper.hxx, MNSDeclares.hxx, MQuery.cxx, MQuery.hxx, MQueryHelper.cxx
Log: #i41444# mozab crash on solaris sparc File Changes: Directory: /dba/connectivity/source/drivers/mozab/ ================================================== File [changed]: MPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MPreparedStatement.cxx?r1=1.7&r2=1.7.46.1 Delta lines: +11 -7 -------------------- --- MPreparedStatement.cxx 25 Jun 2004 18:28:25 -0000 1.7 +++ MPreparedStatement.cxx 27 Jan 2005 11:30:08 -0000 1.7.46.1 @@ -2,9 +2,9 @@ * * $RCSfile: MPreparedStatement.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.7.46.1 $ * - * last change: $Author: hjs $ $Date: 2004/06/25 18:28:25 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -149,7 +149,7 @@ sal_Bool OPreparedStatement::parseSql( const ::rtl::OUString& sql , sal_Bool bAdjusted ) throw ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { - OSL_TRACE("In/Out :: OPreparedStatement::parseSql()"); + OSL_TRACE("in :: OPreparedStatement::parseSql()"); if (!OStatement_Base::parseSql( sql )) return sal_False; @@ -166,6 +166,8 @@ m_pResultSet->acquire(); m_xResultSet = Reference<XResultSet>(m_pResultSet); initializeResultSet(m_pResultSet); + OSL_TRACE("Out :: OPreparedStatement::parseSql()"); + return sal_True; } // ----------------------------------------------------------------------------- @@ -179,11 +181,12 @@ // ----------------------------------------------------------------------------- void OPreparedStatement::initializeResultSet( OResultSet* _pResult ) { + OSL_TRACE("In : OPreparedStatement::initializeResultSet( )"); OStatement_Base::initializeResultSet( _pResult ); - OSL_TRACE("In/Out : OPreparedStatement::initializeResultSet( )"); _pResult->setParameterColumns(m_xParamColumns); _pResult->setParameterRow(m_aParameterRow); + OSL_TRACE("Out : OPreparedStatement::initializeResultSet( )"); } // ----------------------------------------------------------------------------- @@ -288,11 +291,12 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); + OSL_TRACE("In: OPreparedStatement::executeQuery" ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); Reference< XResultSet > rs = OStatement_Base::executeQuery( m_sSqlStatement ); - OSL_TRACE("In/Out: OPreparedStatement::executeQuery" ); + OSL_TRACE("Out: OPreparedStatement::executeQuery" ); return rs; } // ------------------------------------------------------------------------- File [changed]: MResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MResultSet.cxx?r1=1.20&r2=1.20.16.1 Delta lines: +26 -4 -------------------- --- MResultSet.cxx 22 Oct 2004 11:32:02 -0000 1.20 +++ MResultSet.cxx 27 Jan 2005 11:30:08 -0000 1.20.16.1 @@ -2,9 +2,9 @@ * * $RCSfile: MResultSet.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.20.16.1 $ * - * last change: $Author: pjunck $ $Date: 2004/10/22 11:32:02 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2007,8 +2007,30 @@ if (m_bIsReadOnly == -1) { //m_nRowCountResult == 0 mean user call with where case 0 = 1 - m_bIsReadOnly = !m_aQuery.isWritable() || (m_nRowCountResult == 0); + OConnection* xConnection = static_cast<OConnection*>(m_pStatement->getConnection().get()); + m_bIsReadOnly = !m_aQuery.isWritable(xConnection) || (m_nRowCountResult == 0); } return m_bIsReadOnly != 0; +} + +void OResultSet::setTable(OTable* _rTable) +{ + OSL_TRACE("In : setTable"); + m_pTable = _rTable; + m_pTable->acquire(); + m_xTableColumns = m_pTable->getColumns(); + if(m_xTableColumns.is()) + m_aColumnNames = m_xTableColumns->getElementNames(); + OSL_TRACE("Out : setTable"); +} + +void OResultSet::setOrderByColumns(const ::std::vector<sal_Int32>& _aColumnOrderBy) +{ + m_aOrderbyColumnNumber = _aColumnOrderBy; +} + +void OResultSet::setOrderByAscending(const ::std::vector<sal_Int16>& _aOrderbyAsc) +{ + m_aOrderbyAscending = _aOrderbyAsc; } File [changed]: MResultSet.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MResultSet.hxx?r1=1.7&r2=1.7.40.1 Delta lines: +6 -15 -------------------- --- MResultSet.hxx 2 Aug 2004 17:07:09 -0000 1.7 +++ MResultSet.hxx 27 Jan 2005 11:30:08 -0000 1.7.40.1 @@ -2,9 +2,9 @@ * * $RCSfile: MResultSet.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.7.40.1 $ * - * last change: $Author: hr $ $Date: 2004/08/02 17:07:09 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -367,14 +367,7 @@ void SAL_CALL executeQuery() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - void setTable(OTable* _rTable) - { - m_pTable = _rTable; - m_pTable->acquire(); - m_xTableColumns = m_pTable->getColumns(); - if(m_xTableColumns.is()) - m_aColumnNames = m_xTableColumns->getElementNames(); - } + void setTable(OTable* _rTable); void setParameterRow(const OValueRow& _rParaRow) { m_aParameterRow = _rParaRow; } @@ -387,11 +380,9 @@ void setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMapping); - void setOrderByColumns(const ::std::vector<sal_Int32>& _aColumnOrderBy) - { m_aOrderbyColumnNumber = _aColumnOrderBy; } + void setOrderByColumns(const ::std::vector<sal_Int32>& _aColumnOrderBy); - void setOrderByAscending(const ::std::vector<sal_Int16>& _aOrderbyAsc) - { m_aOrderbyAscending = _aOrderbyAsc; } + void setOrderByAscending(const ::std::vector<sal_Int16>& _aOrderbyAsc); inline sal_Int32 mapColumn(sal_Int32 column); File [changed]: MStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MStatement.cxx?r1=1.8&r2=1.8.46.1 Delta lines: +6 -3 ------------------- --- MStatement.cxx 25 Jun 2004 18:30:01 -0000 1.8 +++ MStatement.cxx 27 Jan 2005 11:30:08 -0000 1.8.46.1 @@ -2,9 +2,9 @@ * * $RCSfile: MStatement.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.8.46.1 $ * - * last change: $Author: hjs $ $Date: 2004/06/25 18:30:01 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -154,6 +154,7 @@ m_aParser(_pConnection->getDriver()->getMSFactory()) { m_pConnection->acquire(); + OSL_TRACE("In/Out: OStatement_Base::OStatement_Base" ); } // ----------------------------------------------------------------------------- OStatement_Base::~OStatement_Base() @@ -369,11 +370,13 @@ void OStatement_Base::initializeResultSet( OResultSet* _pResult ) { + OSL_TRACE("In : initializeResultSet"); _pResult->setColumnMapping(m_aColMapping); _pResult->setOrderByColumns(m_aOrderbyColumnNumber); _pResult->setOrderByAscending(m_aOrderbyAscending); _pResult->setBindingRow(m_aRow); _pResult->setTable(m_pTable); + OSL_TRACE("Out : initializeResultSet"); } // ------------------------------------------------------------------------- File [changed]: makefile.mk Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/makefile.mk?r1=1.15.30.1&r2=1.15.30.2 Delta lines: +3 -2 ------------------- --- makefile.mk 17 Jan 2005 05:30:44 -0000 1.15.30.1 +++ makefile.mk 27 Jan 2005 11:30:09 -0000 1.15.30.2 @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.15.30.1 $ +# $Revision: 1.15.30.2 $ # -# last change: $Author: windly $ $Date: 2005/01/17 05:30:44 $ +# last change: $Author: windly $ $Date: 2005/01/27 11:30:09 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -129,6 +129,7 @@ $(SLO)$/MDriver.obj \ $(SLO)$/MServices.obj + # --- MOZAB BASE Library ----------------------------------- SHL1VERSIONMAP= $(TARGET).map Directory: /dba/connectivity/source/drivers/mozab/bootstrap/ ============================================================ File [changed]: MMozillaBootstrap.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +10 -2 -------------------- --- MMozillaBootstrap.cxx 24 Jan 2005 09:47:16 -0000 1.1.2.3 +++ MMozillaBootstrap.cxx 27 Jan 2005 11:30:09 -0000 1.1.2.4 @@ -2,9 +2,9 @@ * * $RCSfile: MMozillaBootstrap.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: windly $ $Date: 2005/01/24 09:47:16 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -184,6 +184,10 @@ { return m_ProfileAccess->getProfilePath(product,profileName); } +::sal_Bool SAL_CALL MozillaBootstrap::isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) +{ + return m_ProfileAccess->isProfileLocked(product,profileName); +} ::sal_Bool SAL_CALL MozillaBootstrap::getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) { return m_ProfileAccess->getProfileExists(product,profileName); @@ -205,6 +209,10 @@ ::rtl::OUString SAL_CALL MozillaBootstrap::getCurrentProfile( ) throw (::com::sun::star::uno::RuntimeException) { return m_ProfileManager->getCurrentProfile(); +} +::sal_Bool SAL_CALL MozillaBootstrap::isCurrentProfileLocked( ) throw (::com::sun::star::uno::RuntimeException) +{ + return isProfileLocked(getCurrentProduct(),m_ProfileManager->getCurrentProfile()); } ::rtl::OUString SAL_CALL MozillaBootstrap::setCurrentProfile( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) { File [changed]: MMozillaBootstrap.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +4 -2 ------------------- --- MMozillaBootstrap.hxx 24 Jan 2005 07:49:04 -0000 1.1.2.2 +++ MMozillaBootstrap.hxx 27 Jan 2005 11:30:09 -0000 1.1.2.3 @@ -2,9 +2,9 @@ * * $RCSfile: MMozillaBootstrap.hxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: windly $ $Date: 2005/01/24 07:49:04 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -118,6 +118,7 @@ virtual ::sal_Int32 SAL_CALL getProfileList( ::com::sun::star::mozilla::MozillaProductType product, ::com::sun::star::uno::Sequence< ::rtl::OUString >& list ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getProfilePath( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); // XProfileManager @@ -125,6 +126,7 @@ virtual ::sal_Int32 SAL_CALL shutdownProfile( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::mozilla::MozillaProductType SAL_CALL getCurrentProduct( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getCurrentProfile( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isCurrentProfileLocked( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL setCurrentProfile( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); // XProxyRunner File [changed]: MNSINIParser.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +7 -8 ------------------- --- MNSINIParser.cxx 25 Jan 2005 09:24:27 -0000 1.1.2.3 +++ MNSINIParser.cxx 27 Jan 2005 11:30:10 -0000 1.1.2.4 @@ -2,9 +2,9 @@ * * $RCSfile: MNSINIParser.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: windly $ $Date: 2005/01/25 09:24:27 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,10 +71,10 @@ { OUString iniUrl; if (osl_File_E_None != osl_getFileURLFromSystemPath(rIniName.pData, &iniUrl.pData)) - throw ::com::sun::star::io::IOException(); + return; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OString sFile = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US); OSL_TRACE(__FILE__" -- parser() - %s\n", sFile.getStr()); #endif @@ -86,7 +86,7 @@ } catch(::com::sun::star::io::IOException e) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OString file_tmp = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US); OSL_TRACE( __FILE__" -- couldn't open file: %s", file_tmp.getStr() ); #endif @@ -138,16 +138,15 @@ } osl_closeFile(handle); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 else { OString file_tmp = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US); OSL_TRACE( __FILE__" -- couldn't open file: %s", file_tmp.getStr() ); - throw ::com::sun::star::io::IOException(); } #endif } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void IniParser::Dump() { IniSectionMap::iterator iBegin = mAllSection.begin(); File [changed]: MNSINIParser.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +4 -4 ------------------- --- MNSINIParser.hxx 24 Jan 2005 08:04:57 -0000 1.1.2.2 +++ MNSINIParser.hxx 27 Jan 2005 11:30:10 -0000 1.1.2.3 @@ -2,9 +2,9 @@ * * $RCSfile: MNSINIParser.hxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: windly $ $Date: 2005/01/24 08:04:57 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,7 +71,7 @@ #include <map> #include <list> -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #include <stdio.h> #endif @@ -110,7 +110,7 @@ IniSectionMap * getAllSection(){return &mAllSection;}; ini_Section * getSection(OUString const & secName); IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void Dump(); #endif File [changed]: MNSInit.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +3 -90 -------------------- --- MNSInit.cxx 25 Jan 2005 09:24:27 -0000 1.1.2.3 +++ MNSInit.cxx 27 Jan 2005 11:30:10 -0000 1.1.2.4 @@ -2,9 +2,9 @@ * * $RCSfile: MNSInit.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: windly $ $Date: 2005/01/25 09:24:27 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -127,7 +127,7 @@ extern "C" void NS_SetupRegistry(); -PROXY_RELATED const PRUnichar* determineProfile( PRUnichar const* const* _pValidProfiles, const PRUint32 _nValidProfiles ) + const PRUnichar* determineProfile( PRUnichar const* const* _pValidProfiles, const PRUint32 _nValidProfiles ) { // the fallback for the to-be-used user profile: the first profile const PRUnichar* pUsedProfile = *_pValidProfiles; @@ -390,92 +390,5 @@ OSL_TRACE( "OUT : MNS_Term() - Final Term\n" ); return sal_True; -} - -nsresult isExistFileOrSymlink(nsILocalFile* aFile,PRBool *bExist) -{ - nsresult rv; - nsAutoString path; - aFile->GetPath(path); - rv = aFile->Exists(bExist); - NS_ENSURE_SUCCESS(rv, rv); - if (!*bExist) - { - rv = aFile->IsSymlink(bExist); - NS_ENSURE_SUCCESS(rv, rv); - } - return rv; -} -nsresult isLockExist(nsILocalFile* aFile) -{ -#if defined (XP_MACOSX) - NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock"); - NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock"); -#elif defined (XP_UNIX) - NS_ConvertASCIItoUTF16 OLD_LOCKFILE_NAME("lock"); - NS_ConvertASCIItoUTF16 LOCKFILE_NAME(".parentlock"); -#else - NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock"); - NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, "parent.lock"); -#endif - - nsresult rv; - - PRBool isDir; - rv = aFile->IsDirectory(&isDir); - NS_ENSURE_SUCCESS(rv, rv); - if (!isDir) - return NS_ERROR_FILE_NOT_DIRECTORY; - - nsCOMPtr<nsILocalFile> lockFile; - rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(lockFile))); - NS_ENSURE_SUCCESS(rv, rv); - - rv = lockFile->Append(LOCKFILE_NAME); - NS_ENSURE_SUCCESS(rv, rv); - PRBool nExist=PR_FALSE; - rv = isExistFileOrSymlink(lockFile,&nExist); - NS_ENSURE_SUCCESS(rv, rv); - if (!nExist) // Check OLD_LOCKFILE_NAME - { - nsCOMPtr<nsILocalFile> oldlockFile; - rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(oldlockFile))); - NS_ENSURE_SUCCESS(rv, rv); - - rv = oldlockFile->Append(OLD_LOCKFILE_NAME); - NS_ENSURE_SUCCESS(rv, rv); - rv = isExistFileOrSymlink(oldlockFile,&nExist); - NS_ENSURE_SUCCESS(rv, rv); - } - return nExist; -} -//determine whether current profile is locked,any error will lead to return true -sal_Bool isProfileLocked() -{ - nsresult rv; - nsCOMPtr< nsIProfile > theProfile = do_GetService( kProfileCID, &rv ); - NS_ENSURE_SUCCESS(rv, sal_True); //if any error happened, we treat it as profile locked - nsXPIDLString profileName; - rv = theProfile->GetCurrentProfile(getter_Copies(profileName)); - NS_ENSURE_SUCCESS(rv, sal_True); - - nsCOMPtr<nsIFile> curProfileDir; - PRBool exists = PR_FALSE; - nsCOMPtr<nsIProfileInternal> profileInternal=do_QueryInterface(theProfile); - NS_ENSURE_SUCCESS(rv, sal_True); - - rv = profileInternal->GetProfileDir(profileName, getter_AddRefs(curProfileDir)); - NS_ENSURE_SUCCESS(rv, sal_True); - - rv = curProfileDir->Exists(&exists); - NS_ENSURE_SUCCESS(rv, sal_True); - if (!exists) - return sal_True; - - // If the profile is locked, we return true - nsCOMPtr<nsILocalFile> localFile(do_QueryInterface(curProfileDir)); - - rv = isLockExist(localFile); - return rv; } File [changed]: MNSProfileDiscover.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +93 -13 --------------------- --- MNSProfileDiscover.cxx 25 Jan 2005 09:24:28 -0000 1.1.2.3 +++ MNSProfileDiscover.cxx 27 Jan 2005 11:30:10 -0000 1.1.2.4 @@ -124,7 +124,11 @@ rv = NS_NewNativeLocalFile(registryDir, PR_TRUE, getter_AddRefs(localFile)); NS_ENSURE_SUCCESS(rv,rv); - + PRBool bExist; + rv = localFile->Exists(&bExist); + NS_ENSURE_SUCCESS(rv,rv); + if (!bExist) + return rv; nsCOMPtr<nsIRegistry> registry(do_CreateInstance(NS_REGISTRY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); rv = registry->Open(localFile); @@ -136,19 +140,10 @@ rv = registry->GetKey(nsIRegistry::Common, szProfileSubtreeString.getStr(), &profilesTreeKey); - if (NS_FAILED(rv)) - { - rv = registry->AddKey(nsIRegistry::Common, - szProfileSubtreeString.getStr(), - &profilesTreeKey); if (NS_FAILED(rv)) return rv; - } - nsXPIDLString tmpCurrentProfile; - - // Get the current profile rv = registry->GetString(profilesTreeKey, szCurrentProfileString.getStr(), @@ -352,6 +347,91 @@ } ProfileStruct * aProfile = (*m_Product.mProfileList.begin()).second; return aProfile->getProfileName(); + } + nsresult ProfileAccess::isExistFileOrSymlink(nsILocalFile* aFile,PRBool *bExist) + { + nsresult rv; + nsAutoString path; + aFile->GetPath(path); + rv = aFile->Exists(bExist); + NS_ENSURE_SUCCESS(rv, rv); + if (!*bExist) + { + rv = aFile->IsSymlink(bExist); + NS_ENSURE_SUCCESS(rv, rv); + } + return rv; + } + nsresult ProfileAccess::isLockExist(nsILocalFile* aFile) + { +#if defined (XP_MACOSX) + NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock"); + NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock"); +#elif defined (XP_UNIX) + NS_ConvertASCIItoUTF16 OLD_LOCKFILE_NAME("lock"); + NS_ConvertASCIItoUTF16 LOCKFILE_NAME(".parentlock"); +#else + NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock"); + NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, "parent.lock"); +#endif + + nsresult rv; + + PRBool isDir; + rv = aFile->IsDirectory(&isDir); + NS_ENSURE_SUCCESS(rv, rv); + if (!isDir) + return NS_ERROR_FILE_NOT_DIRECTORY; + + nsCOMPtr<nsILocalFile> lockFile; + rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(lockFile))); + NS_ENSURE_SUCCESS(rv, rv); + + rv = lockFile->Append(LOCKFILE_NAME); + NS_ENSURE_SUCCESS(rv, rv); + PRBool nExist=PR_FALSE; + rv = isExistFileOrSymlink(lockFile,&nExist); + NS_ENSURE_SUCCESS(rv, rv); + if (!nExist) // Check OLD_LOCKFILE_NAME + { + nsCOMPtr<nsILocalFile> oldlockFile; + rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(oldlockFile))); + NS_ENSURE_SUCCESS(rv, rv); + + rv = oldlockFile->Append(OLD_LOCKFILE_NAME); + NS_ENSURE_SUCCESS(rv, rv); + rv = isExistFileOrSymlink(oldlockFile,&nExist); + NS_ENSURE_SUCCESS(rv, rv); + } + return nExist; + } + + + ::sal_Bool ProfileAccess::isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) + { + ::rtl::OUString path = getProfilePath(product,profileName); + if (!path.getLength()) + return sal_True; + ::rtl::OString sPath = ::rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8); + nsCAutoString filePath(sPath.getStr()); + + nsresult rv; + nsCOMPtr<nsILocalFile> localFile; + rv = NS_NewNativeLocalFile(filePath, PR_TRUE, + getter_AddRefs(localFile)); + NS_ENSURE_SUCCESS(rv,sal_True); + + PRBool exists = PR_FALSE; + rv = localFile->Exists(&exists); + NS_ENSURE_SUCCESS(rv, sal_True); + if (!exists) + return sal_True; + + // If the profile is locked, we return true + rv = isLockExist(localFile); + if (rv) + return sal_True; + return sal_False; } ::sal_Bool ProfileAccess::getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) { File [changed]: MNSProfileDiscover.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +3 -0 ------------------- --- MNSProfileDiscover.hxx 24 Jan 2005 08:04:58 -0000 1.1.2.2 +++ MNSProfileDiscover.hxx 27 Jan 2005 11:30:10 -0000 1.1.2.3 @@ -89,6 +89,7 @@ ::sal_Int32 getProfileCount( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); ::sal_Int32 getProfileList( ::com::sun::star::mozilla::MozillaProductType product, ::com::sun::star::uno::Sequence< ::rtl::OUString >& list ) throw (::com::sun::star::uno::RuntimeException); ::rtl::OUString getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); ::sal_Bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); protected: @@ -96,6 +97,8 @@ sal_Int32 FillProductInfo(); nsresult FillMozillaProfile(); sal_Int32 FillXPToolkitProfile(MozillaProductType product); + nsresult isExistFileOrSymlink(nsILocalFile* aFile,PRBool *bExist); + nsresult isLockExist(nsILocalFile* aFile); }; } Directory: /dba/connectivity/source/drivers/mozab/defs/ ======================================================= File [changed]: wntmsci10 Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/defs/wntmsci10?r1=1.30.8.2&r2=1.30.8.3 Delta lines: +4 -0 ------------------- --- wntmsci10 24 Jan 2005 07:49:05 -0000 1.30.8.2 +++ wntmsci10 27 Jan 2005 11:30:11 -0000 1.30.8.3 @@ -341,3 +341,7 @@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@cppu@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@[EMAIL PROTECTED]@A [EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@Z [EMAIL PROTECTED]@[EMAIL PROTECTED]@cppu@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@[EMAIL PROTECTED]@A Directory: /dba/connectivity/source/drivers/mozab/mozillasrc/ ============================================================= File [changed]: MDatabaseMetaDataHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx?r1=1.9.46.4&r2=1.9.46.5 Delta lines: +27 -23 --------------------- --- MDatabaseMetaDataHelper.cxx 24 Jan 2005 09:47:16 -0000 1.9.46.4 +++ MDatabaseMetaDataHelper.cxx 27 Jan 2005 11:30:11 -0000 1.9.46.5 @@ -2,9 +2,9 @@ * * $RCSfile: MDatabaseMetaDataHelper.cxx,v $ * - * $Revision: 1.9.46.4 $ + * $Revision: 1.9.46.5 $ * - * last change: $Author: windly $ $Date: 2005/01/24 09:47:16 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,6 +94,9 @@ #ifndef _CONNECTIVITY_MAB_MOZABHELPER_HXX_ #include "MNSMozabProxy.hxx" #endif +#ifndef _CONNECTIVITY_MAB_NS_DECLARES_HXX_ +#include <MNSDeclares.hxx> +#endif static ::osl::Mutex m_aMetaMutex; #include <osl/diagnose.h> @@ -112,7 +115,7 @@ #endif -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 # define OUtoCStr( x ) ( ::rtl::OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US).getStr()) #else /* OSL_DEBUG_LEVEL */ # define OUtoCStr( x ) ("dummy") @@ -389,10 +392,15 @@ void MDatabaseMetaDataHelper::setAbSpecificError( OConnection* _pCon, sal_Bool bGivenURI ) { - if ( ! bGivenURI ) { + + if ( ! bGivenURI && m_ProductType ==::com::sun::star::mozilla::MozillaProductType_Mozilla) { m_aErrorString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No Mozilla Addressbook Directories Exist")); } else { + if ( m_ProductType ==::com::sun::star::mozilla::MozillaProductType_Thunderbird) { + m_aErrorString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No Thunderbird Addressbook Directories Exist")); + } + else if (_pCon->usesFactory()) { if ( _pCon->isOutlookExpress() ) { m_aErrorString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No Outlook Express Addressbook Exists")); @@ -584,20 +592,6 @@ if (!m_bProfileExists) { - //if xpcom not inited , init it now - sal_Int32 nProductType=0; - - switch(nDirectoryType) - { - case SDBCAddress::Mozilla: - nProductType = 0; - break; - case SDBCAddress::ThunderBird: - nProductType =1; - break; - default: - nProductType=0; - } Reference<XMozillaBootstrap> xMozillaBootstrap; Reference<XMultiServiceFactory> xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); @@ -605,10 +599,20 @@ OSL_ENSURE( xInstance.is(), "failed to create instance" ); xMozillaBootstrap = Reference<XMozillaBootstrap>(xInstance,UNO_QUERY); m_bProfileExists = sal_False; + //If there are no profiles for this product + //Or the given profile name does not found + //We will reaise a "No Addressbook Directories Exist" error + if ( xMozillaBootstrap->getProfileCount(m_ProductType) == 0 || + ( m_ProfileName.getLength() && !(xMozillaBootstrap->getProfilePath(m_ProductType,m_ProfileName).getLength()))) + m_bProfileExists = sal_False; + else if (xMozillaBootstrap->bootupProfile(m_ProductType,m_ProfileName) > 0) m_bProfileExists = sal_True; + } - if (nDirectoryType == SDBCAddress::Mozilla && !m_bProfileExists) + if ( ( nDirectoryType == SDBCAddress::Mozilla + || m_ProductType ==::com::sun::star::mozilla::MozillaProductType_Thunderbird) + && !m_bProfileExists) { setAbSpecificError( _pCon, bGivenURI ); return sal_False; @@ -803,7 +807,7 @@ } nsresult NewAddressBook(const ::rtl::OUString * aName) { - if (isProfileLocked()) + if (isProfileLocked(NULL)) return NS_ERROR_FILE_IS_LOCKED; nsresult rv; nsCOMPtr<nsIAbDirectoryProperties> aProperties = do_CreateInstance(NS_ABDIRECTORYPROPERTIES_CONTRACTID, &rv); File [changed]: MDatabaseMetaDataHelper.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx?r1=1.5.46.1&r2=1.5.46.2 Delta lines: +3 -3 ------------------- --- MDatabaseMetaDataHelper.hxx 17 Jan 2005 05:30:54 -0000 1.5.46.1 +++ MDatabaseMetaDataHelper.hxx 27 Jan 2005 11:30:11 -0000 1.5.46.2 @@ -2,9 +2,9 @@ * * $RCSfile: MDatabaseMetaDataHelper.hxx,v $ * - * $Revision: 1.5.46.1 $ + * $Revision: 1.5.46.2 $ * - * last change: $Author: windly $ $Date: 2005/01/17 05:30:54 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,7 +134,7 @@ MDatabaseMetaDataHelper( ); ~MDatabaseMetaDataHelper(); - //PROXIED_FUNCTION + // sal_Bool getTableStrings( OConnection* _pCon, ::std::vector< ::rtl::OUString >& _rStrings, ::std::vector< ::rtl::OUString >& _rTypes); File [changed]: MNSDeclares.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx?r1=1.2&r2=1.2.46.1 Delta lines: +10 -9 -------------------- --- MNSDeclares.hxx 25 Jun 2004 18:31:49 -0000 1.2 +++ MNSDeclares.hxx 27 Jan 2005 11:30:11 -0000 1.2.46.1 @@ -2,9 +2,9 @@ * * $RCSfile: MNSDeclares.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.46.1 $ * - * last change: $Author: hjs $ $Date: 2004/06/25 18:31:49 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,14 +60,10 @@ ************************************************************************/ #ifndef _CONNECTIVITY_MAB_NS_DECLARES_HXX_ -#define _CONNECTIVITY_MAB_NS_DECLARES_HXX_ 1 +#define _CONNECTIVITY_MAB_NS_DECLARES_HXX_ #include <sal/types.h> -#define PROXIED_FUNCTION -#define ACCESSED_IN_PROXY -#define ACCESS_PROXIED_VARIABLES -#define PROXY_RELATED const sal_Int32 RowStates_Normal = 0; const sal_Int32 RowStates_Inserted = 1; @@ -75,10 +71,15 @@ const sal_Int32 RowStates_Deleted = 4; const sal_Int32 RowStates_Error = 32; -ACCESSED_IN_PROXY extern sal_Bool isProfileLocked(); +namespace connectivity{ + namespace mozab{ + class OConnection; + } +} +sal_Bool isProfileLocked(connectivity::mozab::OConnection* _pCon); class nsIAbDirectory; -ACCESSED_IN_PROXY sal_Int32 getDirectoryType(const nsIAbDirectory* directory); +sal_Int32 getDirectoryType(const nsIAbDirectory* directory); #endif // _CONNECTIVITY_MAB_NS_DECLARES_HXX_ 1 File [changed]: MQuery.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx?r1=1.13.46.2&r2=1.13.46.3 Delta lines: +27 -5 -------------------- --- MQuery.cxx 24 Jan 2005 07:49:06 -0000 1.13.46.2 +++ MQuery.cxx 27 Jan 2005 11:30:12 -0000 1.13.46.3 @@ -2,9 +2,9 @@ * * $RCSfile: MQuery.cxx,v $ * - * $Revision: 1.13.46.2 $ + * $Revision: 1.13.46.3 $ * - * last change: $Author: windly $ $Date: 2005/01/24 07:49:06 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,6 +77,11 @@ #ifndef _CONNECTIVITY_MAB_MOZABHELPER_HXX_ #include "MNSMozabProxy.hxx" #endif +#include <com/sun/star/uno/Reference.hxx> +#include <unotools/processfactory.hxx> +#ifndef _COM_SUN_STAR_MOZILLA_XMOZILLABOOTSTRAP_HPP_ +#include <com/sun/star/mozilla/XMozillaBootstrap.hpp> +#endif #if OSL_DEBUG_LEVEL > 0 # define OUtoCStr( x ) ( ::rtl::OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US).getStr()) @@ -431,6 +436,23 @@ return rv; } +//determine whether current profile is locked,any error will lead to return true +sal_Bool isProfileLocked(OConnection* _pCon) +{ + ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XMozillaBootstrap > xMozillaBootstrap; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); + OSL_ENSURE( xFactory.is(), "can't get service factory" ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInstance = xFactory->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")) ); + OSL_ENSURE( xInstance.is(), "failed to create instance" ); + xMozillaBootstrap = ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XMozillaBootstrap >(xInstance,::com::sun::star::uno::UNO_QUERY); + if (_pCon) + return xMozillaBootstrap->isProfileLocked(_pCon->getProduct(),_pCon->getMozProfile()); + else + return xMozillaBootstrap->isCurrentProfileLocked(); +} + + // ------------------------------------------------------------------------- sal_Int32 getDirectoryType(const nsIAbDirectory* directory) { @@ -876,7 +898,7 @@ } // ------------------------------------------------------------------------- sal_Bool MQuery:: -isWritable() +isWritable(OConnection* _pCon) { if ( !m_aQueryDirectory ) return sal_False; @@ -885,7 +907,7 @@ nsCOMPtr<nsIAbDirectory> directory = do_QueryInterface(m_aQueryDirectory->directory, &rv);; if (NS_FAILED(rv)) return sal_False; - if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked()) + if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked(_pCon)) return sal_False; PRBool isWriteable; File [changed]: MQuery.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx?r1=1.11.46.1&r2=1.11.46.2 Delta lines: +34 -34 --------------------- --- MQuery.hxx 17 Jan 2005 05:30:55 -0000 1.11.46.1 +++ MQuery.hxx 27 Jan 2005 11:30:12 -0000 1.11.46.2 @@ -2,9 +2,9 @@ * * $RCSfile: MQuery.hxx,v $ * - * $Revision: 1.11.46.1 $ + * $Revision: 1.11.46.2 $ * - * last change: $Author: windly $ $Date: 2005/01/17 05:30:55 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -191,7 +191,7 @@ }; - //PROXY_RELATED + // class MQuery { /* @@ -264,64 +264,64 @@ * - Contains accessors to the members of this class. * - executeQuery() initiates a non-blocking query. */ - sal_Int32 executeQuery(OConnection* _pCon); //PROXIED_FUNCTION + sal_Int32 executeQuery(OConnection* _pCon); // sal_Int32 executeQueryProxied(OConnection* _pCon); //Used only by MNSMozabProxy - sal_Int32 createNewCard(); //return Row count number PROXIED_FUNCTION - sal_Int32 deleteRow(const sal_Int32 rowIndex); //PROXIED_FUNCTION - sal_Int32 commitRow(const sal_Int32 rowIndex); //PROXIED_FUNCTION - sal_Bool resyncRow(sal_Int32 nDBRow); //PROXIED_FUNCTION + sal_Int32 createNewCard(); //return Row count number + sal_Int32 deleteRow(const sal_Int32 rowIndex); // + sal_Int32 commitRow(const sal_Int32 rowIndex); // + sal_Bool resyncRow(sal_Int32 nDBRow); // - sal_Bool isWritable(); //PROXIED_FUNCTION + sal_Bool isWritable(OConnection* _pCon); // - sal_uInt32 InsertLoginInfo(OConnection* _pCon); //ACCESSED_IN_PROXY + sal_uInt32 InsertLoginInfo(OConnection* _pCon); // - void setAttributes( ::std::vector< ::rtl::OUString>&); //PROXY_RELATED - const ::std::vector< ::rtl::OUString> &getAttributes(void) const; //PROXY_RELATED + void setAttributes( ::std::vector< ::rtl::OUString>&); // + const ::std::vector< ::rtl::OUString> &getAttributes(void) const; // - void setAddressbook( ::rtl::OUString&); //PROXY_RELATED - ::rtl::OUString getAddressbook(void) const; //PROXY_RELATED + void setAddressbook( ::rtl::OUString&); // + ::rtl::OUString getAddressbook(void) const; // const ::std::map< ::rtl::OUString,::rtl::OUString>& getColumnAliasMap() const { return m_aColumnAliasMap; } void setExpression( MQueryExpression &_expr ); - void setMaxNrOfReturns( const sal_Int32); //PROXY_RELATED - sal_Int32 getMaxNrOfReturns(void) const; //PROXY_RELATED + void setMaxNrOfReturns( const sal_Int32); // + sal_Int32 getMaxNrOfReturns(void) const; // - void setQuerySubDirs( sal_Bool&); //PROXY_RELATED - sal_Bool getQuerySubDirs(void) const; //PROXY_RELATED + void setQuerySubDirs( sal_Bool&); // + sal_Bool getQuerySubDirs(void) const; // - sal_Int32 getRowCount( void ); //PROXY_RELATED - sal_uInt32 getRealRowCount( void ); //PROXY_RELATED - sal_Bool queryComplete( void ); //PROXY_RELATED - sal_Bool waitForQueryComplete( void ); //PROXY_RELATED - sal_Bool checkRowAvailable( sal_Int32 nDBRow );//PROXY_RELATED + sal_Int32 getRowCount( void ); // + sal_uInt32 getRealRowCount( void ); // + sal_Bool queryComplete( void ); // + sal_Bool waitForQueryComplete( void ); // + sal_Bool checkRowAvailable( sal_Int32 nDBRow );// sal_Bool getRowValue( connectivity::ORowSetValue& rValue, sal_Int32 nDBRow, const rtl::OUString& aDBColumnName, - sal_Int32 nType ) const;//PROXY_RELATED + sal_Int32 nType ) const;// sal_Bool setRowValue( connectivity::ORowSetValue& rValue, sal_Int32 nDBRow, const rtl::OUString& aDBColumnName, - sal_Int32 nType ) const;//PROXY_RELATED - sal_Int32 getRowStates(sal_Int32 nDBRow); //PROXY_RELATED - sal_Bool setRowStates(sal_Int32 nDBRow,sal_Int32 aState); //PROXY_RELATED + sal_Int32 nType ) const;// + sal_Int32 getRowStates(sal_Int32 nDBRow); // + sal_Bool setRowStates(sal_Int32 nDBRow,sal_Int32 aState); // - sal_Bool errorOccurred() const //PROXY_RELATED + sal_Bool errorOccurred() const // { return m_aErrorOccurred; }; - const ::rtl::OUString& getErrorString() const //PROXY_RELATED + const ::rtl::OUString& getErrorString() const // { return m_aErrorString; }; public: - MQuery(); //PROXY_RELATED - MQuery(const ::std::map< ::rtl::OUString, ::rtl::OUString> &); //PROXY_RELATED - virtual ~MQuery(); //PROXY_RELATED - static MNameMapper* CreateNameMapper(); //PROXY_RELATED - static void FreeNameMapper( MNameMapper* _ptr ); //PROXY_RELATED + MQuery(); // + MQuery(const ::std::map< ::rtl::OUString, ::rtl::OUString> &); // + virtual ~MQuery(); // + static MNameMapper* CreateNameMapper(); // + static void FreeNameMapper( MNameMapper* _ptr ); // }; } } File [changed]: MQueryHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx?r1=1.10&r2=1.10.46.1 Delta lines: +4 -4 ------------------- --- MQueryHelper.cxx 25 Jun 2004 18:33:55 -0000 1.10 +++ MQueryHelper.cxx 27 Jan 2005 11:30:12 -0000 1.10.46.1 @@ -2,9 +2,9 @@ * * $RCSfile: MQueryHelper.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.10.46.1 $ * - * last change: $Author: hjs $ $Date: 2004/06/25 18:33:55 $ + * last change: $Author: windly $ $Date: 2005/01/27 11:30:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -631,7 +631,7 @@ } #define ENSURE_MOZAB_PROFILE_NOT_LOOKED(directory) \ - if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked()) \ + if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked(NULL)) \ { \ m_aErrorString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("You can't make any changes to mozilla address book when mozilla is running.")); \ return sal_False; \ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
