diff options
Diffstat (limited to 'connectivity/source/drivers/mozab')
21 files changed, 80 insertions, 80 deletions
diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index 18aa6ca90020..2a28ef569a95 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx @@ -98,7 +98,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su { try { - //............................................................. + Reference< XNameAccess > xAliasesNode; xDriverNode->getPropertyValue("ColumnAliases") >>= xAliasesNode; OSL_ENSURE( xAliasesNode.is(), "OColumnAlias::setAlias: missing the aliases node!" ); @@ -108,7 +108,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su if ( xAliasesNode.is() ) aProgrammaticNames = xAliasesNode->getElementNames(); - //............................................................. + // travel through all the set elements const OUString* pProgrammaticNames = aProgrammaticNames.getConstArray(); const OUString* pProgrammaticNamesEnd = pProgrammaticNames + aProgrammaticNames.getLength(); @@ -124,7 +124,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su sAssignedAlias = *pProgrammaticNames; OString sAsciiProgrammaticName( OUStringToOString( *pProgrammaticNames, RTL_TEXTENCODING_ASCII_US ) ); - //............................................................. + #if OSL_DEBUG_LEVEL > 0 bool bFound = false; #endif diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index 53083fb4893b..1f765df09566 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx @@ -29,7 +29,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//......................................................................... + namespace connectivity { namespace mozab @@ -40,7 +40,7 @@ namespace connectivity Reference< XPropertySet > xNode; try { - //============================================================= + // create the config provider Reference< XMultiServiceFactory > xConfigProvider( com::sun::star::configuration::theDefaultProvider::get( @@ -49,7 +49,7 @@ namespace connectivity OUString sCompleteNodePath( "/org.openoffice.Office.DataAccess/DriverSettings/" ); sCompleteNodePath += OConnection::getDriverImplementationName(); - //========================================================= + // arguments for creating the config access Sequence< Any > aArguments(2); // the path to the node to open @@ -67,7 +67,7 @@ namespace connectivity PropertyState_DIRECT_VALUE ); - //========================================================= + // create the access Reference< XInterface > xAccess = xConfigProvider->createInstanceWithArguments( OUString("com.sun.star.configuration.ConfigurationAccess" ), @@ -172,7 +172,7 @@ namespace connectivity } } -//......................................................................... + extern "C" const sal_Unicode* SAL_CALL getUserProfile( void ) diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 708438f67612..75e2353aff1e 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -64,9 +64,9 @@ using namespace com::sun::star::sdbcx; namespace connectivity { namespace mozab { -// ===================================================================== + // = ConnectionImplData -// ===================================================================== + struct ConnectionImplData { ::boost::shared_ptr< ::comphelper::OfficeResourceBundle > pResourceBundle; @@ -144,9 +144,9 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& OSL_TRACE("IN OConnection::construct()" ); // open file setURL(url); - // + // Skip 'sdbc:mozab: part of URL - // + sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+1); OSL_ENSURE( url.copy( 0, nLen ) == "sdbc:address", "OConnection::construct: invalid start of the URI - should never have survived XDriver::acceptsURL!" ); diff --git a/connectivity/source/drivers/mozab/MConnection.hxx b/connectivity/source/drivers/mozab/MConnection.hxx index b9fe754779ff..f50468db18b9 100644 --- a/connectivity/source/drivers/mozab/MConnection.hxx +++ b/connectivity/source/drivers/mozab/MConnection.hxx @@ -95,9 +95,9 @@ namespace connectivity friend class connectivity::OSubComponent<OConnection, OConnection_BASE>; protected: - //==================================================================== + // Data attributes - //==================================================================== + ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by // an operation MozabDriver* m_pDriver; // Pointer to the owning @@ -163,7 +163,7 @@ namespace connectivity // XWarningsSupplier virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - // + MozabDriver* getDriver() const { return m_pDriver;} // Added to enable me to use SQLInterpreter which requires an diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx index 5d56c82b2242..fbefd5dadc9b 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx @@ -26,9 +26,9 @@ namespace connectivity { namespace mozab { - //************************************************************** + //************ Class: ODatabaseMetaData - //************************************************************** + class ODatabaseMetaData : public ODatabaseMetaDataBase { diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index a30fae3b3d88..38c5d3eee4eb 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -208,7 +208,7 @@ sal_Int32 SAL_CALL MozabDriver::getMinorVersion( ) throw(RuntimeException) EDriverType MozabDriver::impl_classifyURL( const OUString& url ) { // Skip 'sdbc:mozab: part of URL - // + sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+1); OUString aAddrbookURI(url.copy(nLen+1)); diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx index 4c6de31cef42..27322d37a276 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.hxx @@ -56,9 +56,9 @@ namespace connectivity }; ::std::vector< Parameter> m_aParameters; - //==================================================================== + // Data attributes - //==================================================================== + sal_Int32 m_nNumParams; // Number of parameter markers for the prepared statement OUString m_sSqlStatement; diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index 49c9ff05f76e..ebe599a83f43 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -341,9 +341,9 @@ sal_Bool OResultSet::pushCard(sal_uInt32 cardNumber) throw(SQLException, Runtime { if ( (m_aRow->get())[i].isBound() ) { - // + // Everything in the addressbook is a string! - // + if ( !m_aQuery.setRowValue( (m_aRow->get())[i], cardNumber, m_aColumnNames[i-1], DataType::VARCHAR )) { m_pStatement->getOwnConnection()->throwSQLException( m_aQuery.getError(), *this ); @@ -383,9 +383,9 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( { if ( (m_aRow->get())[i].isBound() ) { - // + // Everything in the addressbook is a string! - // + if ( !m_aQuery.getRowValue( (m_aRow->get())[i], cardNumber, m_aColumnNames[i-1], DataType::VARCHAR )) { m_pStatement->getOwnConnection()->throwSQLException( m_aQuery.getError(), *this ); @@ -1399,7 +1399,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, // the getXXX methods are 1-based ... sal_Int32 nTableColumnPos = i + 1; // get first table column is the bookmark column - // ... + #if OSL_DEBUG_LEVEL > 0 OSL_TRACE("Set Col Mapping: %d -> %d", nSelectColumnPos, nTableColumnPos ); #endif @@ -1432,9 +1432,9 @@ sal_Bool OResultSet::isCount() const } -// + // Check for valid row in m_aQuery -// + sal_Bool OResultSet::validRow( sal_uInt32 nRow ) { sal_Int32 nNumberOfRecords = m_aQuery.getRealRowCount(); diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx index 9b227f5f6319..18a50c547c11 100644 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx @@ -30,9 +30,9 @@ namespace connectivity { namespace mozab { - //************************************************************** + //************ Class: ResultSetMetaData - //************************************************************** + typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; class OResultSetMetaData : public OResultSetMetaData_BASE diff --git a/connectivity/source/drivers/mozab/MStatement.hxx b/connectivity/source/drivers/mozab/MStatement.hxx index 0e91ac29bec0..a89a0588e6e2 100644 --- a/connectivity/source/drivers/mozab/MStatement.hxx +++ b/connectivity/source/drivers/mozab/MStatement.hxx @@ -50,10 +50,10 @@ namespace connectivity ::com::sun::star::sdbc::XWarningsSupplier, ::com::sun::star::sdbc::XCloseable> OCommonStatement_IBASE; - //************************************************************** + //************ Class: OCommonStatement // is a base class for the normal statement and for the prepared statement - //************************************************************** + class OCommonStatement; typedef ::connectivity::OSubComponent< OCommonStatement, OCommonStatement_IBASE > OCommonStatement_SBASE; @@ -115,9 +115,9 @@ namespace connectivity virtual ~OCommonStatement(); protected: - // + // Driver Internal Methods - // + enum StatementType { eSelect, eCreateTable }; /** called to do the parsing of a to-be-executed SQL statement, and set all members as needed */ diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx index 3bfca5a367d0..ee64f6c7e388 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx @@ -144,7 +144,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) // Create the Event Queue for the UI thread... - // + // If an event queue already exists for the thread, then // CreateThreadEventQueue(...) will fail... // CreateThread0ueue(...) will fail... diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx index 6248f7c8da92..f2fd8ed9e552 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx @@ -264,7 +264,7 @@ nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile) } -// + // // Do the profile switch gDirServiceProvider->SetProfileDir(profileDir); mCurrentProfileName.Assign(aCurrentProfile); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx index b3e52c622087..1b251e0f9aa7 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx @@ -42,9 +42,9 @@ nsIAtom* nsProfileDirServiceProvider::sApp_PreferencesFile50; nsIAtom* nsProfileDirServiceProvider::sApp_UserProfileDirectory50; -//***************************************************************************** + // nsProfileDirServiceProvider::nsProfileDirServiceProvider -//***************************************************************************** + nsProfileDirServiceProvider::nsProfileDirServiceProvider() { @@ -143,9 +143,9 @@ nsProfileDirServiceProvider::GetFile(const char *prop, PRBool *persistent, nsIFi return rv; } -//***************************************************************************** + // Protected methods -//***************************************************************************** + nsresult nsProfileDirServiceProvider::Initialize() @@ -208,9 +208,9 @@ nsProfileDirServiceProvider::UndefineFileLocations() return NS_OK; } -//***************************************************************************** + // Global creation function -//***************************************************************************** + nsresult NS_NewProfileDirServiceProvider(nsProfileDirServiceProvider** aProvider) { diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx index 79bf6e68b842..3a31c290d060 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx @@ -23,10 +23,10 @@ // Forward Declarations class nsIAtom; -// -------------------------------------------------------------------------------------- + // nsProfileDirServiceProvider - The nsIDirectoryServiceProvider implementation used for // profile-relative file locations. -// -------------------------------------------------------------------------------------- + class nsProfileDirServiceProvider: public nsIDirectoryServiceProvider { @@ -61,7 +61,7 @@ protected: }; -// -------------------------------------------------------------------------------------- + /** * Global method to create an instance of nsProfileDirServiceProvider diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index e71d28ba965a..04b25a247ad6 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -183,9 +183,9 @@ static nsresult insertPABDescription() } return rv; } -// + // nsAbDirectoryDataSource -// + #define NS_RDF_CONTRACTID "@mozilla.org/rdf" #define NS_RDF_DATASOURCE_CONTRACTID NS_RDF_CONTRACTID "/datasource;1" #define NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_RDF_DATASOURCE_CONTRACTID "?name=" diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx index 4aa86de5bf92..fc690313fbb9 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx @@ -47,7 +47,7 @@ namespace connectivity MDatabaseMetaDataHelper(); ~MDatabaseMetaDataHelper(); - // + sal_Bool getTableStrings( OConnection* _pCon, ::std::vector< OUString >& _rStrings, ::std::vector< OUString >& _rTypes); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index 1324d7822a97..9c346b00ddc4 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx @@ -31,13 +31,13 @@ #include <boost/unordered_map.hpp> -//........................................................................ + namespace connectivity { namespace mozab { -//........................................................................ - //==================================================================== + + //= helper - //==================================================================== + namespace { typedef NS_STDCALL_FUNCPROTO(nsresult, CardPropertyGetter, nsIAbCard, GetFirstName, (PRUnichar**)); @@ -131,16 +131,16 @@ namespace connectivity { namespace mozab { } } - //==================================================================== + //= AttributeMap_Data - //==================================================================== + struct AttributeMap_Data { }; - //==================================================================== + //= MLdapAttributeMap - //==================================================================== + MLdapAttributeMap::MLdapAttributeMap() :m_pData( new AttributeMap_Data ) @@ -436,8 +436,8 @@ namespace connectivity { namespace mozab { } } -//........................................................................ + } } // namespace connectivity::mozab -//........................................................................ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx index 8a34d6c9efaf..1ed096ea06e1 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx @@ -24,16 +24,16 @@ #include <memory> -//........................................................................ + namespace connectivity { namespace mozab { -//........................................................................ + struct AttributeMap_Data; class MQueryHelperResultEntry; - //==================================================================== + //= class MLdapAttributeMap - //==================================================================== + /** implements the nsIAbLDAPAttributeMap interface Somewhere between Mozilla 1.7.5 and SeaMonkey 1.1.12, the LDAP address book @@ -61,9 +61,9 @@ namespace connectivity { namespace mozab { ::std::auto_ptr< AttributeMap_Data > m_pData; }; -//........................................................................ + } } // namespace connectivity::mozab -//........................................................................ + #endif // CONNECTIVITY_MLDAPATTRIBUTEMAP_HXX diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx index 9073f4546c38..b5ab0f756b89 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx @@ -19,9 +19,9 @@ #ifndef _CONNECTIVITY_MAB_NS_INCLUDE_HXX_ #define _CONNECTIVITY_MAB_NS_INCLUDE_HXX_ -// + // Only include Mozilla include files once and using this file... -// + // moved this here and in first position due to "long l;" unxsoli4 warning #include <rtl/ustrbuf.hxx> diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx index 2395bd0009b0..9a03fcea28af 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx @@ -53,7 +53,7 @@ using namespace connectivity; // Used to store an nsIAbDirectoryQuery member without the need to use Mozilla // types in the MQuery.hxx file. -// + namespace connectivity { namespace mozab { struct MQueryDirectory { @@ -86,7 +86,7 @@ MQuery::~MQuery() // MQueryHelper is reference counted, so we need to decrement the // count here. - // + if ( m_aQueryDirectory->contextId != -1 && m_aQueryDirectory->directoryQuery != NULL ) m_aQueryDirectory->directoryQuery->StopQuery(m_aQueryDirectory->contextId); @@ -109,7 +109,7 @@ void MQuery::construct() m_aQueryDirectory = new MQueryDirectory(); // MQueryHelper is reference counted, so we need to add to the // count here to prevent accidental deletion else where... - // + m_aQueryHelper = new MQueryHelper(); NS_IF_ADDREF( m_aQueryHelper); } @@ -564,11 +564,11 @@ sal_Int32 MQuery::executeQueryProxied(OConnection* _pCon) } -// -// + + // If the query executed is being done asynchronously then this may return // -1 as the count, ie. it's undetermined. -// + sal_Int32 MQuery::getRowCount() { @@ -576,21 +576,21 @@ MQuery::getRowCount() } -// -// + + // As opposed to getRowCount() this returns the actual number of rows fetched // so far (if is an async query) -// + sal_uInt32 MQuery::getRealRowCount() { return( m_aQueryHelper->getRealCount() ); } -// + // If the query executed is being done asynchronously then this may be // false -// + sal_Bool MQuery::queryComplete( void ) { diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index 0e9264a39fad..a2ea1ea7c28f 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx @@ -34,9 +34,9 @@ using namespace connectivity::mozab; NS_IMPL_THREADSAFE_ISUPPORTS1(connectivity::mozab::MQueryHelper,nsIAbDirectoryQueryResultListener) -// + // class MQueryHelperResultEntry -// + MQueryHelperResultEntry::MQueryHelperResultEntry() @@ -83,9 +83,9 @@ void MQueryHelperResultEntry::setValue( const OString &key, const OUString & rVa { m_Fields[ key ] = rValue; } -// + // class MQueryHelper -// + MQueryHelper::MQueryHelper() :m_nIndex( 0 ) ,m_bHasMore( sal_True ) |