diff options
Diffstat (limited to 'dbaccess/source/core')
119 files changed, 303 insertions, 1030 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx index 0230f2e836c9..96636e93fefc 100644 --- a/dbaccess/source/core/api/BookmarkSet.cxx +++ b/dbaccess/source/core/api/BookmarkSet.cxx @@ -249,4 +249,5 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet } } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CIndexes.cxx b/dbaccess/source/core/api/CIndexes.cxx index dc83d81dd42e..8d6203c29553 100644 --- a/dbaccess/source/core/api/CIndexes.cxx +++ b/dbaccess/source/core/api/CIndexes.cxx @@ -89,4 +89,5 @@ void SAL_CALL OIndexes::disposing(void) else OIndexesHelper::disposing(); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx index a1fa8c941fd8..004ec580dc09 100644 --- a/dbaccess/source/core/api/CRowSetColumn.cxx +++ b/dbaccess/source/core/api/CRowSetColumn.cxx @@ -89,4 +89,5 @@ void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index f9b00667a98a..25888060175b 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -255,4 +255,5 @@ void ORowSetDataColumns::assign(const ::rtl::Reference< ::connectivity::OSQLColu void ORowSetDataColumns::impl_refresh() throw(::com::sun::star::uno::RuntimeException) { } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index b712470d9aea..09519c72c1b8 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -689,4 +689,5 @@ bool OCacheSet::updateColumnValues(const ORowSetValueVector::Vector& /*io_aCache void OCacheSet::fillMissingValues(ORowSetValueVector::Vector& /*io_aRow*/) const { } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 186f4e6fa3b0..58d102dbe54e 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -234,9 +234,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto return aReturn; } - //========================================================================== - //= OViewContainer - //========================================================================== + // OViewContainer OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const Reference< XConnection >& _xCon, @@ -486,4 +484,5 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto } } // namespace + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx index 992b6c23c4ce..8ad3edfee7c1 100644 --- a/dbaccess/source/core/api/HelperCollections.hxx +++ b/dbaccess/source/core/api/HelperCollections.hxx @@ -74,9 +74,7 @@ namespace dbaccess }; typedef connectivity::sdbcx::OCollection OPrivateTables_BASE; - //========================================================================== - //= OPrivateTables - //========================================================================== + // OPrivateTables class OPrivateTables : public OPrivateTables_BASE { OSQLTables m_aTables; diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index c008916525fa..58135fe02db8 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -101,6 +101,7 @@ namespace } } } + DBG_NAME(OKeySet) OKeySet::OKeySet(const connectivity::OSQLTable& _xTable, @@ -144,6 +145,7 @@ OKeySet::~OKeySet() DBG_DTOR(OKeySet,NULL); } + void OKeySet::initColumns() { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); @@ -224,6 +226,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, m_aAutoColumns.push_back( keyColumn->first ); } } + SAL_WNODEPRECATED_DECLARATIONS_POP namespace @@ -484,7 +487,6 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows static OUString aOr(" OR "); static OUString aEqual(" = ?"); - // use keys and indexes for exact postioning // first the keys Reference<XNameAccess> xKeyColumns = getKeyColumns(); @@ -577,7 +579,6 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow if ( xIndexSup.is() ) xIndexes.set(xIndexSup->getIndexes(),UNO_QUERY); - ::std::vector< Reference<XNameAccess> > aAllIndexColumns; lcl_fillIndexColumns(xIndexes,aAllIndexColumns); @@ -909,6 +910,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ tryRefetch(_rInsertRow,bRefetch); } } + void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch) { if ( bRefetch ) @@ -1257,6 +1259,7 @@ sal_Bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, Runtime { return absolute_checked(row,sal_True); } + sal_Bool OKeySet::absolute_checked( sal_Int32 row, sal_Bool /* i_bFetchRow */ ) { SAL_INFO("dbaccess", "OKeySet::absolute" ); @@ -1339,6 +1342,7 @@ sal_Bool OKeySet::previous_checked( sal_Bool /* i_bFetchRow */ ) } return m_aKeyIter != m_aKeyMap.begin(); } + sal_Bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException) { return previous_checked(sal_True); @@ -1388,7 +1392,6 @@ bool OKeySet::doTryRefetch_throw() throw(SQLException, RuntimeException) return m_xSet->next(); } -// ----------------------------------------------------------------------------- void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::refreshRow" ); @@ -1499,6 +1502,7 @@ bool OKeySet::fillAllRows() return true; } } + // XRow sal_Bool SAL_CALL OKeySet::wasNull( ) throw(SQLException, RuntimeException) { @@ -1758,4 +1762,5 @@ void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const Select break; } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 564720cbd57e..5e8aeabc0725 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -503,6 +503,7 @@ void OptimisticSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVecto o_aChangedColumns.push_back(aJoinIter->second); } } + namespace { struct PositionFunctor : ::std::unary_function<SelectColumnsMetaData::value_type,bool> @@ -684,4 +685,5 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const } } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index b0d300d10e0c..f451f9894c9a 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2012,6 +2012,7 @@ void SAL_CALL ORowSet::removeRowSetApproveListener( const Reference< XRowSetAppr m_aApproveListeners.removeInterface(listener); } + // XRowsChangeBroadcaster void SAL_CALL ORowSet::addRowsChangeListener( const Reference< XRowsChangeListener >& listener ) throw(RuntimeException) { @@ -2704,6 +2705,7 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard) m_pCache->reset(xResultSet); notifyAllListeners(_rGuard); } + // *********************************************************** // ORowSetClone // *********************************************************** diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index dc1e8777e445..2b41f105d406 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "RowSetBase.hxx" #include "CRowSetDataColumn.hxx" #include <connectivity/sdbcx/VCollection.hxx> @@ -55,9 +54,7 @@ using namespace ::osl; namespace dbaccess { -// ========================================================================= -// = OEmptyCollection -// ========================================================================= +// OEmptyCollection class OEmptyCollection : public sdbcx::OCollection { protected: @@ -76,9 +73,7 @@ connectivity::sdbcx::ObjectType OEmptyCollection::createObject(const OUString& / return connectivity::sdbcx::ObjectType(); } -// ========================================================================= -// = ORowSetBase -// ========================================================================= +// ORowSetBase DBG_NAME(ORowSetBase) ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex ) @@ -470,7 +465,6 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx throwFunctionSequenceException(*m_pMySelf); } - checkCache(); sal_Bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); @@ -1452,7 +1446,7 @@ sal_Int32 ORowSetBase::impl_getRowCount() const ++nRowCount; return nRowCount; } -// ============================================================================= + struct ORowSetNotifierImpl { ::std::vector<sal_Int32> aChangedColumns; @@ -1460,6 +1454,7 @@ struct ORowSetNotifierImpl ORowSetValueVector::Vector aRow; }; + DBG_NAME(ORowSetNotifier) ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet ) @@ -1544,6 +1539,7 @@ void ORowSetNotifier::firePropertyChange() m_pRowSet->fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False, ORowSetBase::GrantNotifierAccess()); } } + } // namespace dbaccess /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index 185808602f88..780e000d00b0 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -44,7 +44,6 @@ #include <functional> - namespace com { namespace sun { namespace star { namespace sdb { struct RowChangeEvent; } namespace lang { struct Locale; } @@ -327,7 +326,6 @@ namespace dbaccess // is called when the rowset has deleted this bookmark _rBookmark void onDeletedRow( const ::com::sun::star::uno::Any& _rBookmark, sal_Int32 _nPos ); - // ========================================================== // granular access control struct GrantNotifierAccess { friend class ORowSetNotifier; private: GrantNotifierAccess () { } }; @@ -350,7 +348,6 @@ namespace dbaccess ::osl::Mutex* getMutex() const { return m_pMutex; } }; - // ======================================================================== /** eases the handling of the doCancelModification and notifyCancelInsert methods <p>The class can only be used on the stack, within a method of ORowSetBase (or derivees)</p> diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index adcb5c257d47..4ac763ebbfc4 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1752,4 +1752,5 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_ } } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 0863f0ff57e5..a658e2d80332 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -114,7 +114,6 @@ namespace return pNewSqlParseNode; } - // ..................................................................... /** checks whether the given parse node describes a valid single select statement, throws an error if not */ @@ -142,7 +141,6 @@ namespace delete pOldNode; } - // ..................................................................... /** combines parseStatement_throwError and checkForSingleSelect_throwError */ void parseAndCheck_throwError( OSQLParser& _rParser, const OUString& _rStatement, @@ -153,7 +151,6 @@ namespace checkForSingleSelect_throwError( pNode, _rIterator, _rxContext, _rStatement ); } - // ..................................................................... /** transforms a parse node describing a complete statement into a pure select statement, without any filter/order/groupby/having clauses */ @@ -300,6 +297,7 @@ void SAL_CALL OSingleSelectQueryComposer::disposing(void) clearCurrentCollections(); } + IMPLEMENT_FORWARD_XINTERFACE3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer) IMPLEMENT_SERVICE_INFO1(OSingleSelectQueryComposer,"org.openoffice.comp.dba.OSingleSelectQueryComposer",SERVICE_NAME_SINGLESELECTQUERYCOMPOSER) IMPLEMENT_TYPEPROVIDER3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer) @@ -983,7 +981,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr //OSQLParseTreeIterator::appendColumns it creates some labels using those real names //but the evo address book gives them proper labels of First Name, Second Name and City //the munge means that here we have e.g. just "City" as a label because it matches - // + //This is all a horrible mess if (bMissingSomeColumnLabels) aNames.clear(); @@ -1066,7 +1064,6 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, OUString aValue; OUString aColumnName; - pCondition->parseNodeToStr( aValue, m_xConnection, NULL ); pCondition->getChild(0)->parseNodeToStr( aColumnName, m_xConnection, NULL ); @@ -1868,4 +1865,5 @@ OUString OSingleSelectQueryComposer::getSQLPart( SQLPart _ePart, OSQLParseTreeIt sRet = sKeyword + sRet; return sRet; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx index 433450e712e1..5d252a59b1ba 100644 --- a/dbaccess/source/core/api/StaticSet.cxx +++ b/dbaccess/source/core/api/StaticSet.cxx @@ -357,4 +357,5 @@ void SAL_CALL OStaticSet::moveToCurrentRow( ) throw(SQLException, RuntimeExcept { SAL_INFO("dbaccess", "OStaticSet::moveToCurrentRow" ); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 2707b124de1b..d46fe96ddf82 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -56,9 +56,7 @@ using namespace ::comphelper; using namespace ::dbtools; using namespace ::cppu; -//========================================================================== -//= ODBTableDecorator -//========================================================================== +// ODBTableDecorator DBG_NAME(ODBTableDecorator) ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnection, const Reference< XColumnsSupplier >& _rxNewTable, @@ -682,4 +680,5 @@ void SAL_CALL ODBTableDecorator::setName( const OUString& /*aName*/ ) throw (::c SAL_INFO("dbaccess", "ODBTableDecorator::setName" ); throwFunctionNotSupportedException( "XNamed::setName", *this ); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index 82c9d5561a94..df46822f99bc 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "View.hxx" #include "dbastrings.hrc" @@ -56,9 +55,7 @@ namespace dbaccess } return sSupportService; } - //==================================================================== - //= View - //==================================================================== + // View View::View( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive, const OUString& _rCatalogName,const OUString& _rSchemaName, const OUString& _rName ) :View_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, OUString(), _rSchemaName, _rCatalogName ) @@ -133,4 +130,5 @@ namespace dbaccess } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx index a7c312316988..2cdf5192751e 100644 --- a/dbaccess/source/core/api/WrappedResultSet.cxx +++ b/dbaccess/source/core/api/WrappedResultSet.cxx @@ -234,4 +234,5 @@ void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xPar } } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 2b5fabb4225c..43dca97d7091 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ContainerMediator.hxx" #include "apitools.hxx" #include "column.hxx" @@ -63,9 +62,7 @@ using namespace ::cppu; DBG_NAME(OColumn) -//============================================================ -//= OColumn -//============================================================ +// OColumn OColumn::OColumn( const bool _bNameIsReadOnly ) :OColumnBase( m_aMutex ) ,::comphelper::OPropertyContainer( OColumnBase::rBHelper ) @@ -153,9 +150,7 @@ void OColumn::registerPropertyNoMember( const OUString& _rName, sal_Int32 _nHand ::comphelper::OPropertyContainer::registerPropertyNoMember( _rName, _nHandle, _nAttributes, _rType, _pInitialValue ); } -//============================================================ -//= OColumns -//============================================================ +// OColumns DBG_NAME(OColumns); OColumns::OColumns(::cppu::OWeakObject& _rParent, @@ -221,7 +216,6 @@ Sequence< OUString > OColumns::getSupportedServiceNames( ) throw (RuntimeExcept return aSNS; } -//------------------------------------------------------------------ void OColumns::append( const OUString& _rName, OColumn* _pColumn ) { MutexGuard aGuard(m_rMutex); @@ -235,7 +229,6 @@ void OColumns::append( const OUString& _rName, OColumn* _pColumn ) insertElement( _rName, _pColumn ); } -//------------------------------------------------------------------ void OColumns::clearColumns() { MutexGuard aGuard(m_rMutex); @@ -331,7 +324,6 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException) Sequence< Type > aSecTypes(OColumns_BASE::getTypes()); - const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for (;pBegin != pEnd ; ++pBegin) @@ -445,4 +437,5 @@ void SAL_CALL OColumns::setParent( const Reference< XInterface >& _xParent ) thr ::osl::MutexGuard aGuard(m_rMutex); m_xParent = _xParent; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx index 6ea73ad6fa3e..58eb794e5efb 100644 --- a/dbaccess/source/core/api/columnsettings.cxx +++ b/dbaccess/source/core/api/columnsettings.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "columnsettings.hxx" #include "dbastrings.hrc" @@ -28,10 +27,8 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -50,9 +47,7 @@ namespace dbaccess namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; - //============================================================================== - //= OColumnSettings - //============================================================================== + // OColumnSettings DBG_NAME( OColumnSettings ) OColumnSettings::OColumnSettings() @@ -160,8 +155,6 @@ namespace dbaccess return true; } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx index d08f59c81633..421d23df8be3 100644 --- a/dbaccess/source/core/api/datacolumn.cxx +++ b/dbaccess/source/core/api/datacolumn.cxx @@ -414,4 +414,5 @@ void ODataColumn::updateObject(const Any& x) throw( SQLException, RuntimeExcepti m_xRowUpdate->updateObject(m_nPos, x); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx index cfdf5cff3a78..eeb64c4b68f1 100644 --- a/dbaccess/source/core/api/datasettings.cxx +++ b/dbaccess/source/core/api/datasettings.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "datasettings.hxx" #include "apitools.hxx" #include "dbastrings.hrc" @@ -32,7 +31,6 @@ #include <com/sun/star/awt/FontWidth.hpp> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::lang; @@ -42,9 +40,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= ODataSettings -//========================================================================== +// ODataSettings void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem) { if ( m_bQuery ) @@ -209,4 +205,5 @@ void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefau } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index adfb0be5b4bf..962011bc862b 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -56,9 +56,7 @@ namespace const sal_Int32 HAS_TABLENAME = 0x00000040; } -//============================================================ -//= OTableColumnDescriptor -//============================================================ +// OTableColumnDescriptor IMPLEMENT_FORWARD_XINTERFACE2(OTableColumnDescriptor,OColumn,TXChild) void OTableColumnDescriptor::impl_registerProperties() @@ -130,9 +128,8 @@ void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >& ::osl::MutexGuard aGuard(m_aMutex); m_xParent = _xParent; } -//============================================================ -//= OTableColumn -//============================================================ + +// OTableColumn DBG_NAME(OTableColumn); OTableColumn::OTableColumn( const OUString& _rName ) @@ -164,9 +161,7 @@ OUString OTableColumn::getImplementationName( ) throw (RuntimeException) return OTableColumnDescriptor::createArrayHelper(); } -// ========================================================================= -//= OQueryColumn -// ========================================================================= +// OQueryColumn DBG_NAME( OQueryColumn ); OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection, const OUString &i_sLabel ) @@ -322,9 +317,7 @@ void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHand } } -//========================================================================== -//= OColumnWrapper -//========================================================================== +// OColumnWrapper DBG_NAME(OColumnWrapper); OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bool _bNameIsReadOnly ) @@ -420,9 +413,7 @@ sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aId return 0; } -//============================================================ -//= OTableColumnDescriptorWrapper -//============================================================ +// OTableColumnDescriptorWrapper OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< XPropertySet >& _rCol, const bool _bPureWrap, const bool _bIsDescriptor ) :OColumnWrapper( _rCol, !_bIsDescriptor ) ,m_bPureWrap( _bPureWrap ) @@ -575,9 +566,7 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast( } } -//============================================================ -//= OTableColumnWrapper -//============================================================ +// OTableColumnWrapper OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol, const Reference< XPropertySet >& _xColDefintion, const bool _bPureWrap ) :OTableColumnDescriptorWrapper( rCol, _bPureWrap, false ) @@ -626,4 +615,5 @@ Sequence< OUString > OTableColumnWrapper::getSupportedServiceNames( ) throw (Ru { return OTableColumnDescriptorWrapper::createArrayHelper( nId ); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index f8f9680b6150..811d5450004a 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -420,4 +420,5 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim m_xAggregateAsParameters->clearParameters(); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 5bb8cb1e8586..12d959a8aba0 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "query.hxx" #include "dbastrings.hrc" #include <connectivity/warningscontainer.hxx> @@ -66,9 +65,7 @@ using namespace ::utl; namespace dbaccess { -//========================================================================== -//= OQuery -//========================================================================== +// OQuery DBG_NAME(OQuery) OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition @@ -368,4 +365,5 @@ OUString OQuery::determineContentType() const } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx index a0a8e781954f..cb96412d748a 100644 --- a/dbaccess/source/core/api/query.hxx +++ b/dbaccess/source/core/api/query.hxx @@ -35,14 +35,10 @@ namespace dbtools class IWarningsContainer; } -//........................................................................ namespace dbaccess { -//........................................................................ -//========================================================================== -//= OQuery - an object implementing the sdb.Query service -//========================================================================== +// OQuery - an object implementing the sdb.Query service typedef ::cppu::ImplHelper3 < ::com::sun::star::sdbcx::XDataDescriptorFactory, ::com::sun::star::beans::XPropertyChangeListener, ::com::sun::star::sdbcx::XRename @@ -51,7 +47,6 @@ class OQuery; class OColumn; typedef ::comphelper::OPropertyArrayUsageHelper< OQuery > OQuery_ArrayHelperBase; - class OQuery :public OContentHelper ,public OQueryDescriptor_Base ,public OQuery_Base @@ -76,7 +71,6 @@ protected: enum AGGREGATE_ACTION { NONE, SETTING_PROPERTIES, FLUSHING }; AGGREGATE_ACTION m_eDoingCurrently; - // ------------------------------------------------------------------------ /** a class which automatically resets m_eDoingCurrently in it's destructor */ class OAutoActionReset; // just for the following friend declaration @@ -155,11 +149,8 @@ private: void registerProperties(); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_COREAPI_QUERY_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index 70cc6cee2829..3f7c5d50f0cb 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -323,4 +323,5 @@ void SAL_CALL OQueryComposer::release() throw() { OSubComponent::release(); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index fc5ccfcdbce9..fca43df761d3 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "querycontainer.hxx" #include "dbastrings.hrc" #include "query.hxx" @@ -58,9 +57,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= OQueryContainer -//========================================================================== +// OQueryContainer DBG_NAME(OQueryContainer) OQueryContainer::OQueryContainer( @@ -408,4 +405,5 @@ Sequence< OUString > SAL_CALL OQueryContainer::getElementNames( ) throw(Runtime } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 78f549984951..1c2f6501ec32 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -42,9 +42,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= OQueryDescriptor -//========================================================================== +// OQueryDescriptor DBG_NAME(OQueryDescriptor) OQueryDescriptor::OQueryDescriptor() diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx index ccd51749c862..27c8d0d35c41 100644 --- a/dbaccess/source/core/api/querydescriptor.hxx +++ b/dbaccess/source/core/api/querydescriptor.hxx @@ -35,14 +35,10 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/uno3.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ -//========================================================================== -//= OQueryDescriptor_Base - a query descriptor (as the name suggests :) -//========================================================================== +// OQueryDescriptor_Base - a query descriptor (as the name suggests :) typedef ::cppu::ImplHelper3< ::com::sun::star::sdbcx::XColumnsSupplier, ::com::sun::star::lang::XUnoTunnel, @@ -142,11 +138,8 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_COREAPI_QUERYDESCRIPTOR_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx index e2dd8ba86fa5..d47a6327c6a7 100644 --- a/dbaccess/source/core/api/resultcolumn.cxx +++ b/dbaccess/source/core/api/resultcolumn.cxx @@ -311,4 +311,5 @@ void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const } } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index 3476b654a3f6..f11a4ec8bfde 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -1098,4 +1098,5 @@ void OResultSet::checkBookmarkable() const if ( !m_bIsBookmarkable ) throwSQLException( "The result set does not have bookmark support.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) ); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 2cd8ef522813..55bcc6870d4c 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <string.h> #include "table.hxx" @@ -61,9 +60,7 @@ using namespace ::osl; using namespace ::comphelper; using namespace ::cppu; -//========================================================================== -//= ODBTable -//========================================================================== +// ODBTable DBG_NAME(ODBTable) ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables @@ -399,4 +396,5 @@ sdbcx::OCollection* ODBTable::createIndexes(const TStringVector& _rNames) SAL_INFO("dbaccess", "ODBTable::createIndexes" ); return new OIndexes(this,m_aMutex,_rNames,NULL); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 34da7b91ef98..422a2fe9ecaa 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "tablecontainer.hxx" #include "dbastrings.hrc" #include "table.hxx" @@ -94,9 +93,8 @@ namespace return sal_False; } } -//========================================================================== -//= OTableContainer -//========================================================================== + +// OTableContainer DBG_NAME(OTableContainer) OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent, @@ -483,4 +481,5 @@ void OTableContainer::addMasterContainerListener() DBG_UNHANDLED_EXCEPTION(); } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index c839d8b9b939..9e66780750cc 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "viewcontainer.hxx" #include "dbastrings.hrc" #include "core_resource.hxx" @@ -57,9 +56,7 @@ using namespace ::comphelper; using namespace ::cppu; using namespace ::connectivity::sdbcx; -//========================================================================== -//= OViewContainer -//========================================================================== +// OViewContainer DBG_NAME(OViewContainer) OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index 490497369c36..f32c9188bd18 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ComponentDefinition.hxx" #include "apitools.hxx" #include "dbastrings.hrc" @@ -74,6 +73,7 @@ public: } void clear() { m_pComponent = NULL; } }; + DBG_NAME(OComponentDefinition_Impl) OComponentDefinition_Impl::OComponentDefinition_Impl() { @@ -84,9 +84,8 @@ OComponentDefinition_Impl::~OComponentDefinition_Impl() { DBG_DTOR(OComponentDefinition_Impl,NULL); } -//========================================================================== -//= OComponentDefinition -//========================================================================== + +// OComponentDefinition DBG_NAME(OComponentDefinition) @@ -142,7 +141,6 @@ OComponentDefinition::~OComponentDefinition() DBG_DTOR(OComponentDefinition, NULL); } - OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxContainer ,const OUString& _rElementName ,const Reference< XComponentContext >& _xORB @@ -302,4 +300,5 @@ void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxS } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx index 82a5518779f7..67d203e241d2 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx @@ -36,10 +36,8 @@ #include <comphelper/implementationreference.hxx> #include <memory> -//........................................................................ namespace dbaccess { -//........................................................................ typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XColumnsSupplier > OComponentDefinition_BASE; @@ -81,9 +79,7 @@ namespace dbaccess }; class OColumnPropertyListener; -//========================================================================= -//= OComponentDefinition - a database "document" which describes a query -//========================================================================= +// OComponentDefinition - a database "document" which describes a query class OComponentDefinition :public OContentHelper ,public ODataSettings ,public IColumnFactory @@ -101,7 +97,6 @@ protected: virtual ~OComponentDefinition(); virtual void SAL_CALL disposing(); - protected: OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer @@ -169,9 +164,7 @@ private: void registerProperties(); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // DBA_COREDATAACESS_COMPONENTDEFINITION_HXX diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index f6e89f461c9c..9f36d7b70325 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -35,7 +35,6 @@ #include "dbastrings.hrc" #include <tools/debug.hxx> - namespace dbaccess { using namespace ::com::sun::star::uno; @@ -160,9 +159,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma Any aRet; if ( aCommand.Name.compareToAscii( "getPropertyValues" ) == 0 ) { - ////////////////////////////////////////////////////////////////// // getPropertyValues - ////////////////////////////////////////////////////////////////// Sequence< Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) @@ -180,9 +177,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma } else if ( aCommand.Name.compareToAscii( "setPropertyValues" ) == 0 ) { - ////////////////////////////////////////////////////////////////// // setPropertyValues - ////////////////////////////////////////////////////////////////// Sequence< PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) ) @@ -213,9 +208,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma } else if ( aCommand.Name.compareToAscii( "getPropertySetInfo" ) == 0 ) { - ////////////////////////////////////////////////////////////////// // getPropertySetInfo - ////////////////////////////////////////////////////////////////// Reference<XPropertySet> xProp(*this,UNO_QUERY); if ( xProp.is() ) @@ -224,9 +217,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma } else { - ////////////////////////////////////////////////////////////////// // Unsupported command - ////////////////////////////////////////////////////////////////// OSL_FAIL( "Content::execute - unsupported command!" ); @@ -417,7 +408,6 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue return aRet; } -//========================================================================= // static Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& rProperties) { @@ -639,4 +629,5 @@ void OContentHelper::notifyDataSourceModified() } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 36c1458cb824..c553759bd582 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "commandcontainer.hxx" #include "connection.hxx" #include "core_resource.hrc" @@ -87,9 +86,7 @@ using namespace ::comphelper; namespace dbaccess { -//============================================================ -//= VosMutexFacade -//============================================================ +// VosMutexFacade VosMutexFacade::VosMutexFacade( ::osl::Mutex& _rMutex ) :m_rMutex( _rMutex ) { @@ -110,9 +107,7 @@ bool VosMutexFacade::tryToAcquire() return m_rMutex.tryToAcquire(); } -//============================================================ -//= DocumentStorageAccess -//============================================================ +// DocumentStorageAccess DBG_NAME( DocumentStorageAccess ) class DocumentStorageAccess : public ::cppu::WeakImplHelper2< XDocumentSubStorageSupplier , XTransactionListener > @@ -397,9 +392,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So } } -//============================================================ -//= ODatabaseModelImpl -//============================================================ +// ODatabaseModelImpl DBG_NAME(ODatabaseModelImpl) ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _rxContext, ODatabaseContext& _rDBContext ) @@ -1397,4 +1390,5 @@ ModelDependentComponent::~ModelDependentComponent() } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index eff4138ea316..16544bd0528f 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -78,10 +78,8 @@ namespace comphelper class NamedValueCollection; } -//........................................................................ namespace dbaccess { -//........................................................................ typedef ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XConnection > OWeakConnection; typedef std::vector< OWeakConnection > OWeakConnectionArray; @@ -123,9 +121,7 @@ struct AsciiPropertyValue class ODatabaseContext; class OSharedConnectionManager; -//============================================================ -//= VosMutexFacade -//============================================================ +// VosMutexFacade /** a class which provides an IMutex interface to an OSL-based mutex */ class VosMutexFacade : public comphelper::SolarMutex @@ -144,10 +140,7 @@ private: ::osl::Mutex& m_rMutex; }; - -//============================================================ -//= ODatabaseModelImpl -//============================================================ +// ODatabaseModelImpl typedef ::utl::SharedUNOComponent< ::com::sun::star::embed::XStorage > SharedStorage; class ODatabaseContext; @@ -621,9 +614,7 @@ public: } }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_COREDATAACCESS_DATALINK_HXX_ diff --git a/dbaccess/source/core/dataaccess/SharedConnection.cxx b/dbaccess/source/core/dataaccess/SharedConnection.cxx index 242741ee5585..4bbd822294a5 100644 --- a/dbaccess/source/core/dataaccess/SharedConnection.cxx +++ b/dbaccess/source/core/dataaccess/SharedConnection.cxx @@ -155,4 +155,5 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OSharedConnection } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/SharedConnection.hxx b/dbaccess/source/core/dataaccess/SharedConnection.hxx index 916c4fec8cb8..b4e28f465292 100644 --- a/dbaccess/source/core/dataaccess/SharedConnection.hxx +++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx @@ -34,15 +34,12 @@ #include <com/sun/star/sdb/XQueriesSupplier.hpp> #include <comphelper/sequence.hxx> - namespace dbaccess { - //======================================================================================= - //= OSharedConnection: This class implements a simple forwarding of connection calls. - //= All methods will be forwarded with exception of the set methods, which are not allowed - //= to be called on shared connections. Instances of this class will be created when the - //= datasource is asked for not isolated connection. - //======================================================================================= + // OSharedConnection: This class implements a simple forwarding of connection calls. + // All methods will be forwarded with exception of the set methods, which are not allowed + // to be called on shared connections. Instances of this class will be created when the + // datasource is asked for not isolated connection. typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::sdbc::XConnection > OSharedConnection_BASE; typedef ::connectivity::OConnectionWrapper OSharedConnection_BASE2; diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx index 291d9e1507ba..9313d9357431 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "bookmarkcontainer.hxx" #include "dbastrings.hrc" #include "apitools.hxx" @@ -43,9 +42,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= OBookmarkContainer -//========================================================================== +// OBookmarkContainer DBG_NAME(OBookmarkContainer) OBookmarkContainer::OBookmarkContainer(OWeakObject& _rParent, Mutex& _rMutex) @@ -121,7 +118,6 @@ void SAL_CALL OBookmarkContainer::insertByName( const OUString& _rName, const An if (!(aElement >>= sNewLink)) throw IllegalArgumentException(); - implAppend(_rName, sNewLink); // notify the listeners @@ -355,4 +351,5 @@ void SAL_CALL OBookmarkContainer::setParent( const Reference< XInterface >& /*Pa } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx index 36a7cb40d057..81ba669e7177 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx @@ -37,10 +37,8 @@ namespace dbaccess { -//========================================================================== -//= OBookmarkContainer - base class of collections of database definition -//= documents -//========================================================================== +// OBookmarkContainer - base class of collections of database definition +// documents typedef ::cppu::WeakImplHelper6 < ::com::sun::star::container::XIndexAccess , ::com::sun::star::container::XNameContainer @@ -66,7 +64,6 @@ protected: m_aContainerListeners; ::osl::Mutex& m_rMutex; - public: /** constructs the container.<BR> after the construction of the object the creator has to call <code>initialize</code>. @@ -128,7 +125,6 @@ public: */ virtual void dispose(); - protected: /** checks whether the object is basically alive, i.e. it has been fully initialized (@see initialize) and not disposed (@see dispose) diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx index 8fe6ec685150..4154675da695 100644 --- a/dbaccess/source/core/dataaccess/commandcontainer.cxx +++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "commandcontainer.hxx" #include "commanddefinition.hxx" @@ -38,9 +37,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= OCommandContainer -//========================================================================== +// OCommandContainer DBG_NAME(OCommandContainer) OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::uno::XComponentContext >& _xORB @@ -93,4 +90,5 @@ OUString OCommandContainer::determineContentType() const } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/commandcontainer.hxx b/dbaccess/source/core/dataaccess/commandcontainer.hxx index cf952d78baaf..3603e315855b 100644 --- a/dbaccess/source/core/dataaccess/commandcontainer.hxx +++ b/dbaccess/source/core/dataaccess/commandcontainer.hxx @@ -28,9 +28,7 @@ namespace dbaccess { -//========================================================================== -//= OCommandContainer -//========================================================================== +// OCommandContainer typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XSingleServiceFactory > OCommandContainer_BASE; @@ -70,7 +68,6 @@ protected: } // namespace dbaccess - #endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx index 3adf40195ab0..ece84a5a35ff 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.cxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "commanddefinition.hxx" #include "apitools.hxx" #include "dbastrings.hrc" @@ -41,9 +40,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= OCommandDefinition -//========================================================================== +// OCommandDefinition extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition() { static ::dba::OAutoRegistration< OCommandDefinition > aAutoRegistration; @@ -127,7 +124,6 @@ void OCommandDefinition::setUpdateSchemaName(const OUString& p1) throw( ::com::s setPropertyValue(PROPERTY_UPDATE_SCHEMANAME, Any(p1) ); } - OCommandDefinition::OCommandDefinition(const Reference< XComponentContext >& _xORB ,const Reference< XInterface >& _rxContainer ,const TContentPtr& _pImpl) @@ -207,4 +203,5 @@ void SAL_CALL OCommandDefinition::rename( const OUString& newName ) throw (SQLEx } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx index b94e0c7083c0..3a4a79c06fff 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.hxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx @@ -34,15 +34,10 @@ #include <comphelper/uno3.hxx> #include <cppuhelper/implbase2.hxx> - -//........................................................................ namespace dbaccess { -//........................................................................ -//========================================================================= -//= OCommandDefinition - a database "document" which describes a query -//========================================================================= +// OCommandDefinition - a database "document" which describes a query class OCommandDefinition_Impl : public OComponentDefinition_Impl ,public OCommandBase { @@ -148,11 +143,8 @@ private: void registerProperties(); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_COREDATAACESS_COMMANDDEFINITION_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 3675c83f2138..6f3b68234ce3 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "connection.hxx" #include "dbastrings.hrc" #include "datasource.hxx" @@ -71,7 +70,6 @@ using ::com::sun::star::sdb::tools::XDataSourceMetaData; namespace dbaccess { -//========================================================================== // XServiceInfo OUString OConnection::getImplementationName( ) throw(RuntimeException) { @@ -131,6 +129,7 @@ Reference< XStatement > OConnection::createStatement(void) throw( SQLException, } return xStatement; } + Reference< XPreparedStatement > OConnection::prepareStatement(const OUString& sql) throw( SQLException, RuntimeException ) { SAL_INFO("dbaccess", "OConnection::prepareStatement" ); @@ -275,9 +274,8 @@ void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap) throw( SQ checkDisposed(); m_xMasterConnection->setTypeMap(typeMap); } -//========================================================================== -//= OConnection -//========================================================================== + +// OConnection DBG_NAME(OConnection) OConnection::OConnection(ODatabaseSource& _rDB @@ -622,6 +620,7 @@ Reference< XNameAccess > SAL_CALL OConnection::getViews( ) throw(RuntimeExcepti return m_pViews; } + // XQueriesSupplier Reference< XNameAccess > OConnection::getQueries(void) throw( RuntimeException ) { @@ -877,4 +876,5 @@ Reference< XInterface > SAL_CALL OConnection::getTableEditor( const Reference< X } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx index 856a81d082e7..4ae80154e501 100644 --- a/dbaccess/source/core/dataaccess/connection.hxx +++ b/dbaccess/source/core/dataaccess/connection.hxx @@ -47,13 +47,9 @@ #include <connectivity/ConnectionWrapper.hxx> #include <connectivity/warningscontainer.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ -//========================================================================== -//========================================================================== typedef ::comphelper::ImplHelper14 < ::com::sun::star::container::XChild , ::com::sun::star::sdbcx::XTablesSupplier , ::com::sun::star::sdbcx::XViewsSupplier @@ -71,9 +67,7 @@ typedef ::comphelper::ImplHelper14 < ::com::sun::star::container::XChild > OConnection_Base; class ODatabaseSource; -//========================================================================== -//= OConnection -//========================================================================== +// OConnection class OConnection :public ::comphelper::OBaseMutex ,public OSubComponent ,public ::connectivity::OConnectionWrapper @@ -101,7 +95,6 @@ protected: DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>, TSupportServices); TSupportServices m_aSupportServices; - OTableContainer* m_pTables; OViewContainer* m_pViews; ::dbtools::WarningsContainer m_aWarnings; @@ -232,11 +225,8 @@ private: void impl_fillTableFilter(); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_CORE_CONNECTION_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx index c34063488680..9e9622785c3c 100644 --- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx +++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbastrings.hrc" #include "module_dba.hxx" @@ -35,10 +34,8 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -64,9 +61,7 @@ namespace dbaccess namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; namespace CommandType = ::com::sun::star::sdb::CommandType; - //==================================================================== - //= DataAccessDescriptor - //==================================================================== + // DataAccessDescriptor typedef ::comphelper::OMutexAndBroadcastHelper DataAccessDescriptor_MutexBase; typedef ::cppu::WeakImplHelper1 < XServiceInfo @@ -217,9 +212,7 @@ namespace dbaccess return new ::cppu::OPropertyArrayHelper( aProps ); } - //==================================================================== - //= DataAccessDescriptorFactory - //==================================================================== + // DataAccessDescriptorFactory typedef ::cppu::WeakImplHelper2 < XServiceInfo , XDataAccessDescriptorFactory > DataAccessDescriptorFactory_Base; diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 5211222837d4..d5a642f6a9df 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "apitools.hxx" #include "core_resource.hrc" #include "core_resource.hxx" @@ -87,7 +86,6 @@ using ::com::sun::star::ucb::InteractiveIOException; using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING; using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING_PATH; - namespace dbaccess { @@ -164,8 +162,7 @@ namespace dbaccess { } -//= ODatabaseContext -//========================================================================== +// ODatabaseContext ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxContext ) :DatabaseAccessContext_Base(m_aMutex) @@ -762,4 +759,5 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx index 03fa975240ef..635006d2c688 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.hxx +++ b/dbaccess/source/core/dataaccess/databasecontext.hxx @@ -53,14 +53,10 @@ namespace com { namespace sun { namespace star { } } } } -//........................................................................ namespace dbaccess { -//........................................................................ class DatabaseDocumentLoader; -//============================================================ -//= ODatabaseContext -//============================================================ +// ODatabaseContext ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ODatabaseContext_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); @@ -119,7 +115,6 @@ public: ODatabaseContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); virtual ~ODatabaseContext(); - // OComponentHelper virtual void SAL_CALL disposing(void); @@ -189,11 +184,8 @@ private: ); }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBA_COREDATAACCESS_DATABASECONTEXT_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 8ae22546ed5d..613ee0a1f10d 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "core_resource.hxx" #include "core_resource.hrc" #include "datasource.hxx" @@ -64,7 +63,6 @@ #include <com/sun/star/awt/DialogProvider.hpp> #include <com/sun/star/document/XGraphicObjectResolver.hpp> - #include <comphelper/documentconstants.hxx> #include <comphelper/enumhelper.hxx> #include <comphelper/genericpropertyset.hxx> @@ -122,9 +120,7 @@ using ::com::sun::star::sdb::application::XDatabaseDocumentUI; namespace dbaccess { -//============================================================ -//= ViewMonitor -//============================================================ +// ViewMonitor bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxController ) { @@ -151,9 +147,7 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon return bLoadFinished; } -//============================================================ -//= ODatabaseDocument -//============================================================ +// ODatabaseDocument DBG_NAME(ODatabaseDocument) extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument() @@ -392,10 +386,15 @@ static OUString sPictures( "Pictures" ); // try to load the dialog which will try and access the embed images, if those images are not cached in // memory it will try to read them from the Picture directory which is now gone, so... we have to use this // inglorious hack below which basically will +// // a) create a temp storage +// // b) introspect any dialogs for any embed graphics and grab the associate URL(s) +// // c) populate the temp storage with the associated embed images ( will be stored in a 'Pictures' folder ) +// // d) delete the 'Picture' element from the root storage +// // e) copy the Pictures element of the temp storage to the root storage // // this assumes that we don't use the Pictures folder in the root of the base @@ -2173,4 +2172,5 @@ OUString SAL_CALL ODatabaseDocument::getUntitledPrefix() throw (uno::RuntimeE } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index bea00d3665fd..ad3eeeccc87f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -68,10 +68,8 @@ namespace comphelper { class NamedValueCollection; } -//........................................................................ namespace dbaccess { -//........................................................................ class DocumentEvents; class DocumentEventExecutor; @@ -79,9 +77,7 @@ class DocumentGuard; typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > > Controllers; -//============================================================ -//= ViewMonitor -//============================================================ +// ViewMonitor /** helper class monitoring the views of a document, and firing appropriate events when views are attached / detached */ @@ -133,9 +129,7 @@ private: m_xLastConnectedController; }; -//============================================================ -//= ODatabaseDocument -//============================================================ +// ODatabaseDocument typedef ::comphelper::PartialWeakComponentImplHelper17 < ::com::sun::star::frame::XModel2 , ::com::sun::star::util::XModifiable , ::com::sun::star::frame::XStorable @@ -246,7 +240,6 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _xStorageToSaveTo ) const; - /// write a single output stream /// (to be called either directly or by WriteThroughComponent(...)) void WriteThroughComponent( @@ -604,7 +597,6 @@ private: DocumentGuard& _rDocGuard ) const; - /** impl-version of attachResource @param i_rLogicalDocumentURL diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx index a02c2be89c31..aa122e741617 100644 --- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx +++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/sdb/XDatabaseRegistrations.hpp> #include <cppuhelper/basemutex.hxx> @@ -69,9 +68,7 @@ namespace dbaccess return s_sNodeName; } - //==================================================================== - //= DatabaseRegistrations - declaration - //==================================================================== + // DatabaseRegistrations - declaration typedef ::cppu::WeakAggImplHelper1 < XDatabaseRegistrations > DatabaseRegistrations_Base; class DatabaseRegistrations :public ::cppu::BaseMutex @@ -128,9 +125,7 @@ namespace dbaccess ::cppu::OInterfaceContainerHelper m_aRegistrationListeners; }; - //==================================================================== - //= DatabaseRegistrations - implementation - //==================================================================== + // DatabaseRegistrations - implementation DatabaseRegistrations::DatabaseRegistrations( const Reference<XComponentContext> & _rxContext ) :m_aContext( _rxContext ) ,m_aConfigurationRoot() @@ -351,13 +346,12 @@ namespace dbaccess m_aRegistrationListeners.removeInterface( _Listener ); } - //==================================================================== - //= DatabaseRegistrations - factory - //==================================================================== + // DatabaseRegistrations - factory Reference< XAggregation > createDataSourceRegistrations( const Reference<XComponentContext> & _rxContext ) { return new DatabaseRegistrations( _rxContext ); } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 79053b706b3a..adfe1f97138d 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "datasource.hxx" #include "module_dba.hxx" #include "userinformation.hxx" @@ -30,7 +29,6 @@ #include "databasedocument.hxx" #include "OAuthenticationContinuation.hxx" - #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/PropertyState.hpp> @@ -94,9 +92,7 @@ using namespace ::comphelper; namespace dbaccess { -//============================================================ -//= FlushNotificationAdapter -//============================================================ +// FlushNotificationAdapter typedef ::cppu::WeakImplHelper1< XFlushListener > FlushNotificationAdapter_Base; /** helper class which implements a XFlushListener, and forwards all notification events to another XFlushListener @@ -133,9 +129,7 @@ protected: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); }; -//------------------------------------------------------------ DBG_NAME( FlushNotificationAdapter ) -//------------------------------------------------------------ FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable >& _rxBroadcaster, const Reference< XFlushListener >& _rxListener ) :m_aBroadcaster( _rxBroadcaster ) ,m_aListener( _rxListener ) @@ -152,7 +146,6 @@ FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable OSL_ENSURE( m_refCount == 1, "FlushNotificationAdapter::FlushNotificationAdapter: broadcaster isn't holding by hard ref!?" ); } -//------------------------------------------------------------ FlushNotificationAdapter::~FlushNotificationAdapter() { DBG_DTOR( FlushNotificationAdapter, NULL ); @@ -401,6 +394,7 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const OUString& return xRet; } + void OSharedConnectionManager::addEventListener(const Reference<XConnection>& _rxConnection,TConnectionMap::iterator& _rIter) { Reference<XComponent> xComp(_rxConnection,UNO_QUERY); @@ -483,9 +477,8 @@ namespace } }; } -//============================================================ -//= ODatabaseContext -//============================================================ + +// ODatabaseContext DBG_NAME(ODatabaseSource) extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource() @@ -580,6 +573,7 @@ void SAL_CALL ODatabaseSource::disposing( const ::com::sun::star::lang::EventObj if ( m_pImpl.is() ) m_pImpl->disposing(Source); } + // XServiceInfo OUString ODatabaseSource::getImplementationName( ) throw(RuntimeException) { @@ -1402,4 +1396,5 @@ Reference< XInterface > ODatabaseSource::getThis() const } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx index 33e241a36af0..676f64352f82 100644 --- a/dbaccess/source/core/dataaccess/datasource.hxx +++ b/dbaccess/source/core/dataaccess/datasource.hxx @@ -57,9 +57,7 @@ namespace dbaccess class OSharedConnectionManager; -//============================================================ -//= ODatabaseSource -//============================================================ +// ODatabaseSource typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::sdbc::XDataSource , ::com::sun::star::sdb::XBookmarksSupplier @@ -73,7 +71,6 @@ typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::lang::XService , ::com::sun::star::sdb::XDocumentDataSource > ODatabaseSource_Base; - class ODatabaseSource :public ModelDependentComponent // must be first ,public ODatabaseSource_Base ,public ::cppu::OPropertySetHelper @@ -224,5 +221,4 @@ protected: #endif // _DBA_COREDATAACCESS_DATALINK_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 50ef79dc31d6..dc31e69558a7 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "definitioncontainer.hxx" #include "dbastrings.hrc" #include "apitools.hxx" @@ -38,7 +37,6 @@ #include <ucbhelper/contentidentifier.hxx> #include <o3tl/compat_functional.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; @@ -54,9 +52,7 @@ using namespace ::com::sun::star::ucb; namespace dbaccess { -//========================================================================== -//= ODefinitionContainer_Impl -//========================================================================== +// ODefinitionContainer_Impl void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition ) { NamedDefinitions::iterator aPos = find( _pDefinition ); @@ -88,9 +84,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr ); } -//========================================================================== -//= ODefinitionContainer -//========================================================================== +// ODefinitionContainer DBG_NAME(ODefinitionContainer) ODefinitionContainer::ODefinitionContainer( const Reference< XComponentContext >& _xORB @@ -538,7 +532,6 @@ void ODefinitionContainer::implAppend(const OUString& _rName, const Reference< X } } - m_aDocuments.push_back(m_aDocumentMap.insert(Documents::value_type(_rName,_rxNewObject)).first); notifyDataSourceModified(); // now update our structures @@ -668,5 +661,6 @@ sal_Bool ODefinitionContainer::checkExistence(const OUString& _rName) } } + // namespace dbaccess /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index c28643c4bf02..155c1bdf940a 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "documentcontainer.hxx" #include "dbastrings.hrc" #include "documentdefinition.hxx" @@ -60,9 +59,7 @@ using namespace ::cppu; namespace dbaccess { -//========================================================================== -//= LocalNameApproval -//========================================================================== +// LocalNameApproval class LocalNameApproval : public IContainerApprove { ::connectivity::SQLError m_aErrors; @@ -89,9 +86,7 @@ void SAL_CALL LocalNameApproval::approveElement( const OUString& _rName, const R ); } -//========================================================================== -//= ODocumentContainer -//========================================================================== +// ODocumentContainer DBG_NAME(ODocumentContainer) ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xORB @@ -404,9 +399,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com Any aRet; if ( aCommand.Name.compareToAscii( "open" ) == 0 ) { - ////////////////////////////////////////////////////////////////// // open command for a folder content - ////////////////////////////////////////////////////////////////// OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { @@ -449,9 +442,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com } else if ( aCommand.Name == "insert" ) { - ////////////////////////////////////////////////////////////////// // insert - ////////////////////////////////////////////////////////////////// InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) @@ -468,9 +459,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com } else if ( aCommand.Name == "delete" ) { - ////////////////////////////////////////////////////////////////// // delete - ////////////////////////////////////////////////////////////////// Sequence< OUString> aSeq = getElementNames(); const OUString* pIter = aSeq.getConstArray(); const OUString* pEnd = pIter + aSeq.getLength(); @@ -767,4 +756,5 @@ void SAL_CALL ODocumentContainer::rename( const OUString& newName ) throw (SQLEx } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documentcontainer.hxx b/dbaccess/source/core/dataaccess/documentcontainer.hxx index 2ff2269e1180..23aa71d3fc49 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.hxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx @@ -39,9 +39,7 @@ typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XComponentLoader , ::com::sun::star::container::XHierarchicalName , ::com::sun::star::embed::XTransactedObject > ODocumentContainer_Base; -//========================================================================== -//= ODocumentContainer - collections of database documents (reports/forms) -//========================================================================== +// ODocumentContainer - collections of database documents (reports/forms) class ODocumentContainer : public ODefinitionContainer , public ODocumentContainer_Base , public ::comphelper::OPropertyStateContainer diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 5ed81181b33e..d5e6d6bcd047 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "documentdefinition.hxx" #include "dbastrings.hrc" #include "sdbcoretools.hxx" @@ -129,7 +128,6 @@ using namespace ::cppu; using sdb::application::XDatabaseDocumentUI; namespace DatabaseObject = sdb::application::DatabaseObject; - #define DEFAULT_WIDTH 10000 #define DEFAULT_HEIGHT 7500 @@ -138,12 +136,9 @@ namespace dbaccess typedef ::boost::optional< bool > optional_bool; - //========================================================================= - //= helper - //========================================================================= + // helper namespace { - // -------------------------------------------------------------------- OUString lcl_determineContentType_nothrow( const Reference< XStorage >& _rxContainerStorage, const OUString& _rEntityName ) { @@ -162,9 +157,7 @@ namespace dbaccess } } - //================================================================== // OEmbedObjectHolder - //================================================================== typedef ::cppu::WeakComponentImplHelper1< embed::XStateChangeListener > TEmbedObjectHolder; class OEmbedObjectHolder : public ::comphelper::OBaseMutex ,public TEmbedObjectHolder @@ -233,9 +226,7 @@ namespace dbaccess m_xBroadCaster = NULL; } - //================================================================== // OEmbeddedClientHelper - //================================================================== typedef ::cppu::WeakImplHelper1 < XEmbeddedClient > EmbeddedClientHelper_BASE; class OEmbeddedClientHelper : public EmbeddedClientHelper_BASE @@ -263,9 +254,7 @@ namespace dbaccess inline void resetClient(ODocumentDefinition* _pClient) { m_pClient = _pClient; } }; - //================================================================== // LockModifiable - //================================================================== class LockModifiable { public: @@ -297,9 +286,7 @@ namespace dbaccess Reference< XModifiable2 > m_xModifiable; }; - //================================================================== // LifetimeCoupler - //================================================================== typedef ::cppu::WeakImplHelper1 < css::lang::XEventListener > LifetimeCoupler_Base; /** helper class which couples the lifetime of a component to the lifetime @@ -346,9 +333,7 @@ namespace dbaccess m_xClient.clear(); } - //================================================================== // ODocumentSaveContinuation - //================================================================== class ODocumentSaveContinuation : public OInteraction< XInteractionDocumentSave > { OUString m_sName; @@ -426,9 +411,7 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _ return sResult; } -//========================================================================== -//= ODocumentDefinition -//========================================================================== +// ODocumentDefinition DBG_NAME(ODocumentDefinition) ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XComponentContext >& _xORB, @@ -648,9 +631,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR namespace { - // ========================================================================= - // = PreserveVisualAreaSize - // ========================================================================= + // PreserveVisualAreaSize /** stack-guard for preserving the size of the VisArea of an XModel */ class PreserveVisualAreaSize @@ -692,9 +673,7 @@ namespace } }; - // ========================================================================= - // = LayoutManagerLock - // ========================================================================= + // LayoutManagerLock /** helper class for stack-usage which during its lifetime locks a layout manager */ class LayoutManagerLock @@ -1096,9 +1075,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co } else if ( aCommand.Name == "delete" ) { - ////////////////////////////////////////////////////////////////// // delete - ////////////////////////////////////////////////////////////////// closeObject(); Reference< XStorage> xStorage = getContainerStorage(); if ( xStorage.is() ) @@ -1440,7 +1417,6 @@ sal_Bool ODocumentDefinition::saveAs() namespace { - // ......................................................................... void lcl_putLoadArgs( ::comphelper::NamedValueCollection& _io_rArgs, const optional_bool _bSuppressMacros, const optional_bool _bReadOnly ) { if ( !!_bSuppressMacros ) @@ -1524,7 +1500,6 @@ void ODocumentDefinition::separateOpenCommandArguments( const Sequence< Property Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XConnection>& _xConnection, const bool _bSuppressMacros, const bool _bReadOnly, const Sequence< PropertyValue >& i_rOpenCommandArguments, Sequence< PropertyValue >& _out_rEmbeddedObjectDescriptor ) { - // ......................................................................... // (re-)create interceptor, and put it into the descriptor of the embedded object if ( m_pInterceptor ) { @@ -1540,11 +1515,9 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC ::comphelper::NamedValueCollection aEmbeddedDescriptor; aEmbeddedDescriptor.put( "OutplaceDispatchInterceptor", xInterceptor ); - // ......................................................................... ::comphelper::NamedValueCollection aMediaDesc; separateOpenCommandArguments( i_rOpenCommandArguments, aMediaDesc, aEmbeddedDescriptor ); - // ......................................................................... // create the OutplaceFrameProperties, and put them into the descriptor of the embedded object ::comphelper::NamedValueCollection OutplaceFrameProperties; OutplaceFrameProperties.put( "TopWindow", (sal_Bool)sal_True ); @@ -1570,19 +1543,15 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC aEmbeddedDescriptor.put( "OutplaceFrameProperties", OutplaceFrameProperties.getNamedValues() ); - // ......................................................................... // tell the embedded object to have (or not have) script support aEmbeddedDescriptor.put( "EmbeddedScriptSupport", (sal_Bool)objectSupportsEmbeddedScripts() ); - // ......................................................................... // tell the embedded object to not participate in the document recovery game - the DB doc will handle it aEmbeddedDescriptor.put( "DocumentRecoverySupport", (sal_Bool)sal_False ); - // ......................................................................... // pass the descriptor of the embedded object to the caller aEmbeddedDescriptor >>= _out_rEmbeddedObjectDescriptor; - // ......................................................................... // create the ComponentData, and put it into the document's media descriptor { ::comphelper::NamedValueCollection aComponentData; @@ -1596,7 +1565,6 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC aMediaDesc.put( "DocumentBaseURL", m_pImpl->m_pDataSource->getURL() ); - // ......................................................................... // put the common load arguments into the document's media descriptor lcl_putLoadArgs( aMediaDesc, optional_bool( _bSuppressMacros ), optional_bool( _bReadOnly ) ); @@ -2154,9 +2122,7 @@ void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_ fire( &i_nHandle, &i_rNewValue, &i_rOldValue, 1, i_bVetoable ); } -// ============================================================================= // NameChangeNotifier -// ============================================================================= NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefinition, const OUString& i_rNewName, ::osl::ResettableMutexGuard& i_rClearForNotify ) :m_rDocumentDefinition( i_rDocumentDefinition ) @@ -2181,4 +2147,5 @@ void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable ) } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx index b3630dfb5f9f..2f57ed3a032d 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.hxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx @@ -40,17 +40,13 @@ namespace comphelper class NamedValueCollection; } -//........................................................................ namespace dbaccess { -//........................................................................ class OInterceptor; class OEmbeddedClientHelper; -//========================================================================== -//= ODocumentDefinition - a database "document" which is simply a link to a real -//= document -//========================================================================== +// ODocumentDefinition - a database "document" which is simply a link to a real +// document typedef ::cppu::ImplHelper4 < ::com::sun::star::embed::XComponentSupplier , ::com::sun::star::sdb::XSubDocument diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx index f2d4c32f94a4..b05b7970af72 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "documenteventexecutor.hxx" #include <com/sun/star/document/XDocumentEventBroadcaster.hpp> @@ -63,9 +62,7 @@ namespace dbaccess using namespace ::com::sun::star; - //==================================================================== - //= DocumentEventExecutor_Data - //==================================================================== + // DocumentEventExecutor_Data struct DocumentEventExecutor_Data { WeakReference< XEventsSupplier > xDocument; @@ -118,9 +115,7 @@ namespace dbaccess } } - //==================================================================== - //= DocumentEventExecutor - //==================================================================== + // DocumentEventExecutor DocumentEventExecutor::DocumentEventExecutor( const Reference<XComponentContext> & _rContext, const Reference< XEventsSupplier >& _rxDocument ) :m_pData( new DocumentEventExecutor_Data( _rxDocument ) ) @@ -205,4 +200,5 @@ namespace dbaccess } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx index 48fbd3b2309a..984dfa60c453 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx @@ -31,9 +31,7 @@ namespace dbaccess { struct DocumentEventExecutor_Data; - //==================================================================== - //= DocumentEventExecutor - //==================================================================== + // DocumentEventExecutor typedef ::cppu::WeakImplHelper1 < ::com::sun::star::document::XDocumentEventListener > DocumentEventExecutor_Base; class DocumentEventExecutor : public DocumentEventExecutor_Base diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx index 18155d0a45a1..0f977710d3c7 100644 --- a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx +++ b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "documenteventnotifier.hxx" #include <com/sun/star/frame/DoubleInitializationException.hpp> @@ -48,14 +47,10 @@ namespace dbaccess using namespace ::com::sun::star; - //================================================================== - //= DocumentEventHolder - //================================================================== + // DocumentEventHolder typedef ::comphelper::EventHolder< DocumentEvent > DocumentEventHolder; - //==================================================================== - //= DocumentEventNotifier_Impl - //==================================================================== + // DocumentEventNotifier_Impl class DocumentEventNotifier_Impl : public ::comphelper::IEventProcessor { oslInterlockedCount m_refCount; @@ -236,9 +231,7 @@ namespace dbaccess impl_notifyEvent_nothrow( rEventHolder.getEventObject() ); } - //==================================================================== - //= DocumentEventNotifier - //==================================================================== + // DocumentEventNotifier DocumentEventNotifier::DocumentEventNotifier( ::cppu::OWeakObject& _rBroadcasterDocument, ::osl::Mutex& _rMutex ) :m_pImpl( new DocumentEventNotifier_Impl( _rBroadcasterDocument, _rMutex ) ) { @@ -291,4 +284,5 @@ namespace dbaccess } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx index cd365ed91d24..f6a69b2036a9 100644 --- a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx +++ b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx @@ -35,9 +35,7 @@ namespace dbaccess { class DocumentEventNotifier_Impl; - //==================================================================== - //= DocumentEventNotifier - //==================================================================== + // DocumentEventNotifier class DocumentEventNotifier { public: diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx index 41a7e416ad37..d4e9fbe895cc 100644 --- a/dbaccess/source/core/dataaccess/documentevents.cxx +++ b/dbaccess/source/core/dataaccess/documentevents.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "documentevents.hxx" #include <com/sun/star/beans/PropertyValue.hpp> @@ -47,9 +46,7 @@ namespace dbaccess using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Type; - //==================================================================== - //= DocumentEvents_Data - //==================================================================== + // DocumentEvents_Data struct DocumentEvents_Data : public ::boost::noncopyable { ::cppu::OWeakObject& rParent; @@ -64,9 +61,7 @@ namespace dbaccess } }; - //==================================================================== - //= helper - //==================================================================== + // helper struct DocumentEventData { const sal_Char* pAsciiEventName; @@ -108,9 +103,7 @@ namespace dbaccess } } - //==================================================================== - //= DocumentEvents - //==================================================================== + // DocumentEvents DocumentEvents::DocumentEvents( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, DocumentEventsData& _rEventsData ) :m_pData( new DocumentEvents_Data( _rParent, _rMutex, _rEventsData ) ) { @@ -234,4 +227,5 @@ namespace dbaccess } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/documentevents.hxx b/dbaccess/source/core/dataaccess/documentevents.hxx index 12bd8b8fc5f4..1b19a0fbcf3d 100644 --- a/dbaccess/source/core/dataaccess/documentevents.hxx +++ b/dbaccess/source/core/dataaccess/documentevents.hxx @@ -35,9 +35,7 @@ namespace dbaccess typedef ::std::map< OUString, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > DocumentEventsData; - //==================================================================== - //= DocumentEvents - //==================================================================== + // DocumentEvents struct DocumentEvents_Data; typedef ::cppu::WeakImplHelper1 < ::com::sun::star::container::XNameReplace diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx index af3587b16608..5cfd72e4b360 100644 --- a/dbaccess/source/core/dataaccess/intercept.cxx +++ b/dbaccess/source/core/dataaccess/intercept.cxx @@ -428,4 +428,5 @@ void SAL_CALL OInterceptor::disposing( const ::com::sun::star::lang::EventObject } } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx index b005e9cdcc4a..60d06b4e172b 100644 --- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx +++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx @@ -42,12 +42,7 @@ using namespace dbaccess; namespace dbaccess { -//========================================================================= -// // struct ResultListEntry. -// -//========================================================================= - struct ResultListEntry { OUString aId; @@ -59,20 +54,10 @@ struct ResultListEntry ResultListEntry( const ContentProperties& rEntry ) : rData( rEntry ) {} }; -//========================================================================= -// // ResultList. -// -//========================================================================= - typedef std::vector< ResultListEntry* > ResultList; -//========================================================================= -// // struct DataSupplier_Impl. -// -//========================================================================= - struct DataSupplier_Impl { osl::Mutex m_aMutex; @@ -89,7 +74,6 @@ struct DataSupplier_Impl ~DataSupplier_Impl(); }; -//========================================================================= DataSupplier_Impl::~DataSupplier_Impl() { ResultList::const_iterator it = m_aResults.begin(); @@ -104,11 +88,7 @@ DataSupplier_Impl::~DataSupplier_Impl() } -//========================================================================= -// // DataSupplier Implementation. -// -//========================================================================= DBG_NAME(DataSupplier) DataSupplier::DataSupplier( const rtl::Reference< ODocumentContainer >& rContent, @@ -367,4 +347,5 @@ void DataSupplier::validate() throw( ResultSetException ) { } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.cxx b/dbaccess/source/core/dataaccess/myucp_resultset.cxx index f9dab3313935..a0bc50b69d18 100644 --- a/dbaccess/source/core/dataaccess/myucp_resultset.cxx +++ b/dbaccess/source/core/dataaccess/myucp_resultset.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - /************************************************************************** TODO ************************************************************************** @@ -31,7 +30,6 @@ #include "myucp_resultset.hxx" #include <comphelper/processfactory.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::beans; @@ -42,12 +40,7 @@ using namespace ::com::sun::star::container; using namespace dbaccess; -//========================================================================= -// // DynamicResultSet Implementation. -// -//========================================================================= - DynamicResultSet::DynamicResultSet( const Reference< XComponentContext >& rxContext, const rtl::Reference< ODocumentContainer >& rxContent, @@ -59,11 +52,7 @@ DynamicResultSet::DynamicResultSet( { } -//========================================================================= -// // Non-interface methods. -// -//========================================================================= void DynamicResultSet::initStatic() { m_xResultSet1 @@ -84,4 +73,5 @@ void DynamicResultSet::initDynamic() m_xEnv ); m_xResultSet2 = m_xResultSet1; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx index a166cf977338..f1edd5ff2ee9 100644 --- a/dbaccess/source/core/inc/FilteredContainer.hxx +++ b/dbaccess/source/core/inc/FilteredContainer.hxx @@ -129,9 +129,7 @@ namespace dbaccess inline sal_Bool isInitialized() const { return m_bConstructed; } }; -// .............................................................................. } // namespace -// .............................................................................. #endif // DBACCESS_CORE_FILTERED_CONTAINER_HXX diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx index df40f3383931..ebe44ff43d23 100644 --- a/dbaccess/source/core/inc/PropertyForward.hxx +++ b/dbaccess/source/core/inc/PropertyForward.hxx @@ -31,9 +31,7 @@ namespace dbaccess { - // =================================================================== - // = OPropertyForward - // =================================================================== + // OPropertyForward typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener > OPropertyForward_Base; class OPropertyForward :public ::comphelper::OBaseMutex diff --git a/dbaccess/source/core/inc/RefreshListener.hxx b/dbaccess/source/core/inc/RefreshListener.hxx index 4cf224f43d60..11390b1cd0de 100644 --- a/dbaccess/source/core/inc/RefreshListener.hxx +++ b/dbaccess/source/core/inc/RefreshListener.hxx @@ -31,9 +31,7 @@ namespace com { namespace sun { namespace star { namespace container namespace dbaccess { - //===================================================================== - //= IRefreshListener - //===================================================================== + // IRefreshListener class SAL_NO_VTABLE IRefreshListener { public: diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx index 4e6b6b042e70..5dd54a5f268e 100644 --- a/dbaccess/source/core/inc/TableDeco.hxx +++ b/dbaccess/source/core/inc/TableDeco.hxx @@ -51,9 +51,7 @@ namespace dbaccess ::com::sun::star::sdbcx::XRename, ::com::sun::star::lang::XUnoTunnel, ::com::sun::star::sdbcx::XAlterTable> OTableDescriptor_BASE; - //========================================================================== - //= OTables - //========================================================================== + // OTables class ODBTableDecorator; typedef ::comphelper::OIdPropertyArrayUsageHelper< ODBTableDecorator > ODBTableDecorator_PROP; @@ -121,8 +119,6 @@ namespace dbaccess const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumnDefinitions ) throw(::com::sun::star::sdbc::SQLException); - - // ODescriptor virtual void construct(); @@ -173,5 +169,4 @@ namespace dbaccess } #endif // _DBA_CORE_TABLEDECORATOR_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/inc/View.hxx b/dbaccess/source/core/inc/View.hxx index 69d4f45975ce..34282aee65f7 100644 --- a/dbaccess/source/core/inc/View.hxx +++ b/dbaccess/source/core/inc/View.hxx @@ -31,9 +31,7 @@ namespace dbaccess { - //==================================================================== - //= View - //==================================================================== + // View typedef ::connectivity::sdbcx::OView View_Base; typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XAlterView > View_IBASE; class View :public View_Base diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx index fb048127269f..7772a75b201b 100644 --- a/dbaccess/source/core/inc/column.hxx +++ b/dbaccess/source/core/inc/column.hxx @@ -116,9 +116,7 @@ namespace dbaccess virtual void registerPropertyNoMember( const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const ::com::sun::star::uno::Type& _rType, const void* _pInitialValue ); }; - //============================================================ - //= IColumnFactory - used by OColumns for creating new columns - //============================================================ + // IColumnFactory - used by OColumns for creating new columns class SAL_NO_VTABLE IColumnFactory { public: @@ -146,11 +144,9 @@ namespace dbaccess ~IColumnFactory() {} }; - //============================================================ - //= OColumns - //= general columns map, could be used for readonly access - //= no appending and dropping is supported - //============================================================ + // OColumns + // general columns map, could be used for readonly access + // no appending and dropping is supported typedef ::boost::unordered_map<OUString, OColumn*, ::comphelper::UStringMixHash, ::comphelper::UStringMixEqual> OColumnMap; typedef ::std::vector<OColumn*> OColumnArray; diff --git a/dbaccess/source/core/inc/columnsettings.hxx b/dbaccess/source/core/inc/columnsettings.hxx index 7f37e12b4e11..4dd6d2c42e5e 100644 --- a/dbaccess/source/core/inc/columnsettings.hxx +++ b/dbaccess/source/core/inc/columnsettings.hxx @@ -57,9 +57,7 @@ namespace dbaccess ~IPropertyContainer() {} }; - //==================================================================== - //= OColumnSettings - //==================================================================== + // OColumnSettings class OColumnSettings { // <properties> diff --git a/dbaccess/source/core/inc/commandbase.hxx b/dbaccess/source/core/inc/commandbase.hxx index a1c2a9240a9c..1859fdd36c09 100644 --- a/dbaccess/source/core/inc/commandbase.hxx +++ b/dbaccess/source/core/inc/commandbase.hxx @@ -26,10 +26,8 @@ namespace dbaccess { -//========================================================================== -//= OCommandBase - a base class (in fact just a container for some members) -//= for classes implementing the sdb.CommandDefinition service -//========================================================================== +// OCommandBase - a base class (in fact just a container for some members) +// for classes implementing the sdb.CommandDefinition service class OCommandBase { public: // need public access diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx index 34dae33c82b9..3a8da65f426e 100644 --- a/dbaccess/source/core/inc/composertools.hxx +++ b/dbaccess/source/core/inc/composertools.hxx @@ -20,7 +20,6 @@ #ifndef DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX #define DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX - #include <rtl/ustrbuf.hxx> #include <functional> @@ -28,9 +27,7 @@ namespace dbaccess { - //==================================================================== - //= TokenComposer - //==================================================================== + // TokenComposer struct TokenComposer : public ::std::unary_function< OUString, void > { private: @@ -93,9 +90,7 @@ namespace dbaccess virtual void appendNonEmptyToNonEmpty( const OUString& lhs ) = 0; }; - //==================================================================== - //= FilterCreator - //==================================================================== + // FilterCreator struct FilterCreator : public TokenComposer { virtual void appendNonEmptyToNonEmpty( const OUString& lhs ) @@ -108,9 +103,7 @@ namespace dbaccess } }; - //==================================================================== - //= FilterCreator - //==================================================================== + // FilterCreator struct OrderCreator : public TokenComposer { virtual void appendNonEmptyToNonEmpty( const OUString& lhs ) diff --git a/dbaccess/source/core/inc/containerapprove.hxx b/dbaccess/source/core/inc/containerapprove.hxx index 0be528513450..808dcf1c4fe5 100644 --- a/dbaccess/source/core/inc/containerapprove.hxx +++ b/dbaccess/source/core/inc/containerapprove.hxx @@ -27,9 +27,7 @@ namespace dbaccess { - //==================================================================== - //= IContainerApprove - //==================================================================== + // IContainerApprove /** interface for approving elements to be inserted into a container On the long run, one could imagine that this interface completely encapsulates diff --git a/dbaccess/source/core/inc/core_resource.hxx b/dbaccess/source/core/inc/core_resource.hxx index 47e18e84b5d7..8b3c784a7165 100644 --- a/dbaccess/source/core/inc/core_resource.hxx +++ b/dbaccess/source/core/inc/core_resource.hxx @@ -34,10 +34,8 @@ namespace dbaccess #define DBACORE_RESSTRING( id ) DBA_RES( id ) // (compatibility) - //================================================================== - //= ResourceManager - //= handling resources within the DBA-Core library - //================================================================== + // ResourceManager + // handling resources within the DBA-Core library class ResourceManager { friend class OModuleClient; @@ -98,9 +96,7 @@ namespace dbaccess ); }; - //========================================================================= - //= OModuleClient - //========================================================================= + // OModuleClient /** base class for objects which uses any global module-specific resources */ class OModuleClient diff --git a/dbaccess/source/core/inc/datasettings.hxx b/dbaccess/source/core/inc/datasettings.hxx index bf161ebf560d..422f717e0826 100644 --- a/dbaccess/source/core/inc/datasettings.hxx +++ b/dbaccess/source/core/inc/datasettings.hxx @@ -30,12 +30,10 @@ namespace dbaccess { -//========================================================================== -//= ODataSettings_Base - a base class which implements the property member -//= for an object implementing the sdb::DataSettings -//= service -//= the properties have to to be registered when used -//========================================================================== +// ODataSettings_Base - a base class which implements the property member +// for an object implementing the sdb::DataSettings +// service +// the properties have to to be registered when used class ODataSettings_Base { public: @@ -58,11 +56,9 @@ protected: ODataSettings_Base(const ODataSettings_Base& _rSource); ~ODataSettings_Base(); }; -//========================================================================== -//= ODataSettings - a base class which implements the property handling -//= for an object implementing the sdb::DataSettings -//= service -//========================================================================== +// ODataSettings - a base class which implements the property handling +// for an object implementing the sdb::DataSettings +// service class ODataSettings : public ::comphelper::OPropertyStateContainer , public ODataSettings_Base diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx index fef0d2c79f67..41429c1c18f6 100644 --- a/dbaccess/source/core/inc/definitioncolumn.hxx +++ b/dbaccess/source/core/inc/definitioncolumn.hxx @@ -31,14 +31,11 @@ #include <comphelper/uno3.hxx> #include <cppuhelper/implbase1.hxx> - namespace dbaccess { typedef ::cppu::ImplHelper1< ::com::sun::star::container::XChild > TXChild; - // ========================================================================= - //= OTableColumnDescriptor - // ========================================================================= + // OTableColumnDescriptor /** * provides the properties for description. A descriptor could be used to create a new table column. */ @@ -104,9 +101,7 @@ namespace dbaccess void impl_registerProperties(); }; - // ========================================================================= - // = OTableColumn - // ========================================================================= + // OTableColumn class OTableColumn; typedef ::comphelper::OPropertyArrayUsageHelper < OTableColumn > OTableColumn_PBase; /** describes a column of a table @@ -131,9 +126,7 @@ namespace dbaccess virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const; }; - // ========================================================================= - // = OQueryColumn - // ========================================================================= + // OQueryColumn class OQueryColumn; typedef ::comphelper::OPropertyArrayUsageHelper< OQueryColumn > OQueryColumn_PBase; /** a column of a Query, with additional information obtained from parsing the query statement @@ -181,9 +174,7 @@ namespace dbaccess using ::cppu::OPropertySetHelper::getFastPropertyValue; }; - // ========================================================================= - // = OColumnWrapper - // ========================================================================= + // OColumnWrapper /** * describes all properties for a columns of a table. Only the view parts are provided * directly, all the other parts are derived from a driver implementation @@ -227,9 +218,7 @@ namespace dbaccess using OColumn::getFastPropertyValue; }; - // ========================================================================= - // = OTableColumnDescriptorWrapper - // ========================================================================= + // OTableColumnDescriptorWrapper /** * provides the properties for description. A descriptor could be used to create a new table column. */ @@ -276,9 +265,7 @@ namespace dbaccess using OColumnWrapper::getFastPropertyValue; }; - // ========================================================================= - // = OTableColumnWrapper - // ========================================================================= + // OTableColumnWrapper /** * describes all properties for a columns of a table. Only the view parts are provided * directly, all the other parts are derived from a driver implementation diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx index 1c3f654be3d9..3283487de2fd 100644 --- a/dbaccess/source/core/inc/definitioncontainer.hxx +++ b/dbaccess/source/core/inc/definitioncontainer.hxx @@ -75,10 +75,8 @@ private: // (for the moment, this is private. Make it public if needed. If really needed.) }; -//========================================================================== -//= ODefinitionContainer - base class of collections of database definition -//= documents -//========================================================================== +// ODefinitionContainer - base class of collections of database definition +// documents typedef ::cppu::ImplHelper7 < ::com::sun::star::container::XIndexAccess , ::com::sun::star::container::XNameContainer , ::com::sun::star::container::XEnumerationAccess diff --git a/dbaccess/source/core/inc/objectnameapproval.hxx b/dbaccess/source/core/inc/objectnameapproval.hxx index 8a2a077f1867..f137b187de69 100644 --- a/dbaccess/source/core/inc/objectnameapproval.hxx +++ b/dbaccess/source/core/inc/objectnameapproval.hxx @@ -27,9 +27,7 @@ namespace dbaccess { - //==================================================================== - //= ObjectNameApproval - //==================================================================== + // ObjectNameApproval struct ObjectNameApproval_Impl; /** implementation of the IContainerApprove interface which approves elements for insertion into a query or tables container. diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx index 0dd74c078cbb..fa37b08d9204 100644 --- a/dbaccess/source/core/inc/querycontainer.hxx +++ b/dbaccess/source/core/inc/querycontainer.hxx @@ -59,9 +59,7 @@ namespace dbaccess , ::com::sun::star::sdbcx::XDrop > OQueryContainer_Base; - //========================================================================== - //= OQueryContainer - //========================================================================== + // OQueryContainer class OQueryContainer : public ODefinitionContainer , public OQueryContainer_Base { diff --git a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx index 96920f8e3f74..5811e3653873 100644 --- a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx +++ b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx @@ -32,9 +32,7 @@ namespace dbaccess { - //==================================================================== - //= DatabaseDocumentRecovery - //==================================================================== + // DatabaseDocumentRecovery struct DatabaseDocumentRecovery_Data; class DBACCESS_DLLPRIVATE DatabaseDocumentRecovery { diff --git a/dbaccess/source/core/inc/table.hxx b/dbaccess/source/core/inc/table.hxx index ff3e179d0114..7dc6bfcd75d9 100644 --- a/dbaccess/source/core/inc/table.hxx +++ b/dbaccess/source/core/inc/table.hxx @@ -42,9 +42,7 @@ namespace dbaccess { - //========================================================================== - //= OTables - //========================================================================== + // OTables class ODBTable; class OContainerMediator; typedef ::comphelper::OIdPropertyArrayUsageHelper< ODBTable > ODBTable_PROP; @@ -152,5 +150,4 @@ namespace dbaccess } #endif // _DBA_CORE_TABLE_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx index f11dda2612ff..ffba84a0bb72 100644 --- a/dbaccess/source/core/inc/tablecontainer.hxx +++ b/dbaccess/source/core/inc/tablecontainer.hxx @@ -41,9 +41,7 @@ namespace dbaccess { typedef ::cppu::ImplHelper1< ::com::sun::star::container::XContainerListener> OTableContainer_Base; - //========================================================================== - //= OTableContainer - //========================================================================== + // OTableContainer class OContainerMediator; class OTableContainer : public OFilteredContainer, @@ -53,7 +51,6 @@ namespace dbaccess ::rtl::Reference< OContainerMediator > m_pTableMediator; sal_Bool m_bInDrop; // set when we are in the drop method - // OFilteredContainer virtual void addMasterContainerListener(); virtual void removeMasterContainerListener(); @@ -104,5 +101,4 @@ namespace dbaccess } #endif // _DBA_CORE_TABLECONTAINER_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/inc/veto.hxx b/dbaccess/source/core/inc/veto.hxx index 0f2a7a9bc5c0..a418b102f301 100644 --- a/dbaccess/source/core/inc/veto.hxx +++ b/dbaccess/source/core/inc/veto.hxx @@ -27,9 +27,7 @@ namespace dbaccess { - //==================================================================== - //= Veto - //==================================================================== + // Veto typedef ::cppu::WeakImplHelper1 < ::com::sun::star::util::XVeto > Veto_Base; /** implements ::com::sun::star::util::XVeto diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx index f91991416c09..6c0aede10bb9 100644 --- a/dbaccess/source/core/inc/viewcontainer.hxx +++ b/dbaccess/source/core/inc/viewcontainer.hxx @@ -45,9 +45,7 @@ namespace dbaccess { typedef ::cppu::ImplHelper1< ::com::sun::star::container::XContainerListener> OViewContainer_Base; - //========================================================================== - //= OViewContainer - //========================================================================== + // OViewContainer class OViewContainer : public OFilteredContainer, public OViewContainer_Base { @@ -102,5 +100,4 @@ namespace dbaccess } #endif // _DBA_CORE_VIEWCONTAINER_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx index d707a618b157..fae5b202d591 100644 --- a/dbaccess/source/core/misc/ContainerMediator.cxx +++ b/dbaccess/source/core/misc/ContainerMediator.cxx @@ -30,11 +30,8 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> - -//........................................................................ namespace dbaccess { -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; @@ -73,7 +70,7 @@ OContainerMediator::OContainerMediator( const Reference< XContainer >& _xContain m_xContainer.clear(); } } -// ----------------------------------------------------------------------------- + OContainerMediator::~OContainerMediator() { DBG_DTOR(OContainerMediator,NULL); @@ -81,7 +78,6 @@ OContainerMediator::~OContainerMediator() impl_cleanup_nothrow(); } -// ----------------------------------------------------------------------------- void OContainerMediator::impl_cleanup_nothrow() { try @@ -104,7 +100,6 @@ void OContainerMediator::impl_cleanup_nothrow() } } -// ----------------------------------------------------------------------------- void SAL_CALL OContainerMediator::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -120,7 +115,7 @@ void SAL_CALL OContainerMediator::elementInserted( const ContainerEvent& _rEvent } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OContainerMediator::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -142,7 +137,7 @@ void SAL_CALL OContainerMediator::elementRemoved( const ContainerEvent& _rEvent } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OContainerMediator::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { Reference< XContainer > xContainer = m_xContainer; @@ -175,7 +170,6 @@ void SAL_CALL OContainerMediator::elementReplaced( const ContainerEvent& _rEvent } } -// ----------------------------------------------------------------------------- void SAL_CALL OContainerMediator::disposing( const EventObject& /*Source*/ ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -183,7 +177,6 @@ void SAL_CALL OContainerMediator::disposing( const EventObject& /*Source*/ ) thr impl_cleanup_nothrow(); } -// ----------------------------------------------------------------------------- void OContainerMediator::impl_initSettings_nothrow( const OUString& _rName, const Reference< XPropertySet >& _rxDestination ) { try @@ -200,7 +193,6 @@ void OContainerMediator::impl_initSettings_nothrow( const OUString& _rName, cons } } -// ----------------------------------------------------------------------------- void OContainerMediator::notifyElementCreated( const OUString& _sName, const Reference< XPropertySet >& _xDest ) { if ( !m_xSettings.is() ) @@ -244,9 +236,7 @@ void OContainerMediator::notifyElementCreated( const OUString& _sName, const Ref ::rtl::Reference< OPropertyForward > pForward( new OPropertyForward( _xDest, m_xSettings, _sName, aPropertyList ) ); m_aForwardList[ _sName ] = pForward; } -// ----------------------------------------------------------------------------- -//........................................................................ + } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 9168e10575d0..79056db9fc5e 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; using ::com::sun::star::sdbc::SQLException; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::RuntimeException; -// ----------------------------------------------------------------------------- + DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContext > const & context) : TDatabaseDataProvider(m_aMutex), ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >( @@ -83,7 +83,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex } osl_atomic_decrement( &m_refCount ); } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::disposing() { lang::EventObject aEvt(static_cast<XWeak*>(this)); @@ -100,7 +100,7 @@ void SAL_CALL DatabaseDataProvider::disposing() ::comphelper::disposeComponent(m_xInternal); m_xActiveConnection.clear(); } -// ----------------------------------------------------------------------------- + uno::Any DatabaseDataProvider::queryInterface(uno::Type const & type) throw (uno::RuntimeException) { return TDatabaseDataProvider::queryInterface(type); @@ -116,31 +116,29 @@ OUString SAL_CALL DatabaseDataProvider::getImplementationName( ) throw(uno::Run { return getImplementationName_Static(); } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL DatabaseDataProvider::supportsService( const OUString& _rServiceName ) throw(uno::RuntimeException) { return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0; } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------------ + uno::Sequence< OUString > DatabaseDataProvider::getSupportedServiceNames_Static( ) throw (uno::RuntimeException) { uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.chart2.data.DatabaseDataProvider"; return aSNS; } -// ----------------------------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getSupportedServiceNames( ) throw(uno::RuntimeException) { return getSupportedServiceNames_Static(); } -// ----------------------------------------------------------------------------- + uno::Reference< uno::XInterface > DatabaseDataProvider::Create(uno::Reference< uno::XComponentContext > const & context) { return *(new DatabaseDataProvider(context)) ; } -// ----------------------------------------------------------------------------- + // lang::XInitialization: void SAL_CALL DatabaseDataProvider::initialize(const uno::Sequence< uno::Any > & aArguments) throw (uno::RuntimeException, uno::Exception) { @@ -156,7 +154,6 @@ void SAL_CALL DatabaseDataProvider::initialize(const uno::Sequence< uno::Any > & } m_xAggregateSet->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, uno::makeAny( m_xActiveConnection ) ); } -// ----------------------------------------------------------------------------- // chart2::data::XDataProvider: ::sal_Bool SAL_CALL DatabaseDataProvider::createDataSourcePossible(const uno::Sequence< beans::PropertyValue > & _aArguments) throw (uno::RuntimeException) @@ -189,8 +186,7 @@ void SAL_CALL DatabaseDataProvider::initialize(const uno::Sequence< uno::Any > & } return sal_True; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::createDataSource(const uno::Sequence< beans::PropertyValue > & _aArguments) throw (uno::RuntimeException, lang::IllegalArgumentException) { osl::ResettableMutexGuard aClearForNotifies(m_aMutex); @@ -243,7 +239,6 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat } return m_xInternal->createDataSource(_aArguments); } -// ----------------------------------------------------------------------------- uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArguments(const uno::Reference< chart2::data::XDataSource > & _xDataSource) throw (uno::RuntimeException) { @@ -278,13 +273,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum aArguments.put( "HasCategories", uno::makeAny( bHasCategories ) ); return aArguments.getPropertyValues(); } -// ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL DatabaseDataProvider::createDataSequenceByRangeRepresentationPossible(const OUString & /*aRangeRepresentation*/) throw (uno::RuntimeException) { return sal_True; } -// ----------------------------------------------------------------------------- + uno::Any DatabaseDataProvider::impl_getNumberFormatKey_nothrow(const OUString & _sRangeRepresentation) const { ::std::map< OUString,com::sun::star::uno::Any>::const_iterator aFind = m_aNumberFormats.find(_sRangeRepresentation); @@ -292,7 +286,7 @@ uno::Any DatabaseDataProvider::impl_getNumberFormatKey_nothrow(const OUString & return aFind->second; return uno::makeAny(sal_Int32(0)); } -// ----------------------------------------------------------------------------- + uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::createDataSequenceByRangeRepresentation(const OUString & _sRangeRepresentation) throw (uno::RuntimeException, lang::IllegalArgumentException) { osl::MutexGuard g(m_aMutex); @@ -310,18 +304,22 @@ uno::Sequence< uno::Sequence< OUString > > SAL_CALL DatabaseDataProvider::getCom { return m_xComplexDescriptionAccess->getComplexRowDescriptions(); } + void SAL_CALL DatabaseDataProvider::setComplexRowDescriptions( const uno::Sequence< uno::Sequence< OUString > >& aRowDescriptions ) throw (uno::RuntimeException) { m_xComplexDescriptionAccess->setComplexRowDescriptions(aRowDescriptions); } + uno::Sequence< uno::Sequence< OUString > > SAL_CALL DatabaseDataProvider::getComplexColumnDescriptions() throw (uno::RuntimeException) { return m_xComplexDescriptionAccess->getComplexColumnDescriptions(); } + void SAL_CALL DatabaseDataProvider::setComplexColumnDescriptions( const uno::Sequence< uno::Sequence< OUString > >& aColumnDescriptions ) throw (uno::RuntimeException) { m_xComplexDescriptionAccess->setComplexColumnDescriptions(aColumnDescriptions); } + // ____ XChartDataArray ____ uno::Sequence< uno::Sequence< double > > SAL_CALL DatabaseDataProvider::getData() throw (uno::RuntimeException) { @@ -374,8 +372,6 @@ double SAL_CALL DatabaseDataProvider::getNotANumber() throw (uno::RuntimeExce return m_xComplexDescriptionAccess->isNotANumber(nNumber); } -// ----------------------------------------------------------------------------- - uno::Reference< sheet::XRangeSelection > SAL_CALL DatabaseDataProvider::getRangeSelection() throw (uno::RuntimeException) { // TODO: Exchange the default return implementation for "getRangeSelection" !!! @@ -385,52 +381,45 @@ uno::Reference< sheet::XRangeSelection > SAL_CALL DatabaseDataProvider::getRange // different Any initialization in Java and C++ polymorphic structs. return uno::Reference< sheet::XRangeSelection >(); } -// ----------------------------------------------------------------------------- + // chart2::data::XRangeXMLConversion: OUString SAL_CALL DatabaseDataProvider::convertRangeToXML(const OUString & _sRangeRepresentation) throw (uno::RuntimeException, lang::IllegalArgumentException) { osl::MutexGuard g(m_aMutex); return m_xRangeConversion->convertRangeToXML(_sRangeRepresentation); } -// ----------------------------------------------------------------------------- OUString SAL_CALL DatabaseDataProvider::convertRangeFromXML(const OUString & _sXMLRange) throw (uno::RuntimeException, lang::IllegalArgumentException) { osl::MutexGuard g(m_aMutex); return m_xRangeConversion->convertRangeFromXML(_sXMLRange); } -// ----------------------------------------------------------------------------- // com.sun.star.beans.XPropertySet: uno::Reference< beans::XPropertySetInfo > SAL_CALL DatabaseDataProvider::getPropertySetInfo() throw (uno::RuntimeException) { return ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >::getPropertySetInfo(); } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::setPropertyValue(const OUString & aPropertyName, const uno::Any & aValue) throw (uno::RuntimeException, beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException) { ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >::setPropertyValue(aPropertyName, aValue); } -// ----------------------------------------------------------------------------- uno::Any SAL_CALL DatabaseDataProvider::getPropertyValue(const OUString & aPropertyName) throw (uno::RuntimeException, beans::UnknownPropertyException, lang::WrappedTargetException) { return ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >::getPropertyValue(aPropertyName); } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::addPropertyChangeListener(const OUString & aPropertyName, const uno::Reference< beans::XPropertyChangeListener > & xListener) throw (uno::RuntimeException, beans::UnknownPropertyException, lang::WrappedTargetException) { ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >::addPropertyChangeListener(aPropertyName, xListener); } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::removePropertyChangeListener(const OUString & aPropertyName, const uno::Reference< beans::XPropertyChangeListener > & xListener) throw (uno::RuntimeException, beans::UnknownPropertyException, lang::WrappedTargetException) { ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >::removePropertyChangeListener(aPropertyName, xListener); } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::addVetoableChangeListener(const OUString & aPropertyName, const uno::Reference< beans::XVetoableChangeListener > & xListener) throw (uno::RuntimeException, beans::UnknownPropertyException, lang::WrappedTargetException) { @@ -471,7 +460,6 @@ OUString SAL_CALL DatabaseDataProvider::getCommand() throw (uno::RuntimeExceptio osl::MutexGuard g(m_aMutex); return m_Command; } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::setCommand(const OUString & the_value) throw (uno::RuntimeException) { @@ -482,14 +470,12 @@ void SAL_CALL DatabaseDataProvider::setCommand(const OUString & the_value) throw } set(PROPERTY_COMMAND,the_value,m_Command); } -// ----------------------------------------------------------------------------- ::sal_Int32 SAL_CALL DatabaseDataProvider::getCommandType() throw (uno::RuntimeException) { osl::MutexGuard g(m_aMutex); return m_CommandType; } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::setCommandType(::sal_Int32 the_value) throw (uno::RuntimeException) { @@ -499,14 +485,12 @@ void SAL_CALL DatabaseDataProvider::setCommandType(::sal_Int32 the_value) throw } set(PROPERTY_COMMAND_TYPE,the_value,m_CommandType); } -// ----------------------------------------------------------------------------- OUString SAL_CALL DatabaseDataProvider::getFilter() throw (uno::RuntimeException) { osl::MutexGuard g(m_aMutex); return m_aFilterManager.getFilterComponent( dbtools::FilterManager::fcPublicFilter ); } -// ----------------------------------------------------------------------------- void SAL_CALL DatabaseDataProvider::setFilter(const OUString & the_value) throw (uno::RuntimeException) { @@ -516,13 +500,13 @@ void SAL_CALL DatabaseDataProvider::setFilter(const OUString & the_value) throw } set(PROPERTY_FILTER,the_value,m_Filter); } -// ----------------------------------------------------------------------------- + ::sal_Bool SAL_CALL DatabaseDataProvider::getApplyFilter() throw (RuntimeException) { osl::MutexGuard g(m_aMutex); return m_ApplyFilter; } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::setApplyFilter( ::sal_Bool the_value ) throw (RuntimeException) { { @@ -531,13 +515,13 @@ void SAL_CALL DatabaseDataProvider::setApplyFilter( ::sal_Bool the_value ) throw } set(PROPERTY_APPLYFILTER,the_value,m_ApplyFilter); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL DatabaseDataProvider::getHavingClause() throw (uno::RuntimeException) { osl::MutexGuard g(m_aMutex); return m_HavingClause; } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::setHavingClause( const OUString& the_value ) throw (beans::UnknownPropertyException, uno::RuntimeException) { { @@ -546,13 +530,13 @@ void SAL_CALL DatabaseDataProvider::setHavingClause( const OUString& the_value ) } set(PROPERTY_HAVING_CLAUSE,the_value,m_HavingClause); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL DatabaseDataProvider::getGroupBy() throw (uno::RuntimeException) { osl::MutexGuard g(m_aMutex); return m_GroupBy; } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::setGroupBy( const OUString& the_value ) throw (beans::UnknownPropertyException, uno::RuntimeException) { { @@ -561,13 +545,13 @@ void SAL_CALL DatabaseDataProvider::setGroupBy( const OUString& the_value ) thro } set(PROPERTY_GROUP_BY,the_value,m_GroupBy); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL DatabaseDataProvider::getOrder() throw (uno::RuntimeException) { osl::MutexGuard g(m_aMutex); return m_Order; } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::setOrder( const OUString& the_value ) throw (uno::RuntimeException) { { @@ -839,14 +823,14 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat } xData->setData(aData); } -// ----------------------------------------------------------------------------- + void DatabaseDataProvider::impl_fillRowSet_throw() { m_xAggregateSet->setPropertyValue( PROPERTY_FILTER, uno::makeAny( getFilter() ) ); uno::Reference< sdbc::XParameters> xParam(m_xRowSet,uno::UNO_QUERY_THROW); xParam->clearParameters( ); } -// ----------------------------------------------------------------------------- + bool DatabaseDataProvider::impl_fillParameters_nothrow( ::osl::ResettableMutexGuard& _rClearForNotifies) { // do we have to fill the parameters again? @@ -858,292 +842,250 @@ bool DatabaseDataProvider::impl_fillParameters_nothrow( ::osl::ResettableMutexGu return true; } + // com::sun::star::sdbc::XParameters -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw( SQLException, RuntimeException ) { m_aParameterManager.setNull(parameterIndex, sqlType); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName) throw( SQLException, RuntimeException ) { m_aParameterManager.setObjectNull(parameterIndex, sqlType, typeName); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw( SQLException, RuntimeException ) { m_aParameterManager.setBoolean(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setByte(sal_Int32 parameterIndex, sal_Int8 x) throw( SQLException, RuntimeException ) { m_aParameterManager.setByte(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setShort(sal_Int32 parameterIndex, sal_Int16 x) throw( SQLException, RuntimeException ) { m_aParameterManager.setShort(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setInt(sal_Int32 parameterIndex, sal_Int32 x) throw( SQLException, RuntimeException ) { m_aParameterManager.setInt(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setLong(sal_Int32 parameterIndex, sal_Int64 x) throw( SQLException, RuntimeException ) { m_aParameterManager.setLong(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setFloat(sal_Int32 parameterIndex, float x) throw( SQLException, RuntimeException ) { m_aParameterManager.setFloat(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setDouble(sal_Int32 parameterIndex, double x) throw( SQLException, RuntimeException ) { m_aParameterManager.setDouble(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setString(sal_Int32 parameterIndex, const OUString& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setString(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setBytes(sal_Int32 parameterIndex, const uno::Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setBytes(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setDate(sal_Int32 parameterIndex, const util::Date& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setDate(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setTime(sal_Int32 parameterIndex, const util::Time& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setTime(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setTimestamp(sal_Int32 parameterIndex, const util::DateTime& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setTimestamp(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setBinaryStream(sal_Int32 parameterIndex, const uno::Reference<io::XInputStream>& x, sal_Int32 length) throw( SQLException, RuntimeException ) { m_aParameterManager.setBinaryStream(parameterIndex, x, length); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setCharacterStream(sal_Int32 parameterIndex, const uno::Reference<io::XInputStream>& x, sal_Int32 length) throw( SQLException, RuntimeException ) { m_aParameterManager.setCharacterStream(parameterIndex, x, length); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setObjectWithInfo(sal_Int32 parameterIndex, const uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw( SQLException, RuntimeException ) { m_aParameterManager.setObjectWithInfo(parameterIndex, x, targetSqlType, scale); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setObject(sal_Int32 parameterIndex, const uno::Any& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setObject(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setRef(sal_Int32 parameterIndex, const uno::Reference<sdbc::XRef>& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setRef(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setBlob(sal_Int32 parameterIndex, const uno::Reference<sdbc::XBlob>& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setBlob(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setClob(sal_Int32 parameterIndex, const uno::Reference<sdbc::XClob>& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setClob(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::setArray(sal_Int32 parameterIndex, const Reference<sdbc::XArray>& x) throw( SQLException, RuntimeException ) { m_aParameterManager.setArray(parameterIndex, x); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::clearParameters() throw( SQLException, RuntimeException ) { m_aParameterManager.clearParameters(); } -//============================================================================== + // com::sun::star::sdbc::XRowSet -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::execute() throw( SQLException, RuntimeException ) { uno::Sequence< beans::PropertyValue > aEmpty; createDataSource(aEmpty); } -//------------------------------------------------------------------------------ + void SAL_CALL DatabaseDataProvider::addRowSetListener(const uno::Reference<sdbc::XRowSetListener>& _rListener) throw( RuntimeException ) { if (m_xRowSet.is()) m_xRowSet->addRowSetListener(_rListener); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::removeRowSetListener(const uno::Reference<sdbc::XRowSetListener>& _rListener) throw( RuntimeException ) { if (m_xRowSet.is()) m_xRowSet->removeRowSetListener(_rListener); } -//============================================================================== + // com::sun::star::sdbc::XResultSet -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::next() throw( SQLException, RuntimeException ) { return m_xRowSet->next(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::isBeforeFirst() throw( SQLException, RuntimeException ) { return m_xRowSet->isBeforeFirst(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::isAfterLast() throw( SQLException, RuntimeException ) { return m_xRowSet->isAfterLast(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::isFirst() throw( SQLException, RuntimeException ) { return m_xRowSet->isFirst(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::isLast() throw( SQLException, RuntimeException ) { return m_xRowSet->isLast(); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::beforeFirst() throw( SQLException, RuntimeException ) { m_xRowSet->beforeFirst(); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::afterLast() throw( SQLException, RuntimeException ) { m_xRowSet->afterLast(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::first() throw( SQLException, RuntimeException ) { return m_xRowSet->first(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::last() throw( SQLException, RuntimeException ) { return m_xRowSet->last(); } -//------------------------------------------------------------------------------ sal_Int32 SAL_CALL DatabaseDataProvider::getRow() throw( SQLException, RuntimeException ) { return m_xRowSet->getRow(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::absolute(sal_Int32 row) throw( SQLException, RuntimeException ) { return m_xRowSet->absolute(row); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::relative(sal_Int32 rows) throw( SQLException, RuntimeException ) { return m_xRowSet->relative(rows); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::previous() throw( SQLException, RuntimeException ) { return m_xRowSet->previous(); } -//------------------------------------------------------------------------------ void SAL_CALL DatabaseDataProvider::refreshRow() throw( SQLException, RuntimeException ) { m_xRowSet->refreshRow(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::rowUpdated() throw( SQLException, RuntimeException ) { return m_xRowSet->rowUpdated(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::rowInserted() throw( SQLException, RuntimeException ) { return m_xRowSet->rowInserted(); } -//------------------------------------------------------------------------------ sal_Bool SAL_CALL DatabaseDataProvider::rowDeleted() throw( SQLException, RuntimeException ) { return m_xRowSet->rowDeleted(); } -//------------------------------------------------------------------------------ uno::Reference< uno::XInterface > SAL_CALL DatabaseDataProvider::getStatement() throw( SQLException, RuntimeException ) { return m_xRowSet->getStatement(); } -// ----------------------------------------------------------------------------- + uno::Reference< uno::XInterface > SAL_CALL DatabaseDataProvider::getParent( ) throw (uno::RuntimeException) { return m_xParent; } -// ----------------------------------------------------------------------------- + void SAL_CALL DatabaseDataProvider::setParent( const uno::Reference< uno::XInterface >& _xParent ) throw (lang::NoSupportException, uno::RuntimeException) { osl::MutexGuard g(m_aMutex); m_xParent = _xParent; } -// ----------------------------------------------------------------------------- + void DatabaseDataProvider::impl_invalidateParameter_nothrow() { osl::MutexGuard g(m_aMutex); m_aParameterManager.clearAllParameterInformation(); } -// ----------------------------------------------------------------------------- + } // namespace dbaccess /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx index 09a3882f6bec..a58cfe47f0b7 100644 --- a/dbaccess/source/core/misc/PropertyForward.cxx +++ b/dbaccess/source/core/misc/PropertyForward.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "PropertyForward.hxx" #include "dbastrings.hrc" @@ -29,11 +28,8 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> - -//........................................................................ namespace dbaccess { -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -43,7 +39,6 @@ namespace dbaccess DBG_NAME(OPropertyForward) - //------------------------------------------------------------------------ OPropertyForward::OPropertyForward( const Reference< XPropertySet>& _xSource, const Reference< XNameAccess>& _xDestContainer, const OUString& _sName, const ::std::vector< OUString>& _aPropertyList ) :m_xSource( _xSource, UNO_SET_THROW ) @@ -73,13 +68,11 @@ namespace dbaccess osl_atomic_decrement( &m_refCount ); } - // ----------------------------------------------------------------------------- OPropertyForward::~OPropertyForward() { DBG_DTOR(OPropertyForward,NULL); } - // ----------------------------------------------------------------------------- void SAL_CALL OPropertyForward::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -122,7 +115,6 @@ namespace dbaccess } } - // ----------------------------------------------------------------------------- void SAL_CALL OPropertyForward::disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) throw (RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -137,7 +129,6 @@ namespace dbaccess m_xDest = NULL; } - // ----------------------------------------------------------------------------- void OPropertyForward::setDefinition( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDest ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -157,8 +148,6 @@ namespace dbaccess } } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/apitools.cxx b/dbaccess/source/core/misc/apitools.cxx index 880c5ab59fa6..d0fbfb19e1f2 100644 --- a/dbaccess/source/core/misc/apitools.cxx +++ b/dbaccess/source/core/misc/apitools.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "apitools.hxx" #include "dbastrings.hrc" #include <cppuhelper/typeprovider.hxx> @@ -30,14 +29,9 @@ using namespace ::com::sun::star::lang; using namespace cppu; using namespace osl; -//================================================================================== -//= various helper functions -//================================================================================== -//============================================================ -//= OSubComponent -//============================================================ +// various helper functions +// OSubComponent DBG_NAME(OSubComponent) -//-------------------------------------------------------------------------- OSubComponent::OSubComponent(Mutex& _rMutex, const Reference< XInterface > & xParent) :OComponentHelper(_rMutex) ,m_xParent(xParent) @@ -45,7 +39,7 @@ OSubComponent::OSubComponent(Mutex& _rMutex, const Reference< XInterface > & xPa DBG_CTOR(OSubComponent,NULL); } -// ----------------------------------------------------------------------------- + OSubComponent::~OSubComponent() { m_xParent = NULL; @@ -54,7 +48,6 @@ OSubComponent::~OSubComponent() } // com::sun::star::lang::XTypeProvider -//-------------------------------------------------------------------------- Sequence< Type > OSubComponent::getTypes() throw (RuntimeException) { OTypeCollection aTypes(::getCppuType( (const Reference< XComponent > *)0 ), @@ -65,13 +58,11 @@ Sequence< Type > OSubComponent::getTypes() throw (RuntimeException) } // XInterface -//-------------------------------------------------------------------------- void OSubComponent::acquire() throw ( ) { OComponentHelper::acquire(); } -//-------------------------------------------------------------------------- void OSubComponent::release() throw ( ) { Reference< XInterface > x( xDelegator ); @@ -121,7 +112,6 @@ void OSubComponent::release() throw ( ) OWeakAggObject::release(); } -//-------------------------------------------------------------------------- Any OSubComponent::queryInterface( const Type & rType ) throw(RuntimeException) { Any aReturn; @@ -131,5 +121,4 @@ Any OSubComponent::queryInterface( const Type & rType ) throw(RuntimeException) return aReturn; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 51113b30f8a7..2d5844680b64 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dsntypes.hxx" #include "dbamiscres.hrc" #include <unotools/confignode.hxx> @@ -31,10 +30,8 @@ #include <comphelper/documentconstants.hxx> #include <comphelper/string.hxx> -//......................................................................... namespace dbaccess { -//......................................................................... using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -52,11 +49,8 @@ namespace dbaccess } } } -//========================================================================= -//= ODsnTypeCollection -//========================================================================= +// ODsnTypeCollection DBG_NAME(ODsnTypeCollection) -//------------------------------------------------------------------------- ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext) :m_aDriverConfig(_xContext) ,m_xContext(_xContext) @@ -78,18 +72,17 @@ ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< : "ODsnTypeCollection::ODsnTypeCollection : invalid resources !"); } -//------------------------------------------------------------------------- ODsnTypeCollection::~ODsnTypeCollection() { DBG_DTOR(ODsnTypeCollection,NULL); OSL_ENSURE(0 == m_nLivingIterators, "ODsnTypeCollection::~ODsnTypeCollection : there are still living iterator objects!"); } -//------------------------------------------------------------------------- + OUString ODsnTypeCollection::getTypeDisplayName(const OUString& _sURL) const { return m_aDriverConfig.getDriverTypeDisplayName(_sURL); } -//------------------------------------------------------------------------- + OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const { OUString sURL( _sURL); @@ -116,7 +109,6 @@ OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const return sRet; } -//------------------------------------------------------------------------- OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const { OUString sURL( _sURL); @@ -141,14 +133,12 @@ OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const return sRet; } -//------------------------------------------------------------------------- bool ODsnTypeCollection::hasDriver( const sal_Char* _pAsciiPattern ) const { OUString sPrefix( getPrefix( OUString::createFromAscii( _pAsciiPattern ) ) ); return ( sPrefix.getLength() > 0 ); } -// ----------------------------------------------------------------------------- bool ODsnTypeCollection::isConnectionUrlRequired(const OUString& _sURL) const { OUString sURL( _sURL); @@ -167,13 +157,13 @@ bool ODsnTypeCollection::isConnectionUrlRequired(const OUString& _sURL) const } return sRet.getLength() > 0 && sRet[sRet.getLength()-1] == '*'; } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::getMediaType(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("MediaType",OUString()); } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _sMediaType,const OUString& _sExtension) { OUString sURL, sFallbackURL; @@ -202,7 +192,7 @@ OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _s sURL = comphelper::string::stripEnd(sURL, '*'); return sURL; } -// ----------------------------------------------------------------------------- + bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const { return !( _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")-1) @@ -216,7 +206,7 @@ bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:evolution:ldap",sizeof("sdbc:address:evolution:ldap")-1) || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:macab",sizeof("sdbc:address:macab")-1) ); } -// ----------------------------------------------------------------------------- + void ODsnTypeCollection::extractHostNamePort(const OUString& _rDsn,OUString& _sDatabaseName,OUString& _rsHostname,sal_Int32& _nPortNumber) const { OUString sUrl = cutPrefix(_rDsn); @@ -254,55 +244,54 @@ void ODsnTypeCollection::extractHostNamePort(const OUString& _rDsn,OUString& _sD } } } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::getJavaDriverClass(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getProperties(_sURL); return aFeatures.getOrDefault("JavaDriverClass",OUString()); } -//------------------------------------------------------------------------- + sal_Bool ODsnTypeCollection::isFileSystemBased(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("FileSystemBased",sal_False); } -// ----------------------------------------------------------------------------- + sal_Bool ODsnTypeCollection::supportsTableCreation(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsTableCreation",sal_False); } -// ----------------------------------------------------------------------------- + sal_Bool ODsnTypeCollection::supportsColumnDescription(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsColumnDescription",sal_False); } -// ----------------------------------------------------------------------------- + sal_Bool ODsnTypeCollection::supportsBrowsing(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsBrowsing",sal_False); } -// ----------------------------------------------------------------------------- + bool ODsnTypeCollection::needsJVM(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("UseJava",sal_False); } -// ----------------------------------------------------------------------------- + Sequence<PropertyValue> ODsnTypeCollection::getDefaultDBSettings( const OUString& _sURL ) const { const ::comphelper::NamedValueCollection& aProperties = m_aDriverConfig.getProperties(_sURL); return aProperties.getPropertyValues(); } -//------------------------------------------------------------------------- bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL ) const { return _sURL.startsWith( "sdbc:embedded:" ); } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::getEmbeddedDatabase() const { OUString sEmbeddedDatabaseURL; @@ -324,18 +313,17 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const return sEmbeddedDatabaseURL; } -//------------------------------------------------------------------------- + ODsnTypeCollection::TypeIterator ODsnTypeCollection::begin() const { return TypeIterator(this, 0); } -//------------------------------------------------------------------------- ODsnTypeCollection::TypeIterator ODsnTypeCollection::end() const { return TypeIterator(this, m_aDsnTypesDisplayNames.size()); } -//------------------------------------------------------------------------- + DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const { OUString sDsn(comphelper::string::stripEnd(_rDsn, '*')); @@ -437,7 +425,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const return DST_UNKNOWN; } -// ----------------------------------------------------------------------------- + void ODsnTypeCollection::fillPageIds(const OUString& _sURL,::std::vector<sal_Int16>& _rOutPathIds) const { DATASOURCE_TYPE eType = determineType(_sURL); @@ -500,7 +488,7 @@ void ODsnTypeCollection::fillPageIds(const OUString& _sURL,::std::vector<sal_Int break; } } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::getType(const OUString& _sURL) const { OUString sOldPattern; @@ -516,7 +504,7 @@ OUString ODsnTypeCollection::getType(const OUString& _sURL) const } return sOldPattern; } -// ----------------------------------------------------------------------------- + sal_Int32 ODsnTypeCollection::getIndexOf(const OUString& _sURL) const { sal_Int32 nRet = -1; @@ -536,15 +524,13 @@ sal_Int32 ODsnTypeCollection::getIndexOf(const OUString& _sURL) const return nRet; } -// ----------------------------------------------------------------------------- + sal_Int32 ODsnTypeCollection::size() const { return m_aDsnPrefixes.size(); } -//========================================================================= -//= ODsnTypeCollection::TypeIterator -//========================================================================= -//------------------------------------------------------------------------- + +// ODsnTypeCollection::TypeIterator ODsnTypeCollection::TypeIterator::TypeIterator(const ODsnTypeCollection* _pContainer, sal_Int32 _nInitialPos) :m_pContainer(_pContainer) ,m_nPosition(_nInitialPos) @@ -555,7 +541,6 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const ODsnTypeCollection* _pConta #endif } -//------------------------------------------------------------------------- ODsnTypeCollection::TypeIterator::TypeIterator(const TypeIterator& _rSource) :m_pContainer(_rSource.m_pContainer) ,m_nPosition(_rSource.m_nPosition) @@ -565,7 +550,6 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const TypeIterator& _rSource) #endif } -//------------------------------------------------------------------------- ODsnTypeCollection::TypeIterator::~TypeIterator() { #if OSL_DEBUG_LEVEL > 0 @@ -573,19 +557,18 @@ ODsnTypeCollection::TypeIterator::~TypeIterator() #endif } -//------------------------------------------------------------------------- OUString ODsnTypeCollection::TypeIterator::getDisplayName() const { OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!"); return m_pContainer->m_aDsnTypesDisplayNames[m_nPosition]; } -// ----------------------------------------------------------------------------- + OUString ODsnTypeCollection::TypeIterator::getURLPrefix() const { OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnPrefixes.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!"); return m_pContainer->m_aDsnPrefixes[m_nPosition]; } -//------------------------------------------------------------------------- + const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operator++() { OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::operator++ : invalid position!"); @@ -594,7 +577,6 @@ const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operat return *this; } -//------------------------------------------------------------------------- const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operator--() { OSL_ENSURE(m_nPosition >= 0, "ODsnTypeCollection::TypeIterator::operator-- : invalid position!"); @@ -603,14 +585,11 @@ const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operat return *this; } -//------------------------------------------------------------------------- bool operator==(const ODsnTypeCollection::TypeIterator& lhs, const ODsnTypeCollection::TypeIterator& rhs) { return (lhs.m_pContainer == rhs.m_pContainer) && (lhs.m_nPosition == rhs.m_nPosition); } -//......................................................................... } // namespace dbaccess -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/module_dba.cxx b/dbaccess/source/core/misc/module_dba.cxx index ffb9b895bdcc..7b554e789153 100644 --- a/dbaccess/source/core/misc/module_dba.cxx +++ b/dbaccess/source/core/misc/module_dba.cxx @@ -17,18 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "module_dba.hxx" -//........................................................................ namespace dba { -//........................................................................ IMPLEMENT_MODULE( DbaModule, "dba" ) -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/objectnameapproval.cxx b/dbaccess/source/core/misc/objectnameapproval.cxx index 0a9c241dfc62..dfeb3c8ca16e 100644 --- a/dbaccess/source/core/misc/objectnameapproval.cxx +++ b/dbaccess/source/core/misc/objectnameapproval.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "objectnameapproval.hxx" #include <com/sun/star/lang/DisposedException.hpp> @@ -28,10 +27,8 @@ #include <cppuhelper/weakref.hxx> #include <cppuhelper/exc_hlp.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::sdbc::XConnection; using ::com::sun::star::uno::WeakReference; @@ -45,19 +42,14 @@ namespace dbaccess namespace CommandType = com::sun::star::sdb::CommandType; - //==================================================================== - //= ObjectNameApproval_Impl - //==================================================================== + // ObjectNameApproval_Impl struct ObjectNameApproval_Impl { WeakReference< XConnection > aConnection; sal_Int32 nCommandType; }; - //==================================================================== - //= ObjectNameApproval - //==================================================================== - //-------------------------------------------------------------------- + // ObjectNameApproval ObjectNameApproval::ObjectNameApproval( const Reference< XConnection >& _rxConnection, ObjectType _eType ) :m_pImpl( new ObjectNameApproval_Impl ) { @@ -65,12 +57,10 @@ namespace dbaccess m_pImpl->nCommandType = _eType == TypeQuery ? CommandType::QUERY : CommandType::TABLE; } - //-------------------------------------------------------------------- ObjectNameApproval::~ObjectNameApproval() { } - //-------------------------------------------------------------------- void SAL_CALL ObjectNameApproval::approveElement( const OUString& _rName, const Reference< XInterface >& /*_rxElement*/ ) { Reference< XConnection > xConnection( m_pImpl->aConnection ); @@ -82,8 +72,6 @@ namespace dbaccess xObjectNames->checkNameForCreate( m_pImpl->nCommandType, _rName ); } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx index 1e3891fac5cd..83c7016ccb6d 100644 --- a/dbaccess/source/core/misc/sdbcoretools.cxx +++ b/dbaccess/source/core/misc/sdbcoretools.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sdbcoretools.hxx" #include "dbastrings.hrc" @@ -36,10 +35,8 @@ #include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -//......................................................................... namespace dbaccess { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -52,8 +49,6 @@ namespace dbaccess using namespace ::com::sun::star::embed; using namespace ::com::sun::star::container; - // ========================================================================= - // ------------------------------------------------------------------------- void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,sal_Bool _bModified) { Reference< XInterface > xDs = getDataSource( _rxObject ); @@ -65,7 +60,6 @@ namespace dbaccess xModi->setModified(_bModified); } - // ------------------------------------------------------------------------- Reference< XInterface > getDataSource( const Reference< XInterface >& _rxDependentObject ) { Reference< XInterface > xParent = _rxDependentObject; @@ -79,7 +73,6 @@ namespace dbaccess return xReturn; } -// ----------------------------------------------------------------------------- OUString extractExceptionMessage( const Reference<XComponentContext> & _rContext, const Any& _rError ) { OUString sDisplayMessage; @@ -118,7 +111,6 @@ namespace dbaccess namespace tools { namespace stor { - // ----------------------------------------------------------------------------- bool storageIsWritable_nothrow( const Reference< XStorage >& _rxStorage ) { if ( !_rxStorage.is() ) @@ -137,7 +129,6 @@ namespace dbaccess return ( nMode & ElementModes::WRITE ) != 0; } - // ----------------------------------------------------------------------------- bool commitStorageIfWriteable( const Reference< XStorage >& _rxStorage ) SAL_THROW(( IOException, WrappedTargetException, RuntimeException )) { bool bSuccess = false; @@ -153,8 +144,6 @@ namespace dbaccess } } // tools::stor -//......................................................................... } // namespace dbaccess -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx index ba98e212aedb..750ddcd5dcd0 100644 --- a/dbaccess/source/core/misc/services.cxx +++ b/dbaccess/source/core/misc/services.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> #include "module_dba.hxx" @@ -27,13 +26,10 @@ #include <../dataaccess/databasecontext.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; -//*************************************************************************************** -// // registry functions extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition(); extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition(); @@ -43,7 +39,6 @@ extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource(); extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory(); namespace dba{ -//-------------------------------------------------------------------------- ::cppu::ImplementationEntry entries[] = { { &::dbaccess::DatabaseDataProvider::Create, @@ -63,11 +58,8 @@ namespace dba{ }; } -//*************************************************************************************** -// // The prescribed C api must be complied with // It consists of three functions which must be exported by the module. -// extern "C" void SAL_CALL createRegistryInfo_DBA() { static sal_Bool bInit = sal_False; @@ -83,7 +75,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBA() } } -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dba_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/core/misc/userinformation.cxx b/dbaccess/source/core/misc/userinformation.cxx index 5ab2f2ac4a8b..6910d76cfa38 100644 --- a/dbaccess/source/core/misc/userinformation.cxx +++ b/dbaccess/source/core/misc/userinformation.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "userinformation.hxx" #include <osl/diagnose.h> @@ -28,7 +27,6 @@ using namespace ::utl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -//-------------------------------------------------------------------------- UserInformation::UserInformation(): m_aUserLocale( LanguageTag( ConfigManager::getLocale()).getLocale()) {} diff --git a/dbaccess/source/core/misc/veto.cxx b/dbaccess/source/core/misc/veto.cxx index 732f924a2b7a..7b994728b747 100644 --- a/dbaccess/source/core/misc/veto.cxx +++ b/dbaccess/source/core/misc/veto.cxx @@ -19,43 +19,33 @@ #include "veto.hxx" -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::RuntimeException; - //==================================================================== - //= Veto - //==================================================================== - //-------------------------------------------------------------------- + // Veto Veto::Veto( const OUString& _rReason, const Any& _rDetails ) :m_sReason( _rReason ) ,m_aDetails( _rDetails ) { } - //-------------------------------------------------------------------- Veto::~Veto() { } - //-------------------------------------------------------------------- OUString SAL_CALL Veto::getReason() throw (RuntimeException) { return m_sReason; } - //-------------------------------------------------------------------- Any SAL_CALL Veto::getDetails() throw (RuntimeException) { return m_aDetails; } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx index 45a09f76692c..312a6862fc18 100644 --- a/dbaccess/source/core/recovery/dbdocrecovery.cxx +++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "recovery/dbdocrecovery.hxx" #include "sdbcoretools.hxx" #include "storagetextstream.hxx" @@ -41,10 +40,8 @@ #include <algorithm> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -76,12 +73,9 @@ namespace dbaccess namespace ElementModes = ::com::sun::star::embed::ElementModes; - //==================================================================== - //= helpers - //==================================================================== + // helpers namespace { - // ......................................................................... static void lcl_getPersistentRepresentation( const MapStringToCompDesc::value_type& i_rComponentDesc, OUStringBuffer& o_rBuffer ) { o_rBuffer.append( i_rComponentDesc.first ); @@ -91,7 +85,6 @@ namespace dbaccess o_rBuffer.append( sal_Unicode( i_rComponentDesc.second.bForEditing ? '1' : '0' ) ); } - // ......................................................................... static bool lcl_extractCompDesc( const OUString& i_rIniLine, OUString& o_rStorName, SubComponentDescriptor& o_rCompDesc ) { const sal_Int32 nEqualSignPos = i_rIniLine.indexOf( sal_Unicode( '=' ) ); @@ -156,7 +149,6 @@ namespace dbaccess aTextOutput.writeLine(); } - // ......................................................................... static bool lcl_isSectionStart( const OUString& i_rIniLine, OUString& o_rSectionName ) { const sal_Int32 nLen = i_rIniLine.getLength(); @@ -168,7 +160,6 @@ namespace dbaccess return false; } - // ......................................................................... static void lcl_stripTrailingLineFeed( OUString& io_rLine ) { const sal_Int32 nLen = io_rLine.getLength(); @@ -176,7 +167,6 @@ namespace dbaccess io_rLine = io_rLine.copy( 0, nLen - 1 ); } - // ......................................................................... static void lcl_readObjectMap_throw( const Reference<XComponentContext> & i_rxContext, const Reference< XStorage >& i_rStorage, MapStringToCompDesc& o_mapStorageToObjectName ) { @@ -228,7 +218,6 @@ namespace dbaccess } } - // ......................................................................... static void lcl_markModified( const Reference< XComponent >& i_rSubComponent ) { const Reference< XModifiable > xModify( i_rSubComponent, UNO_QUERY ); @@ -242,9 +231,7 @@ namespace dbaccess } } - //==================================================================== - //= DatabaseDocumentRecovery_Data - //==================================================================== + // DatabaseDocumentRecovery_Data struct DBACCESS_DLLPRIVATE DatabaseDocumentRecovery_Data { const Reference<XComponentContext> aContext; @@ -255,21 +242,16 @@ namespace dbaccess } }; - //==================================================================== - //= DatabaseDocumentRecovery - //==================================================================== - //-------------------------------------------------------------------- + // DatabaseDocumentRecovery DatabaseDocumentRecovery::DatabaseDocumentRecovery( const Reference<XComponentContext> & i_rContext ) :m_pData( new DatabaseDocumentRecovery_Data( i_rContext ) ) { } - //-------------------------------------------------------------------- DatabaseDocumentRecovery::~DatabaseDocumentRecovery() { } - //-------------------------------------------------------------------- void DatabaseDocumentRecovery::saveModifiedSubComponents( const Reference< XStorage >& i_rTargetStorage, const ::std::vector< Reference< XController > >& i_rControllers ) { @@ -324,7 +306,6 @@ namespace dbaccess tools::stor::commitStorageIfWriteable( xRecoveryStorage ); } - //-------------------------------------------------------------------- void DatabaseDocumentRecovery::recoverSubDocuments( const Reference< XStorage >& i_rDocumentStorage, const Reference< XController >& i_rTargetController ) { @@ -412,8 +393,6 @@ namespace dbaccess } } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx index bd9c8b2d09c8..fc5cdc6bafea 100644 --- a/dbaccess/source/core/recovery/settingsimport.cxx +++ b/dbaccess/source/core/recovery/settingsimport.cxx @@ -23,10 +23,8 @@ #include <sax/tools/converter.hxx> #include <xmloff/xmltoken.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -41,16 +39,12 @@ namespace dbaccess using ::com::sun::star::uno::Type; using ::com::sun::star::xml::sax::XAttributeList; - //==================================================================== - //= SettingsImport - //==================================================================== - //-------------------------------------------------------------------- + // SettingsImport SettingsImport::SettingsImport() :m_refCount( 0 ) { } - //-------------------------------------------------------------------- SettingsImport::~SettingsImport() { } @@ -103,31 +97,23 @@ namespace dbaccess // If there is, then just ignore it ... } - //==================================================================== - //= IgnoringSettingsImport - //==================================================================== - //-------------------------------------------------------------------- + // IgnoringSettingsImport ::rtl::Reference< SettingsImport > IgnoringSettingsImport::nextState( const OUString& i_rElementName ) { (void)i_rElementName; return this; } - //==================================================================== - //= OfficeSettingsImport - //==================================================================== - //-------------------------------------------------------------------- + // OfficeSettingsImport OfficeSettingsImport::OfficeSettingsImport( ::comphelper::NamedValueCollection& o_rSettings ) :m_rSettings( o_rSettings ) { } - //-------------------------------------------------------------------- OfficeSettingsImport::~OfficeSettingsImport() { } - //-------------------------------------------------------------------- ::rtl::Reference< SettingsImport > OfficeSettingsImport::nextState( const OUString& i_rElementName ) { // separate the namespace part from the element name @@ -147,21 +133,16 @@ namespace dbaccess return new IgnoringSettingsImport; } - //==================================================================== - //= ConfigItemImport - //==================================================================== - //-------------------------------------------------------------------- + // ConfigItemImport ConfigItemImport::ConfigItemImport( ::comphelper::NamedValueCollection& o_rSettings ) :m_rSettings( o_rSettings ) { } - //-------------------------------------------------------------------- ConfigItemImport::~ConfigItemImport() { } - //-------------------------------------------------------------------- ::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const OUString& i_rElementName ) { OSL_FAIL( "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" ); @@ -169,7 +150,6 @@ namespace dbaccess return new IgnoringSettingsImport; } - //-------------------------------------------------------------------- void ConfigItemImport::endElement() { SettingsImport::endElement(); @@ -181,7 +161,6 @@ namespace dbaccess m_rSettings.put( sItemName, aValue ); } - //-------------------------------------------------------------------- void ConfigItemImport::getItemValue( ::com::sun::star::uno::Any& o_rValue ) const { o_rValue.clear(); @@ -232,21 +211,16 @@ namespace dbaccess #endif } - //==================================================================== - //= ConfigItemSetImport - //==================================================================== - //-------------------------------------------------------------------- + // ConfigItemSetImport ConfigItemSetImport::ConfigItemSetImport( ::comphelper::NamedValueCollection& o_rSettings ) :ConfigItemImport( o_rSettings ) { } - //-------------------------------------------------------------------- ConfigItemSetImport::~ConfigItemSetImport() { } - //-------------------------------------------------------------------- ::rtl::Reference< SettingsImport > ConfigItemSetImport::nextState( const OUString& i_rElementName ) { // separate the namespace part from the element name @@ -268,14 +242,11 @@ namespace dbaccess return new IgnoringSettingsImport; } - //-------------------------------------------------------------------- void ConfigItemSetImport::getItemValue( Any& o_rValue ) const { o_rValue <<= m_aChildSettings.getPropertyValues(); } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/settingsimport.hxx b/dbaccess/source/core/recovery/settingsimport.hxx index accad5c714b0..832bd516a93c 100644 --- a/dbaccess/source/core/recovery/settingsimport.hxx +++ b/dbaccess/source/core/recovery/settingsimport.hxx @@ -26,14 +26,10 @@ #include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ - //==================================================================== - //= SettingsImport - //==================================================================== + // SettingsImport /** a simplified version of xmloff/DocumentSettingsContext It would be nice if the DocumentSettingsContext would not be that tightly interwoven with the SvXMLImport @@ -79,9 +75,7 @@ namespace dbaccess OUStringBuffer m_aCharacters; }; - //==================================================================== - //= IgnoringSettingsImport - //==================================================================== + // IgnoringSettingsImport class IgnoringSettingsImport : public SettingsImport { public: @@ -100,9 +94,7 @@ namespace dbaccess } }; - //==================================================================== - //= OfficeSettingsImport - //==================================================================== + // OfficeSettingsImport class OfficeSettingsImport : public SettingsImport { public: @@ -121,9 +113,7 @@ namespace dbaccess ::comphelper::NamedValueCollection& m_rSettings; }; - //==================================================================== - //= ConfigItemSetImport - //==================================================================== + // ConfigItemSetImport class ConfigItemImport : public SettingsImport { public: @@ -149,9 +139,7 @@ namespace dbaccess ::comphelper::NamedValueCollection& m_rSettings; }; - //==================================================================== - //= ConfigItemSetImport - //==================================================================== + // ConfigItemSetImport class ConfigItemSetImport : public ConfigItemImport { public: @@ -175,9 +163,7 @@ namespace dbaccess ::comphelper::NamedValueCollection m_aChildSettings; }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // SETTINGSIMPORT_HXX diff --git a/dbaccess/source/core/recovery/storagestream.cxx b/dbaccess/source/core/recovery/storagestream.cxx index bac839e28f09..90761120e6bc 100644 --- a/dbaccess/source/core/recovery/storagestream.cxx +++ b/dbaccess/source/core/recovery/storagestream.cxx @@ -17,17 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "storagestream.hxx" #include <com/sun/star/embed/ElementModes.hpp> #include <tools/diagnose_ex.h> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -46,10 +43,7 @@ namespace dbaccess namespace ElementModes = ::com::sun::star::embed::ElementModes; - //==================================================================== - //= StorageOutputStream - //==================================================================== - //-------------------------------------------------------------------- + // StorageOutputStream StorageOutputStream::StorageOutputStream( const Reference<XComponentContext>& i_rContext, const Reference< XStorage >& i_rParentStorage, const OUString& i_rStreamName @@ -63,12 +57,10 @@ namespace dbaccess m_xOutputStream.set( xStream->getOutputStream(), UNO_SET_THROW ); } - //-------------------------------------------------------------------- StorageOutputStream::~StorageOutputStream() { } - //-------------------------------------------------------------------- void StorageOutputStream::close() { ENSURE_OR_RETURN_VOID( m_xOutputStream.is(), "already closed" ); @@ -79,10 +71,7 @@ namespace dbaccess // (legitimately) do not call this method here. } - //==================================================================== - //= StorageInputStream - //==================================================================== - //-------------------------------------------------------------------- + // StorageInputStream StorageInputStream::StorageInputStream( const Reference<XComponentContext>& i_rContext, const Reference< XStorage >& i_rParentStorage, const OUString& i_rStreamName @@ -96,12 +85,10 @@ namespace dbaccess m_xInputStream.set( xStream->getInputStream(), UNO_SET_THROW ); } - //-------------------------------------------------------------------- StorageInputStream::~StorageInputStream() { } - //-------------------------------------------------------------------- void StorageInputStream::close() { ENSURE_OR_RETURN_VOID( m_xInputStream.is(), "already closed" ); @@ -112,8 +99,6 @@ namespace dbaccess // (legitimately) do not call this method here. } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/storagestream.hxx b/dbaccess/source/core/recovery/storagestream.hxx index cf227d118d89..64b051969df9 100644 --- a/dbaccess/source/core/recovery/storagestream.hxx +++ b/dbaccess/source/core/recovery/storagestream.hxx @@ -25,14 +25,10 @@ #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -//........................................................................ namespace dbaccess { -//........................................................................ - //==================================================================== - //= StorageOutputStream - //==================================================================== + // StorageOutputStream /** convenience wrapper around a stream living in a storage */ class DBACCESS_DLLPRIVATE StorageOutputStream @@ -62,9 +58,7 @@ namespace dbaccess m_xOutputStream; }; - //==================================================================== - //= StorageInputStream - //==================================================================== + // StorageInputStream /** convenience wrapper around a stream living in a storage */ class DBACCESS_DLLPRIVATE StorageInputStream @@ -94,9 +88,7 @@ namespace dbaccess m_xInputStream; }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // STORAGESTREAM_HXX diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx index 241e336f2652..c835c2134977 100644 --- a/dbaccess/source/core/recovery/storagetextstream.cxx +++ b/dbaccess/source/core/recovery/storagetextstream.cxx @@ -17,17 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "storagetextstream.hxx" #include <com/sun/star/io/TextOutputStream.hpp> #include <tools/diagnose_ex.h> -//...................................................................................................................... namespace dbaccess { -//...................................................................................................................... using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -46,27 +43,21 @@ namespace dbaccess using ::com::sun::star::io::XTextOutputStream2; using ::com::sun::star::io::XActiveDataSource; - //================================================================================================================== - //= StorageTextOutputStream_Data - //================================================================================================================== + // StorageTextOutputStream_Data struct StorageTextOutputStream_Data { Reference< XTextOutputStream2 > xTextOutput; }; - //================================================================================================================== - //= helper - //================================================================================================================== + // helper namespace { - //-------------------------------------------------------------------------------------------------------------- static const OUString& lcl_getTextStreamEncodingName() { static const OUString s_sMapStreamEncodingName( "UTF-8" ); return s_sMapStreamEncodingName; } - //-------------------------------------------------------------------------------------------------------------- static const OUString& lcl_getLineFeed() { static const OUString s_sLineFeed( sal_Unicode( '\n' ) ); @@ -74,10 +65,7 @@ namespace dbaccess } } - //================================================================================================================== - //= StorageTextOutputStream - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // StorageTextOutputStream StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext, const Reference< XStorage >& i_rParentStorage, const OUString& i_rStreamName @@ -90,26 +78,21 @@ namespace dbaccess m_pData->xTextOutput->setOutputStream( getOutputStream() ); } - //------------------------------------------------------------------------------------------------------------------ StorageTextOutputStream::~StorageTextOutputStream() { } - //------------------------------------------------------------------------------------------------------------------ void StorageTextOutputStream::writeLine( const OUString& i_rLine ) { m_pData->xTextOutput->writeString( i_rLine ); m_pData->xTextOutput->writeString( lcl_getLineFeed() ); } - //------------------------------------------------------------------------------------------------------------------ void StorageTextOutputStream::writeLine() { m_pData->xTextOutput->writeString( lcl_getLineFeed() ); } -//...................................................................................................................... } // namespace dbaccess -//...................................................................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/storagetextstream.hxx b/dbaccess/source/core/recovery/storagetextstream.hxx index 57c4599a05ba..289031cb20a8 100644 --- a/dbaccess/source/core/recovery/storagetextstream.hxx +++ b/dbaccess/source/core/recovery/storagetextstream.hxx @@ -24,14 +24,10 @@ #include <memory> -//...................................................................................................................... namespace dbaccess { -//...................................................................................................................... - //================================================================================================================== - //= StorageTextStream - //================================================================================================================== + // StorageTextStream struct StorageTextOutputStream_Data; class DBACCESS_DLLPRIVATE StorageTextOutputStream : public StorageOutputStream { @@ -50,9 +46,7 @@ namespace dbaccess ::std::auto_ptr< StorageTextOutputStream_Data > m_pData; }; -//...................................................................................................................... } // namespace dbaccess -//...................................................................................................................... #endif // STORAGETEXTSTREAM_HXX diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx index 39a828ea589e..06ef1bdea858 100644 --- a/dbaccess/source/core/recovery/storagexmlstream.cxx +++ b/dbaccess/source/core/recovery/storagexmlstream.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "storagexmlstream.hxx" #include <com/sun/star/xml/sax/XDocumentHandler.hpp> @@ -32,10 +31,8 @@ #include <stack> -//...................................................................................................................... namespace dbaccess { -//...................................................................................................................... using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -61,9 +58,7 @@ namespace dbaccess using ::com::sun::star::xml::sax::XParser; using ::com::sun::star::xml::sax::InputSource; - //================================================================================================================== - //= StorageXMLOutputStream_Data - //================================================================================================================== + // StorageXMLOutputStream_Data struct StorageXMLOutputStream_Data { Reference< XDocumentHandler > xHandler; @@ -71,10 +66,7 @@ namespace dbaccess ::rtl::Reference< SvXMLAttributeList > xAttributes; }; - //================================================================================================================== - //= StorageXMLOutputStream - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // StorageXMLOutputStream StorageXMLOutputStream::StorageXMLOutputStream( const Reference<XComponentContext>& i_rContext, const Reference< XStorage >& i_rParentStorage, const OUString& i_rStreamName ) @@ -90,12 +82,10 @@ namespace dbaccess m_pData->xAttributes = new SvXMLAttributeList; } - //------------------------------------------------------------------------------------------------------------------ StorageXMLOutputStream::~StorageXMLOutputStream() { } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::close() { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "illegal document handler" ); @@ -104,13 +94,11 @@ namespace dbaccess // endDocument } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::addAttribute( const OUString& i_rName, const OUString& i_rValue ) const { m_pData->xAttributes->AddAttribute( i_rName, i_rValue ); } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::startElement( const OUString& i_rElementName ) const { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); @@ -120,7 +108,6 @@ namespace dbaccess m_pData->aElements.push( i_rElementName ); } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::endElement() const { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); @@ -131,7 +118,6 @@ namespace dbaccess m_pData->aElements.pop(); } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::ignorableWhitespace( const OUString& i_rWhitespace ) const { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); @@ -139,7 +125,6 @@ namespace dbaccess m_pData->xHandler->ignorableWhitespace( i_rWhitespace ); } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLOutputStream::characters( const OUString& i_rCharacters ) const { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); @@ -147,18 +132,13 @@ namespace dbaccess m_pData->xHandler->characters( i_rCharacters ); } - //================================================================================================================== - //= StorageXMLInputStream_Data - //================================================================================================================== + // StorageXMLInputStream_Data struct StorageXMLInputStream_Data { Reference< XParser > xParser; }; - //================================================================================================================== - //= StorageXMLInputStream - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // StorageXMLInputStream StorageXMLInputStream::StorageXMLInputStream( const Reference<XComponentContext>& i_rContext, const Reference< XStorage >& i_rParentStorage, const OUString& i_rStreamName ) @@ -168,7 +148,6 @@ namespace dbaccess m_pData->xParser.set( Parser::create(i_rContext) ); } - //------------------------------------------------------------------------------------------------------------------ void StorageXMLInputStream::import( const Reference< XDocumentHandler >& i_rHandler ) { ENSURE_OR_THROW( i_rHandler.is(), "illegal document handler (NULL)" ); @@ -180,13 +159,10 @@ namespace dbaccess m_pData->xParser->parseStream( aInputSource ); } - //------------------------------------------------------------------------------------------------------------------ StorageXMLInputStream::~StorageXMLInputStream() { } -//...................................................................................................................... } // namespace dbaccess -//...................................................................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/storagexmlstream.hxx b/dbaccess/source/core/recovery/storagexmlstream.hxx index 8fdb7305e274..435246a634f0 100644 --- a/dbaccess/source/core/recovery/storagexmlstream.hxx +++ b/dbaccess/source/core/recovery/storagexmlstream.hxx @@ -27,14 +27,10 @@ #include <memory> -//........................................................................ namespace dbaccess { -//........................................................................ - //==================================================================== - //= StorageXMLOutputStream - //==================================================================== + // StorageXMLOutputStream struct StorageXMLOutputStream_Data; class DBACCESS_DLLPRIVATE StorageXMLOutputStream : public StorageOutputStream { @@ -66,9 +62,7 @@ namespace dbaccess ::std::auto_ptr< StorageXMLOutputStream_Data > m_pData; }; - //==================================================================== - //= StorageXMLInputStream - //==================================================================== + // StorageXMLInputStream struct StorageXMLInputStream_Data; class DBACCESS_DLLPRIVATE StorageXMLInputStream : public StorageInputStream { @@ -93,9 +87,7 @@ namespace dbaccess ::std::auto_ptr< StorageXMLInputStream_Data > m_pData; }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // STORAGEXMLSTREAM_HXX diff --git a/dbaccess/source/core/recovery/subcomponentloader.cxx b/dbaccess/source/core/recovery/subcomponentloader.cxx index 5dd294daa6c2..25bf9d8f4bb2 100644 --- a/dbaccess/source/core/recovery/subcomponentloader.cxx +++ b/dbaccess/source/core/recovery/subcomponentloader.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "subcomponentloader.hxx" #include <com/sun/star/ucb/Command.hpp> @@ -25,10 +24,8 @@ #include <tools/diagnose_ex.h> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +48,7 @@ namespace dbaccess using ::com::sun::star::frame::XController2; using ::com::sun::star::lang::XComponent; - //==================================================================== - //= SubComponentLoader - //==================================================================== + // SubComponentLoader struct DBACCESS_DLLPRIVATE SubComponentLoader_Data { const Reference< XCommandProcessor > xDocDefCommands; @@ -73,12 +68,9 @@ namespace dbaccess } }; - //==================================================================== - //= helper - //==================================================================== + // helper namespace { - //................................................................ void lcl_onWindowShown_nothrow( const SubComponentLoader_Data& i_rData ) { try @@ -106,10 +98,7 @@ namespace dbaccess } } - //==================================================================== - //= SubComponentLoader - //==================================================================== - //-------------------------------------------------------------------- + // SubComponentLoader SubComponentLoader::SubComponentLoader( const Reference< XController >& i_rApplicationController, const Reference< XCommandProcessor >& i_rSubDocumentDefinition ) :m_pData( new SubComponentLoader_Data( i_rSubDocumentDefinition ) ) @@ -125,7 +114,6 @@ namespace dbaccess osl_atomic_decrement( &m_refCount ); } - //-------------------------------------------------------------------- SubComponentLoader::SubComponentLoader( const Reference< XController >& i_rApplicationController, const Reference< XComponent >& i_rNonDocumentComponent ) :m_pData( new SubComponentLoader_Data( i_rNonDocumentComponent ) ) @@ -141,27 +129,23 @@ namespace dbaccess osl_atomic_decrement( &m_refCount ); } - //-------------------------------------------------------------------- SubComponentLoader::~SubComponentLoader() { delete m_pData, m_pData = NULL; } - //-------------------------------------------------------------------- void SAL_CALL SubComponentLoader::windowResized( const WindowEvent& i_rEvent ) throw (RuntimeException) { // not interested in (void)i_rEvent; } - //-------------------------------------------------------------------- void SAL_CALL SubComponentLoader::windowMoved( const WindowEvent& i_rEvent ) throw (RuntimeException) { // not interested in (void)i_rEvent; } - //-------------------------------------------------------------------- void SAL_CALL SubComponentLoader::windowShown( const EventObject& i_rEvent ) throw (RuntimeException) { (void)i_rEvent; @@ -170,22 +154,18 @@ namespace dbaccess m_pData->xAppComponentWindow->removeWindowListener( this ); } - //-------------------------------------------------------------------- void SAL_CALL SubComponentLoader::windowHidden( const EventObject& i_rEvent ) throw (RuntimeException) { // not interested in (void)i_rEvent; } - //-------------------------------------------------------------------- void SAL_CALL SubComponentLoader::disposing( const EventObject& i_rEvent ) throw (RuntimeException) { // not interested in (void)i_rEvent; } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/subcomponentloader.hxx b/dbaccess/source/core/recovery/subcomponentloader.hxx index decae4450f50..bbe02b9f1105 100644 --- a/dbaccess/source/core/recovery/subcomponentloader.hxx +++ b/dbaccess/source/core/recovery/subcomponentloader.hxx @@ -29,14 +29,10 @@ #include <cppuhelper/implbase1.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ - //==================================================================== - //= SubComponentLoader - //==================================================================== + // SubComponentLoader typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XWindowListener > SubComponentLoader_Base; struct SubComponentLoader_Data; @@ -72,9 +68,7 @@ namespace dbaccess SubComponentLoader_Data* m_pData; }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // SUBCOMPONENTLOADER_HXX diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index 09817873241a..c755d8458a75 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "subcomponentrecovery.hxx" #include "sdbcoretools.hxx" @@ -40,10 +39,8 @@ #include <xmloff/XMLSettingsExportContext.hxx> #include <xmloff/SettingsExportHelper.hxx> -//........................................................................ namespace dbaccess { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -80,13 +77,9 @@ namespace dbaccess namespace ElementModes = ::com::sun::star::embed::ElementModes; - - //==================================================================== - //= helper - //==================================================================== + // helper namespace { - // ......................................................................... static const OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType ) { static const OUString s_sFormBaseName( "form" ); @@ -113,7 +106,6 @@ namespace dbaccess return s_sFallback; } - // ......................................................................... static SubComponentType lcl_databaseObjectToSubComponentType( const sal_Int32 i_nObjectType ) { switch ( i_nObjectType ) @@ -128,7 +120,6 @@ namespace dbaccess return UNKNOWN; } - // ......................................................................... static bool lcl_determineReadOnly( const Reference< XComponent >& i_rComponent ) { Reference< XModel > xDocument( i_rComponent, UNO_QUERY ); @@ -145,7 +136,6 @@ namespace dbaccess return aDocArgs.getOrDefault( "ReadOnly", false ); } - // ......................................................................... static Reference< XCommandProcessor > lcl_getSubComponentDef_nothrow( const Reference< XDatabaseDocumentUI >& i_rAppUI, const SubComponentType i_eType, const OUString& i_rName ) { @@ -188,9 +178,7 @@ namespace dbaccess } } - //==================================================================== - //= SettingsExportContext - //==================================================================== + // SettingsExportContext class DBACCESS_DLLPRIVATE SettingsExportContext : public ::xmloff::XMLSettingsExportContext { public: @@ -227,19 +215,16 @@ namespace dbaccess const OUStringBuffer m_aNamespace; }; - //-------------------------------------------------------------------- void SettingsExportContext::AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName, const OUString& i_rValue ) { m_rDelegator.addAttribute( impl_prefix( i_eName ), i_rValue ); } - //-------------------------------------------------------------------- void SettingsExportContext::AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName, enum ::xmloff::token::XMLTokenEnum i_eValue ) { m_rDelegator.addAttribute( impl_prefix( i_eName ), ::xmloff::token::GetXMLToken( i_eValue ) ); } - //-------------------------------------------------------------------- void SettingsExportContext::StartElement( enum ::xmloff::token::XMLTokenEnum i_eName, const sal_Bool i_bIgnoreWhitespace ) { if ( i_bIgnoreWhitespace ) @@ -248,7 +233,6 @@ namespace dbaccess m_rDelegator.startElement( impl_prefix( i_eName ) ); } - //-------------------------------------------------------------------- void SettingsExportContext::EndElement( const sal_Bool i_bIgnoreWhitespace ) { if ( i_bIgnoreWhitespace ) @@ -256,21 +240,17 @@ namespace dbaccess m_rDelegator.endElement(); } - //-------------------------------------------------------------------- void SettingsExportContext::Characters( const OUString& i_rCharacters ) { m_rDelegator.characters( i_rCharacters ); } - //-------------------------------------------------------------------- Reference< com::sun::star::uno::XComponentContext > SettingsExportContext::GetComponentContext() const { return m_rContext; } - //================================================================================================================== - //= SettingsDocumentHandler - //================================================================================================================== + // SettingsDocumentHandler typedef ::cppu::WeakImplHelper1 < XDocumentHandler > SettingsDocumentHandler_Base; class DBACCESS_DLLPRIVATE SettingsDocumentHandler : public SettingsDocumentHandler_Base @@ -303,17 +283,14 @@ namespace dbaccess ::comphelper::NamedValueCollection m_aSettings; }; - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::startDocument( ) throw (SAXException, RuntimeException) { } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::endDocument( ) throw (SAXException, RuntimeException) { } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::startElement( const OUString& i_Name, const Reference< XAttributeList >& i_Attribs ) throw (SAXException, RuntimeException) { ::rtl::Reference< SettingsImport > pNewState; @@ -345,7 +322,6 @@ namespace dbaccess m_aStates.push( pNewState ); } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::endElement( const OUString& i_Name ) throw (SAXException, RuntimeException) { ENSURE_OR_THROW( !m_aStates.empty(), "no active element" ); @@ -356,7 +332,6 @@ namespace dbaccess m_aStates.pop(); } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::characters( const OUString& i_Chars ) throw (SAXException, RuntimeException) { ENSURE_OR_THROW( !m_aStates.empty(), "no active element" ); @@ -365,14 +340,12 @@ namespace dbaccess pCurrentState->characters( i_Chars ); } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::ignorableWhitespace( const OUString& aWhitespaces ) throw (SAXException, RuntimeException) { // ignore them - that's why they're called "ignorable" (void)aWhitespaces; } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::processingInstruction( const OUString& i_Target, const OUString& i_Data ) throw (SAXException, RuntimeException) { OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." ); @@ -380,16 +353,12 @@ namespace dbaccess (void)i_Data; } - //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::setDocumentLocator( const Reference< XLocator >& i_Locator ) throw (SAXException, RuntimeException) { (void)i_Locator; } - //==================================================================== - //= SubComponentRecovery - //==================================================================== - //-------------------------------------------------------------------- + // SubComponentRecovery const OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType ) { static const OUString s_sFormsStorageName( "forms" ); @@ -419,7 +388,6 @@ namespace dbaccess return s_sFallback; } - //-------------------------------------------------------------------- void SubComponentRecovery::saveToRecoveryStorage( const Reference< XStorage >& i_rRecoveryStorage, MapCompTypeToCompDescs& io_mapCompDescs ) { @@ -466,7 +434,6 @@ namespace dbaccess rMapCompDescs[ sStorName ] = m_aCompDesc; } - //-------------------------------------------------------------------- void SubComponentRecovery::impl_identifyComponent_throw() { // ask the controller @@ -518,7 +485,6 @@ namespace dbaccess "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the component!" ); } - //-------------------------------------------------------------------- void SubComponentRecovery::impl_saveQueryDesign_throw( const Reference< XStorage >& i_rObjectStorage ) { ENSURE_OR_THROW( m_eType == QUERY, "illegal sub component type" ); @@ -547,7 +513,6 @@ namespace dbaccess aDesignOutput.close(); } - //-------------------------------------------------------------------- void SubComponentRecovery::impl_saveSubDocument_throw( const Reference< XStorage >& i_rObjectStorage ) { ENSURE_OR_THROW( ( m_eType == FORM ) || ( m_eType == REPORT ), "illegal sub component type" ); @@ -558,7 +523,6 @@ namespace dbaccess xStorageDocument->storeToStorage( i_rObjectStorage, Sequence< PropertyValue >() ); } - //-------------------------------------------------------------------- Reference< XComponent > SubComponentRecovery::impl_recoverSubDocument_throw( const Reference< XStorage >& i_rRecoveryStorage, const OUString& i_rComponentName, const bool i_bForEditing ) { @@ -608,7 +572,6 @@ namespace dbaccess return xSubComponent; } - //-------------------------------------------------------------------- Reference< XComponent > SubComponentRecovery::impl_recoverQueryDesign_throw( const Reference< XStorage >& i_rRecoveryStorage, const OUString& i_rComponentName, const bool i_bForEditing ) { @@ -662,7 +625,6 @@ namespace dbaccess return xSubComponent; } - //-------------------------------------------------------------------- Reference< XComponent > SubComponentRecovery::recoverFromStorage( const Reference< XStorage >& i_rRecoveryStorage, const OUString& i_rComponentName, const bool i_bForEditing ) { @@ -683,8 +645,6 @@ namespace dbaccess return xSubComponent; } -//........................................................................ } // namespace dbaccess -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.hxx b/dbaccess/source/core/recovery/subcomponentrecovery.hxx index 6c4cac5f99f1..81146f7d5f04 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.hxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.hxx @@ -26,14 +26,10 @@ #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -//........................................................................ namespace dbaccess { -//........................................................................ - //==================================================================== - //= SubComponentRecovery - //==================================================================== + // SubComponentRecovery class DBACCESS_DLLPRIVATE SubComponentRecovery { public: @@ -114,10 +110,7 @@ namespace dbaccess SubComponentDescriptor m_aCompDesc; }; - -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // SUBCOMPONENTRECOVERY_HXX diff --git a/dbaccess/source/core/recovery/subcomponents.hxx b/dbaccess/source/core/recovery/subcomponents.hxx index fe9e9d8a3011..0afd22ceaf41 100644 --- a/dbaccess/source/core/recovery/subcomponents.hxx +++ b/dbaccess/source/core/recovery/subcomponents.hxx @@ -29,14 +29,11 @@ #include <boost/unordered_map.hpp> #include <map> -//........................................................................ namespace dbaccess { -//........................................................................ namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; - // ------------------------------------------------------------------- enum SubComponentType { TABLE = DatabaseObject::TABLE, @@ -49,7 +46,6 @@ namespace dbaccess UNKNOWN = 10001 }; - // ------------------------------------------------------------------- struct DBACCESS_DLLPRIVATE SubComponentDescriptor { OUString sName; @@ -68,14 +64,10 @@ namespace dbaccess } }; - // ------------------------------------------------------------------- typedef ::boost::unordered_map< OUString, SubComponentDescriptor, OUStringHash > MapStringToCompDesc; typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs; - -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // SUBCOMPONENTS_HXX diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx index 01284eb516ec..66140cf7c948 100644 --- a/dbaccess/source/core/resource/core_resource.cxx +++ b/dbaccess/source/core/resource/core_resource.cxx @@ -17,24 +17,19 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "core_resource.hxx" #include <tools/resmgr.hxx> // ---- needed as long as we have no contexts for components --- #include <vcl/svapp.hxx> -//--------------------------------------------------- #include <rtl/instance.hxx> #include <svl/solar.hrc> -//......................................................................... namespace dbaccess { - //================================================================== - //= ResourceManager - //================================================================== + // ResourceManager namespace { // access safety @@ -44,7 +39,6 @@ namespace dbaccess sal_Int32 ResourceManager::s_nClients = 0; ResMgr* ResourceManager::m_pImpl = NULL; - //------------------------------------------------------------------ void ResourceManager::ensureImplExists() { if (m_pImpl) @@ -53,7 +47,6 @@ namespace dbaccess m_pImpl = ResMgr::CreateResMgr("dba", Application::GetSettings().GetUILanguageTag()); } - //------------------------------------------------------------------ OUString ResourceManager::loadString(sal_uInt16 _nResId) { OUString sReturn; @@ -65,14 +58,12 @@ namespace dbaccess return sReturn; } - //------------------------------------------------------------------ OUString ResourceManager::loadString( sal_uInt16 _nResId, const sal_Char* _pPlaceholderAscii, const OUString& _rReplace ) { OUString sString( loadString( _nResId ) ); return sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii), _rReplace ); } - //------------------------------------------------------------------ OUString ResourceManager::loadString( sal_uInt16 _nResId, const sal_Char* _pPlaceholderAscii1, const OUString& _rReplace1, const sal_Char* _pPlaceholderAscii2, const OUString& _rReplace2 ) { @@ -82,14 +73,12 @@ namespace dbaccess return sString; } - //------------------------------------------------------------------------- void ResourceManager::registerClient() { ::osl::MutexGuard aGuard(theResourceManagerMutex::get()); ++s_nClients; } - //------------------------------------------------------------------------- void ResourceManager::revokeClient() { ::osl::MutexGuard aGuard(theResourceManagerMutex::get()); @@ -99,8 +88,6 @@ namespace dbaccess m_pImpl = NULL; } } -//......................................................................... } -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |